1function changerStyleHgt(div,compare) { 2 if (document.getElementById(div).className == compare) { 3 document.getElementById(div).className = compare + 'Roll'; 4 } else { 5 document.getElementById(div).className = compare; 6 } 7} 8function show_hide(nom) 9{ 10 if (document.getElementById(nom).style.display!='none') { 11 document.getElementById(nom).style.display='none'; 12 } else { 13 document.getElementById(nom).style.display='block'; 14 } 15} 16 17var fullsize=0; 18function setHgt(compare, tagName) 19{ 20 fullsize=0; 21 var divcnt=0; 22 var divPntr = new Array(); 23 var divset = document.getElementsByTagName(tagName); 24 var i = 0; 25 for (i=0;i<divset.length;i++) { 26 if(divset[i].id.substr(0,compare.length)==compare) { 27 divPntr[divcnt]=i; 28 divcnt++; 29 fullsize=Math.max(divset[i].offsetHeight,fullsize); 30 } 31 } 32 for (i=0;i<divcnt;i++) { 33 pntr=divPntr[i]; 34 divset[pntr].style.height=fullsize+'px'; 35 } 36} 37var tabImages = new Array(); 38var tabImages_ids = new Array(); 39var nb_images_loaded = 0; 40var loading_finished = -1; 41function diaLoadImage(imgId, filename) 42{ 43 nb_images_loaded++; 44 var l = tabImages.length; 45 tabImages_ids[l] = imgId; 46 tabImages[l] = new Image(); 47 // Small patch for f*****g firefox bugguy cache 48 if (navigator.userAgent.indexOf("Firefox")!=-1) 49 { 50 var d = new Date(); 51 //tabImages[l].src = filename + '?'+d.getMinutes()+d.getSeconds()+d.getMilliseconds(); 52 tabImages[l].src = filename; 53 document.getElementById(tabImages_ids[l]).src = filename; 54 } 55 else 56 { 57 //var d = new Date(); 58 //tabImages[l].src = filename+ '?'+d.getMinutes()+d.getSeconds(); 59 tabImages[l].src = filename; 60 //document.getElementById(tabImages_ids[l]).src = filename + '?'+d.getMinutes()+d.getSeconds(); 61 document.getElementById(tabImages_ids[l]).src = filename; 62 } 63 tabImages[l].title = imgId; 64 tabImages[l].onload=loaded; 65 tabImages[l].onError=error; 66 tabImages[l].onAbort=abort; 67} 68function abort() 69{ 70 alert(this.src + 'aborted!'); 71} 72function error() 73{ 74 alert(this.src + 'errored!'); 75} 76function loaded() 77{ 78 document.getElementById(this.title).src = this.src; 79 nb_images_loaded--; 80} 81var prev1_nb_imgok = 50; 82var prev2_nb_imgok = 40; 83var prev3_nb_imgok = 30; 84var prev4_nb_imgok = 20; 85var prev5_nb_imgok = 10; 86function checkBeforeSetHgt(compare, tagName, evalStr) 87{ 88 var l = tabImages.length; 89 var pas_ok = l; 90 for (var i=0; i<l ; i++) 91 { 92 if (tabImages[i].complete) 93 { 94//alert(tabImages_ids[i]); 95// mise en commentaire de a ligne ci-dessous car déjà fait dans le loaded() 96 // document.getElementById(tabImages_ids[i]).src = tabImages[i].src; 97 pas_ok--; 98 } 99 } 100 if (pas_ok && (prev1_nb_imgok==prev2_nb_imgok==prev3_nb_imgok==prev4_nb_imgok==prev5_nb_imgok==nb_images_loaded)) 101 { 102 pas_ok=false; 103 } 104 else 105 { 106 prev5_nb_imgok=prev4_nb_imgok; 107 prev4_nb_imgok=prev3_nb_imgok; 108 prev3_nb_imgok=prev2_nb_imgok; 109 prev2_nb_imgok=prev1_nb_imgok; 110 prev1_nb_imgok=nb_images_loaded; 111 } 112 if (pas_ok) 113 { 114 setTimeout('checkBeforeSetHgt(\''+compare+'\',\''+tagName+'\', "'+evalStr+'");', 200); 115 //setTimeout('checkBeforeSetHgt(\''+compare+'\',\''+tagName+'\');', 200); 116 } 117 else 118 { 119 setHgt(compare,tagName); 120 loading_finished = 1; 121 eval(evalStr); 122 if (window.location.hash && jQuery(window.location.hash).length) 123 { 124 jQuery("body, html").animate({ 125 'scrollTop': jQuery(window.location.hash).offset().top 126 }, 100); 127 } 128 } 129} 130function checkBeforeScrollAnchor(anchor) 131{ 132 var l = tabImages.length; 133 var pas_ok = l; 134 for (var i=0; i<l ; i++) 135 { 136 if (tabImages[i].complete) 137 { 138//alert(tabImages_ids[i]); 139// mise en commentaire de a ligne ci-dessous car déjà fait dans le loaded() 140 // document.getElementById(tabImages_ids[i]).src = tabImages[i].src; 141 pas_ok--; 142 } 143 } 144 if (pas_ok && (prev1_nb_imgok==prev2_nb_imgok==prev3_nb_imgok==prev4_nb_imgok==prev5_nb_imgok==nb_images_loaded)) 145 { 146 pas_ok=false; 147 } 148 else 149 { 150 prev5_nb_imgok=prev4_nb_imgok; 151 prev4_nb_imgok=prev3_nb_imgok; 152 prev3_nb_imgok=prev2_nb_imgok; 153 prev2_nb_imgok=prev1_nb_imgok; 154 prev1_nb_imgok=nb_images_loaded; 155 } 156 if (pas_ok) 157 { 158 setTimeout('checkBeforeScrollAnchor(\''+anchor+'\');', 200); 159 } 160 else 161 { 162 window.location.hash = anchor; 163 loading_finished = 1; 164 } 165} 166 167 168function checkBeforeEval(evalStr) 169{ 170 var l = tabImages.length; 171 var pas_ok = l; 172 for (var i=0; i<l ; i++) 173 { 174 if (tabImages[i].complete) 175 { 176 //alert(tabImages_ids[i]); 177 // mise en commentaire de a ligne ci-dessous car déjà fait dans le loaded() 178 // document.getElementById(tabImages_ids[i]).src = tabImages[i].src; 179 pas_ok--; 180 } 181 } 182 if (pas_ok && (prev1_nb_imgok==prev2_nb_imgok==prev3_nb_imgok==prev4_nb_imgok==prev5_nb_imgok==nb_images_loaded)) 183 { 184 pas_ok=false; 185 } 186 else 187 { 188 prev5_nb_imgok=prev4_nb_imgok; 189 prev4_nb_imgok=prev3_nb_imgok; 190 prev3_nb_imgok=prev2_nb_imgok; 191 prev2_nb_imgok=prev1_nb_imgok; 192 prev1_nb_imgok=nb_images_loaded; 193 } 194 if (pas_ok) 195 { 196 setTimeout('checkBeforeEval(\''+evalStr+'\');', 200); 197 } 198 else 199 { 200 eval(evalStr); 201 loading_finished = 1; 202 } 203} 204 205function diaSetHgtReset() 206{ 207 fullsize=0; 208 prev1_nb_imgok = 50; 209 prev2_nb_imgok = 40; 210 prev3_nb_imgok = 30; 211 prev4_nb_imgok = 20; 212 prev5_nb_imgok = 10; 213} 214; 215 216/*! lazysizes - v5.3.1 */ 217 218!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");
vendor: 5,660 bytes, line 218
218if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,"opacity")||1)>0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$]("data-expand"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);
vendor: 872 bytes, lines 218-219
218if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,"lazybeforesizes",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});; 219
vendor: 22,881 bytes, lines 220-221
220/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 221!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}
vendor: 1,967 bytes, line 221
221return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||
vendor: 9,546 bytes, line 221
221ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||
vendor: 8,814 bytes, line 221
221(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);
vendor: 14,182 bytes, line 221
221n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;
vendor: 4,590 bytes, line 221
221return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1)
vendor: 13,972 bytes, line 221
221);!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);
vendor: 9,033 bytes, line 221
221if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return
vendor: 2,709 bytes, lines 221-228
221M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce}); 222; 223 224/*! 225 * jQuery.ScrollTo 226 * Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 227 * Dual licensed under MIT and GPL. 228 *
229 * @projectDescription Easy element scrolling using jQuery. 230 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 231 * @author Ariel Flesler 232 * @version 1.4.7 233 234 * @id jQuery.scrollTo 235 * @id jQuery.fn.scrollTo 236 * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. 237 * The different options for target are: 238 * - A number position (will be applied to all axes). 239 * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes 240 * - A jQuery/DOM element ( logically, child of the element to scroll ) 241 * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) 242 * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. 243 * - A percentage of the container's dimension/s, for example: 50% to go to the middle. 244 * - The string 'max' for go-to-end. 245 * @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead. 246 * @param {Object,Function} settings Optional set of settings or the onAfter callback. 247 * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. 248 * @option {Number, Function} duration The OVERALL length of the animation. 249 * @option {Boolean} interrupt If true, the scrolling animation will stop on user scroll 250 * @option {String} easing The easing method for the animation. 251 * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. 252 * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. 253 * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. 254 * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. 255 * @option {Function} onAfter Function to be called after the scrolling ends. 256 * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. 257 * @return {jQuery} Returns the same jQuery object, for chaining. 258 * 259 * @desc Scroll to a fixed position 260 * @example $('#container').scrollTo( 340 ); 261 * 262 * @desc Scroll relatively to the actual position 263 * @example $('#container').scrollTo( '+=340px', { axis:'y' } ); 264 * 265 * @desc Scroll using a selector (relative to the scrolled element) 266 * @example $(window).scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); 267 * 268 * @desc Scroll to a DOM element (same for jQuery object) 269 * @example $(window).scrollTo( document.getElementById('element'), { duration:500, axis:'x', onAfter:function() { 270 * alert('scrolled!!'); 271 * }}); 272 * 273 * @desc Scroll on both axes, to different values 274 * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); 275 */ 276 277;(function( $ ) { 278 279 var $scrollTo = $.scrollTo = function( target, duration, settings ) { 280 return $(window).scrollTo( target, duration, settings ); 281 }; 282 283 $scrollTo.defaults = { 284 axis:'xy', 285 duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, 286 limit:true 287 }; 288 289 // Returns the element that needs to be animated to scroll the window. 290 // Kept for backwards compatibility (specially for localScroll & serialScroll) 291 $scrollTo.window = function( scope ) { 292 return $(window)._scrollable(); 293 }; 294 295 // Hack, hack, hack :) 296 // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) 297 $.fn._scrollable = function() { 298 return this.map(function() { 299 var elem = this, 300 isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; 301 302 if (!isWin) 303 return elem; 304 305 var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; 306 307 return /webkit/i.test(navigator.userAgent) || doc.compatMode == 'BackCompat' ? 308 doc.body : 309 doc.documentElement; 310 }); 311 }; 312 313 $.fn.scrollTo = function( target, duration, settings ) { 314 if (typeof duration == 'object') { 315 settings = duration; 316 duration = 0; 317 } 318 if (typeof settings == 'function') 319 settings = { onAfter:settings }; 320 321 if (target == 'max') 322 target = 9e9; 323 324 settings = $.extend( {}, $scrollTo.defaults, settings ); 325 // Speed is still recognized for backwards compatibility 326 duration = duration || settings.duration; 327 // Make sure the settings are given right 328 settings.queue = settings.queue && settings.axis.length > 1; 329 330 if (settings.queue) 331 // Let's keep the overall duration 332 duration /= 2; 333 settings.offset = both( settings.offset ); 334 settings.over = both( settings.over ); 335 336 return this._scrollable().each(function() { 337 // Null target yields nothing, just like jQuery does 338 if (target == null) return; 339 340 var elem = this, 341 $elem = $(elem), 342 targ = target, toff, attr = {}, 343 win = $elem.is('html,body'); 344 345 switch (typeof targ) { 346 // A number will pass the regex 347 case 'number': 348 case 'string': 349 if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { 350 targ = both( targ ); 351 // We are done 352 break; 353 } 354 // Relative selector, no break! 355 targ = $(targ,this); 356 if (!targ.length) return; 357 case 'object': 358 // DOMElement / jQuery 359 if (targ.is || targ.style) 360 // Get the real position of the target 361 toff = (targ = $(targ)).offset(); 362 } 363 $.each( settings.axis.split(''), function( i, axis ) { 364 var Pos = axis == 'x' ? 'Left' : 'Top', 365 pos = Pos.toLowerCase(), 366 key = 'scroll' + Pos, 367 old = elem[key], 368 max = $scrollTo.max(elem, axis); 369 370 if (toff) {// jQuery / DOMElement 371 attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); 372 373 // If it's a dom element, reduce the margin 374 if (settings.margin) { 375 attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; 376 attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; 377 } 378 379 attr[key] += settings.offset[pos] || 0; 380 381 if(settings.over[pos]) 382 // Scroll to a fraction of its width/height
383 attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; 384 } else { 385 var val = targ[pos]; 386 // Handle percentage values 387 attr[key] = val.slice && val.slice(-1) == '%' ? 388 parseFloat(val) / 100 * max 389 : val; 390 } 391 392 // Number or 'number' 393 if (settings.limit && /^\d+$/.test(attr[key])) 394 // Check the limits 395 attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); 396 397 // Queueing axes 398 if (!i && settings.queue) { 399 // Don't waste time animating, if there's no need. 400 if (old != attr[key]) 401 // Intermediate animation 402 animate( settings.onAfterFirst ); 403 // Don't animate this axis again in the next iteration. 404 delete attr[key]; 405 } 406 }); 407 408 animate( settings.onAfter ); 409 410 function animate( callback ) { 411 $elem.animate( attr, duration, settings.easing, callback && function() { 412 callback.call(this, targ, settings); 413 }); 414 }; 415 416 }).end(); 417 }; 418 419 // Max scrolling position, works on quirks mode 420 // It only fails (not too badly) on IE, quirks mode. 421 $scrollTo.max = function( elem, axis ) { 422 var Dim = axis == 'x' ? 'Width' : 'Height', 423 scroll = 'scroll'+Dim; 424 425 if (!$(elem).is('html,body')) 426 return elem[scroll] - $(elem)[Dim.toLowerCase()](); 427 428 var size = 'client' + Dim, 429 html = elem.ownerDocument.documentElement, 430 body = elem.ownerDocument.body; 431 432 return Math.max( html[scroll], body[scroll] ) 433 - Math.min( html[size] , body[size] ); 434 }; 435 436 function both( val ) { 437 return typeof val == 'object' ? val : { top:val, left:val }; 438 }; 439 440})( jQuery );; 441 442/* 443 * jQuery One Page Nav Plugin 444 * http://github.com/davist11/jQuery-One-Page-Nav 445 * 446 * Copyright (c) 2010 Trevor Davis (http://trevordavis.net) 447 * Dual licensed under the MIT and GPL licenses. 448 * Uses the same license as jQuery, see: 449 * http://jquery.org/license 450 * 451 * @version 3.0.0 452 * 453 * Example usage: 454 * $('#nav').onePageNav({ 455 * currentClass: 'current', 456 * changeHash: false, 457 * scrollSpeed: 750 458 * }); 459 */ 460 461;(function($, window, document, undefined){ 462 463 // our plugin constructor 464 var OnePageNav = function(elem, options){ 465 this.elem = elem; 466 this.$elem = $(elem); 467 this.options = options; 468 this.metadata = this.$elem.data('plugin-options'); 469 this.$win = $(window); 470 this.sections = {}; 471 this.didScroll = false; 472 this.$doc = $(document); 473 this.docHeight = this.$doc.height(); 474 }; 475 476 // the plugin prototype 477 OnePageNav.prototype = { 478 defaults: { 479 navItems: 'a', 480 currentClass: 'current', 481 changeHash: false, 482 easing: 'swing', 483 filter: '', 484 scrollSpeed: 750, 485 scrollThreshold: 0.5, 486 begin: false, 487 end: false, 488 scrollChange: false 489 }, 490 491 init: function() { 492 // Introduce defaults that can be extended either 493 // globally or using an object literal. 494 this.config = $.extend({}, this.defaults, this.options, this.metadata); 495 496 this.$nav = this.$elem.find(this.config.navItems); 497 498 //Filter any links out of the nav 499 if(this.config.filter !== '') { 500 this.$nav = this.$nav.filter(this.config.filter); 501 } 502 503 //Handle clicks on the nav 504 this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this)); 505 506 //Get the section positions 507 this.getPositions(); 508 509 //Handle scroll changes 510 this.bindInterval(); 511 512 //Update the positions on resize too 513 this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this)); 514 515 return this; 516 }, 517 518 adjustNav: function(self, $parent) { 519 self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass); 520 $parent.addClass(self.config.currentClass); 521 }, 522 523 bindInterval: function() { 524 var self = this; 525 var docHeight; 526 527 self.$win.on('scroll.onePageNav', function() { 528 self.didScroll = true; 529 }); 530 531 self.t = setInterval(function() { 532 docHeight = self.$doc.height(); 533 534 //If it was scrolled 535 if(self.didScroll) { 536 self.didScroll = false; 537 self.scrollChange(); 538 } 539 540 //If the document height changes 541 if(docHeight !== self.docHeight) { 542 self.docHeight = docHeight; 543 self.getPositions(); 544 } 545 }, 250); 546 }, 547 548 getHash: function($link) { 549 return $link.attr('href').split('#')[1]; 550 }, 551 552 getPositions: function() { 553 var self = this; 554 var linkHref; 555 var topPos; 556 var $target; 557 558 self.$nav.each(function() { 559 linkHref = self.getHash($(this)); 560 $target = $('#' + linkHref); 561 562 if($target.length) { 563 topPos = $target.offset().top; 564 self.sections[linkHref] = Math.round(topPos); 565 } 566 }); 567 }, 568 569 getSection: function(windowPos) { 570 var returnValue = null; 571 var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold); 572 573 for(var section in this.sections) { 574 if((this.sections[section] - windowHeight) < windowPos) { 575 returnValue = section; 576 } 577 } 578 579 return returnValue; 580 }, 581 582 handleClick: function(e) { 583 var self = this; 584 var $link = $(e.currentTarget); 585 var $parent = $link.parent(); 586 var newLoc = '#' + self.getHash($link); 587 588 if(!$parent.hasClass(self.config.currentClass)) { 589 //Start callback 590 if(self.config.begin) { 591 self.config.begin(); 592 } 593 594 //Change the highlighted nav item 595 self.adjustNav(self, $parent); 596 597 //Removing the auto-adjust on scroll 598 self.unbindInterval(); 599 600 //Scroll to the correct position 601 self.scrollTo(newLoc, function() { 602 //Do we need to change the hash? 603 if(self.config.changeHash) { 604 window.location.hash = newLoc; 605 } 606 607 //Add the auto-adjust on scroll back in 608 self.bindInterval(); 609 610 //End callback 611 if(self.config.end) { 612 self.config.end(); 613 } 614 }); 615 } 616 617 e.preventDefault(); 618 }, 619 620 scrollChange: function() { 621 var windowTop = this.$win.scrollTop();
vendor: 4,514 bytes, lines 622-759
622 var position = this.getSection(windowTop); 623 var $parent; 624 625 //If the position is set 626 if(position !== null) { 627 $parent = this.$elem.find('a[href$="#' + position + '"]').parent(); 628 629 //If it's not already the current section 630 if(!$parent.hasClass(this.config.currentClass)) { 631 //Change the highlighted nav item 632 this.adjustNav(this, $parent); 633 634 //If there is a scrollChange callback 635 if(this.config.scrollChange) { 636 this.config.scrollChange($parent); 637 } 638 } 639 } 640 }, 641 642 scrollTo: function(target, callback) { 643 var offset = $(target).offset().top; 644 645 $('html, body').animate({ 646 scrollTop: offset 647 }, this.config.scrollSpeed, this.config.easing, callback); 648 }, 649 650 unbindInterval: function() { 651 clearInterval(this.t); 652 this.$win.unbind('scroll.onePageNav'); 653 } 654 }; 655 656 OnePageNav.defaults = OnePageNav.prototype.defaults; 657 658 $.fn.onePageNav = function(options) { 659 return this.each(function() { 660 new OnePageNav(this, options).init(); 661 }); 662 }; 663 664})( jQuery, window , document );; 665 666/* 667 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 668 * 669 * Uses the built in easing capabilities added In jQuery 1.1 670 * to offer multiple easing options 671 * 672 * TERMS OF USE - jQuery Easing 673 * 674 * Open source under the BSD License. 675 * 676 * Copyright © 2008 George McGinley Smith 677 * All rights reserved. 678 * 679 * Redistribution and use in source and binary forms, with or without modification, 680 * are permitted provided that the following conditions are met: 681 * 682 * Redistributions of source code must retain the above copyright notice, this list of 683 * conditions and the following disclaimer. 684 * Redistributions in binary form must reproduce the above copyright notice, this list 685 * of conditions and the following disclaimer in the documentation and/or other materials 686 * provided with the distribution. 687 * 688 * Neither the name of the author nor the names of contributors may be used to endorse 689 * or promote products derived from this software without specific prior written permission. 690 * 691 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 692 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 693 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 694 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 695 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 696 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 697 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 698 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 699 * OF THE POSSIBILITY OF SUCH DAMAGE. 700 * 701*/ 702 703// t: current time, b: begInnIng value, c: change In value, d: duration 704jQuery.easing['jswing'] = jQuery.easing['swing']; 705 706jQuery.extend( jQuery.easing, 707{ 708 def: 'easeOutQuad', 709 swing: function (x, t, b, c, d) { 710 //alert(jQuery.easing.default); 711 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 712 }, 713 easeInQuad: function (x, t, b, c, d) { 714 return c*(t/=d)*t + b; 715 }, 716 easeOutQuad: function (x, t, b, c, d) { 717 return -c *(t/=d)*(t-2) + b; 718 }, 719 easeInOutQuad: function (x, t, b, c, d) { 720 if ((t/=d/2) < 1) return c/2*t*t + b; 721 return -c/2 * ((--t)*(t-2) - 1) + b; 722 }, 723 easeInCubic: function (x, t, b, c, d) { 724 return c*(t/=d)*t*t + b; 725 }, 726 easeOutCubic: function (x, t, b, c, d) { 727 return c*((t=t/d-1)*t*t + 1) + b; 728 }, 729 easeInOutCubic: function (x, t, b, c, d) { 730 if ((t/=d/2) < 1) return c/2*t*t*t + b; 731 return c/2*((t-=2)*t*t + 2) + b; 732 }, 733 easeInQuart: function (x, t, b, c, d) { 734 return c*(t/=d)*t*t*t + b; 735 }, 736 easeOutQuart: function (x, t, b, c, d) { 737 return -c * ((t=t/d-1)*t*t*t - 1) + b; 738 }, 739 easeInOutQuart: function (x, t, b, c, d) { 740 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 741 return -c/2 * ((t-=2)*t*t*t - 2) + b; 742 }, 743 easeInQuint: function (x, t, b, c, d) { 744 return c*(t/=d)*t*t*t*t + b; 745 }, 746 easeOutQuint: function (x, t, b, c, d) { 747 return c*((t=t/d-1)*t*t*t*t + 1) + b; 748 }, 749 easeInOutQuint: function (x, t, b, c, d) { 750 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 751 return c/2*((t-=2)*t*t*t*t + 2) + b; 752 }, 753 easeInSine: function (x, t, b, c, d) { 754 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 755 }, 756 easeOutSine: function (x, t, b, c, d) { 757 return c * Math.sin(t/d * (Math.PI/2)) + b; 758 }, 759 easeInOutSine: function (x, t, b, c, d) {
vendor: 4,186 bytes, lines 760-863
760 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 761 }, 762 easeInExpo: function (x, t, b, c, d) { 763 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 764 }, 765 easeOutExpo: function (x, t, b, c, d) { 766 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 767 }, 768 easeInOutExpo: function (x, t, b, c, d) { 769 if (t==0) return b; 770 if (t==d) return b+c; 771 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 772 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 773 }, 774 easeInCirc: function (x, t, b, c, d) { 775 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 776 }, 777 easeOutCirc: function (x, t, b, c, d) { 778 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 779 }, 780 easeInOutCirc: function (x, t, b, c, d) { 781 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 782 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 783 }, 784 easeInElastic: function (x, t, b, c, d) { 785 var s=1.70158;var p=0;var a=c; 786 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 787 if (a < Math.abs(c)) { a=c; var s=p/4; } 788 else var s = p/(2*Math.PI) * Math.asin (c/a); 789 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 790 }, 791 easeOutElastic: function (x, t, b, c, d) { 792 var s=1.70158;var p=0;var a=c; 793 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 794 if (a < Math.abs(c)) { a=c; var s=p/4; } 795 else var s = p/(2*Math.PI) * Math.asin (c/a); 796 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 797 }, 798 easeInOutElastic: function (x, t, b, c, d) { 799 var s=1.70158;var p=0;var a=c; 800 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 801 if (a < Math.abs(c)) { a=c; var s=p/4; } 802 else var s = p/(2*Math.PI) * Math.asin (c/a); 803 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 804 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 805 }, 806 easeInBack: function (x, t, b, c, d, s) { 807 if (s == undefined) s = 1.70158; 808 return c*(t/=d)*t*((s+1)*t - s) + b; 809 }, 810 easeOutBack: function (x, t, b, c, d, s) { 811 if (s == undefined) s = 1.70158; 812 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 813 }, 814 easeInOutBack: function (x, t, b, c, d, s) { 815 if (s == undefined) s = 1.70158; 816 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 817 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 818 }, 819 easeInBounce: function (x, t, b, c, d) { 820 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 821 }, 822 easeOutBounce: function (x, t, b, c, d) { 823 if ((t/=d) < (1/2.75)) { 824 return c*(7.5625*t*t) + b; 825 } else if (t < (2/2.75)) { 826 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 827 } else if (t < (2.5/2.75)) { 828 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 829 } else { 830 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 831 } 832 }, 833 easeInOutBounce: function (x, t, b, c, d) { 834 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 835 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 836 } 837}); 838 839/* 840 * 841 * TERMS OF USE - EASING EQUATIONS 842 * 843 * Open source under the BSD License. 844 * 845 * Copyright © 2001 Robert Penner 846 * All rights reserved. 847 * 848 * Redistribution and use in source and binary forms, with or without modification, 849 * are permitted provided that the following conditions are met: 850 * 851 * Redistributions of source code must retain the above copyright notice, this list of 852 * conditions and the following disclaimer. 853 * Redistributions in binary form must reproduce the above copyright notice, this list 854 * of conditions and the following disclaimer in the documentation and/or other materials 855 * provided with the distribution. 856 * 857 * Neither the name of the author nor the names of contributors may be used to endorse 858 * or promote products derived from this software without specific prior written permission. 859 * 860 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 861 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 862 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 863 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
864 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 865 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 866 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 867 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 868 * OF THE POSSIBILITY OF SUCH DAMAGE. 869 * 870 */; 871 872//var $jQuery = jQuery.noConflict(); 873 874function CalqueDepliant000444(params) 875{ 876 this.divObject = params.divObject; 877 this.hideDelay = params.hideDelay; 878 this.openDuration = params.openDuration; 879 this.hideDuration = params.hideDuration; 880 this.openEasing = params.openEasing; 881 this.hideEasing = params.hideEasing; 882 this.width = params.width; 883 this.hideWidth = params.hideWidth; 884 this.position =params.position; 885 this.initialStatus = params.initialStatus; 886 jQuery("#"+this.divObject).data("CalqueDepliant000444", this); 887// jQuery(document).ready(function() { this.start(); }); 888} 889 890CalqueDepliant000444.prototype = { 891setCookie: function(nom, valeur, expiration) { 892 document.cookie = nom + "=" + escape(valeur) + ((expiration == null) ? "" : ("; expires=" + expiration.toGMTString())); 893}, 894getCookie: function(nom) { 895 var recherche = nom+ "="; 896 if (document.cookie.length > 0) 897 { 898 offset = document.cookie.indexOf(recherche) ; 899 if (offset != -1) 900 { // si le cookie existe 901 offset += recherche.length; 902 // position du début 903 fin = document.cookie.indexOf(";",offset) ; 904 // position de la fin 905 if (fin == -1) 906 fin= document.cookie.length; 907 return unescape(document.cookie.substring(offset, fin)); 908 } 909 else return false; 910 } 911 else return false; 912}, 913DeleteCookie: function(name) { 914 var exp=new Date(); 915 exp.setTime (exp.getTime() - 100000); 916 var cval=getCookie(name); 917 document.cookie=name+"="+cval+"; expires="+exp.toGMTString(); 918}, 919 start: function() { 920 //var o = jQuery("#"+this.divObject).data("CalqueDepliant000223"); 921 //alert(o); 922 jQuery("#"+this.divObject).hover(function() { 923 var o = jQuery(this).data("CalqueDepliant000444"); 924 jQuery("#"+o.divObject).stop(true,true); 925 var a = {}; 926 eval("a."+o.position + " = 0"); 927 jQuery("#"+o.divObject).animate(a,{duration:o.openDuration, easing:o.openEasing}); 928 }, 929 function() { 930 var o = jQuery(this).data("CalqueDepliant000444"); 931 var a = {}; 932 eval("a."+o.position + " = -"+(o.width-o.hideWidth)); 933 //jQuery("#"+o.divObject).delay(o.hideDelay).animate(a,{duration:o.hideDuration,easing:o.hideEasing}); 934 setTimeout(function() {jQuery("#"+o.divObject).animate(a,{duration:o.hideDuration,easing:o.hideEasing})},o.hideDelay); 935 }); 936 if (this.initialStatus == 'closed') { 937 } else { 938 var a = {}; 939 eval("a."+this.position + " = 0"); 940 jQuery("#"+this.divObject).animate(a,{duration:this.hideDuration,easing:this.openEasing}); 941 } 942 jQuery("#"+this.divObject+" #bt_show").click(function () { 943 var o = jQuery(this).parent('div').data("CalqueDepliant000444"); 944 var a = {}; 945 eval("a."+o.position + " = 0"); 946 jQuery(this).parent('div').animate(a,{duration:o.openDuration,easing:o.openEasing}); 947 }); 948 jQuery("#"+this.divObject+" #bt_hide").click(function () { 949 var o = jQuery(this).parent('div').data("CalqueDepliant000444"); 950 var a = {}; 951 eval("a."+o.position + " = -"+(o.width-o.hideWidth)); 952 jQuery(this).parent('div').animate(a,{duration:o.hideDuration,easing:o.hideEasing}); 953 }); 954 jQuery("#"+this.divObject+" #bt_close").click(function () { 955 jQuery(this).parent('div').hide(); 956 }); 957 } 958}; 959 960; 961 962/*! jQuery UI - v1.14.1 - 2025-04-15 963* https://jqueryui.com 964* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js 965* Copyright OpenJS Foundation and other contributors; Licensed MIT */ 966 967!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";t.ui=t.ui||{},t.ui.version="1.14.1";var e,i,s=0,n=Array.prototype.hasOwnProperty,o=Array.prototype.slice;p=t.cleanData,t.cleanData=function(e){var i,s,n;for(n=0;null!=(s=e[n]);n++)(i=t._data(s,"events"))&&i.remove&&t(s).triggerHandler("remove");p(e)},t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];if("__proto__"===(e=e.split(".")[1])||"constructor"===e)return t.error("Invalid widget name: "+e);var h=l+"-"+e;return s||(s=i,i=t.Widget),Array.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr.pseudos[h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(s,function(t,e){if("function"!=typeof e){r[t]=e;return}r[t]=function(){function s(){return i.prototype[t].apply(this,arguments)}function n(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,o=this._superApply;return this._super=s,this._superApply=n,t=e.apply(this,arguments),this._super=i,this._superApply=o,t}}()}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n&&a.widgetEventPrefix||e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o}
vendor: 1,252 bytes, line 967
967,t.widget.extend=function(e){for(var i,s,a=o.call(arguments,1),r=0,l=a.length;r<l;r++)for(i in a[r])s=a[r][i],n.call(a[r],i)&&void 0!==s&&(t.isPlainObject(s)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):e[i]=s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var a="string"==typeof n,r=o.call(arguments,1),l=this;return a?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(l=o,!1):o?"function"!=typeof o[n]||"_"===n.charAt(0)?t.error("no such method '"+n+"' for "+e+" widget instance"):(i=o[n].apply(o,r))!==o&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0:t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):l=void 0:(r.length&&(n=t.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=s
vendor: 11,359 bytes, line 967
967++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0==arguments.length)return t.widget.extend({},this.options);if("string"==typeof e){if(a={},e=(s=e.split(".")).shift(),s.length){for(o=0,n=a[e]=t.widget.extend({},this.options[e]);o<s.length-1;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1==arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1==arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var i=[],s=this;function n(n,o){var a,r;for(r=0;r<n.length;r++)a=s.classesElementLookup[n[r]]||t(),e.add?(function(){var i=[];e.element.each(function(e,n){t.map(s.classesElementLookup,function(t){return t}).some(function(t){return t.is(n)})||i.push(n)}),s._on(t(i),{remove:"_untrackClassesElement"})}(),a=t(t.uniqueSort(a.get().concat(e.element.get())))):a=t(a.not(e.element).get()),s.classesElementLookup[n[r]]=a,i.push(n[r]),o&&e.classes[n[r]]&&i.push(e.classes[n[r]])}return(e=t.extend({element:this.element,classes:this.options.classes||{}},e)).keys&&n(e.keys.match(/\S+/g)||[],!0),e.extra&&n(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))}),this._off(t(e.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){if(!(!e&&(!0===o.options.disabled||t(this).hasClass("ui-state-disabled"))))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!("function"==typeof a&&!1===a.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})?n={duration:n}:!0===n&&(n={}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){var e,i=Math.max,s=Math.abs,n=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,l=/%$/,h=t.fn.position;function c(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function u(e,i){return parseInt(t.css(e,i),10)||0}function d(t){return null!=t&&t===t.window}t.position={scrollbarWidth:function(){if(void 0!==e)return e;var i,s,n=t("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),i===(s=o.offsetWidth)&&(s=n[0].clientWidth),n.remove(),e=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=d(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:s||n?{left:0,top:0}:t(e).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return h.apply(this,arguments);var l,p,f,g,m,_,v,b="string"==typeof(e=t.extend({},e)).of?t(document).find(e.of):t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return v=9===(l=b[0]).nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:d(l)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:l.preventDefault?{width:0,height:0,offset:{top:l.pageY,left:l.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()},b[0].preventDefault&&(e.at="left top"),f=v.width,g=v.height,m=v.offset,_=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=n.test(s[0])?s.concat(["center"]):o.test(s[0])?["center"].concat(s):["center","center"]),s[0]=n.test(s[0])?s[0]:"center",s[1]=o.test(s[1])?s[1]:"center",t=a.exec(s[0]),i=a.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[r.exec(s[0])[0],r.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?_.left+=f:"center"===e.at[0]&&(_.left+=f/2),"bottom"===e.at[1]?_.top+=g:"center"===e.at[1]&&(_.top+=g/2),p=c(k.at,f,g),_.left+=p[0],_.top+=p[1],this.each(function(){var n,o,a=t(this),r=a.outerWidth(),l=a.outerHeight(),h=u(this,"marginLeft"),d=u(this,"marginTop"),v=r+h+u(this,"marginRight")+w.width,C=l+d+u(this,"marginBottom")+w.height,D=t.extend({},_),I=c(k.my,a.outerWidth(),a.outerHeight());"right"===e.my[0]?D.left-=r:"center"===e.my[0]&&(D.left-=r/2),"bottom"===e.my[1]?D.top-=l:"center"===e.my[1]&&(D.top-=l/2),D.left+=I[0],D.top+=I[1],n={marginLeft:h,marginTop:d},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](D,{targetWidth:f,targetHeight:g,elemWidth:r,elemHeight:l,collisionPosition:n,collisionWidth:v,collisionHeight:C,offset:[p[0]+I[0],p[1]+I[1]],my:e.my,at:e.at,within:y,elem:a})}),e.using&&(o=function(t){var n=m.left-D.left,o=n+f-r,h=m.top-D.top,c=h+g-l,u={target:{element:b,left:m.left,top:m.top,width:f,height:g},element:{element:a,left:D.left,top:D.top,width:r,height:l},horizontal:o<0?"left":n>0?"right":"center",vertical:c<0?"top":h>0?"bottom":"middle"};f<r&&s(n+o)<f&&(u.horizontal="center"),g<l&&s(h+c)<g&&(u.vertical="middle"),i(s(n),s(o))>i(s(h),s(c))?u.important="horizontal":u.important="vertical",e.using.call(this,t,u)}),a.offset(t.extend(D,{using:o}))})},t.ui.position={fit:{left:function(t,e){var s,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,a=n.width,r=t.left-e.collisionPosition.marginLeft,l=o-r,h=r+e.collisionWidth-a-o;e.collisionWidth>a?l>0&&h<=0?(s=t.left+l+e.collisionWidth-a-o,t.left+=l-s):h>0&&l<=0?t.left=o:l>h?t.left=o+a-e.collisionWidth:t.left=o:l>0?t.left+=l:h>0?t.left-=h:t.left=i(t.left-r,t.left)},top:function(t,e){var s,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=o-r,h=r+e.collisionHeight-a-o;e.collisionHeight>a?l>0&&h<=0?(s=t.top+l+e.collisionHeight-a-o,t.top+=l-s):h>0&&l<=0?t.top=o:l>h?t.top=o+a-e.collisionHeight:t.top=o:l>0?t.top+=l:h>0?t.top-=h:t.top=i(t.top-r,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,a=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?((i=t.left+d+p+f+e.collisionWidth-r-a)<0||i<s(c))&&(t.left+=d+p+f):u>0&&((n=t.left-e.collisionPosition.marginLeft+d+p+f-l)>0||s(n)<u)&&(t.left+=d+p+f)},top:function(t,e){var i,n,o=e.within,a=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];c<0?((n=t.top+d+p+f+e.collisionHeight-r-a)<0||n<s(c))&&(t.top+=d+p+f):u>0&&((i=t.top-e.collisionPosition.marginTop+d+p+f-l)>0||s(i)<u)&&(t.top+=d+p+f)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr.pseudos,{data:t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}})}),t.fn.extend({disableSelection:(
vendor: 31,775 bytes, line 967
967f="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(f+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(e,i){var s,n,o,a,r,l=e.nodeName.toLowerCase();return"area"===l?(n=(s=e.parentNode).name,!!e.href&&!!n&&"map"===s.nodeName.toLowerCase()&&(o=t("img[usemap='#"+n+"']")).length>0&&o.is(":visible")):(/^(input|select|textarea|button|object)$/.test(l)?(a=!e.disabled)&&(r=t(e).closest("fieldset")[0])&&(a=!r.disabled):a="a"===l&&e.href||i,a&&t(e).is(":visible")&&"visible"===t(e).css("visibility"))},t.extend(t.expr.pseudos,{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=t(this.element.prop("form")),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.escapeSelector||(t.escapeSelector=function(t){return CSS.escape(t+"")}),t.fn.even&&t.fn.odd||t.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.labels=function(){var t,e,i,s,n;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(i=this.attr("id"))&&(n=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+CSS.escape(i)+"']",s=s.add(n.find(e).addBack(e))),this.pushStack(s)):this.pushStack([])},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr.pseudos,{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:(g=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++g)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}});var a=!1;t(document).on("mouseup",function(){a=!1}),t.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!a){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&t(e.target).closest(this.options.cancel).length;return!(s&&!n&&this._mouseCapture(e))||((this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted))?e.preventDefault():(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),a=!0),!0)}},_mouseMove:function(t){if(this._mouseMoved&&!t.which){if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return((t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted)?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,a=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.draggable",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=!0;return}this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!this.helper&&!i.disabled&&!(t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0].activeElement;!t(e.target).closest(i).length&&t(i).trigger("blur")},_mouseStart:function(e){var i=this.options;return(this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e))?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s="function"==typeof i.helper,n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];if(this.relativeContainer=null,!n.containment){this.containment=null;return}if("window"===n.containment){this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if("document"===n.containment){this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment.constructor===Array){this.containment=n.containment;return}"parent"===n.containment&&(n.containment=this.helper[0].parentNode),(s=(i=t(n.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){this.isOver?(this.isOver=0,s.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(e),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?((!n.axis||"x"!==n.axis)&&(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),(!n.axis||"y"!==n.axis)&&(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):((!n.axis||"x"!==n.axis)&&(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),(!n.axis||"y"!==n.axis)&&(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,l,h,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--){if(h=(l=s.snapElements[d].left-s.margins.left)+s.snapElements[d].width,u=(c=s.snapElements[d].top-s.margins.top)+s.snapElements[d].height,_<l-g||m>h+g||b<c-g||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)){s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1;continue}"inner"!==f.snapMode&&(n=Math.abs(c-b)<=g,o=Math.abs(u-v)<=g,a=Math.abs(l-_)<=g,r=Math.abs(h-m)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=Math.abs(c-v)<=g,o=Math.abs(u-b)<=g,a=Math.abs(l-m)<=g,r=Math.abs(h-_)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p}}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.14.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept="function"==typeof i?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!!s&&(s.currentItem||s.element)[0]!==this.element[0]&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return n=!0,!1}),!n&&!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),t.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n,o,a,r,l=(t.positionAbs||t.position.absolute).left+t.margins.left,h=(t.positionAbs||t.position.absolute).top+t.margins.top,c=l+t.helperProportions.width,u=h+t.helperProportions.height,d=e.offset.left,p=e.offset.top,f=d+e.proportions().width,g=p+e.proportions().height;switch(i){case"fit":return d<=l&&c<=f&&p<=h&&u<=g;case"intersect":return d<l+t.helperProportions.width/2&&c-t.helperProportions.width/2<f&&p<h+t.helperProportions.height/2&&u-t.helperProportions.height/2<g;case"pointer":return n=s.pageY,o=e.proportions().height,n>=p&&n<p+o&&(a=s.pageX,r=e.proportions().width,a>=d&&a<d+r);case"touch":return(h>=p&&h<=g||u>=p&&u<=g||h<p&&u>g)&&(l>=d&&l<=f||c>=d&&c<=f||l<d&&c>f);default:return!1}},t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<o.length;s++){if(!o[s].options.disabled&&(!e||o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;n<r.length;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n})).length&&((s=t(o[0]).droppable("instance")).greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!0===t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){var s,n=!1,o=t(e).css("overflow");if("hidden"===o)return!1;if("scroll"===o||e[s=i&&"left"===i?"scrollLeft":"scrollTop"]>0)return!0;try{e[s]=1,n=e[s]>0,e[s]=0}catch(t){}return n},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper
vendor: 18,027 bytes, line 967
967'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){!i.disabled&&(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){!i.disabled&&(s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide()))}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this._addedHandles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i<s.length;i++)n="ui-resizable-"+(e=String.prototype.trim.call(s[i])),o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.children(this.handles[e]).length||(this.element.append(o),this._addedHandles=this._addedHandles.add(o));this._renderAxis=function(e){var i,s,n,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o,a=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=t(a.containment).scrollLeft()||0,s+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this._helper||(o=this._calculateAdjustedElementDimensions(r)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width,height:o.height},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:o.width,height:o.height},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,l,h=this.options;return this._helper&&(n=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:this.sizeDiff.height,o=s?0:this.sizeDiff.width,a={width:this.helper.width()-o,height:this.helper.height()-n},r=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,l=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),i<o.maxWidth&&(o.maxWidth=i),n<o.maxHeight&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),n&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_calculateAdjustedElementDimensions:function(t){var e,i,s,n=t.get(0);return"content-box"===t.css("box-sizing")&&(this._hasScroll(n)||this._hasScroll(n,"left"))?(e=parseFloat(n.style.width),i=parseFloat(n.style.height),s=this._getPaddingPlusBorderDimensions(t),e=isNaN(e)?this._getElementTheoreticalSize(t,s,"width"):e,{height:i=isNaN(i)?this._getElementTheoreticalSize(t,s,"height"):i,width:e}):{height:parseFloat(t.css("height")),width:parseFloat(t.css("width"))}},_getElementTheoreticalSize:function(t,e,i){return Math.max(0,Math.ceil(t.get(0)["offset"+i[0].toUpperCase()+i.slice(1)]-e[i]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance");t(e.options.alsoResize).each(function(){var i=t(this),s=e._calculateAdjustedElementDimensions(i);i.data("ui-resizable-alsoresize",{width:s.width,height:s.height,left:parseFloat(i.css("left")),top:parseFloat(i.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!0===t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,c=l[1]||1,u=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&s.maxWidth<p,m=s.maxHeight&&s.maxHeight<f,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=l,_&&(p+=h),v&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((f-c<=0||p-h<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.
967selectable",t.ui.mouse,{version:"1.14.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),!this.options.disabled&&(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");if(n)return s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return o>r&&(i=r,r=o,o=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?h=!(c.left>r||c.right<o||c.top>l||c.bottom<a):"fit"===n.tolerance&&(h=c.left>o&&c.right<r&&c.top>a&&c.bottom<l),h?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),!i.selected||e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element}))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.14.1
vendor: 10,463 bytes, line 967
967",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!this.reverting&&!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return s=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!!s&&(!this.options.handle||!!i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=t("parent"!==a.appendTo?a.appendTo:this.currentItem.parent()),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),t.extend(this.offset,{parent:this._getParentOffset()}),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this._storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(e),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(e){var i,s,n,o,a=this.options;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),a.scroll&&!1!==this._scroll(e)&&(this._refreshItemPositions(!0),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},i=this.items.length-1;i>=0;i--)if(n=(s=this.items[i]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"===this.options.tolerance||this._intersectsWithSides(s))this._rearrange(e,s);else break;this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&s+h<l,d="y"===this.options.axis||e+c>o&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u&&d:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!!s&&!!n&&(e=this.dragDirection.vertical,i=this.dragDirection.horizontal,this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,n=this.dragDirection.horizontal;return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;
vendor: 14,552 bytes, line 967
967return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(s=(n=t(l[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push(["function"==typeof o.options.items?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){a.push(this)}for(r.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(h);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,l,h,c=this.items,u=[["function"==typeof this.options.items?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=(n=t(d[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(u.push(["function"==typeof o.options.items?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(s=0,a=u[i][1],h=(r=u[i][0]).length;s<h;s++)(l=t(r[s])).data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(e){var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],(!this.currentContainer||s.instance===this.currentContainer||s.item[0]===this.currentItem[0])&&(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),s.left=(o=n.offset()).left,s.top=o.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;e>=0;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(e){var i,s,n=(e=e||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,s=e.currentItem[0].nodeName.toLowerCase(),n.placeholder={element:function(){var n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,o){(!i||n.forcePlaceholderSize)&&((!o.height()||n.forcePlaceholderSize&&("tbody"===s||"tr"===s))&&o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0])){if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(d){if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,a=(c=d.floating||this._isFloating(this.currentItem))?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[a],h=!1,e[u]-l>this.items[s][r]/2&&(h=!0),Math.abs(e[u]-l)<n&&(n=Math.abs(e[u]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p]){this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1);return}o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}}},_createHelper:function(e){var i=this.options,s="function"==typeof i.helper?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||this.appendTo[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this.offsetParent[0]===this.document[0].body&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"===this.cssPosition&&(this.scrollParent[0]===this.document[0]||this.scrollParent[0]===this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!e&&s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push((function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}).call(this,this.currentContainer)),s.push((function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}).call(this,this.currentContainer))),i=this.containers.length-1;i>=0;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.
967accordion",{version:"1.14.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").filter(function(t){return t%2==0}))},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){if("active"===t){this._activate(e);return}"event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),(!1!==e.active||!0!==e.collapsible)&&this.headers.length?!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active):(e.active=!1,this.active=t()),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.
vendor: 3,483 bytes, line 967
967css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&n.collapsible,h=l?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:l?t():a,newPanel:h};e.preventDefault(),(!r||n.collapsible)&&!1!==this._trigger("beforeActivate",e,u)&&(n.active=!l&&this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){a._toggleComplete(i)};return("number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length)?t.length?void(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.14.1
vendor: 9,827 bytes, line 967
967",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(e){var i=t(e.target),s=t(this.document[0].activeElement);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(e){if(!this.previousFilter&&(e.clientX!==this.lastMousePosition.x||e.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:e.clientX,y:e.clientY};var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);!(i[0]!==s[0]||s.is(".ui-state-active"))&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o=this,a=this.options.icons.submenu,r=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=r.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);o._addClass(s,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=r.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=t(this);o._isDivider(e)&&o._addClass(e,"ui-menu-divider","ui-widget-content")}),n=(s=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(s,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return({menu:"menuitem",listbox:"option"})[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),n<0?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},i?0:this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first()),s&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;if(!this.active){this.next(e);return}!this.isLastItem()&&(this._hasScroll()?(s=this.active.offset().top,n=this.element.innerHeight(),0===t.fn.jquery.indexOf("3.2.")&&(n+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-s-n<0}),this.focus(e,i)):this.focus(e,this._menuItems(this.activeMenu)[this.active?"last":"first"]()))},previousPage:function(e){var i,s,n;if(!this.active){this.next(e);return}!this.isFirstItem()&&(this._hasScroll()?(s=this.active.offset().top,n=this.element.innerHeight(),0===t.fn.jquery.indexOf("3.2.")&&(n+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this._menuItems(this.activeMenu).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=RegExp("^"+e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(String.prototype.trim.call(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.14.
9671",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly")){e=!0,s=!0,i=!0;return}e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e){e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault();return}if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){if(s){s=!1,t.preventDefault();return}this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 7,102 bytes, line 967
967)},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(e,i){var s,n;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))){this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});return}n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),(s=i.item.attr("aria-label")||n.value)&&String.prototype.trim.call(s).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(t("<div>").text(s))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=s),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;Array.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||s)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return(t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength)?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=++this.requestIndex;return(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}).bind(this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){if(!this.menu.element.is(":visible")){this.search(null,e);return}if(this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)){this.isMultiLine||this._value(this.term),this.menu.blur();return}this.menu[t](e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),!this.options.disabled&&!this.cancelSearch&&(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(t("<div>").text(i))},100))}}),t.ui.autocomplete;var r=/ui-corner-([a-z]){2,6}/g;function l(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
967ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=h(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function h(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,c)}function c(){t.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function u(e,i){for(var s in t.extend(e,i),i)null==i[s]&&(e[s]=i[s]);return e}function d(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.controlgroup",{version:"1.14.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};if(n){if("controlgroupLabel"===s){(o=e.element.find(n)).each(function(){var e=t(this);!e.children(".ui-controlgroup-label-contents").length&&e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get());return}t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var l=n[s]("widget");t.data(l[0],"ui-controlgroup-data",o||n[s]("instance")),i.push(l[0])}}))}}),this.childWidgets=t(t.uniqueSort(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this).data("ui-controlgroup-data");i&&i[e]&&i[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]=({middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"})[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:({middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}})[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(t){var n=i.options.classes[t]||"";n=String.prototype.trim.call(n.replace(r,"")),s[t]=(n+" "+e[t]).replace(/\s+/g," ")}),s},_setOption:function(t,e){if("direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t){this._callChildMethod(e?"disable":"enable");return}this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.14.1
vendor: 3,974 bytes, line 967
967",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",(s=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=s.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(n.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+CSS.escape(i)+"']";return i?(this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(t(this).prop("form")).length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t){this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e;return}this.refresh()}},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.14.
9671",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 7,045 bytes, line 967
967pace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!0===t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),!this.options.icon&&(this.options.icons.primary||this.options.icons.secondary)?this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"):this.options.icon&&(this.options.icons.primary=this.options.icon),this._super()},_setOption:function(t,e){if("text"===t){this._super("showLabel",e);return}"showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)}}),t.fn.button=(m=t.fn.button,function(e){var i="string"==typeof e,s=Array.prototype.slice.call(arguments,1),n=this;return i?this.length||"instance"!==e?this.each(function(){var i,o=t(this).attr("type"),a=t.data(this,"ui-"+("checkbox"!==o&&"radio"!==o?"button":"checkboxradio"));return"instance"===e?(n=a,!1):a?"function"!=typeof a[e]||"_"===e.charAt(0)?t.error("no such method '"+e+"' for button widget instance"):(i=a[e].apply(a,s))!==a&&void 0!==i?(n=i&&i.jquery?n.pushStack(i.get()):i,!1):void 0:t.error("cannot call methods on button prior to initialization; attempted to call method '"+e+"'")}):n=void 0:(s.length&&(e=t.widget.extend.apply(null,[e].concat(s))),this.each(function(){var i=t(this).attr("type"),s="checkbox"!==i&&"radio"!==i?"button":"checkboxradio",n=t.data(this,"ui-"+s);if(n)n.option(e||{}),n._init&&n._init();else{if("button"===s){m.call(t(this),e);return}t(this).checkboxradio(t.extend({icon:!1},e))}})),n}),t.fn.buttonset=function(){return(t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2])?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.14.1"}}),t.extend(l.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return u(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;n="div"===(s=e.nodeName.toLowerCase())||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(o=this._newInst(t(e),n)).settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?h(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),!s.hasClass(this.markerClassName)&&(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span>").addClass(this._appendClass).text(a),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),("focus"===(s=this._get(i,"showOn"))||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),this._get(i,"buttonImageOnly")?i.trigger=t("<img>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):(i.trigger=t("<button type='button'>").addClass(this._triggerClass),o?i.trigger.html(t("<img>").attr({src:o,alt:n,title:n})):i.trigger.text(n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():(t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]&&t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=0,i=0,s=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);!s.hasClass(this.markerClassName)&&(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var a,r,l,h,c,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>
967"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(d=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",d)),u(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(r=document.documentElement.clientWidth,l=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+h,l/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),t.datepicker._hideDatepicker(),v===n&&(v=null,this._curInst=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&((s=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&((s=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,a,r,l=this._getInst(e);if(2==arguments.length&&"string"==typeof i)return"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null;n=i||{},"string"==typeof i&&((n={})[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(l,"min"),r=this._getMinMaxDate(l,"max"),u(l.settings,n),null!==a&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,a)),null!==r&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,r)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return(n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv))[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),(i=t.datepicker._get(o,"onSelect"))?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);if(t.datepicker._get(n,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||s<" "||!i||i.indexOf(s)>-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(t){}return!0},_showDatepicker:function(e){var i,s,n,o,a,r,l;if("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e)i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(n=(s=t.datepicker._get(i,"beforeShow"))?s.apply(e,[e,i]):{})&&(u(i.settings,n),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),o=!1,t(e).parents().each(function(){return!(o|="fixed"===t(this).css("position"))}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,o),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":o?"fixed":"absolute",display:"none",left:a.left+"px",to
vendor: 1,465 bytes, line 967
967p:a.top+"px"}),i.inline||(r=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(t){var e,i;while(t.length&&t[0]!==document){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&!isNaN(i=parseInt(t.css("zIndex"),10))&&0!==i)return i;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[r]?i.dpDiv.show(r,t.datepicker._get(i,"showOptions"),l):i.dpDiv[r||"show"](r?l:null),t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),t.datepicker._curInst=i))},_updateDatepicker:function(e){this.maxRows=4,v=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],o=e.dpDiv.find("."+this._dayOverClass+" a"),a=t.datepicker._get(e,"onUpdateDatepicker");o.length>0&&c.apply(o.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",17*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),i=e.yearshtml=null},0)),a&&a
vendor: 21,195 bytes, line 967
967.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){var i,s=this._getInst(e),n=this._get(s,"isRTL");while(e&&("hidden"===e.type||1!==e.nodeType||t.expr.pseudos.hidden(e)))e=e[n?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;a&&(!e||a===t.data(e,"datepicker"))&&this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&t.effects.effect[i]?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,(o=this._get(a,"onClose"))&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&!(t.datepicker._inDialog&&t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);!this._isDisabledDatepicker(n[0])&&(this._adjustInstDate(o,i,s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(n.selectedDay=(i=new Date).getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);!(t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0]))&&((o=this._getInst(a[0])).selectedDay=o.currentDay=parseInt(t("a",n).attr("data-date")),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),(s=this._get(o,"onSelect"))?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(document).find(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:new Date().getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{"+("y"===t?s:1)+","+s+"}"),o=i.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];if(i.substr(l,s.length).toLowerCase()===s.toLowerCase())return o=e[0],l+=s.length,!1}),-1!==o)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;n<e.length;n++)if(b)"'"!==e.charAt(n)||y("'")?k():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":x("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=x("M",p,f);break;case"y":g=w("y");break;case"@":g=(r=new Date(w("@"))).getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":g=(r=new Date((w("!")-this._ticksTo1970)/1e4)).getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?k():b=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=new Date().getFullYear():g<100&&(g+=new Date().getFullYear()-new Date().getFullYear()%100+(g<=c?0:-100)),v>-1){m=1,_=v;do{if(_<=(o=this._getDaysInMonth(g,m-1)))break;m++,_-=o}while(!0)}if((r=this._daylightSavingAdjust(new Date(g,m-1,_))).getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864e9,formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))while(s.length<i)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;s<t.length;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=e+1<t.length&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;e<t.length;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n,o=null==i||""===i?s:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}var s=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,n=s.getFullYear(),o=s.getMonth(),a=s.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(i);while(l){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(n,o));break;case"y":case"Y":n+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(n,o))}l=r.exec(i)}return new Date(n,o,a)}(i):"number"==typeof i?isNaN(i)?s:((n=new Date).setDate(n.getDate()+i),n):new Date(i.getTime());return(o=o&&"Invalid Date"===o.toString()?s:o)&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){t(this).on(this.getAttribute("data-event"),{prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(e){var i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,x,k,C,D,I,T,P,M,S,H,z,O,A,E,N,W,F,L,R,Y=new Date,B=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),j=this._get(e,"isRTL"),q=this._get(e,"showButtonPanel"),K=this._get(e,"hideIfNoPrevNext"),U=this._get(e,"navigationAsDateFormat"),V=this._getNumberOfMonths(e),X=this._get(e,"showCurrentAtPos"),$=this._get(e,"stepMonths"),G=1!==V[0]||1!==V[1],Q=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(e,"min"),Z=this._getMinMaxDate(e,"max"),tt=e.drawMonth-X,te=e.drawYear;if(tt<0&&(tt+=12,te--),Z){i=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-V[0]*V[1]+1,Z.getDate())),i=J&&i<J?J:i;while(this._daylightSavingAdjust(new Date(te,tt,1))>i)--tt<0&&(tt=11,te--)}for(e.drawMonth=tt,e.drawYear=te,s=this._get(e,"prevText"),s=U?this.formatDate(s,this._daylightSavingAdjust(new Date(te,tt-$,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,-1,te,tt)?t("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:s}).append(t("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(j?"e":"w")).text(s))[0].outerHTML:K?"":t("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:s}).append(t("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(j?"e":"w")).text(s))[0].outerHTML,o=this._get(e,"nextText"),o=U?this.formatDate(o,this._daylightSavingAdjust(new Date(te,tt+$,1)),this._getFormatConfig(e)):o,a=this._canAdjustMonth(e,1,te,tt)?t("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:o}).append(t("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(j?"w":"e")).text(o))[0].outerHTML:K?"":t("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:o}).append(t("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(j?"w":"e")).text(o))[0].outerHTML,r=this._get(e,"currentText"),l=this._get(e,"gotoCurrent")&&e.currentDay?Q:B,r=U?this.formatDate(r,l,this._getFormatConfig(e)):r,h="",e.inline||(h=t("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),c="",q&&(c=t("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(j?h:"").append(this._isInRange(e,l)?t("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(r):"").append(j?"":h)[0].outerHTML),u=isNaN(u=parseInt(this._get(e,"firstDay"),10))?0:u,d=this._get(e,"showWeek"),p=this._get(e,"dayNames"),f=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),_=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),b=this._get(e,"selectOtherMonths"),y=this._getDefaultDate(e),w="",k=0;k<V[0];k++){for(D=0,C="",this.maxRows=4;D<V[1];D++){if(I=this._daylightSavingAdjust(new Date(te,tt,e.selectedDay)),T=" ui-corner-all",P="",G){if(P+="<div class='ui-datepicker-group",V[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",T=" ui-corner-"+(j?"right":"left");break;case V[1]-1:P+=" ui-datepicker-group-last",T=" ui-corner-"+(j?"left":"right");break;default:P+=" ui-datepicker-group-middle",T=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?j?a:n:"")+(/all|right/.test(T)&&0===k?j?n:a:"")+this._generateMonthYearHeader(e,tt,te,J,Z,k>0||D>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",M=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;x<7;x++)S=(x+u)%7,M+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+p[S]+"'>"+f[S]+"</span></th>";for(P+=M+"</tr></thead><tbody>",H=this._getDaysInMonth(te,tt),te===e.selectedYear&&tt===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,H)),O=Math.ceil(((z=(this._getFirstDayOfMonth(te,tt)-u+7)%7)+H)/7),A=G&&this.maxRows>O?this.maxRows:O,this.maxRows=A,E=this._daylightSavingAdjust(new Date(te,tt,1-z)),N=0;N<A;N++){for(P+="<tr>",W=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(E)+"</td>":"",x=0;x<7;x++)F=_?_.apply(e.input?e.input[0]:null,[E]):[!0,""],R=(L=E.getMonth()!==tt)&&!b||!F[0]||J&&E<J||Z&&E>Z,W+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(E.getTime()===I.getTime()&&tt===e.selectedMonth&&e._keyEvent||y.getTime()===E.getTime()&&y.getTime()===I.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+F[1]+(E.getTime()===Q.getTime()?" "+this._currentClass:"")+(E.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+((!L||v)&&F[2]?" title='"+F[2].replace(/'/g,"'")+"'":"")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(L&&!v?" ":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===B.getTime()?" ui-state-highlight":"")+(E.getTime()===Q.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#' aria-current='"+(E.getTime()===Q.getTime()?"true":"false")+"' data-date='"+E.getDate()+"'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}++tt>11&&(tt=0,te++),P+="</tbody></table>"+(G?"</div>"+(V[0]>0&&D===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=P}w+=C}return w+=c,e._keyEvent=!1,w},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b=this._get(t,"selectMonthLabel"),y=this._get(t,"selectYearLabel"),w="<div class='ui-datepicker-title'>",x="";if(o||!m)x+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,x+="<select class='ui-datepicker-month' aria-label='"+b+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(x+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");x+="</select>"}if(v||(w+=x+(o||!(m&&_)?" ":"")),!t.yearshtml){if(t.yearshtml="",o||!_)w+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=new Date().getFullYear(),g=Math.max(f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(u[0]),p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+y+"' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",w+=t.yearshtml,t.yearshtml=null}}return w+=this._get(t,"yearSuffix"),v&&(w+=(o||!(m&&_)?" ":"")+x),w+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=new Date().getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:new Date().getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2==arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)})},t.datepicker=new
vendor: 15,183 bytes, line 967
967l,t.datepicker.initialized=!1,t.datepicker.uuid=new Date().getTime(),t.datepicker.version="1.14.1",t.datepicker,t.widget("ui.dialog",{version:"1.14.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,uiDialogTitleHeadingLevel:0,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;if(this._isOpen){this._moveToTop()&&this._focusTabbable();return}this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open")},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_restoreTabbableFocus:function(){var e=this.document[0].activeElement;this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE){e.preventDefault(),this.close(e);return}if(!(e.keyCode!==t.ui.keyCode.TAB||e.isDefaultPrevented())){var i=this.uiDialog.find(":tabbable"),s=i.first(),n=i.last();e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?(e.target===s[0]||e.target===this.uiDialog[0])&&e.shiftKey&&(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<"+(Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&this.options.uiDialogTitleHeadingLevel>0&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span")+">").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||Array.isArray(i)&&!i.length){this._removeClass(this.uiDialog,"ui-dialog-buttons");return}t.each(i,function(i,s){var n,o;s="function"==typeof s?{click:s,text:i}:s,n=(s=t.extend({type:"button"},s)).click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var e=this,i=this.options;function s(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,n){e._addClass(t(this),"ui-dialog-dragging"),e._blockFrames(),e._trigger("dragStart",i,s(n))},drag:function(t,i){e._trigger("drag",t,s(i))},stop:function(n,o){var a=o.offset.left-e.document.scrollLeft(),r=o.offset.top-e.document.scrollTop();i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(r>=0?"+":"")+r,of:e.window},e._removeClass(t(this),"ui-dialog-dragging"),e._unblockFrames(),e._trigger("dragStop",n,s(o))}})},_makeResizable:function(){var e=this,i=this.options,s=i.resizable,n=this.uiDialog.css("position");function o(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:"string"==typeof s?s:"n,e,s,w,se,sw,ne,nw",start:function(i,s){e._addClass(t(this),"ui-dialog-resizing"),e._blockFrames(),e._trigger("resizeStart",i,o(s))},resize:function(t,i){e._trigger("resize",t,o(i))},stop:function(s,n){var a=e.uiDialog.offset(),r=a.left-e.document.scrollLeft(),l=a.top-e.document.scrollTop();i.height=e.uiDialog.height(),i.width=e.uiDialog.width(),i.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(l>=0?"+":"")+l,of:e.window},e._removeClass(t(this),"ui-dialog-resizing"),e._unblockFrames(),e._trigger("resizeStop",s,o(n))}}).css("position",n)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((s=o.is(":data(ui-draggable)"))&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"!==e||((n=o.is(":data(ui-resizable)"))&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===e&&o.attr("aria-modal",i?"true":null))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",(function(t){if(!e){var i=this._trackingInstances()[0];i._allowInteraction(t)||(t.preventDefault(),i._focusTabbable())}}).bind(this)),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!0===t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.progressbar",{version:"1.14.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.14.1
vendor: 8,925 bytes, line 967
967",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null==e.focusIndex||s.index===e.focusIndex||(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){if(!this.options.disabled)this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),i.hidden?s.prop("hidden",!0):this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&((t=window.getSelection()).removeAllRanges(),t.addRange(this.range))},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+CSS.escape(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t=window.getSelection();t.rangeCount&&(this.range=t.getRangeAt(0))},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;if(!1===t){this.button.css("width","");return}null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),hidden:i.prop("hidden")||t.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.14.
9671
vendor: 10,435 bytes, line 967
967",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;e<i;e++)o.push("<span tabindex='0'></span>");this.handles=n.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-h.values(e));(n>i||n===i&&(e===h._lastChangedValue||h.values(e)===c.min))&&(n=i,o=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),r=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(+!e),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){if(arguments.length){this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(t,e){var i,s,n;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!Array.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):this.value();for(n=0,i=this.options.values,s=arguments[0];n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(!this._hasMultipleValues())return[];for(s=0,i=this.options.values.slice();s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return -1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=!this._animateOff&&r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=(l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),i=(o=this._valueMax())!==n?(s-n)/(o-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.s
967pinner",{version:"1.14.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e}
vendor: 48,789 bytes, lines 967-1005
967,_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t)},mousewheel:function(t,e){var i=this.document[0].activeElement;if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),(function(){this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=i)}).call(this),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active")){if(!1===this._start(e))return!1;this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)}},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return(!!this.spinning||!1!==this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),(!this.spinning||!1!==this._trigger("spin",e,{value:i}))&&(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return -1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return(i=Math.round((i=t-(e=null!==s.min?s.min:0))/s.step)*s.step,t=parseFloat((t=e+i).toFixed(this._precision())),null!==s.max&&t>s.max)?s.max:null!==s.min&&t<s.min?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;if("culture"===t||"numberFormat"===t){i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i));return}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:d(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:d(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:d(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin(-((t||1)*this.options.step)),this._stop())},pageUp:d(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:d(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());d(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!0===t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.14.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(_=/#.*$/,function(t){var e,i;e=t.href.replace(_,""),i=location.href.replace(_,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return t.hash.length>1&&e===i}),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),Array.isArray(i.disabled)&&(i.disabled=t.uniqueSort(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=decodeURIComponent(location.hash.substring(1));return null===e&&(s&&this.tabs.each(function(i,n){if(t(n).attr("aria-controls")===s)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:e.preventDefault(),clearTimeout(this.activating),this._activate(s);return;case t.ui.keyCode.ENTER:e.preventDefault(),clearTimeout(this.activating),this._activate(s!==this.options.active&&s);return;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){!this._handlePageNav(e)&&e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){var s=this.tabs.length-1;while(-1!==t.inArray((e>s&&(e=0),e<0&&(e=s),e),this.options.disabled))e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){if("active"===t){this._activate(e);return}this._super(t,e),"collapsible"!==t||(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(a=(n=decodeURIComponent(s.hash)).substring(1),o=e.element.find("#"+CSS.escape(a))):(n="#"+(a=l.attr("aria-controls")||t({}).uniqueId()[0].id),(o=e.element.find(n)).length||(o=e._createPanel(a)).insertAfter(e.panels[i-1]||e.tablist),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(Array.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),!0===e||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height()-(this.element.outerHeight()-this.element.height()),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget).closest("li"),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():this._getPanelForTab(n),l=s.length?this._getPanelForTab(s):t(),h={oldTab:s,oldPanel:l,newTab:a?t():n,newPanel:r};e.preventDefault(),!(n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading"))&&!this.running&&(!o||i.collapsible)&&!1!==this._trigger("beforeActivate",e,h)&&(i.active=!a&&this.tabs.index(n),this.active=o?t():n,this.xhr&&this.xhr.abort(),l.length||r.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(n),e),this._toggle(e,h))},_toggle:function(e,i){var s=this,n=i.newPanel,o=i.oldPanel;function a(){s.running=!1,s._trigger("activate",e,i)}function r(){s._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),n.length&&s.options.show?s._show(n,s.options.show,a):(n.show(),a())}this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){s._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o.hide(),r()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&o.length?i.oldTab.attr("tabIndex",-1):n.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),n.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+CSS.escape(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=Array.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=Array.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};!this._isLocal(o[0])&&(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){a.html(t),s._trigger("load",i,r),l(n,e)}).fail(function(t,e){l(t,e)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find("#"+CSS.escape(i))}}),!0===t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.14.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title");return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),(s=String.prototype.trim.call(s.join(" ")))?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);!(!s.length||s.data("ui-tooltip-id"))&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;if("string"==typeof s||s.nodeType||s.jquery)return this._open(e,t,s);(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&(e&&(e.type=o),n._open(e,t,i))}))&&this._open(e,t,i)},_open:function(e,i,s){var n,o,a,r,l=t.extend({},this.options.position);if(s){if(n=this._find(i)){n.tooltip.find(".ui-tooltip-content").html(s);return}i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=(n=this._tooltip(i)).tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),(r=t("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),r.removeAttr("id").find("[id]").removeAttr("id"),r.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:h}),h(e)):o.position(t.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){o.is(":visible")&&(h(l.of),clearInterval(a))},13)),this._trigger("open",e,{tooltip:o})}function h(t){l.of=t,!o.is(":hidden")&&o.position(l)}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){var t=this._find(i);t&&this._removeTooltip(t.tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);if(!o){n.removeData("ui-tooltip-open");return}i=o.tooltip,!o.closing&&(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1))},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!0===t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var p,f,g,m,_,v,b,y={},w=y.toString,x=/^([\-+])=\s*(\d+\.?\d*)/,k=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],C=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},D={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},I={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},T=t.each;function P(t){return null==t?t+"":"object"==typeof t?y[w.call(t)]||"object":typeof t}function M(t,e,i){var s=I[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),s.mod)?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t))}function S(e){var i=C(),s=i._rgba=[];return(e=e.toLowerCase(),T(k,function(t,n){var o,a=n.re.exec(e),r=a&&n.parse(a),l=n.space||"rgba";if(r)return o=i[l](r),i[D[l].cache]=o[D[l].cache],s=i._rgba=o._rgba,!1}),s.length)?("0,0,0,0"===s.join()&&t.extend(s,b.transparent),i):b[e]}function H(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}T(D,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),t.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){y["[object "+e+"]"]=e.toLowerCase()}),C.fn=t.extend(C.prototype,{parse:function(e,i,s,n){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(i),i=void 0);var o=this,a=P(e),r=this._rgba=[];return(void 0!==i&&(e=[e,i,s,n],a="array"),"string"===a)?this.parse(S(e)||b._default):"array"===a?(T(D.rgba.props,function(t,i){r[i.idx]=M(e[i.idx],i)}),this):"object"===a?(e instanceof C?T(D,function(t,i){e[i.cache]&&(o[i.cache]=e[i.cache].slice())}):T(D,function(i,s){var n=s.cache;T(s.props,function(t,i){if(!o[n]&&s.to){if("alpha"===t||null==e[t])return;o[n]=s.to(o._rgba)}o[n][i.idx]=M(e[t],i,!0)}),o[n]&&0>t.inArray(null,o[n].slice(0,3))&&(null==o[n][3]&&(o[n][3]=1),s.from&&(o._rgba=s.from(o[n])))}),this):void 0},is:function(t){var e=C(t),i=!0,s=this;return T(D,function(t,n){var o,a=e[n.cache];return a&&(o=s[n.cache]||n.to&&n.to(s._rgba)||[],T(n.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return T(D,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=C(t),s=i._space(),n=D[s],o=0===this.alpha()?C("transparent"):this,a=o[n.cache]||n.to(o._rgba),r=a.slice();return i=i[n.cache],T(n.props,function(t,s){var n=s.idx,o=a[n],l=i[n],h=I[s.type]||{};null!==l&&(null===o?r[n]=l:(h.mod&&(l-o>h.mod/2?o+=h.mod:o-l>h.mod/2&&(o-=h.mod)),r[n]=M((l-o)*e+o,s)))}),this[s](r)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=C(e)._rgba;return C(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null!=t?t:+(e>2)});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join(", ")+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=+(e>2)),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join(", ")+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return("0"+(t||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}}),C.fn.parse.prototype=C.fn,D.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i=t[0]/255,s=t[1]/255,n=t[2]/255,o=t[3],a=Math.max(i,s,n),r=Math.min(i,s,n),l=a-r,h=a+r,c=.5*h;return[Math.round(r===a?0:i===a?60*(s-n)/l+360:s===a?60*(n-i)/l+120:60*(i-s)/l+240)%360,0===l?0:c<=.5?l/h:l/(2-h),c,null==o?1:o]},D.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],o=s<=.5?s*(1+i):s+i-s*i,a=2*s-o;return[Math.round(255*H(a,o,e+1/3)),Math.round(255*H(a,o,e)),Math.round(255*H(a,o,e-1/3)),n]},T(D,function(t,e){var i=e.props,s=e.cache,n=e.to,o=e.from;C.fn[t]=function(t){if(n&&!this[s]&&(this[s]=n(this._rgba)),void 0===t)return this[s].slice();var e,a=P(t),r="array"===a||"object"===a?t:arguments,l=this[s].slice();return(T(i,function(t,e){var i=r["object"===a?t:e.idx];null==i&&(i=l[e.idx]),l[e.idx]=M(i,e)}),o)?((e=C(o(l)))[s]=l,e):C(l)},T(i,function(e,i){!C.fn[e]&&(C.fn[e]=function(s){var n,o,a,r,l=P(s);return(o=(n=this[r="alpha"===e?this._hsla?"hsla":"rgba":t]())[i.idx],"undefined"===l)?o:("function"===l&&(l=P(s=s.call(this,o))),null==s&&i.empty)?this:("string"===l&&(a=x.exec(s))&&(s=o+parseFloat(a[2])*("+"===a[1]?1:-1)),n[i.idx]=s,this[r](n))})})}),C.hook=function(e){T(e.split(" "),function(e,i){t.cssHooks[i]={set:function(t,e){var s;"transparent"!==e&&("string"!==P(e)||(s=S(e)))&&(e=(e=C(s||e)).toRgbaString()),t.style[i]=e}},t.fx.step[i]=function(e){e.colorInit||(e.start=C(e.elem,i),e.end=C(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},C.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return T(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},b=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"};var z="ui-effects-",O="ui-effects-style",A="ui-effects-animated";t.effects={effect:{}},function(){var e,i,s,n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function a(t){var e,i,s=t.ownerDocument.defaultView.getComputedStyle(t),n={};i=s.length;while(i--)e=s[i],"string"==typeof s[e]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);return n}t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(e){("none"===e.end||e.setAttr)&&(1!==e.pos||e.setAttr)||(t.style(e.elem,i,e.end),e.setAttr=!0)}}),t.effects.animateClass=function(e,i,s,r){var l=t.speed(i,s,r);return this.queue(function(){var i,s=t(this),r=s.attr("class")||"",h=l.children?s.find("*").addBack():s;h=h.map(function(){return{el:t(this),start:a(this)}}),(i=function(){t.each(n,function(t,i){e[i]&&s[i+"Class"](e[i])})})(),h=h.map(function(){return this.end=a(this.el[0]),this.diff=function(e,i){var s,n,a={};for(s in i)n=i[s],e[s]===n||o[s]||!t.fx.step[s]&&isNaN(parseFloat(n))||(a[s]=n);return a}(this.start,this.end),this}),s.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){i(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:(e=t.fn.addClass,function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}),removeClass:(i=t.fn.removeClass,function(e,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:e},s,n,o):i.apply(this,arguments)}),toggleClass:(s=t.fn.toggleClass,function(e,i,n,o,a){return"boolean"!=typeof i&&void 0!==i?t.effects.animateClass.call(this,{toggle:e},i,n,o):n?t.effects.animateClass.call(this,i?{add:e}:{remove:e},n,o,a):s.apply(this,arguments)}),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){var e,i,s,n;function o(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),"function"==typeof i&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),"function"==typeof s&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function a(e){return!e||"number"==typeof e||!!t.fx.speeds[e]||"string"==typeof e&&!t.effects.effect[e]||"function"==typeof e||"object"==typeof e&&!e.effect}function r(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(n[1])||0,right:"auto"===n[2]?i:parseFloat(n[2]),bottom:"auto"===n[3]?s:parseFloat(n[3]),left:parseFloat(n[4])||0}}t.expr&&t.expr.pseudos&&t.expr.pseudos.animated&&(t.expr.pseudos.animated=(e=t.expr.pseudos.animated,function(i){return!!t(i).data(A)||e(i)})),!0===t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(z+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(z+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.14.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(O,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(O)||"",t.removeData(O)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(z+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=z+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){var e=o.apply(this,arguments),i=t.effects.effect[e.effect],s=i.mode,n=e.queue,a=n||"fx",r=e.complete,l=e.mode,h=[],c=function(e){var i=t(this),n=t.effects.mode(i,l)||s;i.data(A,!0),h.push(n),s&&("show"===n||n===s&&"hide"===n)&&i.show(),s&&"none"===n||t.effects.saveStyle(i),"function"==typeof e&&e()};if(t.fx.off||!i)return l?this[l](e.duration,r):this.each(function(){r&&r.call(this)});function u(n){var o=t(this);function a(){"function"==typeof r&&r.call(o[0]),"function"==typeof n&&n()}e.mode=h.shift(),!0!==t.uiBackCompat||s?"none"===e.mode?(o[l](),a()):i.call(o[0],e,function(){o.removeData(A),t.effects.cleanUp(o),"hide"===e.mode&&o.hide(),a()}):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):i.call(o[0],e,a)}return!1===n?this.each(c).each(u):this.queue(a,c).queue(a,u)},show:(i=t.fn.show,function(t){if(a(t))return i.apply(this,arguments);var e=o.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(s=t.fn.hide,function(t){if(a(t))return s.apply(this,arguments);var e=o.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(n=t.fn.toggle,function(t){if(a(t)||"boolean"==typeof t)return n.apply(this,arguments);var e=o.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):r(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>");d.appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),"function"==typeof i&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=r(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),e={},t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin(((t-1)*80-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){var e,i=4;while(t<((e=Math.pow(2,--i))-1)/11);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}});var i=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&((n={opacity:1})[m]=o,a.css("opacity",0).css(m,_?-(2*u):2*u).animate(n,f,g)),l&&(u/=Math.pow(2,d-1)),(n={})[m]=o;v<d;v++)(s={})[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=l?2*u:u/2;l&&((s={opacity:0})[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;s=o.cssClip(),n.clip={top:h?(s.bottom-s.top)/2:s.top,right:l?(s.right-s.left)/2:s.right,bottom:h?(s.bottom-s.top)/2:s.bottom,left:l?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a=e.direction||"left",r="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a?"-=":"+=",h={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===r?"outerHeight":"outerWidth"](!0)/2,h[r]=l+s,"show"===o&&(n.css(h),h[r]=("+="===l?"-=":"+=")+s,h.opacity=1),n.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){var s,n,o,a,r,l,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,c=t(this),u="show"===e.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/h),g=[];function m(){g.push(this),g.length===h*h&&(c.css({visibility:"visible"}),t(g).remove(),i())}for(s=0;s<h;s++)for(n=0,a=d.top+s*f,l=s-(h-1)/2;n<h;n++)o=d.left+n*p,r=n-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*p,top:-s*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:o+(u?r*p:0),top:a+(u?l*f:0),opacity:+!u}).animate({left:o+(u?0:r*p),top:a+(u?0:l*f),opacity:+!!u},e.duration||500,e.easing,m)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",+!s).animate({opacity:+!!s},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o=e.size||15,a=/([0-9]+)%/.exec(o),r=e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,h=t.effects.createPlaceholder(s),c=s.cssClip(),u={clip:t.extend({},c)},d={clip:t.extend({},c)},p=[c[r[0]],c[r[1]]],f=s.queue().length;a&&(o=parseInt(a[1],10)/100*p[+("hide"!==n)]),u.clip[r[0]]=o,d.clip[r[0]]=o,d.clip[r[1]]=0,"show"===n&&(s.cssClip(d.clip),h&&h.css(t.effects.clipToBox(d)),d.clip=c),s.queue(function(i){h&&h.animate(t.effects.clipToBox(u),l,e.easing).animate(t.effects.clipToBox(d),l,e.easing),i()}).animate(u,l,e.easing).animate(d,l,e.easing).queue(i),t.effects.unshift(s,f,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,l,n.from.y,_),v=t.effects.setTransition(a,l,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,h,n.from.x,_),v=t.effects.setTransition(a,h,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),delete _.outerHeight,delete _.outerWidth,a.css(_),("content"===d||"both"===d)&&(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,l,n.from.y,o),a=t.effects.setTransition(i,l,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,h,n.from.x,o),a=t.effects.setTransition(i,h,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:100*("effect"===n)),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a=2*(e.times||5)+ +!!(o||"hide"===n),r=e.duration/a,l=0,h=1,c=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),l=1);h<a;h++)s.animate({opacity:l},r,e.easing),l=1-l;s.animate({opacity:l},r,e.easing),s.queue(i),t.effects.unshift(s,c,a+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,h,e.easing);s<r;s++)n.animate(p,h,e.easing).animate(f,h,e.easing);n.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(n,g,l+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c=e.distance||o["top"===h?"outerHeight":"outerWidth"](!0),u={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[h],u[h]=("up"===l||"left"===l?-1:1)*c+n,u.clip=o.cssClip(),u.clip[a[l][1]]=u.clip[a[l][0]],"show"===r&&(o.cssClip(u.clip),o.css(h,u[h]),u.clip=s,u[h]=n),o.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),!0===t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})});; 968 969/*! 970 * fancyBox - jQuery Plugin 971 * version: 2.1.5 (Fri, 14 Jun 2013) 972 * @requires jQuery v1.6 or later 973 * 974 * Examples at http://fancyapps.com/fancybox/ 975 * License: www.fancyapps.com/fancybox/#license 976 * 977 * Copyright 2012 Janis Skarnelis - [email protected] 978 * 979 */ 980 981(function (window, document, $, undefined) { 982 "use strict"; 983 984 var H = $("html"), 985 W = $(window), 986 D = $(document), 987 F = $.fancybox = function () { 988 F.open.apply( this, arguments ); 989 }, 990 IE = navigator.userAgent.match(/msie/i), 991 didUpdate = null, 992 isTouch = document.createTouch !== undefined, 993 994 isQuery = function(obj) { 995 return obj && obj.hasOwnProperty && obj instanceof $; 996 }, 997 isString = function(str) { 998 return str && $.type(str) === "string"; 999 }, 1000 isPercentage = function(str) { 1001 return isString(str) && str.indexOf('%') > 0; 1002 }, 1003 isScrollable = function(el) { 1004 return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); 1005 },
vendor: 16,702 bytes, lines 1006-1729
1006 getScalar = function(orig, dim) { 1007 var value = parseInt(orig, 10) || 0; 1008 1009 if (dim && isPercentage(orig)) { 1010 value = F.getViewport()[ dim ] / 100 * value; 1011 } 1012 1013 return Math.ceil(value); 1014 }, 1015 getValue = function(value, dim) { 1016 return getScalar(value, dim) + 'px'; 1017 }; 1018 1019 $.extend(F, { 1020 // The current version of fancyBox 1021 version: '2.1.5', 1022 1023 defaults: { 1024 padding : 15, 1025 margin : 20, 1026 1027 width : 800, 1028 height : 600, 1029 minWidth : 100, 1030 minHeight : 100, 1031 maxWidth : 9999, 1032 maxHeight : 9999, 1033 pixelRatio: 1, // Set to 2 for retina display support 1034 1035 autoSize : true, 1036 autoHeight : false, 1037 autoWidth : false, 1038 1039 autoResize : true, 1040 autoCenter : !isTouch, 1041 fitToView : true, 1042 aspectRatio : false, 1043 topRatio : 0.5, 1044 leftRatio : 0.5, 1045 1046 scrolling : 'auto', // 'auto', 'yes' or 'no' 1047 wrapCSS : '', 1048 1049 arrows : true, 1050 closeBtn : true, 1051 closeClick : false, 1052 nextClick : false, 1053 mouseWheel : true, 1054 autoPlay : false, 1055 playSpeed : 3000, 1056 preload : 3, 1057 modal : false, 1058 loop : true, 1059 1060 ajax : { 1061 dataType : 'html', 1062 headers : { 'X-fancyBox': true } 1063 }, 1064 iframe : { 1065 scrolling : 'auto', 1066 preload : true 1067 }, 1068 swf : { 1069 wmode: 'transparent', 1070 allowfullscreen : 'true', 1071 allowscriptaccess : 'always' 1072 }, 1073 1074 keys : { 1075 next : { 1076 13 : 'left', // enter 1077 34 : 'up', // page down 1078 39 : 'left', // right arrow 1079 40 : 'up' // down arrow 1080 }, 1081 prev : { 1082 8 : 'right', // backspace 1083 33 : 'down', // page up 1084 37 : 'right', // left arrow 1085 38 : 'down' // up arrow 1086 }, 1087 close : [27], // escape key 1088 play : [32], // space - start/stop slideshow 1089 toggle : [70] // letter "f" - toggle fullscreen 1090 }, 1091 1092 direction : { 1093 next : 'left', 1094 prev : 'right' 1095 }, 1096 1097 scrollOutside : true, 1098 1099 // Override some properties 1100 index : 0, 1101 type : null, 1102 href : null, 1103 content : null, 1104 title : null, 1105 1106 // HTML templates 1107 tpl: { 1108 wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 1109 image : '<img class="fancybox-image" src="{href}" alt="" />', 1110 iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>', 1111 error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 1112 closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 1113 next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 1114 prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' 1115 }, 1116 1117 // Properties for each animation type 1118 // Opening fancyBox 1119 openEffect : 'fade', // 'elastic', 'fade' or 'none' 1120 openSpeed : 250, 1121 openEasing : 'swing', 1122 openOpacity : true, 1123 openMethod : 'zoomIn', 1124 1125 // Closing fancyBox 1126 closeEffect : 'fade', // 'elastic', 'fade' or 'none' 1127 closeSpeed : 250, 1128 closeEasing : 'swing', 1129 closeOpacity : true, 1130 closeMethod : 'zoomOut', 1131 1132 // Changing next gallery item 1133 nextEffect : 'elastic', // 'elastic', 'fade' or 'none' 1134 nextSpeed : 250, 1135 nextEasing : 'swing', 1136 nextMethod : 'changeIn', 1137 1138 // Changing previous gallery item 1139 prevEffect : 'elastic', // 'elastic', 'fade' or 'none' 1140 prevSpeed : 250, 1141 prevEasing : 'swing', 1142 prevMethod : 'changeOut', 1143 1144 // Enable default helpers 1145 helpers : { 1146 overlay : true, 1147 title : true 1148 }, 1149 1150 // Callbacks 1151 onCancel : $.noop, // If canceling 1152 beforeLoad : $.noop, // Before loading 1153 afterLoad : $.noop, // After loading 1154 beforeShow : $.noop, // Before changing in current item 1155 afterShow : $.noop, // After opening 1156 beforeChange : $.noop, // Before changing gallery item 1157 beforeClose : $.noop, // Before closing 1158 afterClose : $.noop // After closing 1159 }, 1160 1161 //Current state 1162 group : {}, // Selected group 1163 opts : {}, // Group options 1164 previous : null, // Previous element 1165 coming : null, // Element being loaded 1166 current : null, // Currently loaded element 1167 isActive : false, // Is activated 1168 isOpen : false, // Is currently open 1169 isOpened : false, // Have been fully opened at least once 1170 1171 wrap : null, 1172 skin : null, 1173 outer : null, 1174 inner : null, 1175 1176 player : { 1177 timer : null, 1178 isActive : false 1179 }, 1180 1181 // Loaders 1182 ajaxLoad : null, 1183 imgPreload : null, 1184 1185 // Some collections 1186 transitions : {}, 1187 helpers : {}, 1188 1189 /* 1190 * Static methods 1191 */ 1192 1193 open: function (group, opts) { 1194 if (!group) { 1195 return; 1196 } 1197 1198 if (!$.isPlainObject(opts)) { 1199 opts = {}; 1200 } 1201 1202 // Close if already active 1203 if (false === F.close(true)) { 1204 return; 1205 } 1206 1207 // Normalize group 1208 if (!$.isArray(group)) { 1209 group = isQuery(group) ? $(group).get() : [group]; 1210 } 1211 1212 // Recheck if the type of each element is `object` and set content type (image, ajax, etc) 1213 $.each(group, function(i, element) { 1214 var obj = {}, 1215 href, 1216 title, 1217 content, 1218 type, 1219 rez, 1220 hrefParts, 1221 selector; 1222 1223 if ($.type(element) === "object") { 1224 // Check if is DOM element 1225 if (element.nodeType) { 1226 element = $(element); 1227 } 1228 1229 if (isQuery(element)) { 1230 obj = { 1231 href : element.data('fancybox-href') || element.attr('href'), 1232 title : element.data('fancybox-title') || element.attr('title'), 1233 isDom : true, 1234 element : element 1235 }; 1236 1237 if ($.metadata) { 1238 $.extend(true, obj, element.metadata()); 1239 } 1240 1241 } else { 1242 obj = element; 1243 } 1244 } 1245 1246 href = opts.href || obj.href || (isString(element) ? element : null); 1247 title = opts.title !== undefined ? opts.title : obj.title || ''; 1248 1249 content = opts.content || obj.content; 1250 type = content ? 'html' : (opts.type || obj.type); 1251 1252 if (!type && obj.isDom) { 1253 type = element.data('fancybox-type'); 1254 1255 if (!type) { 1256 rez = element.prop('class').match(/fancybox\.(\w+)/); 1257 type = rez ? rez[1] : null; 1258 } 1259 } 1260 1261 if (isString(href)) { 1262 // Try to guess the content type 1263 if (!type) { 1264 if (F.isImage(href)) { 1265 type = 'image'; 1266 1267 } else if (F.isSWF(href)) { 1268 type = 'swf'; 1269 1270 } else if (href.charAt(0) === '#') { 1271 type = 'inline'; 1272 1273 } else if (isString(element)) { 1274 type = 'html'; 1275 content = element; 1276 } 1277 } 1278 1279 // Split url into two pieces with source url and content selector, e.g, 1280 // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" 1281 if (type === 'ajax') { 1282 hrefParts = href.split(/\s+/, 2); 1283 href = hrefParts.shift(); 1284 selector = hrefParts.shift(); 1285 } 1286 } 1287 1288 if (!content) { 1289 if (type === 'inline') { 1290 if (href) { 1291 content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 1292 1293 } else if (obj.isDom) { 1294 content = element; 1295 } 1296 1297 } else if (type === 'html') { 1298 content = href; 1299 1300 } else if (!type && !href && obj.isDom) { 1301 type = 'inline'; 1302 content = element; 1303 } 1304 } 1305 1306 $.extend(obj, { 1307 href : href, 1308 type : type, 1309 content : content, 1310 title : title, 1311 selector : selector 1312 }); 1313 1314 group[ i ] = obj; 1315 }); 1316 1317 // Extend the defaults 1318 F.opts = $.extend(true, {}, F.defaults, opts); 1319 1320 // All options are merged recursive except keys 1321 if (opts.keys !== undefined) { 1322 F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; 1323 } 1324 1325 F.group = group; 1326 1327 return F._start(F.opts.index); 1328 }, 1329 1330 // Cancel image loading or abort ajax request 1331 cancel: function () { 1332 var coming = F.coming; 1333 1334 if (!coming || false === F.trigger('onCancel')) { 1335 return; 1336 } 1337 1338 F.hideLoading(); 1339 1340 if (F.ajaxLoad) { 1341 F.ajaxLoad.abort(); 1342 } 1343 1344 F.ajaxLoad = null; 1345 1346 if (F.imgPreload) { 1347 F.imgPreload.onload = F.imgPreload.onerror = null; 1348 } 1349 1350 if (coming.wrap) { 1351 coming.wrap.stop(true, true).trigger('onReset').remove(); 1352 } 1353 1354 F.coming = null; 1355 1356 // If the first item has been canceled, then clear everything 1357 if (!F.current) { 1358 F._afterZoomOut( coming ); 1359 } 1360 }, 1361 1362 // Start closing animation if is open; remove immediately if opening/closing 1363 close: function (event) { 1364 F.cancel(); 1365 1366 if (false === F.trigger('beforeClose')) { 1367 return; 1368 } 1369 1370 F.unbindEvents(); 1371 1372 if (!F.isActive) { 1373 return; 1374 } 1375 1376 if (!F.isOpen || event === true) { 1377 $('.fancybox-wrap').stop(true).trigger('onReset').remove(); 1378 1379 F._afterZoomOut(); 1380 1381 } else { 1382 F.isOpen = F.isOpened = false; 1383 F.isClosing = true; 1384 1385 $('.fancybox-item, .fancybox-nav').remove(); 1386 1387 F.wrap.stop(true, true).removeClass('fancybox-opened'); 1388 1389 F.transitions[ F.current.closeMethod ](); 1390 } 1391 }, 1392 1393 // Manage slideshow: 1394 // $.fancybox.play(); - toggle slideshow 1395 // $.fancybox.play( true ); - start 1396 // $.fancybox.play( false ); - stop 1397 play: function ( action ) { 1398 var clear = function () { 1399 clearTimeout(F.player.timer); 1400 }, 1401 set = function () { 1402 clear(); 1403 1404 if (F.current && F.player.isActive) { 1405 F.player.timer = setTimeout(F.next, F.current.playSpeed); 1406 } 1407 }, 1408 stop = function () { 1409 clear(); 1410 1411 D.unbind('.player'); 1412 1413 F.player.isActive = false; 1414 1415 F.trigger('onPlayEnd'); 1416 }, 1417 start = function () { 1418 if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { 1419 F.player.isActive = true; 1420 1421 D.bind({ 1422 'onCancel.player beforeClose.player' : stop, 1423 'onUpdate.player' : set, 1424 'beforeLoad.player' : clear 1425 }); 1426 1427 set(); 1428 1429 F.trigger('onPlayStart'); 1430 } 1431 }; 1432 1433 if (action === true || (!F.player.isActive && action !== false)) { 1434 start(); 1435 } else { 1436 stop(); 1437 } 1438 }, 1439 1440 // Navigate to next gallery item 1441 next: function ( direction ) { 1442 var current = F.current; 1443 1444 if (current) { 1445 if (!isString(direction)) { 1446 direction = current.direction.next; 1447 } 1448 1449 F.jumpto(current.index + 1, direction, 'next'); 1450 } 1451 }, 1452 1453 // Navigate to previous gallery item 1454 prev: function ( direction ) { 1455 var current = F.current; 1456 1457 if (current) { 1458 if (!isString(direction)) { 1459 direction = current.direction.prev; 1460 } 1461 1462 F.jumpto(current.index - 1, direction, 'prev'); 1463 } 1464 }, 1465 1466 // Navigate to gallery item by index 1467 jumpto: function ( index, direction, router ) { 1468 var current = F.current; 1469 1470 if (!current) { 1471 return; 1472 } 1473 1474 index = getScalar(index); 1475 1476 F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; 1477 F.router = router || 'jumpto'; 1478 1479 if (current.loop) { 1480 if (index < 0) { 1481 index = current.group.length + (index % current.group.length); 1482 } 1483 1484 index = index % current.group.length; 1485 } 1486 1487 if (current.group[ index ] !== undefined) { 1488 F.cancel(); 1489 1490 F._start(index); 1491 } 1492 }, 1493 1494 // Center inside viewport and toggle position type to fixed or absolute if needed 1495 reposition: function (e, onlyAbsolute) { 1496 var current = F.current, 1497 wrap = current ? current.wrap : null, 1498 pos; 1499 1500 if (wrap) { 1501 pos = F._getPosition(onlyAbsolute); 1502 1503 if (e && e.type === 'scroll') { 1504 delete pos.position; 1505 1506 wrap.stop(true, true).animate(pos, 200); 1507 1508 } else { 1509 wrap.css(pos); 1510 1511 current.pos = $.extend({}, current.dim, pos); 1512 } 1513 } 1514 }, 1515 1516 update: function (e) { 1517 var type = (e && e.type), 1518 anyway = !type || type === 'orientationchange'; 1519 1520 if (anyway) { 1521 clearTimeout(didUpdate); 1522 1523 didUpdate = null; 1524 } 1525 1526 if (!F.isOpen || didUpdate) { 1527 return; 1528 } 1529 1530 didUpdate = setTimeout(function() { 1531 var current = F.current; 1532 1533 if (!current || F.isClosing) { 1534 return; 1535 } 1536 1537 F.wrap.removeClass('fancybox-tmp'); 1538 1539 if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { 1540 F._setDimension(); 1541 } 1542 1543 if (!(type === 'scroll' && current.canShrink)) { 1544 F.reposition(e); 1545 } 1546 1547 F.trigger('onUpdate'); 1548 1549 didUpdate = null; 1550 1551 }, (anyway && !isTouch ? 0 : 300)); 1552 }, 1553 1554 // Shrink content to fit inside viewport or restore if resized 1555 toggle: function ( action ) { 1556 if (F.isOpen) { 1557 F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; 1558 1559 // Help browser to restore document dimensions 1560 if (isTouch) { 1561 F.wrap.removeAttr('style').addClass('fancybox-tmp'); 1562 1563 F.trigger('onUpdate'); 1564 } 1565 1566 F.update(); 1567 } 1568 }, 1569 1570 hideLoading: function () { 1571 D.unbind('.loading'); 1572 1573 $('#fancybox-loading').remove(); 1574 }, 1575 1576 showLoading: function () { 1577 var el, viewport; 1578 1579 F.hideLoading(); 1580 1581 el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body'); 1582 1583 // If user will press the escape-button, the request will be canceled 1584 D.bind('keydown.loading', function(e) { 1585 if ((e.which || e.keyCode) === 27) { 1586 e.preventDefault(); 1587 1588 F.cancel(); 1589 } 1590 }); 1591 1592 if (!F.defaults.fixed) { 1593 viewport = F.getViewport(); 1594 1595 el.css({ 1596 position : 'absolute', 1597 top : (viewport.h * 0.5) + viewport.y, 1598 left : (viewport.w * 0.5) + viewport.x 1599 }); 1600 } 1601 }, 1602 1603 getViewport: function () { 1604 var locked = (F.current && F.current.locked) || false, 1605 rez = { 1606 x: W.scrollLeft(), 1607 y: W.scrollTop() 1608 }; 1609 1610 if (locked) { 1611 rez.w = locked[0].clientWidth; 1612 rez.h = locked[0].clientHeight; 1613 1614 } else { 1615 // See http://bugs.jquery.com/ticket/6724 1616 rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); 1617 rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); 1618 } 1619 1620 return rez; 1621 }, 1622 1623 // Unbind the keyboard / clicking actions 1624 unbindEvents: function () { 1625 if (F.wrap && isQuery(F.wrap)) { 1626 F.wrap.unbind('.fb'); 1627 } 1628 1629 D.unbind('.fb'); 1630 W.unbind('.fb'); 1631 }, 1632 1633 bindEvents: function () { 1634 var current = F.current, 1635 keys; 1636 1637 if (!current) { 1638 return; 1639 } 1640 1641 // Changing document height on iOS devices triggers a 'resize' event, 1642 // that can change document height... repeating infinitely 1643 W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); 1644 1645 keys = current.keys; 1646 1647 if (keys) { 1648 D.bind('keydown.fb', function (e) { 1649 var code = e.which || e.keyCode, 1650 target = e.target || e.srcElement; 1651 1652 // Skip esc key if loading, because showLoading will cancel preloading 1653 if (code === 27 && F.coming) { 1654 return false; 1655 } 1656 1657 // Ignore key combinations and key events within form elements 1658 if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { 1659 $.each(keys, function(i, val) { 1660 if (current.group.length > 1 && val[ code ] !== undefined) { 1661 F[ i ]( val[ code ] ); 1662 1663 e.preventDefault(); 1664 return false; 1665 } 1666 1667 if ($.inArray(code, val) > -1) { 1668 F[ i ] (); 1669 1670 e.preventDefault(); 1671 return false; 1672 } 1673 }); 1674 } 1675 }); 1676 } 1677 1678 if ($.fn.mousewheel && current.mouseWheel) { 1679 F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { 1680 var target = e.target || null, 1681 parent = $(target), 1682 canScroll = false; 1683 1684 while (parent.length) { 1685 if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { 1686 break; 1687 } 1688 1689 canScroll = isScrollable( parent[0] ); 1690 parent = $(parent).parent(); 1691 } 1692 1693 if (delta !== 0 && !canScroll) { 1694 if (F.group.length > 1 && !current.canShrink) { 1695 if (deltaY > 0 || deltaX > 0) { 1696 F.prev( deltaY > 0 ? 'down' : 'left' ); 1697 1698 } else if (deltaY < 0 || deltaX < 0) { 1699 F.next( deltaY < 0 ? 'up' : 'right' ); 1700 } 1701 1702 e.preventDefault(); 1703 } 1704 } 1705 }); 1706 } 1707 }, 1708 1709 trigger: function (event, o) { 1710 var ret, obj = o || F.coming || F.current; 1711 1712 if (!obj) { 1713 return; 1714 } 1715 1716 if ($.isFunction( obj[event] )) { 1717 ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); 1718 } 1719 1720 if (ret === false) { 1721 return false; 1722 } 1723 1724 if (obj.helpers) { 1725 $.each(obj.helpers, function (helper, opts) { 1726 if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { 1727 F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); 1728 } 1729 });
vendor: 8,050 bytes, lines 1729-2088
1729 1730 } 1731 1732 D.trigger(event); 1733 }, 1734 1735 isImage: function (str) { 1736 return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); 1737 }, 1738 1739 isSWF: function (str) { 1740 return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); 1741 }, 1742 1743 _start: function (index) { 1744 var coming = {}, 1745 obj, 1746 href, 1747 type, 1748 margin, 1749 padding; 1750 1751 index = getScalar( index ); 1752 obj = F.group[ index ] || null; 1753 1754 if (!obj) { 1755 return false; 1756 } 1757 1758 coming = $.extend(true, {}, F.opts, obj); 1759 1760 // Convert margin and padding properties to array - top, right, bottom, left 1761 margin = coming.margin; 1762 padding = coming.padding; 1763 1764 if ($.type(margin) === 'number') { 1765 coming.margin = [margin, margin, margin, margin]; 1766 } 1767 1768 if ($.type(padding) === 'number') { 1769 coming.padding = [padding, padding, padding, padding]; 1770 } 1771 1772 // 'modal' propery is just a shortcut 1773 if (coming.modal) { 1774 $.extend(true, coming, { 1775 closeBtn : false, 1776 closeClick : false, 1777 nextClick : false, 1778 arrows : false, 1779 mouseWheel : false, 1780 keys : null, 1781 helpers: { 1782 overlay : { 1783 closeClick : false 1784 } 1785 } 1786 }); 1787 } 1788 1789 // 'autoSize' property is a shortcut, too 1790 if (coming.autoSize) { 1791 coming.autoWidth = coming.autoHeight = true; 1792 } 1793 1794 if (coming.width === 'auto') { 1795 coming.autoWidth = true; 1796 } 1797 1798 if (coming.height === 'auto') { 1799 coming.autoHeight = true; 1800 } 1801 1802 /* 1803 * Add reference to the group, so it`s possible to access from callbacks, example: 1804 * afterLoad : function() { 1805 * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 1806 * } 1807 */ 1808 1809 coming.group = F.group; 1810 coming.index = index; 1811 1812 // Give a chance for callback or helpers to update coming item (type, title, etc) 1813 F.coming = coming; 1814 1815 if (false === F.trigger('beforeLoad')) { 1816 F.coming = null; 1817 1818 return; 1819 } 1820 1821 type = coming.type; 1822 href = coming.href; 1823 1824 if (!type) { 1825 F.coming = null; 1826 1827 //If we can not determine content type then drop silently or display next/prev item if looping through gallery 1828 if (F.current && F.router && F.router !== 'jumpto') { 1829 F.current.index = index; 1830 1831 return F[ F.router ]( F.direction ); 1832 } 1833 1834 return false; 1835 } 1836 1837 F.isActive = true; 1838 1839 if (type === 'image' || type === 'swf') { 1840 coming.autoHeight = coming.autoWidth = false; 1841 coming.scrolling = 'visible'; 1842 } 1843 1844 if (type === 'image') { 1845 coming.aspectRatio = true; 1846 } 1847 1848 if (type === 'iframe' && isTouch) { 1849 coming.scrolling = 'scroll'; 1850 } 1851 1852 // Build the neccessary markup 1853 coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); 1854 1855 $.extend(coming, { 1856 skin : $('.fancybox-skin', coming.wrap), 1857 outer : $('.fancybox-outer', coming.wrap), 1858 inner : $('.fancybox-inner', coming.wrap) 1859 }); 1860 1861 $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { 1862 coming.skin.css('padding' + v, getValue(coming.padding[ i ])); 1863 }); 1864 1865 F.trigger('onReady'); 1866 1867 // Check before try to load; 'inline' and 'html' types need content, others - href 1868 if (type === 'inline' || type === 'html') { 1869 if (!coming.content || !coming.content.length) { 1870 return F._error( 'content' ); 1871 } 1872 1873 } else if (!href) { 1874 return F._error( 'href' ); 1875 } 1876 1877 if (type === 'image') { 1878 F._loadImage(); 1879 1880 } else if (type === 'ajax') { 1881 F._loadAjax(); 1882 1883 } else if (type === 'iframe') { 1884 F._loadIframe(); 1885 1886 } else { 1887 F._afterLoad(); 1888 } 1889 }, 1890 1891 _error: function ( type ) { 1892 $.extend(F.coming, { 1893 type : 'html', 1894 autoWidth : true, 1895 autoHeight : true, 1896 minWidth : 0, 1897 minHeight : 0, 1898 scrolling : 'no', 1899 hasError : type, 1900 content : F.coming.tpl.error 1901 }); 1902 1903 F._afterLoad(); 1904 }, 1905 1906 _loadImage: function () { 1907 // Reset preload image so it is later possible to check "complete" property 1908 var img = F.imgPreload = new Image(); 1909 1910 img.onload = function () { 1911 this.onload = this.onerror = null; 1912 1913 F.coming.width = this.width / F.opts.pixelRatio; 1914 F.coming.height = this.height / F.opts.pixelRatio; 1915 1916 F._afterLoad(); 1917 }; 1918 1919 img.onerror = function () { 1920 this.onload = this.onerror = null; 1921 1922 F._error( 'image' ); 1923 }; 1924 1925 img.src = F.coming.href; 1926 1927 if (img.complete !== true) { 1928 F.showLoading(); 1929 } 1930 }, 1931 1932 _loadAjax: function () { 1933 var coming = F.coming; 1934 1935 F.showLoading(); 1936 1937 F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { 1938 url: coming.href, 1939 error: function (jqXHR, textStatus) { 1940 if (F.coming && textStatus !== 'abort') { 1941 F._error( 'ajax', jqXHR ); 1942 1943 } else { 1944 F.hideLoading(); 1945 } 1946 }, 1947 success: function (data, textStatus) { 1948 if (textStatus === 'success') { 1949 coming.content = data; 1950 1951 F._afterLoad(); 1952 } 1953 } 1954 })); 1955 }, 1956 1957 _loadIframe: function() { 1958 var coming = F.coming, 1959 iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) 1960 .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) 1961 .attr('src', coming.href); 1962 1963 // This helps IE 1964 $(coming.wrap).bind('onReset', function () { 1965 try { 1966 $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); 1967 } catch (e) {} 1968 }); 1969 1970 if (coming.iframe.preload) { 1971 F.showLoading(); 1972 1973 iframe.one('load', function() { 1974 $(this).data('ready', 1); 1975 1976 // iOS will lose scrolling if we resize 1977 if (!isTouch) { 1978 $(this).bind('load.fb', F.update); 1979 } 1980 1981 // Without this trick: 1982 // - iframe won't scroll on iOS devices 1983 // - IE7 sometimes displays empty iframe 1984 $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); 1985 1986 F._afterLoad(); 1987 }); 1988 } 1989 1990 coming.content = iframe.appendTo( coming.inner ); 1991 1992 if (!coming.iframe.preload) { 1993 F._afterLoad(); 1994 } 1995 }, 1996 1997 _preloadImages: function() { 1998 var group = F.group, 1999 current = F.current, 2000 len = group.length, 2001 cnt = current.preload ? Math.min(current.preload, len - 1) : 0, 2002 item, 2003 i; 2004 2005 for (i = 1; i <= cnt; i += 1) { 2006 item = group[ (current.index + i ) % len ]; 2007 2008 if (item.type === 'image' && item.href) { 2009 new Image().src = item.href; 2010 } 2011 } 2012 }, 2013 2014 _afterLoad: function () { 2015 var coming = F.coming, 2016 previous = F.current, 2017 placeholder = 'fancybox-placeholder', 2018 current, 2019 content, 2020 type, 2021 scrolling, 2022 href, 2023 embed; 2024 2025 F.hideLoading(); 2026 2027 if (!coming || F.isActive === false) { 2028 return; 2029 } 2030 2031 if (false === F.trigger('afterLoad', coming, previous)) { 2032 coming.wrap.stop(true).trigger('onReset').remove(); 2033 2034 F.coming = null; 2035 2036 return; 2037 } 2038 2039 if (previous) { 2040 F.trigger('beforeChange', previous); 2041 2042 previous.wrap.stop(true).removeClass('fancybox-opened') 2043 .find('.fancybox-item, .fancybox-nav') 2044 .remove(); 2045 } 2046 2047 F.unbindEvents(); 2048 2049 current = coming; 2050 content = coming.content; 2051 type = coming.type; 2052 scrolling = coming.scrolling; 2053 2054 $.extend(F, { 2055 wrap : current.wrap, 2056 skin : current.skin, 2057 outer : current.outer, 2058 inner : current.inner, 2059 current : current, 2060 previous : previous 2061 }); 2062 2063 href = current.href; 2064 2065 switch (type) { 2066 case 'inline': 2067 case 'ajax': 2068 case 'html': 2069 if (current.selector) { 2070 content = $('<div>').html(content).find(current.selector); 2071 2072 } else if (isQuery(content)) { 2073 if (!content.data(placeholder)) { 2074 content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() ); 2075 } 2076 2077 content = content.show().detach(); 2078 2079 current.wrap.bind('onReset', function () { 2080 if ($(this).find(content).length) { 2081 content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); 2082 } 2083 }); 2084 } 2085 break; 2086 2087 case 'image': 2088 content = current.tpl.image.replace(
vendor: 19,741 bytes, lines 2088-2860
2088'{href}', href); 2089 break; 2090 2091 case 'swf': 2092 content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>'; 2093 embed = ''; 2094 2095 $.each(current.swf, function(name, val) { 2096 content += '<param name="' + name + '" value="' + val + '"></param>'; 2097 embed += ' ' + name + '="' + val + '"'; 2098 }); 2099 2100 content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>'; 2101 break; 2102 } 2103 2104 if (!(isQuery(content) && content.parent().is(current.inner))) { 2105 current.inner.append( content ); 2106 } 2107 2108 // Give a chance for helpers or callbacks to update elements 2109 F.trigger('beforeShow'); 2110 2111 // Set scrolling before calculating dimensions 2112 current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); 2113 2114 // Set initial dimensions and start position 2115 F._setDimension(); 2116 2117 F.reposition(); 2118 2119 F.isOpen = false; 2120 F.coming = null; 2121 2122 F.bindEvents(); 2123 2124 if (!F.isOpened) { 2125 $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); 2126 2127 } else if (previous.prevMethod) { 2128 F.transitions[ previous.prevMethod ](); 2129 } 2130 2131 F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); 2132 2133 F._preloadImages(); 2134 }, 2135 2136 _setDimension: function () { 2137 var viewport = F.getViewport(), 2138 steps = 0, 2139 canShrink = false, 2140 canExpand = false, 2141 wrap = F.wrap, 2142 skin = F.skin, 2143 inner = F.inner, 2144 current = F.current, 2145 width = current.width, 2146 height = current.height, 2147 minWidth = current.minWidth, 2148 minHeight = current.minHeight, 2149 maxWidth = current.maxWidth, 2150 maxHeight = current.maxHeight, 2151 scrolling = current.scrolling, 2152 scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, 2153 margin = current.margin, 2154 wMargin = getScalar(margin[1] + margin[3]), 2155 hMargin = getScalar(margin[0] + margin[2]), 2156 wPadding, 2157 hPadding, 2158 wSpace, 2159 hSpace, 2160 origWidth, 2161 origHeight, 2162 origMaxWidth, 2163 origMaxHeight, 2164 ratio, 2165 width_, 2166 height_, 2167 maxWidth_, 2168 maxHeight_, 2169 iframe, 2170 body; 2171 2172 // Reset dimensions so we could re-check actual size 2173 wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); 2174 2175 wPadding = getScalar(skin.outerWidth(true) - skin.width()); 2176 hPadding = getScalar(skin.outerHeight(true) - skin.height()); 2177 2178 // Any space between content and viewport (margin, padding, border, title) 2179 wSpace = wMargin + wPadding; 2180 hSpace = hMargin + hPadding; 2181 2182 origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; 2183 origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; 2184 2185 if (current.type === 'iframe') { 2186 iframe = current.content; 2187 2188 if (current.autoHeight && iframe.data('ready') === 1) { 2189 try { 2190 if (iframe[0].contentWindow.document.location) { 2191 inner.width( origWidth ).height(9999); 2192 2193 body = iframe.contents().find('body'); 2194 2195 if (scrollOut) { 2196 body.css('overflow-x', 'hidden'); 2197 } 2198 2199 origHeight = body.outerHeight(true); 2200 } 2201 2202 } catch (e) {} 2203 } 2204 2205 } else if (current.autoWidth || current.autoHeight) { 2206 inner.addClass( 'fancybox-tmp' ); 2207 2208 // Set width or height in case we need to calculate only one dimension 2209 if (!current.autoWidth) { 2210 inner.width( origWidth ); 2211 } 2212 2213 if (!current.autoHeight) { 2214 inner.height( origHeight ); 2215 } 2216 2217 if (current.autoWidth) { 2218 origWidth = inner.width(); 2219 } 2220 2221 if (current.autoHeight) { 2222 origHeight = inner.height(); 2223 } 2224 2225 inner.removeClass( 'fancybox-tmp' ); 2226 } 2227 2228 width = getScalar( origWidth ); 2229 height = getScalar( origHeight ); 2230 2231 ratio = origWidth / origHeight; 2232 2233 // Calculations for the content 2234 minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); 2235 maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); 2236 2237 minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); 2238 maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); 2239 2240 // These will be used to determine if wrap can fit in the viewport 2241 origMaxWidth = maxWidth; 2242 origMaxHeight = maxHeight; 2243 2244 if (current.fitToView) { 2245 maxWidth = Math.min(viewport.w - wSpace, maxWidth); 2246 maxHeight = Math.min(viewport.h - hSpace, maxHeight); 2247 } 2248 2249 maxWidth_ = viewport.w - wMargin; 2250 maxHeight_ = viewport.h - hMargin; 2251 2252 if (current.aspectRatio) { 2253 if (width > maxWidth) { 2254 width = maxWidth; 2255 height = getScalar(width / ratio); 2256 } 2257 2258 if (height > maxHeight) { 2259 height = maxHeight; 2260 width = getScalar(height * ratio); 2261 } 2262 2263 if (width < minWidth) { 2264 width = minWidth; 2265 height = getScalar(width / ratio); 2266 } 2267 2268 if (height < minHeight) { 2269 height = minHeight; 2270 width = getScalar(height * ratio); 2271 } 2272 2273 } else { 2274 width = Math.max(minWidth, Math.min(width, maxWidth)); 2275 2276 if (current.autoHeight && current.type !== 'iframe') { 2277 inner.width( width ); 2278 2279 height = inner.height(); 2280 } 2281 2282 height = Math.max(minHeight, Math.min(height, maxHeight)); 2283 } 2284 2285 // Try to fit inside viewport (including the title) 2286 if (current.fitToView) { 2287 inner.width( width ).height( height ); 2288 2289 wrap.width( width + wPadding ); 2290 2291 // Real wrap dimensions 2292 width_ = wrap.width(); 2293 height_ = wrap.height(); 2294 2295 if (current.aspectRatio) { 2296 while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { 2297 if (steps++ > 19) { 2298 break; 2299 } 2300 2301 height = Math.max(minHeight, Math.min(maxHeight, height - 10)); 2302 width = getScalar(height * ratio); 2303 2304 if (width < minWidth) { 2305 width = minWidth; 2306 height = getScalar(width / ratio); 2307 } 2308 2309 if (width > maxWidth) { 2310 width = maxWidth; 2311 height = getScalar(width / ratio); 2312 } 2313 2314 inner.width( width ).height( height ); 2315 2316 wrap.width( width + wPadding ); 2317 2318 width_ = wrap.width(); 2319 height_ = wrap.height(); 2320 } 2321 2322 } else { 2323 width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); 2324 height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); 2325 } 2326 } 2327 2328 if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { 2329 width += scrollOut; 2330 } 2331 2332 inner.width( width ).height( height ); 2333 2334 wrap.width( width + wPadding ); 2335 2336 width_ = wrap.width(); 2337 height_ = wrap.height(); 2338 2339 canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; 2340 canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); 2341 2342 $.extend(current, { 2343 dim : { 2344 width : getValue( width_ ), 2345 height : getValue( height_ ) 2346 }, 2347 origWidth : origWidth, 2348 origHeight : origHeight, 2349 canShrink : canShrink, 2350 canExpand : canExpand, 2351 wPadding : wPadding, 2352 hPadding : hPadding, 2353 wrapSpace : height_ - skin.outerHeight(true), 2354 skinSpace : skin.height() - height 2355 }); 2356 2357 if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { 2358 inner.height('auto'); 2359 } 2360 }, 2361 2362 _getPosition: function (onlyAbsolute) { 2363 var current = F.current, 2364 viewport = F.getViewport(), 2365 margin = current.margin, 2366 width = F.wrap.width() + margin[1] + margin[3], 2367 height = F.wrap.height() + margin[0] + margin[2], 2368 rez = { 2369 position: 'absolute', 2370 top : margin[0], 2371 left : margin[3] 2372 }; 2373 2374 if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { 2375 rez.position = 'fixed'; 2376 2377 } else if (!current.locked) { 2378 rez.top += viewport.y; 2379 rez.left += viewport.x; 2380 } 2381 2382 rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); 2383 rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); 2384 2385 return rez; 2386 }, 2387 2388 _afterZoomIn: function () { 2389 var current = F.current; 2390 2391 if (!current) { 2392 return; 2393 } 2394 2395 F.isOpen = F.isOpened = true; 2396 2397 F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); 2398 2399 F.update(); 2400 2401 // Assign a click event 2402 if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { 2403 F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { 2404 if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { 2405 e.preventDefault(); 2406 2407 F[ current.closeClick ? 'close' : 'next' ](); 2408 } 2409 }); 2410 } 2411 2412 // Create a close button 2413 if (current.closeBtn) { 2414 $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { 2415 e.preventDefault(); 2416 2417 F.close(); 2418 }); 2419 } 2420 2421 // Create navigation arrows 2422 if (current.arrows && F.group.length > 1) { 2423 if (current.loop || current.index > 0) { 2424 $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); 2425 } 2426 2427 if (current.loop || current.index < F.group.length - 1) { 2428 $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); 2429 } 2430 } 2431 2432 F.trigger('afterShow'); 2433 2434 // Stop the slideshow if this is the last item 2435 if (!current.loop && current.index === current.group.length - 1) { 2436 F.play( false ); 2437 2438 } else if (F.opts.autoPlay && !F.player.isActive) { 2439 F.opts.autoPlay = false; 2440 2441 F.play(); 2442 } 2443 }, 2444 2445 _afterZoomOut: function ( obj ) { 2446 obj = obj || F.current; 2447 2448 $('.fancybox-wrap').trigger('onReset').remove(); 2449 2450 $.extend(F, { 2451 group : {}, 2452 opts : {}, 2453 router : false, 2454 current : null, 2455 isActive : false, 2456 isOpened : false, 2457 isOpen : false, 2458 isClosing : false, 2459 wrap : null, 2460 skin : null, 2461 outer : null, 2462 inner : null 2463 }); 2464 2465 F.trigger('afterClose', obj); 2466 } 2467 }); 2468 2469 /* 2470 * Default transitions 2471 */ 2472 2473 F.transitions = { 2474 getOrigPosition: function () { 2475 var current = F.current, 2476 element = current.element, 2477 orig = current.orig, 2478 pos = {}, 2479 width = 50, 2480 height = 50, 2481 hPadding = current.hPadding, 2482 wPadding = current.wPadding, 2483 viewport = F.getViewport(); 2484 2485 if (!orig && current.isDom && element.is(':visible')) { 2486 orig = element.find('img:first'); 2487 2488 if (!orig.length) { 2489 orig = element; 2490 } 2491 } 2492 2493 if (isQuery(orig)) { 2494 pos = orig.offset(); 2495 2496 if (orig.is('img')) { 2497 width = orig.outerWidth(); 2498 height = orig.outerHeight(); 2499 } 2500 2501 } else { 2502 pos.top = viewport.y + (viewport.h - height) * current.topRatio; 2503 pos.left = viewport.x + (viewport.w - width) * current.leftRatio; 2504 } 2505 2506 if (F.wrap.css('position') === 'fixed' || current.locked) { 2507 pos.top -= viewport.y; 2508 pos.left -= viewport.x; 2509 } 2510 2511 pos = { 2512 top : getValue(pos.top - hPadding * current.topRatio), 2513 left : getValue(pos.left - wPadding * current.leftRatio), 2514 width : getValue(width + wPadding), 2515 height : getValue(height + hPadding) 2516 }; 2517 2518 return pos; 2519 }, 2520 2521 step: function (now, fx) { 2522 var ratio, 2523 padding, 2524 value, 2525 prop = fx.prop, 2526 current = F.current, 2527 wrapSpace = current.wrapSpace, 2528 skinSpace = current.skinSpace; 2529 2530 if (prop === 'width' || prop === 'height') { 2531 ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); 2532 2533 if (F.isClosing) { 2534 ratio = 1 - ratio; 2535 } 2536 2537 padding = prop === 'width' ? current.wPadding : current.hPadding; 2538 value = now - padding; 2539 2540 F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); 2541 F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); 2542 } 2543 }, 2544 2545 zoomIn: function () { 2546 var current = F.current, 2547 startPos = current.pos, 2548 effect = current.openEffect, 2549 elastic = effect === 'elastic', 2550 endPos = $.extend({opacity : 1}, startPos); 2551 2552 // Remove "position" property that breaks older IE 2553 delete endPos.position; 2554 2555 if (elastic) { 2556 startPos = this.getOrigPosition(); 2557 2558 if (current.openOpacity) { 2559 startPos.opacity = 0.1; 2560 } 2561 2562 } else if (effect === 'fade') { 2563 startPos.opacity = 0.1; 2564 } 2565 2566 F.wrap.css(startPos).animate(endPos, { 2567 duration : effect === 'none' ? 0 : current.openSpeed, 2568 easing : current.openEasing, 2569 step : elastic ? this.step : null, 2570 complete : F._afterZoomIn 2571 }); 2572 }, 2573 2574 zoomOut: function () { 2575 var current = F.current, 2576 effect = current.closeEffect, 2577 elastic = effect === 'elastic', 2578 endPos = {opacity : 0.1}; 2579 2580 if (elastic) { 2581 endPos = this.getOrigPosition(); 2582 2583 if (current.closeOpacity) { 2584 endPos.opacity = 0.1; 2585 } 2586 } 2587 2588 F.wrap.animate(endPos, { 2589 duration : effect === 'none' ? 0 : current.closeSpeed, 2590 easing : current.closeEasing, 2591 step : elastic ? this.step : null, 2592 complete : F._afterZoomOut 2593 }); 2594 }, 2595 2596 changeIn: function () { 2597 var current = F.current, 2598 effect = current.nextEffect, 2599 startPos = current.pos, 2600 endPos = { opacity : 1 }, 2601 direction = F.direction, 2602 distance = 200, 2603 field; 2604 2605 startPos.opacity = 0.1; 2606 2607 if (effect === 'elastic') { 2608 field = direction === 'down' || direction === 'up' ? 'top' : 'left'; 2609 2610 if (direction === 'down' || direction === 'right') { 2611 startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); 2612 endPos[ field ] = '+=' + distance + 'px'; 2613 2614 } else { 2615 startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); 2616 endPos[ field ] = '-=' + distance + 'px'; 2617 } 2618 } 2619 2620 // Workaround for http://bugs.jquery.com/ticket/12273 2621 if (effect === 'none') { 2622 F._afterZoomIn(); 2623 2624 } else { 2625 F.wrap.css(startPos).animate(endPos, { 2626 duration : current.nextSpeed, 2627 easing : current.nextEasing, 2628 complete : F._afterZoomIn 2629 }); 2630 } 2631 }, 2632 2633 changeOut: function () { 2634 var previous = F.previous, 2635 effect = previous.prevEffect, 2636 endPos = { opacity : 0.1 }, 2637 direction = F.direction, 2638 distance = 200; 2639 2640 if (effect === 'elastic') { 2641 endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; 2642 } 2643 2644 previous.wrap.animate(endPos, { 2645 duration : effect === 'none' ? 0 : previous.prevSpeed, 2646 easing : previous.prevEasing, 2647 complete : function () { 2648 $(this).trigger('onReset').remove(); 2649 } 2650 }); 2651 } 2652 }; 2653 2654 /* 2655 * Overlay helper 2656 */ 2657 2658 F.helpers.overlay = { 2659 defaults : { 2660 closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay 2661 speedOut : 200, // duration of fadeOut animation 2662 showEarly : true, // indicates if should be opened immediately or wait until the content is ready 2663 css : {}, // custom CSS properties 2664 locked : !isTouch, // if true, the content will be locked into overlay 2665 fixed : true // if false, the overlay CSS position property will not be set to "fixed" 2666 }, 2667 2668 overlay : null, // current handle 2669 fixed : false, // indicates if the overlay has position "fixed" 2670 el : $('html'), // element that contains "the lock" 2671 2672 // Public methods 2673 create : function(opts) { 2674 opts = $.extend({}, this.defaults, opts); 2675 2676 if (this.overlay) { 2677 this.close(); 2678 } 2679 2680 this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent ); 2681 this.fixed = false; 2682 2683 if (opts.fixed && F.defaults.fixed) { 2684 this.overlay.addClass('fancybox-overlay-fixed'); 2685 2686 this.fixed = true; 2687 } 2688 }, 2689 2690 open : function(opts) { 2691 var that = this; 2692 2693 opts = $.extend({}, this.defaults, opts); 2694 2695 if (this.overlay) { 2696 this.overlay.unbind('.overlay').width('auto').height('auto'); 2697 2698 } else { 2699 this.create(opts); 2700 } 2701 2702 if (!this.fixed) { 2703 W.bind('resize.overlay', $.proxy( this.update, this) ); 2704 2705 this.update(); 2706 } 2707 2708 if (opts.closeClick) { 2709 this.overlay.bind('click.overlay', function(e) { 2710 if ($(e.target).hasClass('fancybox-overlay')) { 2711 if (F.isActive) { 2712 F.close(); 2713 } else { 2714 that.close(); 2715 } 2716 2717 return false; 2718 } 2719 }); 2720 } 2721 2722 this.overlay.css( opts.css ).show(); 2723 }, 2724 2725 close : function() { 2726 var scrollV, scrollH; 2727 2728 W.unbind('resize.overlay'); 2729 2730 if (this.el.hasClass('fancybox-lock')) { 2731 $('.fancybox-margin').removeClass('fancybox-margin'); 2732 2733 scrollV = W.scrollTop(); 2734 scrollH = W.scrollLeft(); 2735 2736 this.el.removeClass('fancybox-lock'); 2737 2738 W.scrollTop( scrollV ).scrollLeft( scrollH ); 2739 } 2740 2741 $('.fancybox-overlay').remove().hide(); 2742 2743 $.extend(this, { 2744 overlay : null, 2745 fixed : false 2746 }); 2747 }, 2748 2749 // Private, callbacks 2750 2751 update : function () { 2752 var width = '100%', offsetWidth; 2753 2754 // Reset width/height so it will not mess 2755 this.overlay.width(width).height('100%'); 2756 2757 // jQuery does not return reliable result for IE 2758 if (IE) { 2759 offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); 2760 2761 if (D.width() > offsetWidth) { 2762 width = D.width(); 2763 } 2764 2765 } else if (D.width() > W.width()) { 2766 width = D.width(); 2767 } 2768 2769 this.overlay.width(width).height(D.height()); 2770 }, 2771 2772 // This is where we can manipulate DOM, because later it would cause iframes to reload 2773 onReady : function (opts, obj) { 2774 var overlay = this.overlay; 2775 2776 $('.fancybox-overlay').stop(true, true); 2777 2778 if (!overlay) { 2779 this.create(opts); 2780 } 2781 2782 if (opts.locked && this.fixed && obj.fixed) { 2783 if (!overlay) { 2784 this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; 2785 } 2786 2787 obj.locked = this.overlay.append( obj.wrap ); 2788 obj.fixed = false; 2789 } 2790 2791 if (opts.showEarly === true) { 2792 this.beforeShow.apply(this, arguments); 2793 } 2794 }, 2795 2796 beforeShow : function(opts, obj) { 2797 var scrollV, scrollH; 2798 2799 if (obj.locked) { 2800 if (this.margin !== false) { 2801 $('*').filter(function(){ 2802 return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); 2803 }).addClass('fancybox-margin'); 2804 2805 this.el.addClass('fancybox-margin'); 2806 } 2807 2808 scrollV = W.scrollTop(); 2809 scrollH = W.scrollLeft(); 2810 2811 this.el.addClass('fancybox-lock'); 2812 2813 W.scrollTop( scrollV ).scrollLeft( scrollH ); 2814 } 2815 2816 this.open(opts); 2817 }, 2818 2819 onUpdate : function() { 2820 if (!this.fixed) { 2821 this.update(); 2822 } 2823 }, 2824 2825 afterClose: function (opts) { 2826 // Remove overlay if exists and fancyBox is not opening 2827 // (e.g., it is not being open using afterClose callback) 2828 //if (this.overlay && !F.isActive) { 2829 if (this.overlay && !F.coming) { 2830 this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); 2831 } 2832 } 2833 }; 2834 2835 /* 2836 * Title helper 2837 */ 2838 2839 F.helpers.title = { 2840 defaults : { 2841 type : 'float', // 'float', 'inside', 'outside' or 'over', 2842 position : 'bottom' // 'top' or 'bottom' 2843 }, 2844 2845 beforeShow: function (opts) { 2846 var current = F.current, 2847 text = current.title, 2848 type = opts.type, 2849 title, 2850 target; 2851 2852 if ($.isFunction(text)) { 2853 text = text.call(current.element, current); 2854 } 2855 2856 if (!isString(text) || $.trim(text) === '') { 2857 return; 2858 } 2859 2860 title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">
2860' + text + '</div>'); 2861 2862 switch (type) { 2863 case 'inside': 2864 target = F.skin; 2865 break; 2866 2867 case 'outside': 2868 target = F.wrap; 2869 break; 2870 2871 case 'over': 2872 target = F.inner; 2873 break; 2874 2875 default: // 'float' 2876 target = F.skin; 2877 2878 title.appendTo('body'); 2879 2880 if (IE) { 2881 title.width( title.width() ); 2882 } 2883 2884 title.wrapInner('<span class="child"></span>'); 2885 2886 //Increase bottom margin so this title will also fit into viewport 2887 F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); 2888 break; 2889 } 2890 2891 title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); 2892 } 2893 }; 2894 2895 // jQuery plugin initialization 2896 $.fn.fancybox = function (options) { 2897 var index, 2898 that = $(this), 2899 selector = this.selector || '', 2900 run = function(e) { 2901 var what = $(this).blur(), idx = index, relType, relVal; 2902 2903 if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { 2904 relType = options.groupAttr || 'data-fancybox-group'; 2905 relVal = what.attr(relType); 2906 2907 if (!relVal) { 2908 relType = 'rel'; 2909 relVal = what.get(0)[ relType ]; 2910 } 2911 2912 if (relVal && relVal !== '' && relVal !== 'nofollow') { 2913 what = selector.length ? $(selector) : that; 2914 what = what.filter('[' + relType + '="' + relVal + '"]'); 2915 idx = what.index(this); 2916 } 2917 2918 options.index = idx; 2919 2920 // Stop an event from bubbling if everything is fine 2921 if (F.open(what, options) !== false) { 2922 e.preventDefault(); 2923 } 2924 } 2925 }; 2926 2927 options = options || {}; 2928 index = options.index || 0; 2929 2930 if (!selector || options.live === false) { 2931 that.unbind('click.fb-start').bind('click.fb-start', run); 2932 2933 } else { 2934 D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); 2935 } 2936 2937 this.filter('[data-fancybox-start=1]').trigger('click'); 2938 2939 return this; 2940 }; 2941 2942 // Tests that need a body at doc ready 2943 D.ready(function() { 2944 var w1, w2; 2945 2946 if ( $.scrollbarWidth === undefined ) { 2947 // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth 2948 $.scrollbarWidth = function() { 2949 var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'), 2950 child = parent.children(), 2951 width = child.innerWidth() - child.height( 99 ).innerWidth(); 2952 2953 parent.remove(); 2954 2955 return width; 2956 }; 2957 } 2958 2959 if ( $.support.fixedPosition === undefined ) { 2960 $.support.fixedPosition = (function() { 2961 var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'), 2962 fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); 2963 2964 elem.remove(); 2965 2966 return fixed; 2967 }()); 2968 } 2969 2970 $.extend(F.defaults, { 2971 scrollbarWidth : $.scrollbarWidth(), 2972 fixed : $.support.fixedPosition, 2973 parent : $('body') 2974 }); 2975 2976 //Get real width of page scroll-bar 2977 w1 = $(window).width(); 2978 2979 H.addClass('fancybox-lock-test'); 2980 2981 w2 = $(window).width(); 2982 2983 H.removeClass('fancybox-lock-test'); 2984 2985 $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head"); 2986 }); 2987 2988}(window, document, jQuery));; 2989 2990/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2991 * Licensed under the MIT License (LICENSE.txt). 2992 * 2993 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 2994 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 2995 * Thanks to: Seamus Leahy for adding deltaX and deltaY 2996 * 2997 * Version: 3.0.6 2998 * 2999 * Requires: 1.2.2+ 3000 */ 3001(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); 3002; 3003 3004/*! 3005 * Media helper for fancyBox 3006 * version: 1.0.6 (Fri, 14 Jun 2013) 3007 * @requires fancyBox v2.0 or later 3008 * 3009 * Usage: 3010 * $(".fancybox").fancybox({ 3011 * helpers : { 3012 * media: true 3013 * } 3014 * }); 3015 * 3016 * Set custom URL parameters: 3017 * $(".fancybox").fancybox({ 3018 * helpers : { 3019 * media: { 3020 * youtube : { 3021 * params : { 3022 * autoplay : 0 3023 * } 3024 * } 3025 * } 3026 * } 3027 * }); 3028 * 3029 * Or: 3030 * $(".fancybox").fancybox({, 3031 * helpers : { 3032 * media: true 3033 * }, 3034 * youtube : { 3035 * autoplay: 0 3036 * } 3037 * }); 3038 * 3039 * Supports: 3040 * 3041 * Youtube 3042 * http://www.youtube.com/watch?v=opj24KnzrWo 3043 * http://www.youtube.com/embed/opj24KnzrWo 3044 * http://youtu.be/opj24KnzrWo 3045 * http://www.youtube-nocookie.com/embed/opj24KnzrWo 3046 * Vimeo 3047 * http://vimeo.com/40648169 3048 * http://vimeo.com/channels/staffpicks/38843628
vendor: 4,218 bytes, lines 3049-3197
3049 * http://vimeo.com/groups/surrealism/videos/36516384 3050 * http://player.vimeo.com/video/45074303 3051 * Metacafe 3052 * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 3053 * http://www.metacafe.com/watch/7635964/ 3054 * Dailymotion 3055 * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 3056 * Twitvid 3057 * http://twitvid.com/QY7MD 3058 * Twitpic 3059 * http://twitpic.com/7p93st 3060 * Instagram 3061 * http://instagr.am/p/IejkuUGxQn/ 3062 * http://instagram.com/p/IejkuUGxQn/ 3063 * Google maps 3064 * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 3065 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 3066 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 3067 */ 3068(function ($) { 3069 "use strict"; 3070 3071 //Shortcut for fancyBox object 3072 var F = $.fancybox, 3073 format = function( url, rez, params ) { 3074 params = params || ''; 3075 3076 if ( $.type( params ) === "object" ) { 3077 params = $.param(params, true); 3078 } 3079 3080 $.each(rez, function(key, value) { 3081 url = url.replace( '$' + key, value || '' ); 3082 }); 3083 3084 if (params.length) { 3085 url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 3086 } 3087 3088 return url; 3089 }; 3090 3091 //Add helper object 3092 F.helpers.media = { 3093 defaults : { 3094 youtube : { 3095 matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 3096 params : { 3097 autoplay : 1, 3098 autohide : 1, 3099 fs : 1, 3100 rel : 0, 3101 hd : 1, 3102 wmode : 'opaque', 3103 enablejsapi : 1 3104 }, 3105 type : 'iframe', 3106 url : '//www.youtube.com/embed/$3' 3107 }, 3108 vimeo : { 3109 matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 3110 params : { 3111 autoplay : 1, 3112 hd : 1, 3113 show_title : 1, 3114 show_byline : 1, 3115 show_portrait : 0, 3116 fullscreen : 1 3117 }, 3118 type : 'iframe', 3119 url : '//player.vimeo.com/video/$1' 3120 }, 3121 metacafe : { 3122 matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 3123 params : { 3124 autoPlay : 'yes' 3125 }, 3126 type : 'swf', 3127 url : function( rez, params, obj ) { 3128 obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 3129 3130 return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 3131 } 3132 }, 3133 dailymotion : { 3134 matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 3135 params : { 3136 additionalInfos : 0, 3137 autoStart : 1 3138 }, 3139 type : 'swf', 3140 url : '//www.dailymotion.com/swf/video/$1' 3141 }, 3142 twitvid : { 3143 matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 3144 params : { 3145 autoplay : 0 3146 }, 3147 type : 'iframe', 3148 url : '//www.twitvid.com/embed.php?guid=$1' 3149 }, 3150 twitpic : { 3151 matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 3152 type : 'image', 3153 url : '//twitpic.com/show/full/$1/' 3154 }, 3155 instagram : { 3156 matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 3157 type : 'image', 3158 url : '//$1/p/$2/media/?size=l' 3159 }, 3160 google_maps : { 3161 matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 3162 type : 'iframe', 3163 url : function( rez ) { 3164 return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 3165 } 3166 } 3167 }, 3168 3169 beforeLoad : function(opts, obj) { 3170 var url = obj.href || '', 3171 type = false, 3172 what, 3173 item, 3174 rez, 3175 params; 3176 3177 for (what in opts) { 3178 if (opts.hasOwnProperty(what)) { 3179 item = opts[ what ]; 3180 rez = url.match( item.matcher ); 3181 3182 if (rez) { 3183 type = item.type; 3184 params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 3185 3186 url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 3187 3188 break; 3189 } 3190 } 3191 } 3192 3193 if (type) { 3194 obj.href = url; 3195 obj.type = type; 3196 3197 obj.autoHeight = false;
vendor: 27,489 bytes, lines 3198-3215
3198 } 3199 } 3200 }; 3201 3202}(jQuery));; 3203 3204rep="/roll/";pref="ov_";function initRollover(){src1=src2=el=0;imageOver=[];D=document;im=D.getElementsByTagName("img");if(!im){return}for(var a=0;a<im.length;++a){if(im[a].src.indexOf(rep)!=-1&&im[a].src.indexOf(rep+pref)==-1){imageOver[a]=new Image();imageOver[a].src=im[a].src.replace(rep,rep+pref)}}addEvent(D,"mouseover",chg_img);addEvent(D,"mouseout",retabli_img)}function chg_img(a){el=a.target?a.target:event.srcElement;if(!el){return}if(!el.tagName){return}if((el.tagName=="IMG")&&el.src.indexOf(rep)!=-1&&el.src.indexOf(rep+pref)==-1){src1=el.src;el.src=el.src.replace(rep,rep+pref)}}function retabli_img(a){el=a.target?a.target:event.srcElement;if(!el){return}if(!el.tagName){return}if(src1&&(el.tagName=="IMG")&&el.src.indexOf(rep)!=-1&&el.src==src1.replace(rep,rep+pref)){el.src=src1}src1=0}function addEvent(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a);return true}else{if(d.attachEvent){d.attachEvent("on"+c,b)}else{return false}}}addEvent(window,"load",initRollover);; 3205 3206/** 3207 * simplebar - v6.2.7 3208 * Scrollbars, simpler. 3209 * https://grsmto.github.io/simplebar/ 3210 * 3211 * Made by Adrien Denat from a fork by Jonathan Nicol 3212 * Under MIT License 3213 */ 3214 3215var SimpleBar=function(){"use strict";var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};var e="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,s=e||i||Function("return this")(),r=s.Symbol,l=Object.prototype,o=l.hasOwnProperty,n=l.toString,a=r?r.toStringTag:void 0;var c=Object.prototype.toString;var h="[object Null]",u="[object Undefined]",d=r?r.toStringTag:void 0;function p(t){return null==t?void 0===t?u:h:d&&d in Object(t)?function(t){var e=o.call(t,a),i=t[a];try{t[a]=void 0;var s=!0}catch(t){}var r=n.call(t);return s&&(e?t[a]=i:delete t[a]),r}(t):function(t){return c.call(t)}(t)}var v="[object Symbol]";var f=/\s/;var m=/^\s+/;function b(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&f.test(t.charAt(e)););return e}(t)+1).replace(m,""):t}function g(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var x=NaN,y=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,O=/^0o[0-7]+$/i,w=parseInt;function S(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&p(t)==v}(t))return x;if(g(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=b(t);var i=E.test(t);return i||O.test(t)?w(t.slice(2),i?2:8):y.test(t)?x:+t}var A=function(){return s.Date.now()},k="Expected a function",W=Math.max,M=Math.min;function N(t,e,i){var s,r,l,o,n,a,c=0,h=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError(k);function p(e){var i=s,l=r;return s=r=void 0,c=e,o=t.apply(l,i)}function v(t){var i=t-a;return void 0===a||i>=e||i<0||u&&t-c>=l}function f(){var t=A();if(v(t))return m(t);n=setTimeout(f,function(t){var i=e-(t-a);return u?M(i,l-(t-c)):i}(t))}function m(t){return n=void 0,d&&s?p(t):(s=r=void 0,o)}function b(){var t=A(),i=v(t);if(s=arguments,r=this,a=t,i){if(void 0===n)return function(t){return c=t,n=setTimeout(f,e),h?p(t):o}(a);if(u)return clearTimeout(n),n=setTimeout(f,e),p(a)}return void 0===n&&(n=setTimeout(f,e)),o}return e=S(e)||0,g(i)&&(h=!!i.leading,l=(u="maxWait"in i)?W(S(i.maxWait)||0,e):l,d="trailing"in i?!!i.trailing:d),b.cancel=function(){void 0!==n&&clearTimeout(n),c=0,s=a=r=n=void 0},b.flush=function(){return void 0===n?o:m(A())},b}var L=function(){return L=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},L.apply(this,arguments)};function z(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function C(t){return t&&t.ownerDocument?t.ownerDocument:document}var T=function(t){return Array.prototype.reduce.call(t,(function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var s=i[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[s]=!0;break;case"false":t[s]=!1;break;case void 0:t[s]=!0;break;default:t[s]=e.value}}return t}),{})};function D(t,e){var i;t&&(i=t.classList).add.apply(i,e.split(" "))}function R(t,e){t&&e.split(" ").forEach((function(e){t.classList.remove(e)}))}function V(t){return".".concat(t.split(" ").join("."))}var H=!("undefined"==typeof window||!window.document||!window.document.createElement),j=Object.freeze({__proto__:null,addClasses:D,canUseDOM:H,classNamesToQuery:V,getElementDocument:C,getElementWindow:z,getOptions:T,removeClasses:R}),B=null,_=null;function q(){if(null===B){if("undefined"==typeof document)return B=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var i=e.getBoundingClientRect().right;t.removeChild(e),B=i}return B}H&&window.addEventListener("resize",(function(){_!==window.devicePixelRatio&&(_=window.devicePixelRatio,B=null)}));var P=z,X=C,Y=T,F=D,I=R,U=V,$=function(){function t(e,i){void 0===i&&(i={});var s=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var t=P(s.el);s.scrollXTicking||(t.requestAnimationFrame(s.scrollX),s.scrollXTicking=!0),s.scrollYTicking||(t.requestAnimationFrame(s.scrollY),s.scrollYTicking=!0),s.isScrolling||(s.isScrolling=!0,F(s.el,s.classNames.scrolling)),s.showScrollbar("x"),s.showScrollbar("y"),s.onStopScrolling()},this.scrollX=function(){s.axis.x.isOverflowing&&s.positionScrollbar("x"),s.scrollXTicking=!1},this.scrollY=function(){s.axis.y.isOverflowing&&s.positionScrollbar("y"),s.scrollYTicking=!1},this._onStopScrolling=function(){I(s.el,s.classNames.scrolling),s.options.autoHide&&(s.hideScrollbar("x"),s.hideScrollbar("y")),s.isScrolling=!1},this.onMouseEnter=function(){s.isMouseEntering||(F(s.el,s.classNames.mouseEntered),s.showScrollbar("x"),s.showScrollbar("y"),s.isMouseEntering=!0),s.onMouseEntered()},this._onMouseEntered=function(){I(s.el,s.classNames.mouseEntered),s.options.autoHide&&(s.hideScrollbar("x"),s.hideScrollbar("y")),s.isMouseEntering=!1},this._onMouseMove=function(t){s.mouseX=t.clientX,s.mouseY=t.clientY,(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseMoveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseMoveForAxis("y")},this.onMouseLeave=function(){s.onMouseMove.cancel(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseLeaveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseLeaveForAxis("y"),s.mouseX=-1,s.mouseY=-1},this._onWindowResize=function(){s.scrollbarWidth=s.getScrollbarWidth(),s.hideNativeScrollbar()},this.onPointerEvent=function(t){var e,i;s.axis.x.track.el&&s.axis.y.track.el&&s.axis.x.scrollbar.el&&s.axis.y.scrollbar.el&&(s.axis.x.track.rect=s.axis.x.track.el.getBoundingClientRect(),s.axis.y.track.rect=s.axis.y.track.el.getBoundingClientRect(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&(e=s.isWithinBounds(s.axis.x.track.rect)),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&(i=s.isWithinBounds(s.axis.y.track.rect)),(e||i)&&(t.stopPropagation(),"pointerdown"===t.type&&"touch"!==t.pointerType&&(e&&(s.axis.x.scrollbar.rect=s.axis.x.scrollbar.el.getBoundingClientRect(),s.isWithinBounds(s.axis.x.scrollbar.rect)?s.onDragStart(t,"x"):s.onTrackClick(t,"x")),i&&(s.axis.y.scrollbar.rect=s.axis.y.scrollbar.el.getBoundingClientRect(),s.isWithinBounds(s.axis.y.scrollbar.rect)?s.onDragStart(t,"y"):s.onTrackClick(t,"y")))))},this.drag=function(e){var i,r,l,o,n,a,c,h,u,d,p;if(s.draggedAxis&&s.contentWrapperEl){var v=s.axis[s.draggedAxis].track,f=null!==(r=null===(i=v.rect)||void 0===i?void 0:i[s.axis[s.draggedAxis].sizeAttr])&&void 0!==r?r:0,m=s.axis[s.draggedAxis].scrollbar,b=null!==(o=null===(l=s.contentWrapperEl)||void 0===l?void 0:l[s.axis[s.draggedAxis].scrollSizeAttr])&&void 0!==o?o:0,g=parseInt(null!==(a=null===(n=s.elStyles)||void 0===n?void 0:n[s.axis[s.draggedAxis].sizeAttr])&&void 0!==a?a:"0px",10);e.preventDefault(),e.stopPropagation();var x=("y"===s.draggedAxis?e.pageY:e.pageX)-(null!==(h=null===(c=v.rect)||void 0===c?void 0:c[s.axis[s.draggedAxis].offsetAttr])&&void 0!==h?h:0)-s.axis[s.draggedAxis].dragOffset,y=(x="x"===s.draggedAxis&&s.isRtl?(null!==(d=null===(u=v.rect)||void 0===u?void 0:u[s.axis[s.draggedAxis].sizeAttr])&&void 0!==d?d:0)-m.size-x:x)/(f-m.size)*(b-g);"x"===s.draggedAxis&&s.isRtl&&(y=(null===(p=t.getRtlHelpers())||void 0===p?void 0:p.isScrollingToNegative)?-y:y),s.contentWrapperEl[s.axis[s.draggedAxis].scrollOffsetAttr]=y}},this.onEndDrag=function(t){s.isDragging=!1;var e=X(s.el),i=P(s.el);t.preventDefault(),t.stopPropagation(),I(s.el,s.classNames.dragging),s.onStopScrolling(),e.removeEventListener("mousemove",s.drag,!0),e.removeEventListener("mouseup",s.onEndDrag,!0),s.removePreventClickId=i.setTimeout((function(){e.removeEventListener("click",s.preventClick,!0),e.removeEventListener("dblclick",s.preventClick,!0),s.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.options=L(L({},t.defaultOptions),i),this.classNames=L(L({},t.defaultOptions.classNames),i.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},"object"!=typeof this.el||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=function(t,e,i){var s=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return g(i)&&(s="leading"in i?!!i.leading:s,r="trailing"in i?!!i.trailing:r),N(t,e,{leading:s,maxWait:e,trailing:r})}(this._onMouseMove,64),this.onWindowResize=N(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=N(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=N(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var i=e.firstElementChild,s=null==i?void 0:i.firstElementChild;if(!s)return null;document.body.appendChild(i),i.scrollLeft=0;var r=t.getOffset(i),l=t.getOffset(s);i.scrollLeft=-999;var o=t.getOffset(s);return document.body.removeChild(i),t.rtlHelpers={isScrollOriginAtZero:r.left!==l.left,isScrollingToNegative:l.left!==o.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:q()}catch(t){return q()}},t.getOffset=function(t){var e=t.getBoundingClientRect(),i=X(t),s=P(t);return{top:e.top+(s.pageYOffset||i.documentElement.scrollTop),left:e.left+(s.pageXOffset||i.documentElement.scrollLeft)}},t.prototype.init=function(){H&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var t,e;this.wrapperEl=this.el.querySelector(U(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(U(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(U(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(U(this.classNames.offset)),this.maskEl=this.el.querySelector(U(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,U(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(U(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(U(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(U(this.classNames.track)).concat(U(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(U(this.classNames.track)).concat(U(this.classNames.vertical))),this.axis.x.scrollbar.el=(null===(t=this.axis.x.track.el)||void 0===t?void 0:t.querySelector(U(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=(null===(e=this.axis.y.track.el)||void 0===e?void 0:e.querySelector(U(this.classNames.scrollbar)))||null,this.options.autoHide||(F(this.axis.x.scrollbar.el,this.classNames.visible),F(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var t,e=this,i=P(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),null===(t=this.contentWrapperEl)||void 0===t||t.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize),this.contentEl){if(window.ResizeObserver){var s=!1,r=i.ResizeObserver||ResizeObserver;this.resizeObserver=new r((function(){s&&i.requestAnimationFrame((function(){e.recalculate()}))})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame((function(){s=!0}))}this.mutationObserver=new i.MutationObserver((function(){i.requestAnimationFrame((function(){e.recalculate()}))})),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(this.heightAutoObserverEl&&this.contentEl&&this.contentWrapperEl&&this.wrapperEl&&this.placeholderEl){var t=P(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||e>0,r=this.contentWrapperEl.offsetWidth,l=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var n=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=s?"".concat(e||a,"px"):"auto",this.placeholderEl.style.height="".concat(n,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&a>e,this.axis.y.isOverflowing=n>c,this.axis.x.isOverflowing="hidden"!==l&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,u=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>r-u,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&n>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(t){var e,i;if(void 0===t&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s,r=this.contentEl[this.axis[t].scrollSizeAttr],l=null!==(i=null===(e=this.axis[t].track.el)||void 0===e?void 0:e[this.axis[t].offsetSizeAttr])&&void 0!==i?i:0,o=l/r;return s=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},t.prototype.positionScrollbar=function(e){var i,s,r;void 0===e&&(e="y");var l=this.axis[e].scrollbar;if(this.axis[e].isOverflowing&&this.contentWrapperEl&&l.el&&this.elStyles){var o=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=(null===(i=this.axis[e].track.el)||void 0===i?void 0:i[this.axis[e].offsetSizeAttr])||0,a=parseInt(this.elStyles[this.axis[e].sizeAttr],10),c=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];c="x"===e&&this.isRtl&&(null===(s=t.getRtlHelpers())||void 0===s?void 0:s.isScrollOriginAtZero)?-c:c,"x"===e&&this.isRtl&&(c=(null===(r=t.getRtlHelpers())||void 0===r?void 0:r.isScrollingToNegative)?c:-c);var h=c/(o-a),u=~~((n-l.size)*h);u="x"===e&&this.isRtl?-u+(n-l.size):u,l.el.style.transform="x"===e?"translate3d(".concat(u,"px, 0, 0)"):"translate3d(0, ".concat(u,"px, 0)")}},t.prototype.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,i=this.axis[t].scrollbar.el;e&&i&&this.contentWrapperEl&&(this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none")},t.prototype.showScrollbar=function(t){void 0===t&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(F(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(t){void 0===t&&(t="y"),this.isDragging||this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(I(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(t){void 0===t&&(t="y");var e=this.axis[t];e.track.el&&e.scrollbar.el&&(e.track.rect=e.track.el.getBoundingClientRect(),e.scrollbar.rect=e.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(e.track.rect)?(this.showScrollbar(t),F(e.track.el,this.classNames.hover),this.isWithinBounds(e.scrollbar.rect)?F(e.scrollbar.el,this.classNames.hover):I(e.scrollbar.el,this.classNames.hover)):(I(e.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},t.prototype.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),I(this.axis[t].track.el,this.classNames.hover),I(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},t.prototype.onDragStart=function(t,e){var i;void 0===e&&(e="y"),this.isDragging=!0;var s=X(this.el),r=P(this.el),l=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-((null===(i=l.rect)||void 0===i?void 0:i[this.axis[e].offsetAttr])||0),this.draggedAxis=e,F(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(t,e){var i,s,r,l,o=this;void 0===e&&(e="y");var n=this.axis[e];if(this.options.clickOnTrack&&n.scrollbar.el&&this.contentWrapperEl){t.preventDefault();var a=P(this.el);this.axis[e].scrollbar.rect=n.scrollbar.el.getBoundingClientRect();var c=null!==(s=null===(i=this.axis[e].scrollbar.rect)||void 0===i?void 0:i[this.axis[e].offsetAttr])&&void 0!==s?s:0,h=parseInt(null!==(l=null===(r=this.elStyles)||void 0===r?void 0:r[this.axis[e].sizeAttr])&&void 0!==l?l:"0px",10),u=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],d=("y"===e?this.mouseY-c:this.mouseX-c)<0?-1:1,p=-1===d?u-h:u+h,v=function(){o.contentWrapperEl&&(-1===d?u>p&&(u-=40,o.contentWrapperEl[o.axis[e].scrollOffsetAttr]=u,a.requestAnimationFrame(v)):u<p&&(u+=40,o.contentWrapperEl[o.axis[e].scrollOffsetAttr]=u,a.requestAnimationFrame(v)))};v()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var t=P(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},t.prototype.findChild=function(t,e){var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return i.call(t,e)}))[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=Y,t.helpers=j,t}(),Z=$.helpers,Q=Z.getOptions,G=Z.addClasses,J=Z.canUseDOM,K=function(e){function i(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];var r=e.apply(this,t)||this;return i.instances.set(t[0],r),r}return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}(i,e),i.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||i.instances.has(t)||new i(t,Q(t.attributes))}))},i.removeObserver=function(){var t;null===(t=i.globalObserver)||void 0===t||t.disconnect()},i.prototype.initDOM=function(){var t,e,i,s=this;if(!Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(s.classNames.wrapper)})).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),G(this.wrapperEl,this.classNames.wrapper),G(this.contentWrapperEl,this.classNames.contentWrapper),G(this.offsetEl,this.classNames.offset),G(this.maskEl,this.classNames.mask),G(this.contentEl,this.classNames.contentEl),G(this.placeholderEl,this.classNames.placeholder),G(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),G(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),null===(t=this.contentWrapperEl)||void 0===t||t.setAttribute("tabindex",this.options.tabIndex.toString()),null===(e=this.contentWrapperEl)||void 0===e||e.setAttribute("role","region"),null===(i=this.contentWrapperEl)||void 0===i||i.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var r=document.createElement("div"),l=document.createElement("div");G(r,this.classNames.track),G(l,this.classNames.scrollbar),r.appendChild(l),this.axis.x.track.el=r.cloneNode(!0),G(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=r.cloneNode(!0),G(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}$.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},i.prototype.unMount=function(){$.prototype.unMount.call(this),i.instances.delete(this.el)},i.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(i.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},i.handleMutations=function(t){t.forEach((function(t){t.addedNodes.forEac
vendor: 20,564 bytes, lines 3215-3230
3215h((function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!i.instances.has(t)&&document.documentElement.contains(t)&&new i(t,Q(t.attributes)):t.querySelectorAll("[data-simplebar]").forEach((function(t){"init"!==t.getAttribute("data-simplebar")&&!i.instances.has(t)&&document.documentElement.contains(t)&&new i(t,Q(t.attributes))})))})),t.removedNodes.forEach((function(t){var e;1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?!document.documentElement.contains(t)&&(null===(e=i.instances.get(t))||void 0===e||e.unMount()):Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){var e;!document.documentElement.contains(t)&&(null===(e=i.instances.get(t))||void 0===e||e.unMount())})))}))}))},i.instances=new WeakMap,i}($);return J&&K.initHtmlApi(),K}(); 3216; 3217 3218/*! 3219* jQuery Cycle2; version: 2.1.6 build: 20141007 3220* http://jquery.malsup.com/cycle2/ 3221* Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL 3222*/ 3223!function(a){"use strict";function b(a){return(a||"").toLowerCase()}var c="2.1.6";a.fn.cycle=function(c){var d;return 0!==this.length||a.isReady?this.each(function(){var d,e,f,g,h=a(this),i=a.fn.cycle.log;if(!h.data("cycle.opts")){(h.data("cycle-log")===!1||c&&c.log===!1||e&&e.log===!1)&&(i=a.noop),i("--c2 init--"),d=h.data();for(var j in d)d.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(g=d[j],f=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),i(f+":",g,"("+typeof g+")"),d[f]=g);e=a.extend({},a.fn.cycle.defaults,d,c||{}),e.timeoutId=0,e.paused=e.paused||!1,e.container=h,e._maxZ=e.maxZ,e.API=a.extend({_container:h},a.fn.cycle.API),e.API.log=i,e.API.trigger=function(a,b){return e.container.trigger(a,b),e.API},h.data("cycle.opts",e),h.data("cycle.API",e.API),e.API.trigger("cycle-bootstrap",[e,e.API]),e.API.addInitialSlides(),e.API.preInitSlideshow(),e.slides.length&&e.API.initSlideshow()}}):(d={s:this.selector,c:this.context},a.fn.cycle.log("requeuing slideshow (dom not ready)"),a(function(){a(d.s,d.c).cycle(c)}),this)},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b,c=this.opts(),d=c.container;c.API.calcFirstSlide(),"static"==c.container.css("position")&&c.container.css("position","relative"),a(c.slides[c.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),c.API.stackSlides(c.slides[c.currSlide],c.slides[c.nextSlide],!c.reverse),c.pauseOnHover&&(c.pauseOnHover!==!0&&(d=a(c.pauseOnHover)),d.hover(function(){c.API.pause(!0)},function(){c.API.resume(!0)})),c.timeout&&(b=c.API.getSlideOpts(c.currSlide),c.API.queueTransition(b,b.timeout+c.delay)),c._initialized=!0,c.API.updateView(!0),c.API.trigger("cycle-initialized",[c]),c.API.postInitSlideshow()},pause:function(b){var c=this.opts(),d=c.API.getSlideOpts(),e=c.hoverPaused||c.paused;b?c.hoverPaused=!0:c.paused=!0,e||(c.container.addClass("cycle-paused"),c.API.trigger("cycle-paused",[c]).log("cycle-paused"),d.timeout&&(clearTimeout(c.timeoutId),c.timeoutId=0,c._remainingTimeout-=a.now()-c._lastQueue,(c._remainingTimeout<0||isNaN(c._remainingTimeout))&&(c._remainingTimeout=void 0)))},resume:function(a){var b=this.opts(),c=!b.hoverPaused&&!b.paused;a?b.hoverPaused=!1:b.paused=!1,c||(b.container.removeClass("cycle-paused"),0===b.slides.filter(":animated").length&&b.API.queueTransition(b.API.getSlideOpts(),b._remainingTimeout),b.API.trigger("cycle-resumed",[b,b._remainingTimeout]).log("cycle-resumed"))},add:function(b,c){var d,e=this.opts(),f=e.slideCount,g=!1;"string"==a.type(b)&&(b=a.trim(b)),a(b).each(function(){var b,d=a(this);c?e.container.prepend(d):e.container.append(d),e.slideCount++,b=e.API.buildSlideOpts(d),e.slides=c?a(d).add(e.slides):e.slides.add(d),e.API.initSlide(b,d,--e._maxZ),d.data("cycle.opts",b),e.API.trigger("cycle-slide-added",[e,b,d])}),e.API.updateView(!0),g=e._preInitialized&&2>f&&e.slideCount>=1,g&&(e._initialized?e.timeout&&(d=e.slides.length,e.nextSlide=e.reverse?d-1:1,e.timeoutId||e.API.queueTransition(e)):e.API.initSlideshow())},calcFirstSlide:function(){var a,b=this.opts();a=parseInt(b.startingSlide||0,10),(a>=b.slides.length||0>a)&&(a=0),b.currSlide=a,b.reverse?(b.nextSlide=a-1,b.nextSlide<0&&(b.nextSlide=b.slides.length-1)):(b.nextSlide=a+1,b.nextSlide==b.slides.length&&(b.nextSlide=0))},calcNextSlide:function(){var a,b=this.opts();b.reverse?(a=b.nextSlide-1<0,b.nextSlide=a?b.slideCount-1:b.nextSlide-1,b.currSlide=a?0:b.nextSlide+1):(a=b.nextSlide+1==b.slides.length,b.nextSlide=a?0:b.nextSlide+1,b.currSlide=a?b.slides.length-1:b.nextSlide-1)},calcTx:function(b,c){var d,e=b;return e._tempFx?d=a.fn.cycle.transitions[e._tempFx]:c&&e.manualFx&&(d=a.fn.cycle.transitions[e.manualFx]),d||(d=a.fn.cycle.transitions[e.fx]),e._tempFx=null,this.opts()._tempFx=null,d||(d=a.fn.cycle.transitions.fade,e.API.log('Transition "'+e.fx+'" not found. Using fade.')),d},prepareTx:function(a,b){var c,d,e,f,g,h=this.opts();return h.slideCount<2?void(h.timeoutId=0):(!a||h.busy&&!h.manualTrump||(h.API.stopTransition(),h.busy=!1,clearTimeout(h.timeoutId),h.timeoutId=0),void(h.busy||(0!==h.timeoutId||a)&&(d=h.slides[h.currSlide],e=h.slides[h.nextSlide],f=h.API.getSlideOpts(h.nextSlide),g=h.API.calcTx(f,a),h._tx=g,a&&void 0!==f.manualSpeed&&(f.speed=f.manualSpeed),h.nextSlide!=h.currSlide&&(a||!h.paused&&!h.hoverPaused&&h.timeout)?(h.API.trigger("cycle-before",[f,d,e,b]),g.before&&g.before(f,d,e,b),c=function(){h.busy=!1,h.container.data("cycle.opts")&&(g.after&&g.after(f,d,e,b),h.API.trigger("cycle-after",[f,d,e,b]),h.API.queueTransition(f),h.API.updateView(!0))},h.busy=!0,g.transition?g.transition(f,d,e,b,c):h.API.doTransition(f,d,e,b,c),h.API.calcNextSlide(),h.API.updateView()):h.API.queueTransition(f))))},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(b,c){var d=this.opts(),e=void 0!==c?c:b.timeout;return 0===d.nextSlide&&0===--d.loop?(d.API.log("terminating; loop=0"),d.timeout=0,e?setTimeout(function(){d.API.trigger("cycle-finished",[d])},e):d.API.trigger("cycle-finished",[d]),void(d.nextSlide=d.currSlide)):void 0!==d.continueAuto&&(d.continueAuto===!1||a.isFunction(d.continueAuto)&&d.continueAuto()===!1)?(d.API.log("terminating automatic transitions"),d.timeout=0,void(d.timeoutId&&clearTimeout(d.timeoutId))):void(e&&(d._lastQueue=a.now(),void 0===c&&(d._remainingTimeout=b.timeout),d.paused||d.hoverPaused||(d.timeoutId=setTimeout(function(){d.API.prepareTx(!1,!d.reverse)},e))))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(c){var d,e,f=this.opts(),g=c.data()||{};for(var h in g)g.hasOwnProperty(h)&&/^cycle[A-Z]+/.test(h)&&(d=g[h],e=h.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),f.API.log("["+(f.slideCount-1)+"]",e+":",d,"("+typeof d+")"),g[e]=d);g=a.extend({},a.fn.cycle.defaults,f,g),g.slideNum=f.slideCount;try{delete g.API,delete g.slideCount,delete g.currSlide,delete g.nextSlide,delete g.slides}catch(i){}return g},getSlideOpts:function(b){var c=this.opts();void 0===b&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(a,b){var c=this.opts();if(c._initialized){var d=c.API.getSlideOpts(),e=c.slides[c.currSlide];!a&&b!==!0&&(c.API.trigger("cycle-update-view-before",[c,d,e]),c.updateView<0)||(c.slideActiveClass&&c.slides.removeClass(c.slideActiveClass).eq(c.currSlide).addClass(c.slideActiveClass),a&&c.hideNonActive&&c.slides.filter(":not(."+c.slideActiveClass+")").css("visibility","hidden"),0===c.updateView&&setTimeout(function(){c.API.trigger("cycle-update-view",[c,d,e,a])},d.speed/(c.sync?2:1)),0!==c.updateView&&c.API.trigger("cycle-update-view",[c,d,e,a]),a&&c.API.trigger("cycle-update-view-after",[c,d,e]))}},getComponent:function(b){var c=this.opts(),d=c[b];return"string"==typeof d?/^\s*[\>|\+|~]/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;h>f;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},a.fn.cycle.version=function(){return"Cycle2: "+c},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,visibility:"visible",display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,visibility:"visible",display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,visibility:"visible",display:"block"},a.cssAfter={zIndex:a._maxZ-2,left:0},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */ 3224function(a){"use strict";function b(b,d){var e,f,g,h=d.autoHeight;if("container"==h)f=a(d.slides[d.currSlide]).outerHeight(),d.container.height(f);else if(d._autoHeightRatio)d.container.height(d.container.width()/d._autoHeightRatio);else if("calc"===h||"number"==a.type(h)&&h>=0){if(g="calc"===h?c(b,d):h>=d.slides.length?0:h,g==d._sentinelIndex)return;d._sentinelIndex=g,d._sentinel&&d._sentinel.remove(),e=a(d.slides[g].cloneNode(!0)),e.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),e.css({position:"static",visibility:"hidden",display:"block"}).prependTo(d.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),e.find("*").css("visibility","hidden"),d._sentinel=e}}function c(b,c){var d=0,e=-1;return c.slides.each(function(b){var c=a(this).height();c>e&&(e=c,d=b)}),d}function d(b,c,d,e){var f=a(e).outerHeight();c.container.animate({height:f},c.autoHeightSpeed,c.autoHeightEasing)}function e(c,f){f._autoHeightOnResize&&(a(window).off("resize orientationchange",f._autoHeightOnResize),f._autoHeightOnResize=null),f.container.off("cycle-slide-added cycle-slide-removed",b),f.container.off("cycle-destroyed",e),f.container.off("cycle-before",d),f._sentinel&&(f._sentinel.remove(),f._sentinel=null)}a.extend(a.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),a(document).on("cycle-initialized",function(c,f){function g(){b(c,f)}var h,i=f.autoHeight,j=a.type(i),k=null;("string"===j||"number"===j)&&(f.container.on("cycle-slide-added cycle-slide-removed",b),f.container.on("cycle-destroyed",e),"container"==i?f.container.on("cycle-before",d):"string"===j&&/\d+\:\d+/.test(i)&&(h=i.match(/(\d+)\:(\d+)/),h=h[1]/h[2],f._autoHeightRatio=h),"number"!==j&&(f._autoHeightOnResize=function(){clearTimeout(k),k=setTimeout(g,50)},a(window).on("resize orientationchange",f._autoHeightOnResize)),setTimeout(g,30))})}(jQuery),/*! caption plugin for Cycle2; version: 20130306 */ 3225function(a){"use strict";a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),a(document).on("cycle-update-view",function(b,c,d,e){if("caption"===c.captionModule){a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"],f=c.API.getComponent(a);f.length&&b?(f.html(c.API.tmpl(b,d,c,e)),f.show()):f.hide()})}}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),/*! command plugin for Cycle2; version: 20140415 */ 3226function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return"number"==a.type(c)?this.cycle("goto",c):"string"==a.type(c)?this.each(function(){var h;return d=c,f=a(this).data("cycle.opts"),void 0===f?void b.log('slideshow must be initialized before sending commands; "'+d+'" ignored'):(d="goto"==d?"jump":d,e=f.API[d],a.isFunction(e)?(h=a.makeArray(g),h.shift(),e.apply(f.API,h)):void b.log("unknown command: ",d))}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?-1:1;a.allowWrap===!1&&a.currSlide+b>=a.slideCount||(a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next"))}},prev:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?1:-1;a.allowWrap===!1&&a.currSlide+b<0||(a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev"))}},destroy:function(){this.stop();var b=this.opts(),c=a.isFunction(a._data)?a._data:a.noop;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stop(),b.API.trigger("cycle-destroyed",[b]).log("cycle-destroyed"),b.container.removeData(),c(b.container[0],"parsedAttrs",!1),b.retainStylesOnDestroy||(b.container.removeAttr("style"),b.slides.removeAttr("style"),b.slides.removeClass(b.slideActiveClass)),b.slides.each(function(){var d=a(this);d.removeData(),d.removeClass(b.slideClass),c(this,"parsedAttrs",!1)})},jump:function(a,b){var c,d=this.opts();if(!d.busy||d.manualTrump){var e=parseInt(a,10);if(isNaN(e)||0>e||e>=d.slides.length)return void d.API.log("goto: invalid slide index: "+e);if(e==d.currSlide)return void d.API.log("goto: skipping, already on slide",e);d.nextSlide=e,clearTimeout(d.timeoutId),d.timeoutId=0,d.API.log("goto: ",e," (zero-index)"),c=d.currSlide<d.nextSlide,d._tempFx=b,d.API.prepareTx(!0,c)}},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){for(var c,d,e=this.opts(),f=[],g=1,h=0;h<e.slides.length;h++)c=e.slides[h],h==b?d=c:(f.push(c),a(c).data("cycle.opts").slideNum=g,g++);d&&(e.slides=a(f),e.slideCount--,a(d).remove(),b==e.currSlide?e.API.advanceSlide(1):b<e.currSlide?e.currSlide--:e.currSlide++,e.API.trigger("cycle-slide-removed",[e,b,d]).log("cycle-slide-removed"),e.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),/*! hash plugin for Cycle2; version: 20130905 */ 3227function(a){"use strict";function b(b,c){var d;return b._hashFence?void(b._hashFence=!1):(d=window.location.hash.substring(1),void b.slides.each(function(e){if(a(this).data("cycle-hash")==d){if(c===!0)b.startingSlide=e;else{var f=b.currSlide<e;b.nextSlide=e,b.API.prepareTx(!0,f)}return!1}}))}a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&"#"+c.hash!=window.location.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),/*! loader plugin for Cycle2; version: 20131121 */ 3228function(a){"use strict";a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function d(b,d){function f(b){var f;"wait"==c.loader?(h.push(b),0===j&&(h.sort(g),e.apply(c.API,[h,d]),c.container.removeClass("cycle-loading"))):(f=a(c.slides[c.currSlide]),e.apply(c.API,[b,d]),f.show(),c.container.removeClass("cycle-loading"))}function g(a,b){return a.data("index")-b.data("index")}var h=[];if("string"==a.type(b))b=a.trim(b);else if("array"===a.type(b))for(var i=0;i<b.length;i++)b[i]=a(b[i])[0];b=a(b);var j=b.length;j&&(b.css("visibility","hidden").appendTo("body").each(function(b){function g(){0===--i&&(--j,f(k))}var i=0,k=a(this),l=k.is("img")?k:k.find("img");return k.data("index",b),l=l.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),l.length?(i=l.length,void l.each(function(){this.complete?g():a(this).load(function(){g()}).on("error",function(){0===--i&&(c.API.log("slide skipped; img not loaded:",this.src),0===--j&&"wait"==c.loader&&e.apply(c.API,[h,d]))})})):(--j,void h.push(k))}),j&&c.container.addClass("cycle-loading"))}var e;c.loader&&(e=c.API.add,c.API.add=d)})}(jQuery),/*! pager plugin for Cycle2; version: 20140415 */ 3229function(a){"use strict";function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,b,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){b.pagerEventBubble||a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts();if(!c.busy||c.manualTrump){var d=a.children().index(b),e=d,f=c.currSlide<e;c.currSlide!=e&&(c.nextSlide=e,c._tempFx=c.pagerFx,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b]))}}a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:"<span>•</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d){if(c.pager){var e=c.API.getComponent("pager");e.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c){var d;c.pager&&(d=c.API.getComponent("pager"),d.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c=b.API.getComponent("pager");c&&(c.children().off(b.pagerEvent),b.pagerTemplate&&c.empty())})}(jQuery),/*! prevnext plugin for Cycle2; version: 20140408 */ 3230function(a){"use strict";a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){if(b.API.getComponent("next").on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()}
3230),b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(){b._tempFx=b.swipeFx,b.API.next()}),b.container.on(d,function(){b._tempFx=b.swipeFx,b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b){if(!b.allowWrap){var c=b.disabledClass,d=b.API.getComponent("next"),e=b.API.getComponent("prev"),f=b._prevBoundry||0,g=void 0!==b._nextBoundry?b._nextBoundry:b.slideCount-1;b.currSlide==g?d.addClass(c).prop("disabled",!0):d.removeClass(c).prop("disabled",!1),b.currSlide===f?e.addClass(c).prop("disabled",!0):e.removeClass(c).prop("disabled",!1)}}),a(document).on("cycle-destroyed",function(a,b){b.API.getComponent("prev").off(b.nextEvent),b.API.getComponent("next").off(b.prevEvent),b.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),/*! progressive loader plugin for Cycle2; version: 20130315 */ 3231function(a){"use strict";a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(c.progressive){var d,e,f=c.API,g=f.next,h=f.prev,i=f.prepareTx,j=a.type(c.progressive);if("array"==j)d=c.progressive;else if(a.isFunction(c.progressive))d=c.progressive(c);else if("string"==j){if(e=a(c.progressive),d=a.trim(e.html()),!d)return;if(/^(\[)/.test(d))try{d=a.parseJSON(d)}catch(k){return void f.log("error parsing progressive slides",k)}else d=d.split(new RegExp(e.data("cycle-split")||"\n")),d[d.length-1]||d.pop()}i&&(f.prepareTx=function(a,b){var e,f;return a||0===d.length?void i.apply(c.API,[a,b]):void(b&&c.currSlide==c.slideCount-1?(f=d[0],d=d.slice(1),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.API.advanceSlide(1)},50)}),c.API.add(f)):b||0!==c.currSlide?i.apply(c.API,[a,b]):(e=d.length-1,f=d[e],d=d.slice(0,e),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.currSlide=1,b.API.advanceSlide(-1)},50)}),c.API.add(f,!0)))}),g&&(f.next=function(){var a=this.opts();if(d.length&&a.currSlide==a.slideCount-1){var b=d[0];d=d.slice(1),a.container.one("cycle-slide-added",function(a,b){g.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else g.apply(a.API)}),h&&(f.prev=function(){var a=this.opts();if(d.length&&0===a.currSlide){var b=d.length-1,c=d[b];d=d.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else h.apply(a.API)})}})}(jQuery),/*! tmpl plugin for Cycle2; version: 20121227 */ 3232function(a){"use strict";a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c){var d=new RegExp(c.tmplRegex||a.fn.cycle.defaults.tmplRegex,"g"),e=a.makeArray(arguments);return e.shift(),b.replace(d,function(b,c){var d,f,g,h,i=c.split(".");for(d=0;d<e.length;d++)if(g=e[d]){if(i.length>1)for(h=g,f=0;f<i.length;f++)g=h,h=h[i[f]]||c;else h=g[c];if(a.isFunction(h))return h.apply(g,e);if(void 0!==h&&null!==h&&h!=c)return h}return c})}})}(jQuery); 3233; 3234 3235/* 3236* MultiSlider | MIT License 3237* 3238* Copyright (c) 2017 Trevor Blackman 3239* http://www.multislider.info 3240* 3241*/ 3242 3243!function(a){a.fn.multislider=function(b,c){function s(){y(),z(),w(),A()}function t(){window.innerWidth>p.pauseAbove&&d.addClass("ms-PAUSE"),a(window).on("resize",function(){window.innerWidth>p.pauseAbove?d.addClass("ms-PAUSE"):d.removeClass("ms-PAUSE")})}function u(){window.innerWidth<p.pauseBelow&&d.addClass("ms-PAUSE"),a(window).on("resize",function(){window.innerWidth<p.pauseBelow?d.addClass("ms-PAUSE"):d.removeClass("ms-PAUSE")})}function v(a){void 0!==d.data(a)?d.data(a)():console.error("Multislider currently only accepts the following methods: next, prev, pause, play")}function w(){d.data({pause:function(){d.addClass("ms-PAUSE")},unPause:function(){d.removeClass("ms-PAUSE")},continuous:function(){d.removeClass("ms-PAUSE"),K()},next:function(){x(N)},nextAll:function(){x(L)},prev:function(){x(O)},prevAll:function(){x(M)},settings:p})}function x(a){d.hasClass("ms-PAUSE")?(d.removeClass("ms-PAUSE"),a(),d.addClass("ms-PAUSE")):a(),D()}function y(){e.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove()}function z(){o=p||{continuous:!1,slideAll:!1,interval:2e3,duration:500,hoverPause:!0,pauseAbove:null,pauseBelow:null},p=a.extend({},o,b),B(),q=p.duration,p.hoverPause&&H(),!0!==p.continuous&&0!==p.interval&&!1!==p.interval&&!1!==p.autoSlide&&C(),null!==p.pauseAbove&&"number"==typeof p.pauseAbove&&t(),null!==p.pauseBelow&&"number"==typeof p.pauseBelow&&u()}function A(){p.continuous?(p.autoSlide=!1,K()):p.slideAll?(m=d.data("prevAll"),n=d.data("nextAll")):(m=d.data("prev"),n=d.data("next"))}function B(){E(),l=h.width();
3243var a=parseInt(e.find(".item:first").css("padding-left")),b=parseInt(e.find(".item:first").css("padding-right"));0!==a&&(l+=a),0!==b&&(l+=b)}function C(){r=setInterval(function(){d.hasClass("ms-PAUSE")||n()},p.interval)}function D(){0!==p.interval&&!1!==p.interval&&!0!==p.continuous&&(clearInterval(r),C())}function E(){h=e.find(".item:first"),i=e.find(".item:last")}function F(a){d.hasClass("ms-animating")||d.hasClass("ms-HOVER")||d.hasClass("ms-PAUSE")||(d.trigger("ms.before.animate"),d.addClass("ms-animating"),a())}function G(){d.hasClass("ms-animating")&&(d.removeClass("ms-animating"),d.trigger("ms.after.animate"))}function H(){p.continuous?(e.on("mouseover",function(){G(),e.children(".item:first").stop()}),e.on("mouseout",function(){K()})):(e.on("mouseover",function(){d.addClass("ms-HOVER")}),e.on("mouseout",function(){d.removeClass("ms-HOVER")}))}function I(){q=p.duration;var a=parseFloat(e.find(".item:first").css("margin-left"));q*=1-a/-(l-1)}function J(){j=e.width(),k=Math.round(j/l)}function K(){F(function(){E(),I(),h.animate({marginLeft:-(l+1)},{duration:q,easing:"linear",complete:function(){h.insertAfter(i).removeAttr("style"),G(),K()}})})}function L(){F(function(){E(),J();var b=e.children(".item").clone(),c=b.splice(0,k);e.append(c),h.animate({marginLeft:-j},{duration:q,easing:"swing",complete:function(){a(e.children(".item").splice(0,k)).remove(),G()}})})}function M(){F(function(){E(),J();var b=e.children(".item").length,c=e.children(".item").clone(),d=c.splice(b-k,b);a(a(d)[0]).css("margin-left",-j),e.prepend(d),E(),h.animate({marginLeft:0},{duration:q,easing:"swing",complete:function(){b=e.find(".item").length,a(e.find(".item").splice(b-k,b)).remove(),h.removeAttr("style"),G()}})})}function N(){F(function(){E(),h.animate({marginLeft:-l},{duration:q,easing:"swing",complete:function(){h.detach().removeAttr("style").appendTo(e),G()}})})}function O(){F(function(){E(),i.css("margin-left",-l).prependTo(e),i.animate({marginLeft:0},{duration:q,easing:"swing",complete:function(){i.removeAttr("style"),G()}})})}var d=a(this),e=d.find(".MS-content"),f=d.find("button.MS-right"),g=d.find("button.MS-left"),h=e.find(".item:first");if("string"==typeof b)return v(b),d;"object"!=typeof b&&void 0!==b||s();var i,j,k,l,m,n,o,p,q,r;return f.on("click",n),g.on("click",m),d.on("click",".MS-right, .MS-left",D),a(window).on("resize",B),d}}(jQuery); 3244; 3245 3246/*! 3247 * 3248 * MediaElement.js 3249 * HTML5 <video> and <audio> shim and player 3250 * http://mediaelementjs.com/ 3251 * 3252 * Creates a JavaScript object that mimics HTML5 MediaElement API 3253 * for browsers that don't understand HTML5 or can't play the provided codec 3254 * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3 3255 * 3256 * Copyright 2010-2014, John Dyer (http://j.hn) 3257 * License: MIT 3258 * 3259 */ 3260// Namespace 3261var mejs = mejs || {}; 3262 3263// version number 3264mejs.version = '2.17.0'; 3265 3266 3267// player number (for missing, same id attr) 3268mejs.meIndex = 0; 3269 3270// media types accepted by plugins 3271mejs.plugins = { 3272 silverlight: [ 3273 {version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']} 3274 ], 3275 flash: [ 3276 {version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg', 'video/youtube', 'video/x-youtube', 'video/dailymotion', 'video/x-dailymotion', 'application/x-mpegURL']} 3277 //,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!) 3278 ], 3279 youtube: [ 3280 {version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']} 3281 ], 3282 vimeo: [ 3283 {version: null, types: ['video/vimeo', 'video/x-vimeo']} 3284 ] 3285}; 3286 3287/* 3288Utility methods 3289*/ 3290mejs.Utility = { 3291 encodeUrl: function(url) { 3292 return encodeURIComponent(url); //.replace(/\?/gi,'%3F').replace(/=/gi,'%3D').replace(/&/gi,'%26'); 3293 }, 3294 escapeHTML: function(s) { 3295 return s.toString().split('&').join('&').split('<').join('<').split('"').join('"'); 3296 }, 3297 absolutizeUrl: function(url) { 3298 var el = document.createElement('div'); 3299 el.innerHTML = '<a href="' + this.escapeHTML(url) + '">x</a>'; 3300 return el.firstChild.href; 3301 }, 3302 getScriptPath: function(scriptNames) { 3303 var 3304 i = 0, 3305 j, 3306 codePath = '', 3307 testname = '', 3308 slashPos, 3309 filenamePos, 3310 scriptUrl, 3311 scriptPath, 3312 scriptFilename, 3313 scripts = document.getElementsByTagName('script'), 3314 il = scripts.length, 3315 jl = scriptNames.length; 3316 3317 // go through all <script> tags 3318 for (; i < il; i++) { 3319 scriptUrl = scripts[i].src; 3320 slashPos = scriptUrl.lastIndexOf('/'); 3321 if (slashPos > -1) { 3322 scriptFilename = scriptUrl.substring(slashPos + 1); 3323 scriptPath = scriptUrl.substring(0, slashPos + 1); 3324 } else { 3325 scriptFilename = scriptUrl; 3326 scriptPath = ''; 3327 } 3328 3329 // see if any <script> tags have a file name that matches the 3330 for (j = 0; j < jl; j++) { 3331 testname = scriptNames[j]; 3332 filenamePos = scriptFilename.indexOf(testname); 3333 if (filenamePos > -1) { 3334 codePath = scriptPath; 3335 break; 3336 } 3337 } 3338 3339 // if we found a path, then break and return it 3340 if (codePath !== '') { 3341 break; 3342 } 3343 } 3344 3345 // send the best path back 3346 return codePath; 3347 }, 3348 secondsToTimeCode: function(time, forceHours, showFrameCount, fps) { 3349 //add framecount 3350 if (typeof showFrameCount == 'undefined') { 3351 showFrameCount=false; 3352 } else if(typeof fps == 'undefined') { 3353 fps = 25; 3354 } 3355 3356 var hours = Math.floor(time / 3600) % 24, 3357 minutes = Math.floor(time / 60) % 60, 3358 seconds = Math.floor(time % 60), 3359 frames = Math.floor(((time % 1)*fps).toFixed(3)), 3360 result = 3361 ( (forceHours || hours > 0) ? (hours < 10 ? '0' + hours : hours) + ':' : '') 3362 + (minutes < 10 ? '0' + minutes : minutes) + ':' 3363 + (seconds < 10 ? '0' + seconds : seconds) 3364 + ((showFrameCount) ? ':' + (frames < 10 ? '0' + frames : frames) : ''); 3365 3366 return result; 3367 }, 3368 3369 timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){ 3370 if (typeof showFrameCount == 'undefined') { 3371 showFrameCount=false; 3372 } else if(typeof fps == 'undefined') { 3373 fps = 25; 3374 } 3375 3376 var tc_array = hh_mm_ss_ff.split(":"), 3377 tc_hh = parseInt(tc_array[0], 10), 3378 tc_mm = parseInt(tc_array[1], 10), 3379 tc_ss = parseInt(tc_array[2], 10), 3380 tc_ff = 0, 3381 tc_in_seconds = 0; 3382 3383 if (showFrameCount) { 3384 tc_ff = parseInt(tc_array[3])/fps; 3385 } 3386 3387 tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff; 3388 3389 return tc_in_seconds; 3390 }, 3391 3392 3393 convertSMPTEtoSeconds: function (SMPTE) { 3394 if (typeof SMPTE != 'string') 3395 return false;
3396 3397 SMPTE = SMPTE.replace(',', '.'); 3398 3399 var secs = 0, 3400 decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0, 3401 multiplier = 1; 3402 3403 SMPTE = SMPTE.split(':').reverse(); 3404 3405 for (var i = 0; i < SMPTE.length; i++) { 3406 multiplier = 1; 3407 if (i > 0) { 3408 multiplier = Math.pow(60, i); 3409 } 3410 secs += Number(SMPTE[i]) * multiplier; 3411 } 3412 return Number(secs.toFixed(decimalLen)); 3413 }, 3414 3415 /* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */ 3416 removeSwf: function(id) { 3417 var obj = document.getElementById(id); 3418 if (obj && /object|embed/i.test(obj.nodeName)) { 3419 if (mejs.MediaFeatures.isIE) { 3420 obj.style.display = "none"; 3421 (function(){ 3422 if (obj.readyState == 4) { 3423 mejs.Utility.removeObjectInIE(id); 3424 } else { 3425 setTimeout(arguments.callee, 10); 3426 } 3427 })(); 3428 } else { 3429 obj.parentNode.removeChild(obj); 3430 } 3431 } 3432 }, 3433 removeObjectInIE: function(id) { 3434 var obj = document.getElementById(id); 3435 if (obj) { 3436 for (var i in obj) { 3437 if (typeof obj[i] == "function") { 3438 obj[i] = null; 3439 } 3440 } 3441 obj.parentNode.removeChild(obj); 3442 } 3443 } 3444}; 3445 3446 3447// Core detector, plugins are added below 3448mejs.PluginDetector = { 3449 3450 // main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]); 3451 hasPluginVersion: function(plugin, v) { 3452 var pv = this.plugins[plugin]; 3453 v[1] = v[1] || 0; 3454 v[2] = v[2] || 0; 3455 return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; 3456 }, 3457 3458 // cached values 3459 nav: window.navigator, 3460 ua: window.navigator.userAgent.toLowerCase(), 3461 3462 // stored version numbers 3463 plugins: [], 3464 3465 // runs detectPlugin() and stores the version number 3466 addPlugin: function(p, pluginName, mimeType, activeX, axDetect) { 3467 this.plugins[p] = this.detectPlugin(pluginName, mimeType, activeX, axDetect); 3468 }, 3469 3470 // get the version number from the mimetype (all but IE) or ActiveX (IE) 3471 detectPlugin: function(pluginName, mimeType, activeX, axDetect) { 3472 3473 var version = [0,0,0], 3474 description, 3475 i, 3476 ax; 3477 3478 // Firefox, Webkit, Opera 3479 if (typeof(this.nav.plugins) != 'undefined' && typeof this.nav.plugins[pluginName] == 'object') { 3480 description = this.nav.plugins[pluginName].description; 3481 if (description && !(typeof this.nav.mimeTypes != 'undefined' && this.nav.mimeTypes[mimeType] && !this.nav.mimeTypes[mimeType].enabledPlugin)) { 3482 version = description.replace(pluginName, '').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.'); 3483 for (i=0; i<version.length; i++) { 3484 version[i] = parseInt(version[i].match(/\d+/), 10); 3485 } 3486 } 3487 // Internet Explorer / ActiveX 3488 } else if (typeof(window.ActiveXObject) != 'undefined') { 3489 try { 3490 ax = new ActiveXObject(activeX); 3491 if (ax) { 3492 version = axDetect(ax); 3493 } 3494 } 3495 catch (e) { } 3496 } 3497 return version; 3498 } 3499}; 3500 3501// Add Flash detection 3502mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash', function(ax) { 3503 // adapted from SWFObject 3504 var version = [], 3505 d = ax.GetVariable("$version"); 3506 if (d) { 3507 d = d.split(" ")[1].split(","); 3508 version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; 3509 } 3510 return version; 3511}); 3512 3513// Add Silverlight detection 3514mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl', function (ax) { 3515 // Silverlight cannot report its version number to IE 3516 // but it does have a isVersionSupported function, so we have to loop through it to get a version number. 3517 // adapted from http://www.silverlightversion.com/ 3518 var v = [0,0,0,0], 3519 loopMatch = function(ax, v, i, n) { 3520 while(ax.isVersionSupported(v[0]+ "."+ v[1] + "." + v[2] + "." + v[3])){ 3521 v[i]+=n; 3522 } 3523 v[i] -= n; 3524 }; 3525 loopMatch(ax, v, 0, 1); 3526 loopMatch(ax, v, 1, 1); 3527 loopMatch(ax, v, 2, 10000); // the third place in the version number is usually 5 digits (4.0.xxxxx) 3528 loopMatch(ax, v, 2, 1000); 3529 loopMatch(ax, v, 2, 100); 3530 loopMatch(ax, v, 2, 10); 3531 loopMatch(ax, v, 2, 1); 3532 loopMatch(ax, v, 3, 1); 3533 3534 return v; 3535}); 3536// add adobe acrobat 3537/* 3538PluginDetector.addPlugin('acrobat','Adobe Acrobat','application/pdf','AcroPDF.PDF', function (ax) { 3539 var version = [], 3540 d = ax.GetVersions().split(',')[0].split('=')[1].split('.'); 3541 3542 if (d) { 3543 version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; 3544 } 3545 return version; 3546});
3547*/ 3548// necessary detection (fixes for <IE9) 3549mejs.MediaFeatures = { 3550 init: function() { 3551 var 3552 t = this, 3553 d = document, 3554 nav = mejs.PluginDetector.nav, 3555 ua = mejs.PluginDetector.ua.toLowerCase(), 3556 i, 3557 v, 3558 html5Elements = ['source','track','audio','video']; 3559 3560 // detect browsers (only the ones that have some kind of quirk we need to work around) 3561 t.isiPad = (ua.match(/ipad/i) !== null); 3562 t.isiPhone = (ua.match(/iphone/i) !== null); 3563 t.isiOS = t.isiPhone || t.isiPad; 3564 t.isAndroid = (ua.match(/android/i) !== null); 3565 t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null); 3566 t.isBustedNativeHTTPS = (location.protocol === 'https:' && (ua.match(/android [12]\./) !== null || ua.match(/macintosh.* version.* safari/) !== null)); 3567 t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1 || nav.appName.toLowerCase().match(/trident/gi) !== null); 3568 t.isChrome = (ua.match(/chrome/gi) !== null); 3569 t.isChromium = (ua.match(/chromium/gi) !== null); 3570 t.isFirefox = (ua.match(/firefox/gi) !== null); 3571 t.isWebkit = (ua.match(/webkit/gi) !== null); 3572 t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit && !t.isIE; 3573 t.isOpera = (ua.match(/opera/gi) !== null); 3574 t.hasTouch = ('ontouchstart' in window); // && window.ontouchstart != null); // this breaks iOS 7 3575 3576 // borrowed from Modernizr 3577 t.svg = !! document.createElementNS && 3578 !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect; 3579 3580 // create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection 3581 for (i=0; i<html5Elements.length; i++) { 3582 v = document.createElement(html5Elements[i]); 3583 } 3584 3585 t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid); 3586 3587 // Fix for IE9 on Windows 7N / Windows 7KN (Media Player not installer) 3588 try{ 3589 v.canPlayType("video/mp4"); 3590 }catch(e){ 3591 t.supportsMediaTag = false; 3592 } 3593 3594 // detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails) 3595 3596 // iOS 3597 t.hasSemiNativeFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined'); 3598 3599 // W3C 3600 t.hasNativeFullscreen = (typeof v.requestFullscreen !== 'undefined'); 3601 3602 // webkit/firefox/IE11+ 3603 t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined'); 3604 t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined'); 3605 t.hasMsNativeFullScreen = (typeof v.msRequestFullscreen !== 'undefined'); 3606 3607 t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen || t.hasMsNativeFullScreen); 3608 t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen; 3609 3610 // Enabled? 3611 if (t.hasMozNativeFullScreen) { 3612 t.nativeFullScreenEnabled = document.mozFullScreenEnabled; 3613 } else if (t.hasMsNativeFullScreen) { 3614 t.nativeFullScreenEnabled = document.msFullscreenEnabled; 3615 } 3616 3617 if (t.isChrome) { 3618 t.hasSemiNativeFullScreen = false; 3619 } 3620 3621 if (t.hasTrueNativeFullScreen) { 3622 3623 t.fullScreenEventName = ''; 3624 if (t.hasWebkitNativeFullScreen) { 3625 t.fullScreenEventName = 'webkitfullscreenchange'; 3626 3627 } else if (t.hasMozNativeFullScreen) { 3628 t.fullScreenEventName = 'mozfullscreenchange'; 3629 3630 } else if (t.hasMsNativeFullScreen) { 3631 t.fullScreenEventName = 'MSFullscreenChange'; 3632 } 3633 3634 t.isFullScreen = function() { 3635 if (t.hasMozNativeFullScreen) { 3636 return d.mozFullScreen; 3637 3638 } else if (t.hasWebkitNativeFullScreen) { 3639 return d.webkitIsFullScreen; 3640 3641 } else if (t.hasMsNativeFullScreen) { 3642 return d.msFullscreenElement !== null; 3643 } 3644 } 3645 3646 t.requestFullScreen = function(el) { 3647 3648 if (t.hasWebkitNativeFullScreen) { 3649 el.webkitRequestFullScreen(); 3650 3651 } else if (t.hasMozNativeFullScreen) { 3652 el.mozRequestFullScreen(); 3653 3654 } else if (t.hasMsNativeFullScreen) { 3655 el.msRequestFullscreen(); 3656 3657 } 3658 } 3659 3660 t.cancelFullScreen = function() { 3661 if (t.hasWebkitNativeFullScreen) { 3662 document.webkitCancelFullScreen(); 3663 3664 } else if (t.hasMozNativeFullScreen) { 3665 document.mozCancelFullScreen(); 3666 3667 } else if (t.hasMsNativeFullScreen) { 3668 document.msExitFullscreen(); 3669 3670 } 3671 } 3672 3673 } 3674 3675 3676 // OS X 10.5 can't do this even if it says it can :( 3677 if (t.hasSemiNativeFullScreen && ua.match(/mac os x 10_5/i)) { 3678 t.hasNativeFullScreen = false;
3679 t.hasSemiNativeFullScreen = false; 3680 } 3681 3682 } 3683}; 3684mejs.MediaFeatures.init(); 3685 3686/* 3687extension methods to <video> or <audio> object to bring it into parity with PluginMediaElement (see below) 3688*/ 3689mejs.HtmlMediaElement = { 3690 pluginType: 'native', 3691 isFullScreen: false, 3692 3693 setCurrentTime: function (time) { 3694 this.currentTime = time; 3695 }, 3696 3697 setMuted: function (muted) { 3698 this.muted = muted; 3699 }, 3700 3701 setVolume: function (volume) { 3702 this.volume = volume; 3703 }, 3704 3705 // for parity with the plugin versions 3706 stop: function () { 3707 this.pause(); 3708 }, 3709 3710 // This can be a url string 3711 // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}] 3712 setSrc: function (url) { 3713 3714 // Fix for IE9 which can't set .src when there are <source> elements. Awesome, right? 3715 var 3716 existingSources = this.getElementsByTagName('source'); 3717 while (existingSources.length > 0){ 3718 this.removeChild(existingSources[0]); 3719 } 3720 3721 if (typeof url == 'string') { 3722 this.src = url; 3723 } else { 3724 var i, media; 3725 3726 for (i=0; i<url.length; i++) { 3727 media = url[i]; 3728 if (this.canPlayType(media.type)) { 3729 this.src = media.src; 3730 break; 3731 } 3732 } 3733 } 3734 }, 3735 3736 setVideoSize: function (width, height) { 3737 this.width = width; 3738 this.height = height; 3739 } 3740}; 3741 3742/* 3743Mimics the <video/audio> element by calling Flash's External Interface or Silverlights [ScriptableMember] 3744*/ 3745mejs.PluginMediaElement = function (pluginid, pluginType, mediaUrl) { 3746 this.id = pluginid; 3747 this.pluginType = pluginType; 3748 this.src = mediaUrl; 3749 this.events = {}; 3750 this.attributes = {}; 3751}; 3752 3753// JavaScript values and ExternalInterface methods that match HTML5 video properties methods 3754// http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html 3755// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html 3756mejs.PluginMediaElement.prototype = { 3757 3758 // special 3759 pluginElement: null, 3760 pluginType: '', 3761 isFullScreen: false, 3762 3763 // not implemented :( 3764 playbackRate: -1, 3765 defaultPlaybackRate: -1, 3766 seekable: [], 3767 played: [], 3768 3769 // HTML5 read-only properties 3770 paused: true, 3771 ended: false, 3772 seeking: false, 3773 duration: 0, 3774 error: null, 3775 tagName: '', 3776 3777 // HTML5 get/set properties, but only set (updated by event handlers) 3778 muted: false, 3779 volume: 1, 3780 currentTime: 0, 3781 3782 // HTML5 methods 3783 play: function () { 3784 if (this.pluginApi != null) { 3785 if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') { 3786 this.pluginApi.playVideo(); 3787 } else { 3788 this.pluginApi.playMedia(); 3789 } 3790 this.paused = false; 3791 } 3792 }, 3793 load: function () { 3794 if (this.pluginApi != null) { 3795 if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') { 3796 } else { 3797 this.pluginApi.loadMedia(); 3798 } 3799 3800 this.paused = false; 3801 } 3802 }, 3803 pause: function () { 3804 if (this.pluginApi != null) { 3805 if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') { 3806 this.pluginApi.pauseVideo(); 3807 } else { 3808 this.pluginApi.pauseMedia(); 3809 } 3810 3811 3812 this.paused = true; 3813 } 3814 }, 3815 stop: function () { 3816 if (this.pluginApi != null) { 3817 if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') { 3818 this.pluginApi.stopVideo(); 3819 } else { 3820 this.pluginApi.stopMedia(); 3821 } 3822 this.paused = true; 3823 } 3824 }, 3825 canPlayType: function(type) { 3826 var i, 3827 j, 3828 pluginInfo, 3829 pluginVersions = mejs.plugins[this.pluginType]; 3830 3831 for (i=0; i<pluginVersions.length; i++) { 3832 pluginInfo = pluginVersions[i]; 3833 3834 // test if user has the correct plugin version 3835 if (mejs.PluginDetector.hasPluginVersion(this.pluginType, pluginInfo.version)) { 3836 3837 // test for plugin playback types 3838 for (j=0; j<pluginInfo.types.length; j++) { 3839 // find plugin that can play the type 3840 if (type == pluginInfo.types[j]) { 3841 return 'probably'; 3842 } 3843 } 3844 } 3845 } 3846 3847 return ''; 3848 }, 3849 3850 positionFullscreenButton: function(x,y,visibleAndAbove) { 3851 if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) { 3852 this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove); 3853 } 3854 }, 3855 3856 hideFullscreenButton: function() { 3857 if (this.pluginApi != null && this.pluginApi.hideFullscreenButton) { 3858 this.pluginApi.hideFullscreenButton(); 3859 } 3860 }, 3861 3862 3863 // custom methods since not all JavaScript implementations supp
3863ort get/set 3864 3865 // This can be a url string 3866 // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}] 3867 setSrc: function (url) { 3868 if (typeof url == 'string') { 3869 this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url)); 3870 this.src = mejs.Utility.absolutizeUrl(url); 3871 } else { 3872 var i, media; 3873 3874 for (i=0; i<url.length; i++) { 3875 media = url[i]; 3876 if (this.canPlayType(media.type)) { 3877 this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src)); 3878 this.src = mejs.Utility.absolutizeUrl(url); 3879 break; 3880 } 3881 } 3882 } 3883 3884 }, 3885 setCurrentTime: function (time) { 3886 if (this.pluginApi != null) { 3887 if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') { 3888 this.pluginApi.seekTo(time); 3889 } else { 3890 this.pluginApi.setCurrentTime(time); 3891 } 3892 3893 3894 3895 this.currentTime = time; 3896 } 3897 }, 3898 setVolume: function (volume) { 3899 if (this.pluginApi != null) { 3900 // same on YouTube and MEjs 3901 if (this.pluginType == 'youtube') { 3902 this.pluginApi.setVolume(volume * 100); 3903 } else { 3904 this.pluginApi.setVolume(volume); 3905 } 3906 this.volume = volume; 3907 } 3908 }, 3909 setMuted: function (muted) { 3910 if (this.pluginApi != null) { 3911 if (this.pluginType == 'youtube') { 3912 if (muted) { 3913 this.pluginApi.mute(); 3914 } else { 3915 this.pluginApi.unMute(); 3916 } 3917 this.muted = muted; 3918 this.dispatchEvent('volumechange'); 3919 } else { 3920 this.pluginApi.setMuted(muted); 3921 } 3922 this.muted = muted; 3923 } 3924 }, 3925 3926 // additional non-HTML5 methods 3927 setVideoSize: function (width, height) { 3928 3929 //if (this.pluginType == 'flash' || this.pluginType == 'silverlight') { 3930 if (this.pluginElement && this.pluginElement.style) { 3931 this.pluginElement.style.width = width + 'px'; 3932 this.pluginElement.style.height = height + 'px'; 3933 } 3934 if (this.pluginApi != null && this.pluginApi.setVideoSize) { 3935 this.pluginApi.setVideoSize(width, height); 3936 } 3937 //} 3938 }, 3939 3940 setFullscreen: function (fullscreen) { 3941 if (this.pluginApi != null && this.pluginApi.setFullscreen) { 3942 this.pluginApi.setFullscreen(fullscreen); 3943 } 3944 }, 3945 3946 enterFullScreen: function() { 3947 if (this.pluginApi != null && this.pluginApi.setFullscreen) { 3948 this.setFullscreen(true); 3949 } 3950 3951 }, 3952 3953 exitFullScreen: function() { 3954 if (this.pluginApi != null && this.pluginApi.setFullscreen) { 3955 this.setFullscreen(false); 3956 } 3957 }, 3958 3959 // start: fake events 3960 addEventListener: function (eventName, callback, bubble) { 3961 this.events[eventName] = this.events[eventName] || []; 3962 this.events[eventName].push(callback); 3963 }, 3964 removeEventListener: function (eventName, callback) { 3965 if (!eventName) { this.events = {}; return true; } 3966 var callbacks = this.events[eventName]; 3967 if (!callbacks) return true; 3968 if (!callback) { this.events[eventName] = []; return true; } 3969 for (var i = 0; i < callbacks.length; i++) { 3970 if (callbacks[i] === callback) { 3971 this.events[eventName].splice(i, 1); 3972 return true; 3973 } 3974 } 3975 return false; 3976 }, 3977 dispatchEvent: function (eventName) { 3978 var i, 3979 args, 3980 callbacks = this.events[eventName]; 3981 3982 if (callbacks) { 3983 args = Array.prototype.slice.call(arguments, 1); 3984 for (i = 0; i < callbacks.length; i++) { 3985 callbacks[i].apply(this, args); 3986 } 3987 } 3988 }, 3989 // end: fake events 3990 3991 // fake DOM attribute methods 3992 hasAttribute: function(name){ 3993 return (name in this.attributes); 3994 }, 3995 removeAttribute: function(name){ 3996 delete this.attributes[name]; 3997 }, 3998 getAttribute: function(name){ 3999 if (this.hasAttribute(name)) { 4000 return this.attributes[name]; 4001 } 4002 return ''; 4003 }, 4004 setAttribute: function(name, value){ 4005 this.attributes[name] = value; 4006 }, 4007 4008 remove: function() { 4009 mejs.Utility.removeSwf(this.pluginElement.id); 4010 mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id); 4011 } 4012}; 4013 4014// Handles calls from Flash/Silverlight and reports them as native <video/audio> events and properties 4015mejs.MediaPluginBridge = { 4016 4017 pluginMediaElements:{}, 4018 htmlMediaElements:{}, 4019 4020 registerPluginElement: function (id, pluginMediaElement, htmlMediaElement) { 4021 this.pluginMediaElements[id] = pluginMediaElement; 4022 this.htmlMediaElements[id] = htmlMediaElement; 4023 }, 4024 4025 unregisterPluginElement: function (id) { 4026 delete this.pluginMediaElements[id]; 4027 delete this.htmlMediaElements[id]; 4028 }, 4029 4030 // when Flash/Silverlight is ready, it calls out to this method 4031 initPlugin: function (id) { 4032 4033 var pluginMediaElement = this.pluginMediaElements[id], 4034 htmlMediaElement = this.htmlMediaElements[id]; 4035 4036 if (pluginMediaElement) { 4037 // find the javascript bridge 4038 switch (pluginMediaElement.pluginType) { 4039 case "flash": 4040 pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(id); 4041 break; 4042 case "silverlight": 4043 pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id); 4044 pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS; 4045 break; 4046 } 4047 4048 if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) { 4049 pluginMediaElement.success(pluginMediaElement, htmlMediaElement); 4050 } 4051 } 4052 }, 4053 4054 // receives events from Flash/Silverlight and sends them out as HTML5 media events 4055 // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html 4056 fireEvent: function (id, eventName, values) { 4057 4058 var 4059 e, 4060 i, 4061 bufferedTime, 4062 pluginMediaElement = this.pluginMediaElements[id]; 4063 4064 if(!pluginMediaElement){ 4065 return; 4066 } 4067 4068 // fake event object to mimic real HTML media event. 4069 e = { 4070 type: eventName, 4071 target: pluginMediaElement 4072 }; 4073 4074 // attach all values to element and event object 4075 for (i in values) { 4076 pluginMediaElement[i] = values[i]; 4077 e[i] = values[i]; 4078 } 4079 4080 // fake the newer W3C buffered TimeRange (loaded and total have been removed) 4081 bufferedTime = values.bufferedTime || 0; 4082 4083 e.target.buffered = e.buffered = { 4084 start: function(index) { 4085 return 0; 4086 }, 4087 end: function (index) { 4088 return bufferedTime; 4089 }, 4090 length: 1 4091 }; 4092 4093 pluginMediaElement.dispatchEvent(e.type, e); 4094 } 4095}; 4096 4097/* 4098Default options 4099*/ 4100mejs.MediaElementDefaults = { 4101 // allows testing on HTML5, flash, silverlight 4102 // auto: attempts to detect what the browser can do 4103 // auto_plugin: prefer plugins and then attempt native HTML5 4104 // native: forces HTML5 playback 4105 // shim: disallows HTML5, will attempt either Flash or Silverlight 4106 // none: forces fallback view 4107 mode: 'auto', 4108 // remove or reorder to change plugin priority and availability 4109 plugins: ['flash','silverlight','youtube','vimeo'], 4110 // shows debug errors on screen 4111 enablePluginDebug: false, 4112 // use plugin for browsers that have trouble with Basic Authentication on HTTPS sites 4113 httpsBasicAuthSite: false, 4114 // overrides the type specified, useful for dynamic instantiation 4115 type: '', 4116 // path to Flash and Silverlight plugins 4117 pluginPath: mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']), 4118 // name of flash file 4119 flashName: 'flashmediaelement.swf', 4120 // streamer for RTMP streaming 4121 flashStreamer: '', 4122 // turns on the smoothing filter in Flash 4123 enablePluginSmoothing: false, 4124 // enabled pseudo-streaming (seek) on .mp4 files 4125 enablePseudoStreaming: false, 4126 // start query parameter sent to server for pseudo-streaming 4127 pseudoStreamingStartQueryParam: 'start', 4128 // name of silverlight file 4129 silverlightName: 'silverlightmediaelement.xap', 4130 // default if the <video width> is not specified 4131 defaultVideoWidth: 480, 4132 // default if the <video height> is not specified 4133 defaultVideoHeight: 270, 4134 // overrides <video width> 4135 pluginWidth: -1, 4136 // overrides <video height> 4137 pluginHeight: -1, 4138 // additional plugin variables in 'key=value' form 4139 pluginVars: [], 4140 // rate in milliseconds for Flash and Silverlight to fire the timeupdate event 4141 // larger number is less accurate, but less strain on plugin->JavaScript bridge 4142 timerRate: 250, 4143 // initial volume for player 4144 startVolume: 0.8, 4145 success: function () { }, 4146 error: function () { } 4147}; 4148 4149/* 4150Determines if a browser supports the <video> or <audio> element
4151and returns either the native element or a Flash/Silverlight version that 4152mimics HTML5 MediaElement 4153*/ 4154mejs.MediaElement = function (el, o) { 4155 return mejs.HtmlMediaElementShim.create(el,o); 4156}; 4157 4158mejs.HtmlMediaElementShim = { 4159 4160 create: function(el, o) { 4161 var 4162 options = mejs.MediaElementDefaults, 4163 htmlMediaElement = (typeof(el) == 'string') ? document.getElementById(el) : el, 4164 tagName = htmlMediaElement.tagName.toLowerCase(), 4165 isMediaTag = (tagName === 'audio' || tagName === 'video'), 4166 src = (isMediaTag) ? htmlMediaElement.getAttribute('src') : htmlMediaElement.getAttribute('href'), 4167 poster = htmlMediaElement.getAttribute('poster'), 4168 autoplay = htmlMediaElement.getAttribute('autoplay'), 4169 preload = htmlMediaElement.getAttribute('preload'), 4170 controls = htmlMediaElement.getAttribute('controls'), 4171 playback, 4172 prop; 4173 4174 // extend options 4175 for (prop in o) { 4176 options[prop] = o[prop]; 4177 } 4178 4179 // clean up attributes 4180 src = (typeof src == 'undefined' || src === null || src == '') ? null : src; 4181 poster = (typeof poster == 'undefined' || poster === null) ? '' : poster; 4182 preload = (typeof preload == 'undefined' || preload === null || preload === 'false') ? 'none' : preload; 4183 autoplay = !(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false'); 4184 controls = !(typeof controls == 'undefined' || controls === null || controls === 'false'); 4185 4186 // test for HTML5 and plugin capabilities 4187 playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src); 4188 playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : ''; 4189 4190 if (playback.method == 'native') { 4191 // second fix for android 4192 if (mejs.MediaFeatures.isBustedAndroid) { 4193 htmlMediaElement.src = playback.url; 4194 htmlMediaElement.addEventListener('click', function() { 4195 htmlMediaElement.play(); 4196 }, false); 4197 } 4198 4199 // add methods to native HTMLMediaElement 4200 return this.updateNative(playback, options, autoplay, preload); 4201 } else if (playback.method !== '') { 4202 // create plugin to mimic HTMLMediaElement 4203 4204 return this.createPlugin( playback, options, poster, autoplay, preload, controls); 4205 } else { 4206 // boo, no HTML5, no Flash, no Silverlight. 4207 this.createErrorMessage( playback, options, poster ); 4208 4209 return this; 4210 } 4211 }, 4212 4213 determinePlayback: function(htmlMediaElement, options, supportsMediaTag, isMediaTag, src) { 4214 var 4215 mediaFiles = [], 4216 i, 4217 j, 4218 k, 4219 l, 4220 n, 4221 type, 4222 result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio')}, 4223 pluginName, 4224 pluginVersions, 4225 pluginInfo, 4226 dummy, 4227 media; 4228 4229 // STEP 1: Get URL and type from <video src> or <source src> 4230 4231 // supplied type overrides <video type> and <source type> 4232 if (typeof options.type != 'undefined' && options.type !== '') { 4233 4234 // accept either string or array of types 4235 if (typeof options.type == 'string') { 4236 mediaFiles.push({type:options.type, url:src}); 4237 } else { 4238 4239 for (i=0; i<options.type.length; i++) { 4240 mediaFiles.push({type:options.type[i], url:src}); 4241 } 4242 } 4243 4244 // test for src attribute first 4245 } else if (src !== null) { 4246 type = this.formatType(src, htmlMediaElement.getAttribute('type')); 4247 mediaFiles.push({type:type, url:src}); 4248 4249 // then test for <source> elements 4250 } else { 4251 // test <source> types to see if they are usable 4252 for (i = 0; i < htmlMediaElement.childNodes.length; i++) { 4253 n = htmlMediaElement.childNodes[i]; 4254 if (n.nodeType == 1 && n.tagName.toLowerCase() == 'source') { 4255 src = n.getAttribute('src'); 4256 type = this.formatType(src, n.getAttribute('type')); 4257 media = n.getAttribute('media'); 4258 4259 if (!media || !window.matchMedia || (window.matchMedia && window.matchMedia(media).matches)) { 4260 mediaFiles.push({type:type, url:src}); 4261 } 4262 } 4263 } 4264 } 4265 4266 // in the case of dynamicly created players 4267 // check for audio types 4268 if (!isMediaTag && mediaFiles.length > 0 && mediaFiles[0].url !== null && this.getTypeFromFile(mediaFiles[0].url).indexOf('audio') > -1) { 4269 result.isVideo = false;
4270 } 4271 4272 4273 // STEP 2: Test for playback method 4274 4275 // special case for Android which sadly doesn't implement the canPlayType function (always returns '') 4276 if (mejs.MediaFeatures.isBustedAndroid) { 4277 htmlMediaElement.canPlayType = function(type) { 4278 return (type.match(/video\/(mp4|m4v)/gi) !== null) ? 'maybe' : ''; 4279 }; 4280 } 4281 4282 // special case for Chromium to specify natively supported video codecs (i.e. WebM and Theora) 4283 if (mejs.MediaFeatures.isChromium) { 4284 htmlMediaElement.canPlayType = function(type) { 4285 return (type.match(/video\/(webm|ogv|ogg)/gi) !== null) ? 'maybe' : ''; 4286 }; 4287 } 4288 4289 // test for native playback first 4290 if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native') && !(mejs.MediaFeatures.isBustedNativeHTTPS && options.httpsBasicAuthSite === true)) { 4291 4292 if (!isMediaTag) { 4293 4294 // create a real HTML5 Media Element 4295 dummy = document.createElement( result.isVideo ? 'video' : 'audio'); 4296 htmlMediaElement.parentNode.insertBefore(dummy, htmlMediaElement); 4297 htmlMediaElement.style.display = 'none'; 4298 4299 // use this one from now on 4300 result.htmlMediaElement = htmlMediaElement = dummy; 4301 } 4302 4303 for (i=0; i<mediaFiles.length; i++) { 4304 // normal check 4305 if (mediaFiles[i].type == "video/m3u8" || htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/, '') !== '' 4306 // special case for Mac/Safari 5.0.3 which answers '' to canPlayType('audio/mp3') but 'maybe' to canPlayType('audio/mpeg') 4307 || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/, '') !== '' 4308 // special case for m4a supported by detecting mp4 support 4309 || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/m4a/,'mp4')).replace(/no/, '') !== '') { 4310 result.method = 'native'; 4311 result.url = mediaFiles[i].url; 4312 break; 4313 } 4314 } 4315 4316 if (result.method === 'native') { 4317 if (result.url !== null) { 4318 htmlMediaElement.src = result.url; 4319 } 4320 4321 // if `auto_plugin` mode, then cache the native result but try plugins. 4322 if (options.mode !== 'auto_plugin') { 4323 return result; 4324 } 4325 } 4326 } 4327 4328 // if native playback didn't work, then test plugins 4329 if (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'shim') { 4330 for (i=0; i<mediaFiles.length; i++) { 4331 type = mediaFiles[i].type; 4332 4333 // test all plugins in order of preference [silverlight, flash] 4334 for (j=0; j<options.plugins.length; j++) { 4335 4336 pluginName = options.plugins[j]; 4337 4338 // test version of plugin (for future features) 4339 pluginVersions = mejs.plugins[pluginName]; 4340 4341 for (k=0; k<pluginVersions.length; k++) { 4342 pluginInfo = pluginVersions[k]; 4343 4344 // test if user has the correct plugin version 4345 4346 // for youtube/vimeo 4347 if (pluginInfo.version == null || 4348 4349 mejs.PluginDetector.hasPluginVersion(pluginName, pluginInfo.version)) { 4350 4351 // test for plugin playback types 4352 for (l=0; l<pluginInfo.types.length; l++) { 4353 // find plugin that can play the type 4354 if (type == pluginInfo.types[l]) { 4355 result.method = pluginName; 4356 result.url = mediaFiles[i].url; 4357 return result; 4358 } 4359 } 4360 } 4361 } 4362 } 4363 } 4364 } 4365 4366 // at this point, being in 'auto_plugin' mode implies that we tried plugins but failed. 4367 // if we have native support then return that. 4368 if (options.mode === 'auto_plugin' && result.method === 'native') { 4369 return result; 4370 } 4371 4372 // what if there's nothing to play? just grab the first available 4373 if (result.method === '' && mediaFiles.length > 0) { 4374 result.url = mediaFiles[0].url; 4375 } 4376 4377 return result; 4378 }, 4379 4380 formatType: function(url, type) { 4381 var ext; 4382 4383 // if no type is supplied, fake it with the extension 4384 if (url && !type) { 4385 return this.getTypeFromFile(url); 4386 } else { 4387 // only return the mime part of the type in case the attribute contains the codec 4388 // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element 4389 // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4` 4390 4391 if (type && ~type.indexOf(';')) { 4392 return type.substr(0, type.indexOf(';')); 4393 } else { 4394 return type; 4395 } 4396 } 4397 }, 4398 4399 getTypeFromFile: function(url) { 4400 url = url.split('?')[0]; 4401 var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase(); 4402 return (/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video' : 'audio') + '/' + this.getTypeFromExtension(ext); 4403 }, 4404 4405 getTypeFromExtension: function(ext) { 4406 4407 switch (ext) { 4408 case 'mp4': 4409 case 'm4v': 4410 case 'm4a': 4411 return 'mp4'; 4412 case 'webm': 4413 case 'webma': 4414 case 'webmv': 4415 return 'webm'; 4416 case 'ogg': 4417 case 'oga': 4418 case 'ogv': 4419 return 'ogg'; 4420 default: 4421 return ext; 4422 } 4423 }, 4424 4425 createErrorMessage: function(playback, options, poster) { 4426 var 4427 htmlMediaElement = playback.htmlMediaElement, 4428 errorContainer = document.createElement('div'); 4429 4430 errorContainer.className = 'me-cannotplay'; 4431 4432 try { 4433 errorContainer.style.width = htmlMediaElement.width + 'px'; 4434 errorContainer.style.height = htmlMediaElement.height + 'px'; 4435 } catch (e) {} 4436 4437 if (options.customError) { 4438 errorContainer.innerHTML = options.customError; 4439 } else { 4440 errorContainer.innerHTML = (poster !== '') ? 4441 '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' : 4442 '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>'; 4443 } 4444 4445 htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement); 4446 htmlMediaElement.style.display = 'none'; 4447 4448 options.error(htmlMediaElement); 4449 }, 4450 4451 createPlugin:function(playback, options, poster, autoplay, preload, controls) { 4452 var 4453 htmlMediaElement = playback.htmlMediaElement, 4454 width = 1, 4455 height = 1, 4456 pluginid = 'me_' + playback.method + '_' + (mejs.meIndex++), 4457 pluginMediaElement = new mejs.PluginMediaElement(pluginid, playback.method, playback.url), 4458 container = document.createElement('div'), 4459 specialIEContainer, 4460 node, 4461 initVars; 4462 4463 // copy tagName from html media element 4464 pluginMediaElement.tagName = htmlMediaElement.tagName 4465 4466 // copy attributes from html media element to plugin media element 4467 for (var i = 0; i < htmlMediaElement.attributes.length; i++) { 4468 var attribute = htmlMediaElement.attributes[i]; 4469 if (attribute.specified == true) { 4470 pluginMediaElement.setAttribute(attribute.name, attribute.value); 4471 } 4472 } 4473 4474 // check for placement inside a <p> tag (sometimes WYSIWYG editors do this) 4475 node = htmlMediaElement.parentNode; 4476 4477 while (node !== null && node.tagName != null && node.tagName.toLowerCase() !== 'body' && 4478 node.parentNode != null && node.parentNode.tagName != null && node.parentNode.constructor != null && node.parentNode.constructor.name === "ShadowRoot") { 4479 if (node.parentNode.tagName.toLowerCase() === 'p') { 4480 node.parentNode.parentNode.insertBefore(node, node.parentNode); 4481 break; 4482 } 4483 node = node.parentNode; 4484 } 4485 4486 if (playback.isVideo) { 4487 width = (options.pluginWidth > 0) ? options.pluginWidth : (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth; 4488 height = (options.pluginHeight > 0) ? options.pluginHeight : (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight; 4489 4490 // in case of '%' make sure it's encoded 4491 width = mejs.Utility.encodeUrl(width); 4492 height = mejs.Utility.encodeUrl(height); 4493 4494 } else { 4495 if (options.enablePluginDebug) { 4496 width = 320; 4497 height = 240; 4498 } 4499 } 4500 4501 // register plugin 4502 pluginMediaElement.success = options.success; 4503 mejs.MediaPluginBridge.registerPluginElement(pluginid, pluginMediaElement, htmlMediaElement); 4504 4505 // add container (must be added to DOM before inserting HTML for IE) 4506 container.className = 'me-plugin'; 4507 container.id = pluginid + '_container'; 4508 4509 if (playback.isVideo) { 4510 htmlMediaElement.parentNode.insertBefore(container, htmlMediaElement); 4511 } else { 4512 document.body.insertBefore(container, document.body.childNodes[0]); 4513 } 4514 4515 // flash/silverlight vars 4516 initVars = [
4517 'id=' + pluginid, 4518 'jsinitfunction=' + "mejs.MediaPluginBridge.initPlugin", 4519 'jscallbackfunction=' + "mejs.MediaPluginBridge.fireEvent", 4520 'isvideo=' + ((playback.isVideo) ? "true" : "false"), 4521 'autoplay=' + ((autoplay) ? "true" : "false"), 4522 'preload=' + preload, 4523 'width=' + width, 4524 'startvolume=' + options.startVolume, 4525 'timerrate=' + options.timerRate, 4526 'flashstreamer=' + options.flashStreamer, 4527 'height=' + height, 4528 'pseudostreamstart=' + options.pseudoStreamingStartQueryParam]; 4529 4530 if (playback.url !== null) { 4531 if (playback.method == 'flash') { 4532 initVars.push('file=' + mejs.Utility.encodeUrl(playback.url)); 4533 } else { 4534 initVars.push('file=' + playback.url); 4535 } 4536 } 4537 if (options.enablePluginDebug) { 4538 initVars.push('debug=true'); 4539 } 4540 if (options.enablePluginSmoothing) { 4541 initVars.push('smoothing=true'); 4542 } 4543 if (options.enablePseudoStreaming) { 4544 initVars.push('pseudostreaming=true'); 4545 } 4546 if (controls) { 4547 initVars.push('controls=true'); // shows controls in the plugin if desired 4548 } 4549 if (options.pluginVars) { 4550 initVars = initVars.concat(options.pluginVars); 4551 } 4552 4553 switch (playback.method) { 4554 case 'silverlight': 4555 container.innerHTML = 4556'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + pluginid + '" name="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' + 4557'<param name="initParams" value="' + initVars.join(',') + '" />' + 4558'<param name="windowless" value="true" />' + 4559'<param name="background" value="black" />' + 4560'<param name="minRuntimeVersion" value="3.0.0.0" />' + 4561'<param name="autoUpgrade" value="true" />' + 4562'<param name="source" value="' + options.pluginPath + options.silverlightName + '" />' + 4563'</object>'; 4564 break; 4565 4566 case 'flash': 4567 4568 if (mejs.MediaFeatures.isIE) { 4569 specialIEContainer = document.createElement('div'); 4570 container.appendChild(specialIEContainer); 4571 specialIEContainer.outerHTML = 4572'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' + 4573'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' + 4574'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' + 4575'<param name="flashvars" value="' + initVars.join('&') + '" />' + 4576'<param name="quality" value="high" />' + 4577'<param name="bgcolor" value="#000000" />' + 4578'<param name="wmode" value="transparent" />' + 4579'<param name="allowScriptAccess" value="always" />' + 4580'<param name="allowFullScreen" value="true" />' + 4581'<param name="scale" value="default" />' + 4582'</object>'; 4583 4584 } else { 4585 4586 container.innerHTML = 4587'<embed id="' + pluginid + '" name="' + pluginid + '" ' + 4588'play="true" ' + 4589'loop="false" ' + 4590'quality="high" ' + 4591'bgcolor="#000000" ' + 4592'wmode="transparent" ' + 4593'allowScriptAccess="always" ' + 4594'allowFullScreen="true" ' + 4595'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" ' + 4596'src="' + options.pluginPath + options.flashName + '" ' + 4597'flashvars="' + initVars.join('&') + '" ' + 4598'width="' + width + '" ' + 4599'height="' + height + '" ' + 4600'scale="default"' + 4601'class="mejs-shim"></embed>'; 4602 } 4603 break; 4604 4605 case 'youtube': 4606 4607 4608 var videoId; 4609 // youtu.be url from share button 4610 if (playback.url.lastIndexOf("youtu.be") != -1) { 4611 videoId = playback.url.substr(playback.url.lastIndexOf('/')+1); 4612 if (videoId.indexOf('?') != -1) { 4613 videoId = videoId.substr(0, videoId.indexOf('?')); 4614 } 4615 } 4616 else { 4617 videoId = playback.url.substr(playback.url.lastIndexOf('=')+1); 4618 } 4619 youtubeSettings = { 4620 container: container, 4621 containerId: container.id, 4622 pluginMediaElement: pluginMediaElement, 4623 pluginId: pluginid, 4624 videoId: videoId, 4625 height: height, 4626 width: width 4627 }; 4628 4629 if (mejs.PluginDetector.hasPluginVersion('flash', [10,0,0]) ) { 4630 mejs.YouTubeApi.createFlash(youtubeSettings); 4631 } else { 4632 mejs.YouTubeApi.enqueueIframe(youtubeSettings); 4633 } 4634 4635 break; 4636 4637 // DEMO Code. Does NOT work. 4638 case 'vimeo': 4639 var player_id = pluginid + "_player"; 4640 pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1); 4641 4642 container.innerHTML ='<iframe src="//player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; 4643 if (typeof($f) == 'function') { // froogaloop available 4644 var player = $f(container.childNodes[0]); 4645 4646 player.addEvent('ready', function() { 4647 4648 player.playVideo = function() { 4649 player.api( 'play' ); 4650 } 4651 player.stopVideo = function() { 4652 player.api( 'unload' ); 4653 } 4654 player.pauseVideo = function() { 4655 player.api( 'pause' ); 4656 } 4657 player.seekTo = function( seconds ) { 4658 player.api( 'seekTo', seconds ); 4659 } 4660 player.setVolume = function( volume ) { 4661 player.api( 'setVolume', volume ); 4662 } 4663 player.setMuted = function( muted ) { 4664 if( muted ) { 4665 player.lastVolume = player.api( 'getVolume' );
4666 player.api( 'setVolume', 0 ); 4667 } else { 4668 player.api( 'setVolume', player.lastVolume ); 4669 delete player.lastVolume; 4670 } 4671 } 4672 4673 function createEvent(player, pluginMediaElement, eventName, e) { 4674 var obj = { 4675 type: eventName, 4676 target: pluginMediaElement 4677 }; 4678 if (eventName == 'timeupdate') { 4679 pluginMediaElement.currentTime = obj.currentTime = e.seconds; 4680 pluginMediaElement.duration = obj.duration = e.duration; 4681 } 4682 pluginMediaElement.dispatchEvent(obj.type, obj); 4683 } 4684 4685 player.addEvent('play', function() { 4686 createEvent(player, pluginMediaElement, 'play'); 4687 createEvent(player, pluginMediaElement, 'playing'); 4688 }); 4689 4690 player.addEvent('pause', function() { 4691 createEvent(player, pluginMediaElement, 'pause'); 4692 }); 4693 4694 player.addEvent('finish', function() { 4695 createEvent(player, pluginMediaElement, 'ended'); 4696 }); 4697 4698 player.addEvent('playProgress', function(e) { 4699 createEvent(player, pluginMediaElement, 'timeupdate', e); 4700 }); 4701 4702 pluginMediaElement.pluginElement = container; 4703 pluginMediaElement.pluginApi = player; 4704 4705 // init mejs 4706 mejs.MediaPluginBridge.initPlugin(pluginid); 4707 }); 4708 } 4709 else { 4710 console.warn("You need to include froogaloop for vimeo to work"); 4711 } 4712 break; 4713 } 4714 // hide original element 4715 htmlMediaElement.style.display = 'none'; 4716 // prevent browser from autoplaying when using a plugin 4717 htmlMediaElement.removeAttribute('autoplay'); 4718 4719 // FYI: options.success will be fired by the MediaPluginBridge 4720 4721 return pluginMediaElement; 4722 }, 4723 4724 updateNative: function(playback, options, autoplay, preload) { 4725 4726 var htmlMediaElement = playback.htmlMediaElement, 4727 m; 4728 4729 4730 // add methods to video object to bring it into parity with Flash Object 4731 for (m in mejs.HtmlMediaElement) { 4732 htmlMediaElement[m] = mejs.HtmlMediaElement[m]; 4733 } 4734 4735 /* 4736 Chrome now supports preload="none" 4737 if (mejs.MediaFeatures.isChrome) { 4738 4739 // special case to enforce preload attribute (Chrome doesn't respect this) 4740 if (preload === 'none' && !autoplay) { 4741 4742 // forces the browser to stop loading (note: fails in IE9) 4743 htmlMediaElement.src = ''; 4744 htmlMediaElement.load(); 4745 htmlMediaElement.canceledPreload = true; 4746 4747 htmlMediaElement.addEventListener('play',function() { 4748 if (htmlMediaElement.canceledPreload) { 4749 htmlMediaElement.src = playback.url; 4750 htmlMediaElement.load(); 4751 htmlMediaElement.play(); 4752 htmlMediaElement.canceledPreload = false; 4753 } 4754 }, false); 4755 // for some reason Chrome forgets how to autoplay sometimes. 4756 } else if (autoplay) { 4757 htmlMediaElement.load(); 4758 htmlMediaElement.play(); 4759 } 4760 } 4761 */ 4762 4763 // fire success code 4764 options.success(htmlMediaElement, htmlMediaElement); 4765 4766 return htmlMediaElement; 4767 } 4768}; 4769 4770/* 4771 - test on IE (object vs. embed) 4772 - determine when to use iframe (Firefox, Safari, Mobile) vs. Flash (Chrome, IE) 4773 - fullscreen? 4774*/ 4775 4776// YouTube Flash and Iframe API 4777mejs.YouTubeApi = { 4778 isIframeStarted: false, 4779 isIframeLoaded: false, 4780 loadIframeApi: function() { 4781 if (!this.isIframeStarted) { 4782 var tag = document.createElement('script'); 4783 tag.src = "//www.youtube.com/player_api"; 4784 var firstScriptTag = document.getElementsByTagName('script')[0]; 4785 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 4786 this.isIframeStarted = true; 4787 } 4788 }, 4789 iframeQueue: [], 4790 enqueueIframe: function(yt) { 4791 4792 if (this.isLoaded) { 4793 this.createIframe(yt); 4794 } else { 4795 this.loadIframeApi(); 4796 this.iframeQueue.push(yt); 4797 } 4798 }, 4799 createIframe: function(settings) { 4800 4801 var 4802 pluginMediaElement = settings.pluginMediaElement, 4803 player = new YT.Player(settings.containerId, { 4804 height: settings.height, 4805 width: settings.width, 4806 videoId: settings.videoId, 4807 playerVars: {controls:0}, 4808 events: { 4809 'onReady': function() { 4810 4811 // hook up iframe object to MEjs 4812 settings.pluginMediaElement.pluginApi = player; 4813 4814 // init mejs 4815 mejs.MediaPluginBridge.initPlugin(settings.pluginId); 4816 4817 // create timer 4818 setInterval(function() { 4819 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate'); 4820 }, 250); 4821 }, 4822 'onStateChange': function(e) { 4823 4824 mejs.YouTubeApi.handleStateChange(e.data, player, pluginMediaElement); 4825 4826 } 4827 } 4828 }); 4829 }, 4830 4831 createEvent: function (player, pluginMediaElement, eventName) { 4832 var obj = { 4833 type: eventName, 4834 target: pluginMediaElement 4835 }; 4836 4837 if (player && player.getDuration) { 4838 4839 // time 4840 pluginMediaElement.currentTime = obj.currentTime = player.getCurrentTime(); 4841 pluginMediaElement.duration = obj.duration = player.getDuration(); 4842 4843 // state 4844 obj.paused = pluginMediaElement.paused; 4845 obj.ended = pluginMediaElement.ended; 4846 4847 // sound 4848 obj.muted = player.isMuted(); 4849 obj.volume = player.getVolume() / 100; 4850 4851 // progress 4852 obj.bytesTotal = player.getVideoBytesTotal(); 4853 obj.bufferedBytes = player.getVideoBytesLoaded(); 4854 4855 // fake the W3C buffered TimeRange 4856 var bufferedTime = obj.bufferedBytes / obj.bytesTotal * obj.duration; 4857 4858 obj.target.buffered = obj.buffered = { 4859 start: function(index) { 4860 return 0; 4861 }, 4862 end: function (index) { 4863 return bufferedTime; 4864 }, 4865 length: 1 4866 }; 4867 4868 } 4869 4870 // send event up the chain 4871 pluginMediaElement.dispatchEvent(obj.type, obj); 4872 }, 4873 4874 iFrameReady: function() { 4875 4876 this.isLoaded = true; 4877 this.isIframeLoaded = true; 4878 4879 while (this.iframeQueue.length > 0) { 4880 var settings = this.iframeQueue.pop(); 4881 this.createIframe(settings); 4882 } 4883 }, 4884 4885 // FLASH! 4886 flashPlayers: {}, 4887 createFlash: function(settings) { 4888 4889 this.flashPlayers[settings.pluginId] = settings; 4890 4891 /* 4892 settings.container.innerHTML = 4893 '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid=' + settings.pluginId + '&version=3&autoplay=0&controls=0&modestbranding=1&loop=0" ' + 4894 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' + 4895 '<param name="allowScriptAccess" value="always">' + 4896 '<param name="wmode" value="transparent">' + 4897 '</object>'; 4898 */ 4899 4900 var specialIEContainer, 4901 youtubeUrl = '//www.youtube.com/apiplayer?enablejsapi=1&playerapiid=' + settings.pluginId + '&version=3&autoplay=0&controls=0&modestbranding=1&loop=0'; 4902 4903 if (mejs.MediaFeatures.isIE) { 4904 4905 specialIEContainer = document.createElement('div'); 4906 settings.container.appendChild(specialIEContainer); 4907 specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/s
4907hockwave/cabs/flash/swflash.cab" ' + 4908'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' + 4909 '<param name="movie" value="' + youtubeUrl + '" />' + 4910 '<param name="wmode" value="transparent" />' + 4911 '<param name="allowScriptAccess" value="always" />' + 4912 '<param name="allowFullScreen" value="true" />' + 4913'</object>'; 4914 } else { 4915 settings.container.innerHTML = 4916 '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + youtubeUrl + '" ' + 4917 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' + 4918 '<param name="allowScriptAccess" value="always">' + 4919 '<param name="wmode" value="transparent">' + 4920 '</object>'; 4921 } 4922 4923 }, 4924 4925 flashReady: function(id) { 4926 var 4927 settings = this.flashPlayers[id], 4928 player = document.getElementById(id), 4929 pluginMediaElement = settings.pluginMediaElement; 4930 4931 // hook up and return to MediaELementPlayer.success 4932 pluginMediaElement.pluginApi = 4933 pluginMediaElement.pluginElement = player; 4934 mejs.MediaPluginBridge.initPlugin(id); 4935 4936 // load the youtube video 4937 player.cueVideoById(settings.videoId); 4938 4939 var callbackName = settings.containerId + '_callback'; 4940 4941 window[callbackName] = function(e) { 4942 mejs.YouTubeApi.handleStateChange(e, player, pluginMediaElement); 4943 } 4944 4945 player.addEventListener('onStateChange', callbackName); 4946 4947 setInterval(function() { 4948 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate'); 4949 }, 250); 4950 4951 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'canplay'); 4952 }, 4953 4954 handleStateChange: function(youTubeState, player, pluginMediaElement) { 4955 switch (youTubeState) { 4956 case -1: // not started 4957 pluginMediaElement.paused = true; 4958 pluginMediaElement.ended = true; 4959 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'loadedmetadata'); 4960 //createYouTubeEvent(player, pluginMediaElement, 'loadeddata'); 4961 break; 4962 case 0: 4963 pluginMediaElement.paused = false; 4964 pluginMediaElement.ended = true; 4965 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'ended'); 4966 break; 4967 case 1: 4968 pluginMediaElement.paused = false; 4969 pluginMediaElement.ended = false; 4970 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'play'); 4971 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'playing'); 4972 break; 4973 case 2: 4974 pluginMediaElement.paused = true; 4975 pluginMediaElement.ended = false; 4976 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'pause'); 4977 break; 4978 case 3: // buffering 4979 mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'progress'); 4980 break; 4981 case 5: 4982 // cued? 4983 break; 4984 4985 } 4986 4987 } 4988} 4989// IFRAME 4990function onYouTubePlayerAPIReady() { 4991 mejs.YouTubeApi.iFrameReady(); 4992} 4993// FLASH 4994function onYouTubePlayerReady(id) { 4995 mejs.YouTubeApi.flashReady(id); 4996} 4997 4998window.mejs = mejs; 4999window.MediaElement = mejs.MediaElement; 5000 5001/* 5002 * Adds Internationalization and localization to mediaelement. 5003 * 5004 * This file does not contain translations, you have to add them manually. 5005 * The schema is always the same: me-i18n-locale-[IETF-language-tag].js 5006 * 5007 * Examples are provided both for german and chinese translation. 5008 * 5009 * 5010 * What is the concept beyond i18n? 5011 * http://en.wikipedia.org/wiki/Internationalization_and_localization 5012 * 5013 * What langcode should i use? 5014 * http://en.wikipedia.org/wiki/IETF_language_tag 5015 * https://tools.ietf.org/html/rfc5646 5016 * 5017 * 5018 * License? 5019 * 5020 * The i18n file uses methods from the Drupal project (drupal.js): 5021 * - i18n.methods.t() (modified) 5022 * - i18n.methods.checkPlain() (full copy) 5023 * 5024 * The Drupal project is (like mediaelementjs) licensed under GPLv2. 5025 * - http://drupal.org/licensing/faq/#q1 5026 * - https://github.com/johndyer/mediaelement 5027 * - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 5028 * 5029 * 5030 * @author 5031 * Tim Latz ([email protected]) 5032 * 5033 * 5034 * @params 5035 * - context - document, iframe .. 5036 * - exports - CommonJS, window .. 5037 * 5038 */ 5039;(function(context, exports, undefined) { 5040 "use strict"; 5041 5042 var i18n = { 5043 "locale": { 5044 // Ensure previous values aren't overwritten. 5045 "language" : (exports.i18n && exports.i18n.locale.language) || '', 5046 "strings" : (exports.i18n && exports.i18n.locale.strings) || {} 5047 }, 5048 "ietf_lang_regex" : /^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/, 5049 "methods" : {} 5050 }; 5051// start i18n 5052 5053 5054 /** 5055 * Get language, fallback to browser's language if empty 5056 * 5057 * IETF: RFC 5646, https://tools.ietf.org/html/rfc5646 5058 * Examples: en, zh-CN, cmn-Hans-CN, sr-Latn-RS, es-419, x-private 5059 */ 5060 i18n.getLanguage = function () { 5061 var language = i18n.locale.language || window.navigator.userLanguage || window.navigator.language; 5062 return i18n.ietf_lang_regex.exec(language) ? language : null; 5063 5064 //(WAS: convert to iso 639-1 (2-letters, lower case)) 5065 //return language.substr(0, 2).toLowerCase(); 5066 }; 5067 5068 // i18n fixes for compatibility with WordPress 5069 if ( typeof mejsL10n != 'undefined' ) { 5070 i18n.locale.language = mejsL10n.language; 5071 } 5072 5073 5074 5075 /** 5076 * Encode special characters in a plain-text string for display as HTML. 5077 */ 5078 i18n.methods.checkPlain = function (str) { 5079 var character, regex, 5080 replace = { 5081 '&': '&', 5082 '"': '"', 5083 '<': '<', 5084 '>': '>' 5085 }; 5086 str = String(str); 5087 for (character in replace) { 5088 if (replace.hasOwnProperty(character)) { 5089 regex = new RegExp(character, 'g'); 5090 str = str.replace(regex, replace[character]); 5091 } 5092 } 5093 return str; 5094 }; 5095 5096 /** 5097 * Translate strings to the page language or a given language. 5098 * 5099 * 5100 * @param str 5101 * A string containing the English string to translate. 5102 * 5103 * @param options 5104 * - 'context' (defaults to the default context): The context the source string 5105 * belongs to. 5106 * 5107 * @return 5108 * The translated string, escaped via i18n.methods.checkPlain() 5109 */ 5110 i18n.methods.t = function (str, options) { 5111 5112 // Fetch the localized version of the string. 5113 if (i18n.locale.strings && i18n.locale.strings[options.context] && i18n.locale.strings[options.context][str]) { 5114 str = i18n.locale.strings[options.context][str]; 5115 } 5116 5117 return i18n.methods.checkPlain(str); 5118 }; 5119 5120 5121 /** 5122 * Wrapper for i18n.methods.t() 5123 * 5124 * @see i18n.methods.t() 5125 * @throws InvalidArgumentException 5126 */ 5127 i18n.t = function(str, options) { 5128 5129 if (typeof str === 'string' && str.length > 0) { 5130 5131 // check every time due language can change for 5132 // different reasons (translation, lang switcher ..) 5133 var language = i18n.getLanguage(); 5134 5135 options = options || { 5136 "context" : language 5137 }; 5138 5139 return i18n.methods.t(str, options); 5140 } 5141 else { 5142 throw { 5143 "name" : 'InvalidArgumentException', 5144 "message" : 'First argument is either not a string or empty.' 5145 }; 5146 } 5147 }; 5148 5149// end i18n 5150 exports.i18n = i18n; 5151}(document, mejs)); 5152 5153// i18n fixes for compatibility with WordPress 5154;(function(exports, undefined) { 5155 5156 "use strict"; 5157 5158 if ( typeof mejsL10n != 'undefined' ) { 5159 exports[mejsL10n.language] = mejsL10n.strings; 5160 } 5161 5162}(mejs.i18n.locale.strings)); 5163 5164/*! 5165 * 5166 * MediaElementPlayer 5167 * http://mediaelementjs.com/ 5168 * 5169 * Creates a controller bar for HTML5 <video> add <audio> tags 5170 * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper) 5171 * 5172 * Copyright 2010-2013, John Dyer (http://j.hn/) 5173 * License: MIT 5174 * 5175 */ 5176if (typeof jQuery != 'undefined') { 5177 mejs.$ = jQuery; 5178} else if (typeof ender != 'undefined') { 5179 mejs.$ = ender; 5180} 5181(function ($) { 5182 5183 // default player values 5184 mejs.MepDefaults = { 5185 // url to poster (to fix iOS 3.x) 5186 poster: '', 5187 // When the video is ended, we can show the poster. 5188 showPosterWhenEnded: false, 5189 // default if the <video width> is not specified 5190 defaultVideoWidth: 480, 5191 // default if the <video height> is not specified 5192 defaultVideoHeight: 270, 5193 // if set, overrides <video width> 5194 videoWidth: -1, 5195 // if set, overrides <video height> 5196 videoHeight: -1, 5197 // default if the user doesn't specify 5198 defaultAudioWidth: 400, 5199 // default if the user doesn't specify 5200 defaultAudioHeight: 30, 5201 5202 // default amount to move back when back key is pressed 5203 defaultSeekBackwardInterval: function(media) { 5204 return (media.duration * 0.05); 5205 }, 5206 // default amount to move forward when forward key is pressed 5207 defaultSeekForwardInterval: function(media) { 5208 return (media.duration * 0.05); 5209 }, 5210 5211 // set dimensions via JS instead of CSS 5212 setDimensions: true, 5213 5214 // width of audio player 5215 audioWidth: -1, 5216 // height of audio player 5217 audioHeight: -1, 5218 // initial volume when the player starts (overrided by user cookie) 5219 startVolume: 0.8, 5220 // useful for <audio> player loops 5221 loop: false, 5222 // rewind to beginning when media ends 5223 autoRewind: true, 5224 // resize to media dimensions 5225 enableAutosize: true, 5226 // forces the hour marker (##:00:00) 5227 alwaysShowHours: false, 5228 5229 // show framecount in timecode (##:00:00:00)
5230 showTimecodeFrameCount: false, 5231 // used when showTimecodeFrameCount is set to true 5232 framesPerSecond: 25, 5233 5234 // automatically calculate the width of the progress bar based on the sizes of other elements 5235 autosizeProgress : true, 5236 // Hide controls when playing and mouse is not over the video 5237 alwaysShowControls: false, 5238 // Display the video control 5239 hideVideoControlsOnLoad: false, 5240 // Enable click video element to toggle play/pause 5241 clickToPlayPause: true, 5242 // force iPad's native controls 5243 iPadUseNativeControls: false, 5244 // force iPhone's native controls 5245 iPhoneUseNativeControls: false, 5246 // force Android's native controls 5247 AndroidUseNativeControls: false, 5248 // features to show 5249 features: ['playpause','current','progress','duration','tracks','volume','fullscreen'], 5250 // only for dynamic 5251 isVideo: true, 5252 5253 // turns keyboard support on and off for this instance 5254 enableKeyboard: true, 5255 5256 // whenthis player starts, it will pause other players 5257 pauseOtherPlayers: true, 5258 5259 // array of keyboard actions such as play pause 5260 keyActions: [ 5261 { 5262 keys: [ 5263 32, // SPACE 5264 179 // GOOGLE play/pause button 5265 ], 5266 action: function(player, media) { 5267 if (media.paused || media.ended) { 5268 player.play(); 5269 } else { 5270 player.pause(); 5271 } 5272 } 5273 }, 5274 { 5275 keys: [38], // UP 5276 action: function(player, media) { 5277 player.container.find('.mejs-volume-slider').css('display','block'); 5278 if (player.isVideo) { 5279 player.showControls(); 5280 player.startControlsTimer(); 5281 } 5282 5283 var newVolume = Math.min(media.volume + 0.1, 1); 5284 media.setVolume(newVolume); 5285 } 5286 }, 5287 { 5288 keys: [40], // DOWN 5289 action: function(player, media) { 5290 player.container.find('.mejs-volume-slider').css('display','block'); 5291 if (player.isVideo) { 5292 player.showControls(); 5293 player.startControlsTimer(); 5294 } 5295 5296 var newVolume = Math.max(media.volume - 0.1, 0); 5297 media.setVolume(newVolume); 5298 } 5299 }, 5300 { 5301 keys: [ 5302 37, // LEFT 5303 227 // Google TV rewind 5304 ], 5305 action: function(player, media) { 5306 if (!isNaN(media.duration) && media.duration > 0) { 5307 if (player.isVideo) { 5308 player.showControls(); 5309 player.startControlsTimer(); 5310 } 5311 5312 // 5% 5313 var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0); 5314 media.setCurrentTime(newTime); 5315 } 5316 } 5317 }, 5318 { 5319 keys: [ 5320 39, // RIGHT 5321 228 // Google TV forward 5322 ], 5323 action: function(player, media) { 5324 if (!isNaN(media.duration) && media.duration > 0) { 5325 if (player.isVideo) { 5326 player.showControls(); 5327 player.startControlsTimer(); 5328 } 5329 5330 // 5% 5331 var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration); 5332 media.setCurrentTime(newTime); 5333 } 5334 } 5335 }, 5336 { 5337 keys: [70], // F 5338 action: function(player, media) { 5339 if (typeof player.enterFullScreen != 'undefined') { 5340 if (player.isFullScreen) { 5341 player.exitFullScreen(); 5342 } else { 5343 player.enterFullScreen(); 5344 } 5345 } 5346 } 5347 }, 5348 { 5349 keys: [77], // M 5350 action: function(player, media) { 5351 player.container.find('.mejs-volume-slider').css('display','block'); 5352 if (player.isVideo) { 5353 player.showControls(); 5354 player.startControlsTimer(); 5355 } 5356 if (player.media.muted) { 5357 player.setMuted(false); 5358 } else { 5359 player.setMuted(true); 5360 } 5361 } 5362 } 5363 ] 5364 }; 5365 5366 mejs.mepIndex = 0; 5367 5368 mejs.players = {}; 5369 5370 // wraps a MediaElement object in player controls 5371 mejs.MediaElementPlayer = function(node, o) { 5372 // enforce object, even without "new" (via John Resig) 5373 if ( !(this instanceof mejs.MediaElementPlayer) ) { 5374 return new mejs.MediaElementPlayer(node, o); 5375 } 5376 5377 var t = this; 5378 5379 // these will be reset after the MediaElement.success fires 5380 t.$media = t.$node = $(node); 5381 t.node = t.media = t.$media[0]; 5382 5383 if(!t.node) { 5384 return 5385 } 5386 5387 // check for existing player 5388 if (typeof t.node.player != 'undefined') { 5389 return t.node.player; 5390 } else { 5391 // attach player to DOM node for reference 5392 t.node.player = t; 5393 } 5394 5395 5396 // try to get options from data-mejsoptions 5397 if (typeof o == 'undefined') { 5398 o = t.$node.data('mejsoptions'); 5399 } 5400 5401 // extend default options 5402 t.options = $.extend({},mejs.MepDefaults,o); 5403 5404 // unique ID 5405 t.id = 'mep_' + mejs.mepIndex++; 5406 5407 // add to player array (for focus events) 5408 mejs.players[t.id] = t; 5409 5410 // start up 5411 t.init(); 5412 5413 return t; 5414 }; 5415 5416 // actual player 5417 mejs.MediaElementPlayer.prototype = { 5418 5419 hasFocus: false, 5420 5421 controlsAreVisible: true, 5422 5423 init: function() { 5424 5425 var 5426 t = this, 5427 mf = mejs.MediaFeatures, 5428 // options for MediaElement (shim) 5429 meOptions = $.extend(true, {}, t.options, { 5430 success: function(media, domNode) { t.meReady(media, domNode); }, 5431 error: function(e) { t.handleError(e);} 5432 }), 5433 tagName = t.media.tagName.toLowerCase(); 5434 5435 t.isDynamic = (tagName !== 'audio' && tagName !== 'video'); 5436 5437 if (t.isDynamic) { 5438 // get video from src or href? 5439 t.isVideo = t.options.isVideo; 5440 } else { 5441 t.isVideo = (tagName !== 'audio' && t.options.isVideo); 5442 } 5443 5444 // use native controls in iPad, iPhone, and Android 5445 if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) { 5446 5447 // add controls and stop 5448 t.$media.attr('controls', 'controls'); 5449 5450 // attempt to fix iOS 3 bug 5451 //t.$media.removeAttr('poster'); 5452 // no Issue found on iOS3 -ttroxell 5453 5454 // override Apple's autoplay override for iPads 5455 if (mf.isiPad && t.media.getAttribute('autoplay') !== null) { 5456 t.play(); 5457 } 5458 5459 } else if (mf.isAndroid && t.options.AndroidUseNativeControls) { 5460 5461 // leave default player 5462 5463 } else { 5464 5465 // DESKTOP: use MediaElementPlayer controls 5466 5467 // remove native controls 5468 t.$media.removeAttr('controls'); 5469 var videoPlayerTitle = t.isVideo ? 5470 mejs.i18n.t('Video Player') : mejs.i18n.t('Audio Player'); 5471 // insert description for screen readers 5472 $('<span class="mejs-offscreen">' + videoPlayerTitle + '</span>').insertBefore(t.$media); 5473 // build container 5474 t.container = 5475 $('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? 'svg' : 'no-svg') + 5476 '" tabindex="0" role="application" aria-label="' + videoPlayerTitle + '">
5476'+ 5477 '<div class="mejs-inner">'+ 5478 '<div class="mejs-mediaelement"></div>'+ 5479 '<div class="mejs-layers"></div>'+ 5480 '<div class="mejs-controls"></div>'+ 5481 '<div class="mejs-clear"></div>'+ 5482 '</div>' + 5483 '</div>') 5484 .addClass(t.$media[0].className) 5485 .insertBefore(t.$media) 5486 .focus(function ( e ) { 5487 if( !t.controlsAreVisible ) { 5488 t.showControls(true); 5489 var playButton = t.container.find('.mejs-playpause-button > button'); 5490 playButton.focus(); 5491 } 5492 }); 5493 5494 // add classes for user and content 5495 t.container.addClass( 5496 (mf.isAndroid ? 'mejs-android ' : '') + 5497 (mf.isiOS ? 'mejs-ios ' : '') + 5498 (mf.isiPad ? 'mejs-ipad ' : '') + 5499 (mf.isiPhone ? 'mejs-iphone ' : '') + 5500 (t.isVideo ? 'mejs-video ' : 'mejs-audio ') 5501 ); 5502 5503 5504 // move the <video/video> tag into the right spot 5505 if (mf.isiOS) { 5506 5507 // sadly, you can't move nodes in iOS, so we have to destroy and recreate it! 5508 var $newMedia = t.$media.clone(); 5509 5510 t.container.find('.mejs-mediaelement').append($newMedia); 5511 5512 t.$media.remove(); 5513 t.$node = t.$media = $newMedia; 5514 t.node = t.media = $newMedia[0]; 5515 5516 } else { 5517 5518 // normal way of moving it into place (doesn't work on iOS) 5519 t.container.find('.mejs-mediaelement').append(t.$media); 5520 } 5521 5522 // find parts 5523 t.controls = t.container.find('.mejs-controls'); 5524 t.layers = t.container.find('.mejs-layers'); 5525 5526 // determine the size 5527 5528 /* size priority: 5529 (1) videoWidth (forced), 5530 (2) style="width;height;" 5531 (3) width attribute, 5532 (4) defaultVideoWidth (for unspecified cases) 5533 */ 5534 5535 var tagType = (t.isVideo ? 'video' : 'audio'), 5536 capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1); 5537 5538 5539 5540 if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) { 5541 t.width = t.options[tagType + 'Width']; 5542 } else if (t.media.style.width !== '' && t.media.style.width !== null) { 5543 t.width = t.media.style.width; 5544 } else if (t.media.getAttribute('width') !== null) { 5545 t.width = t.$media.attr('width'); 5546 } else { 5547 t.width = t.options['default' + capsTagName + 'Width']; 5548 } 5549 5550 if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) { 5551 t.height = t.options[tagType + 'Height']; 5552 } else if (t.media.style.height !== '' && t.media.style.height !== null) { 5553 t.height = t.media.style.height; 5554 } else if (t.$media[0].getAttribute('height') !== null) { 5555 t.height = t.$media.attr('height'); 5556 } else { 5557 t.height = t.options['default' + capsTagName + 'Height']; 5558 } 5559 5560 // set the size, while we wait for the plugins to load below 5561 t.setPlayerSize(t.width, t.height); 5562 5563 // create MediaElementShim 5564 meOptions.pluginWidth = t.width; 5565 meOptions.pluginHeight = t.height; 5566 } 5567 5568 // create MediaElement shim 5569 mejs.MediaElement(t.$media[0], meOptions); 5570 5571 if (typeof(t.container) != 'undefined' && t.controlsAreVisible){ 5572 // controls are shown when loaded 5573 t.container.trigger('controlsshown'); 5574 } 5575 }, 5576 5577 showControls: function(doAnimation) { 5578 var t = this; 5579 5580 doAnimation = typeof doAnimation == 'undefined' || doAnimation; 5581 5582 if (t.controlsAreVisible) 5583 return; 5584 5585 if (doAnimation) { 5586 t.controls 5587 .css('visibility','visible') 5588 .stop(true, true).fadeIn(200, function() { 5589 t.controlsAreVisible = true; 5590 t.container.trigger('controlsshown'); 5591 }); 5592 5593 // any additional controls people might add and want to hide 5594 t.container.find('.mejs-control') 5595 .css('visibility','visible') 5596 .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;}); 5597 5598 } else { 5599 t.controls 5600 .css('visibility','visible') 5601 .css('display','block'); 5602 5603 // any additional controls people might add and want to hide 5604 t.container.find('.mejs-control') 5605 .css('visibility','visible') 5606 .css('display','block'); 5607 5608 t.controlsAreVisible = true; 5609 t.container.trigger('controlsshown'); 5610 } 5611 5612 t.setControlsSize(); 5613 5614 }, 5615 5616 hideControls: function(doAnimation) { 5617 var t = this; 5618 5619 doAnimation = typeof doAnimation == 'undefined' || doAnimation; 5620 5621 if (!t.controlsAreVisible || t.options.alwaysShowControls || t.keyboardAction) 5622 return; 5623 5624 if (doAnimation) { 5625 // fade out main controls 5626 t.controls.stop(true, true).fadeOut(200, function() { 5627 $(this) 5628 .css('visibility','hidden') 5629 .css('display','block'); 5630 5631 t.controlsAreVisible = false;
5632 t.container.trigger('controlshidden'); 5633 }); 5634 5635 // any additional controls people might add and want to hide 5636 t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() { 5637 $(this) 5638 .css('visibility','hidden') 5639 .css('display','block'); 5640 }); 5641 } else { 5642 5643 // hide main controls 5644 t.controls 5645 .css('visibility','hidden') 5646 .css('display','block'); 5647 5648 // hide others 5649 t.container.find('.mejs-control') 5650 .css('visibility','hidden') 5651 .css('display','block'); 5652 5653 t.controlsAreVisible = false; 5654 t.container.trigger('controlshidden'); 5655 } 5656 }, 5657 5658 controlsTimer: null, 5659 5660 startControlsTimer: function(timeout) { 5661 5662 var t = this; 5663 5664 timeout = typeof timeout != 'undefined' ? timeout : 1500; 5665 5666 t.killControlsTimer('start'); 5667 5668 t.controlsTimer = setTimeout(function() { 5669 // 5670 t.hideControls(); 5671 t.killControlsTimer('hide'); 5672 }, timeout); 5673 }, 5674 5675 killControlsTimer: function(src) { 5676 5677 var t = this; 5678 5679 if (t.controlsTimer !== null) { 5680 clearTimeout(t.controlsTimer); 5681 delete t.controlsTimer; 5682 t.controlsTimer = null; 5683 } 5684 }, 5685 5686 controlsEnabled: true, 5687 5688 disableControls: function() { 5689 var t= this; 5690 5691 t.killControlsTimer(); 5692 t.hideControls(false); 5693 this.controlsEnabled = false; 5694 }, 5695 5696 enableControls: function() { 5697 var t= this; 5698 5699 t.showControls(false); 5700 5701 t.controlsEnabled = true; 5702 }, 5703 5704 5705 // Sets up all controls and events 5706 meReady: function(media, domNode) { 5707 5708 5709 var t = this, 5710 mf = mejs.MediaFeatures, 5711 autoplayAttr = domNode.getAttribute('autoplay'), 5712 autoplay = !(typeof autoplayAttr == 'undefined' || autoplayAttr === null || autoplayAttr === 'false'), 5713 featureIndex, 5714 feature; 5715 5716 // make sure it can't create itself again if a plugin reloads 5717 if (t.created) { 5718 return; 5719 } else { 5720 t.created = true; 5721 } 5722 5723 t.media = media; 5724 t.domNode = domNode; 5725 5726 if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) { 5727 5728 // two built in features 5729 t.buildposter(t, t.controls, t.layers, t.media); 5730 t.buildkeyboard(t, t.controls, t.layers, t.media); 5731 t.buildoverlays(t, t.controls, t.layers, t.media); 5732 5733 // grab for use by features 5734 t.findTracks(); 5735 5736 // add user-defined features/controls 5737 for (featureIndex in t.options.features) { 5738 feature = t.options.features[featureIndex]; 5739 if (t['build' + feature]) { 5740 try { 5741 t['build' + feature](t, t.controls, t.layers, t.media); 5742 } catch (e) { 5743 // TODO: report control error 5744 //throw e; 5745 5746 5747 } 5748 } 5749 } 5750 5751 t.container.trigger('controlsready'); 5752 5753 // reset all layers and controls 5754 t.setPlayerSize(t.width, t.height); 5755 t.setControlsSize(); 5756 5757 5758 // controls fade 5759 if (t.isVideo) { 5760 5761 if (mejs.MediaFeatures.hasTouch) { 5762 5763 // for touch devices (iOS, Android) 5764 // show/hide without animation on touch 5765 5766 t.$media.bind('touchstart', function() { 5767 5768 5769 // toggle controls 5770 if (t.controlsAreVisible) { 5771 t.hideControls(false); 5772 } else { 5773 if (t.controlsEnabled) { 5774 t.showControls(false); 5775 } 5776 } 5777 }); 5778 5779 } else { 5780 5781 // create callback here since it needs access to current 5782 // MediaElement object 5783 t.clickToPlayPauseCallback = function() { 5784 // 5785 5786 if (t.options.clickToPlayPause) { 5787 if (t.media.paused) { 5788 t.play(); 5789 } else { 5790 t.pause(); 5791 } 5792 } 5793 }; 5794 5795 // click to play/pause 5796 t.media.addEventListener('click', t.clickToPlayPauseCallback, false); 5797 5798 // show/hide controls 5799 t.container 5800 .bind('mouseenter mouseover', function () { 5801 if (t.controlsEnabled) { 5802 if (!t.options.alwaysShowControls ) { 5803 t.killControlsTimer('enter'); 5804 t.showControls(); 5805 t.startControlsTimer(2500); 5806 } 5807 } 5808 }) 5809 .bind('mousemove', function() { 5810 if (t.controlsEnabled) { 5811 if (!t.controlsAreVisible) { 5812 t.showControls(); 5813 } 5814 if (!t.options.alwaysShowControls) { 5815 t.startControlsTimer(2500); 5816 } 5817 } 5818 }) 5819 .bind('mouseleave', function () { 5820 if (t.controlsEnabled) { 5821 if (!t.media.paused && !t.options.alwaysShowControls) { 5822 t.startControlsTimer(1000); 5823 } 5824 } 5825 }); 5826 } 5827 5828 if(t.options.hideVideoControlsOnLoad) { 5829 t.hideControls(false); 5830 } 5831 5832 // check for autoplay 5833 if (autoplay && !t.options.alwaysShowControls) { 5834 t.hideControls(); 5835 } 5836 5837 // resizer 5838 if (t.options.enableAutosize) { 5839 t.media.addEventListener('loadedmetadata', function(e) { 5840 // if the <video height> was not set and the options.videoHeight was not set 5841 // then resize to the real dimensions 5842 if (t.options.videoHeight <= 0 && t.domNode.getAttribute('height') === null && !isNaN(e.target.videoHeight)) { 5843 t.setPlayerSize(e.target.videoWidth, e.target.videoHeight); 5844 t.setControlsSize(); 5845 t.media.setVideoSize(e.target.videoWidth, e.target.videoHeight); 5846 } 5847 }, false); 5848 } 5849 } 5850 5851 // EVENTS 5852 5853 // FOCUS: when a video starts playing, it takes focus from other players (possibily pausing them) 5854 media.addEventListener('play', function() { 5855 var playerIndex; 5856 5857 // go through all other players 5858 for (playerIndex in mejs.players) { 5859 var p = mejs.players[playerIndex]; 5860 if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) { 5861 p.pause(); 5862 } 5863 p.hasFocus = false;
5864 } 5865 5866 t.hasFocus = true; 5867 },false); 5868 5869 5870 // ended for all 5871 t.media.addEventListener('ended', function (e) { 5872 if(t.options.autoRewind) { 5873 try{ 5874 t.media.setCurrentTime(0); 5875 // Fixing an Android stock browser bug, where "seeked" isn't fired correctly after ending the video and jumping to the beginning 5876 window.setTimeout(function(){ 5877 $(t.container).find('.mejs-overlay-loading').parent().hide(); 5878 }, 20); 5879 } catch (exp) { 5880 5881 } 5882 } 5883 t.media.pause(); 5884 5885 if (t.setProgressRail) { 5886 t.setProgressRail(); 5887 } 5888 if (t.setCurrentRail) { 5889 t.setCurrentRail(); 5890 } 5891 5892 if (t.options.loop) { 5893 t.play(); 5894 } else if (!t.options.alwaysShowControls && t.controlsEnabled) { 5895 t.showControls(); 5896 } 5897 }, false); 5898 5899 // resize on the first play 5900 t.media.addEventListener('loadedmetadata', function(e) { 5901 if (t.updateDuration) { 5902 t.updateDuration(); 5903 } 5904 if (t.updateCurrent) { 5905 t.updateCurrent(); 5906 } 5907 5908 if (!t.isFullScreen) { 5909 t.setPlayerSize(t.width, t.height); 5910 t.setControlsSize(); 5911 } 5912 }, false); 5913 5914 t.container.focusout(function (e) { 5915 if( e.relatedTarget ) { //FF is working on supporting focusout https://bugzilla.mozilla.org/show_bug.cgi?id=687787 5916 var $target = $(e.relatedTarget); 5917 if (t.keyboardAction && $target.parents('.mejs-container').length === 0) { 5918 t.keyboardAction = false; 5919 t.hideControls(true); 5920 } 5921 } 5922 }); 5923 5924 // webkit has trouble doing this without a delay 5925 setTimeout(function () { 5926 t.setPlayerSize(t.width, t.height); 5927 t.setControlsSize(); 5928 }, 50); 5929 5930 // adjust controls whenever window sizes (used to be in fullscreen only) 5931 t.globalBind('resize', function() { 5932 5933 // don't resize for fullscreen mode 5934 if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) { 5935 t.setPlayerSize(t.width, t.height); 5936 } 5937 5938 // always adjust controls 5939 t.setControlsSize(); 5940 }); 5941 5942 // This is a work-around for a bug in the YouTube iFrame player, which means 5943 // we can't use the play() API for the initial playback on iOS or Android; 5944 // user has to start playback directly by tapping on the iFrame. 5945 if (t.media.pluginType == 'youtube' && ( mf.isiOS || mf.isAndroid ) ) { 5946 t.container.find('.mejs-overlay-play').hide(); 5947 } 5948 } 5949 5950 // force autoplay for HTML5 5951 if (autoplay && media.pluginType == 'native') { 5952 t.play(); 5953 } 5954 5955 5956 if (t.options.success) { 5957 5958 if (typeof t.options.success == 'string') { 5959 window[t.options.success](t.media, t.domNode, t); 5960 } else { 5961 t.options.success(t.media, t.domNode, t); 5962 } 5963 } 5964 }, 5965 5966 handleError: function(e) { 5967 var t = this; 5968 5969 t.controls.hide(); 5970 5971 // Tell user that the file cannot be played 5972 if (t.options.error) { 5973 t.options.error(e); 5974 } 5975 }, 5976 5977 setPlayerSize: function(width,height) { 5978 var t = this; 5979 5980 if( !t.options.setDimensions ) { 5981 return false; 5982 } 5983 5984 if (typeof width != 'undefined') { 5985 t.width = width; 5986 } 5987 5988 if (typeof height != 'undefined') { 5989 t.height = height; 5990 } 5991 5992 // detect 100% mode - use currentStyle for IE since css() doesn't return percentages 5993 if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) { 5994 5995 // do we have the native dimensions yet? 5996 var nativeWidth = (function() { 5997 if (t.isVideo) { 5998 if (t.media.videoWidth && t.media.videoWidth > 0) { 5999 return t.media.videoWidth; 6000 } else if (t.media.getAttribute('width') !== null) { 6001 return t.media.getAttribute('width'); 6002 } else { 6003 return t.options.defaultVideoWidth; 6004 } 6005 } else { 6006 return t.options.defaultAudioWidth; 6007 } 6008 })(); 6009 6010 var nativeHeight = (function() { 6011 if (t.isVideo) { 6012 if (t.media.videoHeight && t.media.videoHeight > 0) { 6013 return t.media.videoHeight; 6014 } else if (t.media.getAttribute('height') !== null) { 6015 return t.media.getAttribute('height'); 6016 } else { 6017 return t.options.defaultVideoHeight; 6018 } 6019 } else { 6020 return t.options.defaultAudioHeight; 6021 } 6022 })(); 6023 6024 var 6025 parentWidth = t.container.parent().closest(':visible').width(), 6026 parentHeight = t.container.parent().closest(':visible').height(), 6027 newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight; 6028 6029 // When we use percent, the newHeight can't be calculated so we get the container height 6030 if (isNaN(newHeight)) { 6031 newHeight = parentHeight; 6032 } 6033 6034 if (t.container.parent().length > 0 && t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) { 6035 parentWidth = $(window).width(); 6036 newHeight = $(window).height(); 6037 } 6038 6039 if ( newHeight && parentWidth ) { 6040 6041 // set outer container size 6042 t.container 6043 .width(parentWidth) 6044 .height(newHeight); 6045 6046 // set native <video> or <audio> and shims 6047 t.$media.add(t.container.find('.mejs-shim')) 6048 .width('100%') 6049 .height('100%'); 6050 6051 // if shim is ready, send the size to the embeded plugin 6052 if (t.isVideo) { 6053 if (t.media.setVideoSize) { 6054 t.media.setVideoSize(parentWidth, newHeight); 6055 } 6056 } 6057 6058 // set the layers 6059 t.layers.children('.mejs-layer') 6060 .width('100%') 6061 .height('100%'); 6062 } 6063 6064 6065 } else { 6066 6067 t.container 6068 .width(t.width) 6069 .height(t.height); 6070 6071 t.layers.children('.mejs-layer') 6072 .width(t.width) 6073 .height(t.height); 6074 6075 } 6076 6077 // special case for big play button so it doesn't go over the controls area 6078 var playLayer = t.layers.find('.mejs-overlay-play'), 6079 playButton = playLayer.find('.mejs-overlay-button'); 6080 6081 playLayer.height(t.container.height() - t.controls.height()); 6082 playButton.css('margin-top', '-' + (playButton.height()/2 - t.controls.height()/2).toString() + 'px' ); 6083 6084 }, 6085 6086 setControlsSize: function() { 6087 var t = this, 6088 usedWidth = 0, 6089 railWidth = 0, 6090 rail = t.controls.find('.mejs-time-rail'), 6091 total = t.controls.find('.mejs-time-total'), 6092 current = t.controls.find('.mejs-time-current'), 6093 loaded = t.controls.find('.mejs-time-loaded'), 6094 others = rail.siblings(), 6095 lastControl = others.last(), 6096 lastControlPosition = null; 6097 6098 // skip calculation if hidden 6099 if (!t.container.is(':visible') || !rail.length || !rail.is(':visible')) { 6100 return; 6101 } 6102 6103 6104 // allow the size to come from custom CSS 6105 if (t.options && !t.options.autosizeProgress) { 6106 // Also, frontends devs can be more flexible 6107 // due the opportunity of absolute positioning. 6108 railWidth = parseInt(rail.css('width'), 10); 6109 } 6110 6111 // attempt to autosize 6112 if (railWidth === 0 || !railWidth) { 6113 6114 // find the size of all the other controls besides the rail 6115 others.each(function() { 6116 var $this = $(this); 6117 if ($this.css('position') != 'absolute' && $this.is(':visible')) { 6118 usedWidth += $(this).outerWidth(true); 6119 } 6120 }); 6121 6122 // fit the rail into the remaining space 6123 railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width()); 6124 } 6125 6126 // resize the rail, 6127 // but then check if the last control (say, the fullscreen button) got pushed down 6128 // this often happens when zoomed 6129 do { 6130 // outer area 6131 rail.width(railWidth); 6132 // dark space 6133 total.width(railWidth - (total.outerWidth(true) - total.width())); 6134 6135 if (lastControl.css('position') != 'absolute') { 6136 lastControlPosition = lastControl.length ? lastControl.position() : null; 6137 railWidth--; 6138 } 6139 } while (lastControlPosition !== null && lastControlPosition.top > 0 && railWidth > 0); 6140 6141 if (t.setProgressRail) 6142 t.setProgressRail(); 6143 if (t.setCurrentRail) 6144 t.setCurrentRail(); 6145 }, 6146 6147 6148 buildposter: function(player, controls, layers, media) { 6149 var t = this, 6150 poster = 6151 $('<div class="mejs-poster mejs-layer">' + 6152 '</div>') 6153 .appendTo(layers), 6154 posterUrl = player.$media.attr('poster'); 6155 6156 // prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster) 6157 if (player.options.poster !== '') { 6158 posterUrl = player.options.poster; 6159 } 6160
6161 // second, try the real poster 6162 if ( posterUrl ) { 6163 t.setPoster(posterUrl); 6164 } else { 6165 poster.hide(); 6166 } 6167 6168 media.addEventListener('play',function() { 6169 poster.hide(); 6170 }, false); 6171 6172 if(player.options.showPosterWhenEnded && player.options.autoRewind){ 6173 media.addEventListener('ended',function() { 6174 poster.show(); 6175 }, false); 6176 } 6177 }, 6178 6179 setPoster: function(url) { 6180 var t = this, 6181 posterDiv = t.container.find('.mejs-poster'), 6182 posterImg = posterDiv.find('img'); 6183 6184 if (posterImg.length === 0) { 6185 posterImg = $('<img width="100%" height="100%" />').appendTo(posterDiv); 6186 } 6187 6188 posterImg.attr('src', url); 6189 posterDiv.css({'background-image' : 'url(' + url + ')'}); 6190 }, 6191 6192 buildoverlays: function(player, controls, layers, media) { 6193 var t = this; 6194 if (!player.isVideo) 6195 return; 6196 6197 var 6198 loading = 6199 $('<div class="mejs-overlay mejs-layer">'+ 6200 '<div class="mejs-overlay-loading"><span></span></div>'+ 6201 '</div>') 6202 .hide() // start out hidden 6203 .appendTo(layers), 6204 error = 6205 $('<div class="mejs-overlay mejs-layer">'+ 6206 '<div class="mejs-overlay-error"></div>'+ 6207 '</div>') 6208 .hide() // start out hidden 6209 .appendTo(layers), 6210 // this needs to come last so it's on top 6211 bigPlay = 6212 $('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+ 6213 '<div class="mejs-overlay-button"></div>'+ 6214 '</div>') 6215 .appendTo(layers) 6216 .bind('click', function() { // Removed 'touchstart' due issues on Samsung Android devices where a tap on bigPlay started and immediately stopped the video 6217 if (t.options.clickToPlayPause) { 6218 if (media.paused) { 6219 media.play(); 6220 } 6221 } 6222 }); 6223 6224 /* 6225 if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) { 6226 bigPlay.remove(); 6227 loading.remove(); 6228 } 6229 */ 6230 6231 6232 // show/hide big play button 6233 media.addEventListener('play',function() { 6234 bigPlay.hide(); 6235 loading.hide(); 6236 controls.find('.mejs-time-buffering').hide(); 6237 error.hide(); 6238 }, false); 6239 6240 media.addEventListener('playing', function() { 6241 bigPlay.hide(); 6242 loading.hide(); 6243 controls.find('.mejs-time-buffering').hide(); 6244 error.hide(); 6245 }, false); 6246 6247 media.addEventListener('seeking', function() { 6248 loading.show(); 6249 controls.find('.mejs-time-buffering').show(); 6250 }, false); 6251 6252 media.addEventListener('seeked', function() { 6253 loading.hide(); 6254 controls.find('.mejs-time-buffering').hide(); 6255 }, false); 6256 6257 media.addEventListener('pause',function() { 6258 if (!mejs.MediaFeatures.isiPhone) { 6259 bigPlay.show(); 6260 } 6261 }, false); 6262 6263 media.addEventListener('waiting', function() { 6264 loading.show(); 6265 controls.find('.mejs-time-buffering').show(); 6266 }, false); 6267 6268 6269 // show/hide loading 6270 media.addEventListener('loadeddata',function() { 6271 // for some reason Chrome is firing this event 6272 //if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none') 6273 // return; 6274 6275 loading.show(); 6276 controls.find('.mejs-time-buffering').show(); 6277 // Firing the 'canplay' event after a timeout which isn't getting fired on some Android 4.1 devices (https://github.com/johndyer/mediaelement/issues/1305) 6278 if (mejs.MediaFeatures.isAndroid) { 6279 media.canplayTimeout = window.setTimeout( 6280 function() { 6281 if (document.createEvent) { 6282 var evt = document.createEvent('HTMLEvents'); 6283 evt.initEvent('canplay', true, true); 6284 return media.dispatchEvent(evt); 6285 } 6286 }, 300 6287 ); 6288 } 6289 }, false); 6290 media.addEventListener('canplay',function() { 6291 loading.hide(); 6292 controls.find('.mejs-time-buffering').hide(); 6293 clearTimeout(media.canplayTimeout); // Clear timeout inside 'loadeddata' to prevent 'canplay' to fire twice 6294 }, false); 6295 6296 // error handling 6297 media.addEventListener('error',function() { 6298 loading.hide(); 6299 controls.find('.mejs-time-buffering').hide(); 6300 error.show(); 6301 error.find('.mejs-overlay-error').html("Error loading this resource"); 6302 }, false); 6303 6304 media.addEventListener('keydown', function(e) { 6305 t.onkeydown(player, media, e); 6306 }, false); 6307 }, 6308 6309 buildkeyboard: function(player, controls, layers, media) { 6310 6311 var t = this; 6312 6313 t.container.keydown(function () { 6314 t.keyboardAction = true; 6315 }); 6316 6317 // listen for key presses 6318 t.globalBind('keydown', function(e) { 6319 return t.onkeydown(player, media, e); 6320 }); 6321 6322 6323 // check if someone clicked outside a player region, then kill its focus 6324 t.globalBind('click', function(event) { 6325 player.hasFocus = $(event.target).closest('.mejs-container').length !== 0; 6326 }); 6327 6328 }, 6329 onkeydown: function(player, media, e) { 6330 if (player.hasFocus && player.options.enableKeyboard) { 6331 // find a matching key 6332 for (var i = 0, il = player.options.keyActions.length; i < il; i++) { 6333 var keyAction = player.options.keyActions[i]; 6334 6335 for (var j = 0, jl = keyAction.keys.length; j < jl; j++) { 6336 if (e.keyCode == keyAction.keys[j]) { 6337 if (typeof(e.preventDefault) == "function") e.preventDefault(); 6338 keyAction.action(player, media, e.keyCode); 6339 return false;
6340 } 6341 } 6342 } 6343 } 6344 6345 return true; 6346 }, 6347 6348 findTracks: function() { 6349 var t = this, 6350 tracktags = t.$media.find('track'); 6351 6352 // store for use by plugins 6353 t.tracks = []; 6354 tracktags.each(function(index, track) { 6355 6356 track = $(track); 6357 6358 t.tracks.push({ 6359 srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '', 6360 src: track.attr('src'), 6361 kind: track.attr('kind'), 6362 label: track.attr('label') || '', 6363 entries: [], 6364 isLoaded: false 6365 }); 6366 }); 6367 }, 6368 changeSkin: function(className) { 6369 this.container[0].className = 'mejs-container ' + className; 6370 this.setPlayerSize(this.width, this.height); 6371 this.setControlsSize(); 6372 }, 6373 play: function() { 6374 this.load(); 6375 this.media.play(); 6376 }, 6377 pause: function() { 6378 try { 6379 this.media.pause(); 6380 } catch (e) {} 6381 }, 6382 load: function() { 6383 if (!this.isLoaded) { 6384 this.media.load(); 6385 } 6386 6387 this.isLoaded = true; 6388 }, 6389 setMuted: function(muted) { 6390 this.media.setMuted(muted); 6391 }, 6392 setCurrentTime: function(time) { 6393 this.media.setCurrentTime(time); 6394 }, 6395 getCurrentTime: function() { 6396 return this.media.currentTime; 6397 }, 6398 setVolume: function(volume) { 6399 this.media.setVolume(volume); 6400 }, 6401 getVolume: function() { 6402 return this.media.volume; 6403 }, 6404 setSrc: function(src) { 6405 this.media.setSrc(src); 6406 }, 6407 remove: function() { 6408 var t = this, featureIndex, feature; 6409 6410 // invoke features cleanup 6411 for (featureIndex in t.options.features) { 6412 feature = t.options.features[featureIndex]; 6413 if (t['clean' + feature]) { 6414 try { 6415 t['clean' + feature](t); 6416 } catch (e) { 6417 // TODO: report control error 6418 //throw e; 6419 // 6420 // 6421 } 6422 } 6423 } 6424 6425 // grab video and put it back in place 6426 if (!t.isDynamic) { 6427 t.$media.prop('controls', true); 6428 // detach events from the video 6429 // TODO: detach event listeners better than this; 6430 // also detach ONLY the events attached by this plugin! 6431 t.$node.clone().insertBefore(t.container).show(); 6432 t.$node.remove(); 6433 } else { 6434 t.$node.insertBefore(t.container); 6435 } 6436 6437 if (t.media.pluginType !== 'native') { 6438 t.media.remove(); 6439 } 6440 6441 // Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api. 6442 delete mejs.players[t.id]; 6443 6444 if (typeof t.container == 'object') { 6445 t.container.remove(); 6446 } 6447 t.globalUnbind(); 6448 delete t.node.player; 6449 }, 6450 rebuildtracks: function(){ 6451 var t = this; 6452 t.findTracks(); 6453 t.buildtracks(t, t.controls, t.layers, t.media); 6454 }, 6455 resetSize: function(){ 6456 var t = this; 6457 // webkit has trouble doing this without a delay 6458 setTimeout(function () { 6459 // 6460 t.setPlayerSize(t.width, t.height); 6461 t.setControlsSize(); 6462 }, 50); 6463 } 6464 }; 6465 6466 (function(){ 6467 var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/; 6468 6469 function splitEvents(events, id) { 6470 // add player ID as an event namespace so it's easier to unbind them all later 6471 var ret = {d: [], w: []}; 6472 $.each((events || '').split(' '), function(k, v){ 6473 var eventname = v + '.' + id; 6474 if (eventname.indexOf('.') === 0) { 6475 ret.d.push(eventname); 6476 ret.w.push(eventname); 6477 } 6478 else { 6479 ret[rwindow.test(v) ? 'w' : 'd'].push(eventname); 6480 } 6481 }); 6482 ret.d = ret.d.join(' '); 6483 ret.w = ret.w.join(' '); 6484 return ret; 6485 } 6486 6487 mejs.MediaElementPlayer.prototype.globalBind = function(events, data, callback) { 6488 var t = this; 6489 events = splitEvents(events, t.id); 6490 if (events.d) $(document).bind(events.d, data, callback); 6491 if (events.w) $(window).bind(events.w, data, callback); 6492 }; 6493 6494 mejs.MediaElementPlayer.prototype.globalUnbind = function(events, callback) { 6495 var t = this; 6496 events = splitEvents(events, t.id); 6497 if (events.d) $(document).unbind(events.d, callback); 6498 if (events.w) $(window).unbind(events.w, callback); 6499 }; 6500 })(); 6501 6502 // turn into jQuery plugin 6503 if (typeof $ != 'undefined') { 6504 $.fn.mediaelementplayer = function (options) { 6505 if (options === false) { 6506 this.each(function () { 6507 var player = $(this).data('mediaelementplayer'); 6508 if (player) { 6509 player.remove(); 6510 } 6511 $(this).removeData('mediaelementplayer'); 6512 }); 6513 } 6514 else { 6515 this.each(function () { 6516 $(this).data('mediaelementplayer', new mejs.MediaElementPlayer(this, options)); 6517 }); 6518 } 6519 return this; 6520 }; 6521 6522 6523 $(document).ready(function() { 6524 // auto enable using JSON attribute 6525 $('.mejs-player').mediaelementplayer(); 6526 }); 6527 } 6528 6529 // push out to window 6530 window.MediaElementPlayer = mejs.MediaElementPlayer; 6531 6532})(mejs.$); 6533 6534(function($) { 6535 6536 $.extend(mejs.MepDefaults, { 6537 playText: mejs.i18n.t('Play'), 6538 pauseText: mejs.i18n.t('Pause') 6539 }); 6540 6541 // PLAY/pause BUTTON 6542 $.extend(MediaElementPlayer.prototype, { 6543 buildplaypause: function(player, controls, layers, media) { 6544 var 6545 t = this, 6546 op = t.options, 6547 play = 6548 $('<div class="mejs-button mejs-playpause-button mejs-play" >' + 6549 '<button type="button" aria-controls="' + t.id + '" title="' + op.playText + '" aria-label="' + op.playText + '"></button>' + 6550 '</div>') 6551 .appendTo(controls) 6552 .click(function(e) { 6553 e.preventDefault(); 6554 6555 if (media.paused) { 6556 media.play(); 6557 } else { 6558 media.pause(); 6559 } 6560 6561 return false;
6562 }), 6563 play_btn = play.find('button'); 6564 6565 6566 function togglePlayPause(which) { 6567 if ('play' === which) { 6568 play.removeClass('mejs-play').addClass('mejs-pause'); 6569 play_btn.attr({ 6570 'title': op.pauseText, 6571 'aria-label': op.pauseText 6572 }); 6573 } else { 6574 play.removeClass('mejs-pause').addClass('mejs-play'); 6575 play_btn.attr({ 6576 'title': op.playText, 6577 'aria-label': op.playText 6578 }); 6579 } 6580 }; 6581 togglePlayPause('pse'); 6582 6583 6584 media.addEventListener('play',function() { 6585 togglePlayPause('play'); 6586 }, false); 6587 media.addEventListener('playing',function() { 6588 togglePlayPause('play'); 6589 }, false); 6590 6591 6592 media.addEventListener('pause',function() { 6593 togglePlayPause('pse'); 6594 }, false); 6595 media.addEventListener('paused',function() { 6596 togglePlayPause('pse'); 6597 }, false); 6598 } 6599 }); 6600 6601})(mejs.$); 6602 6603(function($) { 6604 6605 $.extend(mejs.MepDefaults, { 6606 stopText: 'Stop' 6607 }); 6608 6609 // STOP BUTTON 6610 $.extend(MediaElementPlayer.prototype, { 6611 buildstop: function(player, controls, layers, media) { 6612 var t = this, 6613 stop = 6614 $('<div class="mejs-button mejs-stop-button mejs-stop">' + 6615 '<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '" aria-label="' + t.options.stopText + '"></button>' + 6616 '</div>') 6617 .appendTo(controls) 6618 .click(function() { 6619 if (!media.paused) { 6620 media.pause(); 6621 } 6622 if (media.currentTime > 0) { 6623 media.setCurrentTime(0); 6624 media.pause(); 6625 controls.find('.mejs-time-current').width('0px'); 6626 controls.find('.mejs-time-handle').css('left', '0px'); 6627 controls.find('.mejs-time-float-current').html( mejs.Utility.secondsToTimeCode(0) ); 6628 controls.find('.mejs-currenttime').html( mejs.Utility.secondsToTimeCode(0) ); 6629 layers.find('.mejs-poster').show(); 6630 } 6631 }); 6632 } 6633 }); 6634 6635})(mejs.$); 6636 6637(function($) { 6638 6639 $.extend(mejs.MepDefaults, { 6640 progessHelpText: mejs.i18n.t( 6641 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.') 6642 }); 6643 6644 // progress/loaded bar 6645 $.extend(MediaElementPlayer.prototype, { 6646 buildprogress: function(player, controls, layers, media) { 6647 6648 $('<div class="mejs-time-rail">' + 6649 '<span class="mejs-time-total mejs-time-slider">' + 6650 //'<span class="mejs-offscreen">' + this.options.progessHelpText + '</span>' + 6651 '<span class="mejs-time-buffering"></span>' + 6652 '<span class="mejs-time-loaded"></span>' + 6653 '<span class="mejs-time-current"></span>' + 6654 '<span class="mejs-time-handle"></span>' + 6655 '<span class="mejs-time-float">' + 6656 '<span class="mejs-time-float-current">00:00</span>' + 6657 '<span class="mejs-time-float-corner"></span>' + 6658 '</span>' + 6659 '</span>' + 6660 '</div>') 6661 .appendTo(controls); 6662 controls.find('.mejs-time-buffering').hide(); 6663 6664 var 6665 t = this, 6666 total = controls.find('.mejs-time-total'), 6667 loaded = controls.find('.mejs-time-loaded'), 6668 current = controls.find('.mejs-time-current'), 6669 handle = controls.find('.mejs-time-handle'), 6670 timefloat = controls.find('.mejs-time-float'), 6671 timefloatcurrent = controls.find('.mejs-time-float-current'), 6672 slider = controls.find('.mejs-time-slider'), 6673 handleMouseMove = function (e) { 6674 6675 var offset = total.offset(), 6676 width = total.outerWidth(true), 6677 percentage = 0, 6678 newTime = 0, 6679 pos = 0, 6680 x; 6681 6682 // mouse or touch position relative to the object 6683 if (e.originalEvent.changedTouches) { 6684 x = e.originalEvent.changedTouches[0].pageX; 6685 }else{ 6686 x = e.pageX; 6687 } 6688 6689 if (media.duration) { 6690 if (x < offset.left) { 6691 x = offset.left; 6692 } else if (x > width + offset.left) { 6693 x = width + offset.left; 6694 } 6695 6696 pos = x - offset.left; 6697 percentage = (pos / width); 6698 newTime = (percentage <= 0.02) ? 0 : percentage * media.duration; 6699 6700 // seek to where the mouse is 6701 if (mouseIsDown && newTime !== media.currentTime) { 6702 media.setCurrentTime(newTime); 6703 } 6704 6705 // position floating time box 6706 if (!mejs.MediaFeatures.hasTouch) { 6707 timefloat.css('left', pos); 6708 timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime) ); 6709 timefloat.show(); 6710 } 6711 } 6712 }, 6713 mouseIsDown = false, 6714 mouseIsOver = false, 6715 lastKeyPressTime = 0, 6716 startedPaused = false, 6717 autoRewindInitial = player.options.autoRewind; 6718 // Accessibility for slider 6719 var updateSlider = function (e) { 6720 6721 var seconds = media.currentTime, 6722 timeSliderText = mejs.i18n.t('Time Slider'), 6723 time = mejs.Utility.secondsToTimeCode(seconds), 6724 duration = media.duration; 6725 6726 slider.attr({ 6727 'aria-label': timeSliderText, 6728 'aria-valuemin': 0, 6729 'aria-valuemax': duration, 6730 'aria-valuenow': seconds, 6731 'aria-valuetext': time, 6732 'role': 'slider', 6733 'tabindex': 0 6734 }); 6735 6736 }; 6737 6738 var restartPlayer = function () { 6739 var now = new Date(); 6740 if (now - lastKeyPressTime >= 1000) { 6741 media.play(); 6742 } 6743 }; 6744 6745 slider.bind('focus', function (e) { 6746 player.options.autoRewind = false;
6747 }); 6748 6749 slider.bind('blur', function (e) { 6750 player.options.autoRewind = autoRewindInitial; 6751 }); 6752 6753 slider.bind('keydown', function (e) { 6754 6755 if ((new Date() - lastKeyPressTime) >= 1000) { 6756 startedPaused = media.paused; 6757 } 6758 6759 var keyCode = e.keyCode, 6760 duration = media.duration, 6761 seekTime = media.currentTime; 6762 6763 switch (keyCode) { 6764 case 37: // left 6765 seekTime -= 1; 6766 break; 6767 case 39: // Right 6768 seekTime += 1; 6769 break; 6770 case 38: // Up 6771 seekTime += Math.floor(duration * 0.1); 6772 break; 6773 case 40: // Down 6774 seekTime -= Math.floor(duration * 0.1); 6775 break; 6776 case 36: // Home 6777 seekTime = 0; 6778 break; 6779 case 35: // end 6780 seekTime = duration; 6781 break; 6782 case 10: // enter 6783 media.paused ? media.play() : media.pause(); 6784 return; 6785 case 13: // space 6786 media.paused ? media.play() : media.pause(); 6787 return; 6788 default: 6789 return; 6790 } 6791 6792 seekTime = seekTime < 0 ? 0 : (seekTime >= duration ? duration : Math.floor(seekTime)); 6793 lastKeyPressTime = new Date(); 6794 if (!startedPaused) { 6795 media.pause(); 6796 } 6797 6798 if (seekTime < media.duration && !startedPaused) { 6799 setTimeout(restartPlayer, 1100); 6800 } 6801 6802 media.setCurrentTime(seekTime); 6803 6804 e.preventDefault(); 6805 e.stopPropagation(); 6806 return false; 6807 }); 6808 6809 6810 // handle clicks 6811 //controls.find('.mejs-time-rail').delegate('span', 'click', handleMouseMove); 6812 total 6813 .bind('mousedown touchstart', function (e) { 6814 // only handle left clicks or touch 6815 if (e.which === 1 || e.which === 0) { 6816 mouseIsDown = true; 6817 handleMouseMove(e); 6818 t.globalBind('mousemove.dur touchmove.dur', function(e) { 6819 handleMouseMove(e); 6820 }); 6821 t.globalBind('mouseup.dur touchend.dur', function (e) { 6822 mouseIsDown = false; 6823 timefloat.hide(); 6824 t.globalUnbind('.dur'); 6825 }); 6826 } 6827 }) 6828 .bind('mouseenter', function(e) { 6829 mouseIsOver = true; 6830 t.globalBind('mousemove.dur', function(e) { 6831 handleMouseMove(e); 6832 }); 6833 if (!mejs.MediaFeatures.hasTouch) { 6834 timefloat.show(); 6835 } 6836 }) 6837 .bind('mouseleave',function(e) { 6838 mouseIsOver = false; 6839 if (!mouseIsDown) { 6840 t.globalUnbind('.dur'); 6841 timefloat.hide(); 6842 } 6843 }); 6844 6845 // loading 6846 media.addEventListener('progress', function (e) { 6847 player.setProgressRail(e); 6848 player.setCurrentRail(e); 6849 }, false); 6850 6851 // current time 6852 media.addEventListener('timeupdate', function(e) { 6853 player.setProgressRail(e); 6854 player.setCurrentRail(e); 6855 updateSlider(e); 6856 }, false); 6857 6858 6859 // store for later use 6860 t.loaded = loaded; 6861 t.total = total; 6862 t.current = current; 6863 t.handle = handle; 6864 }, 6865 setProgressRail: function(e) { 6866 6867 var 6868 t = this, 6869 target = (e !== undefined) ? e.target : t.media, 6870 percent = null; 6871 6872 // newest HTML5 spec has buffered array (FF4, Webkit) 6873 if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) { 6874 // TODO: account for a real array with multiple values (only Firefox 4 has this so far) 6875 percent = target.buffered.end(0) / target.duration; 6876 } 6877 // Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end() 6878 // to be anything other than 0. If the byte count is available we use this instead. 6879 // Browsers that support the else if do not seem to have the bufferedBytes value and 6880 // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8. 6881 else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) { 6882 percent = target.bufferedBytes / target.bytesTotal; 6883 } 6884 // Firefox 3 with an Ogg file seems to go this way 6885 else if (e && e.lengthComputable && e.total !== 0) { 6886 percent = e.loaded / e.total; 6887 } 6888 6889 // finally update the progress bar 6890 if (percent !== null) { 6891 percent = Math.min(1, Math.max(0, percent)); 6892 // update loaded bar 6893 if (t.loaded && t.total) { 6894 t.loaded.width(t.total.width() * percent); 6895 } 6896 } 6897 }, 6898 setCurrentRail: function() { 6899 6900 var t = this; 6901
6902 if (t.media.currentTime !== undefined && t.media.duration) { 6903 6904 // update bar and handle 6905 if (t.total && t.handle) { 6906 var 6907 newWidth = Math.round(t.total.width() * t.media.currentTime / t.media.duration), 6908 handlePos = newWidth - Math.round(t.handle.outerWidth(true) / 2); 6909 6910 t.current.width(newWidth); 6911 t.handle.css('left', handlePos); 6912 } 6913 } 6914 6915 } 6916 }); 6917})(mejs.$); 6918(function($) { 6919 6920 // options 6921 $.extend(mejs.MepDefaults, { 6922 duration: -1, 6923 timeAndDurationSeparator: '<span> | </span>' 6924 }); 6925 6926 6927 // current and duration 00:00 / 00:00 6928 $.extend(MediaElementPlayer.prototype, { 6929 buildcurrent: function(player, controls, layers, media) { 6930 var t = this; 6931 6932 $('<div class="mejs-time" role="timer" aria-live="off">' + 6933 '<span class="mejs-currenttime">' + 6934 (player.options.alwaysShowHours ? '00:' : '') + 6935 (player.options.showTimecodeFrameCount? '00:00:00':'00:00') + 6936 '</span>'+ 6937 '</div>') 6938 .appendTo(controls); 6939 6940 t.currenttime = t.controls.find('.mejs-currenttime'); 6941 6942 media.addEventListener('timeupdate',function() { 6943 player.updateCurrent(); 6944 }, false); 6945 }, 6946 6947 6948 buildduration: function(player, controls, layers, media) { 6949 var t = this; 6950 6951 if (controls.children().last().find('.mejs-currenttime').length > 0) { 6952 $(t.options.timeAndDurationSeparator + 6953 '<span class="mejs-duration">' + 6954 (t.options.duration > 0 ? 6955 mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) : 6956 ((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00')) 6957 ) + 6958 '</span>') 6959 .appendTo(controls.find('.mejs-time')); 6960 } else { 6961 6962 // add class to current time 6963 controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container'); 6964 6965 $('<div class="mejs-time mejs-duration-container">'+ 6966 '<span class="mejs-duration">' + 6967 (t.options.duration > 0 ? 6968 mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) : 6969 ((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00')) 6970 ) + 6971 '</span>' + 6972 '</div>') 6973 .appendTo(controls); 6974 } 6975 6976 t.durationD = t.controls.find('.mejs-duration'); 6977 6978 media.addEventListener('timeupdate',function() { 6979 player.updateDuration(); 6980 }, false); 6981 }, 6982 6983 updateCurrent: function() { 6984 var t = this; 6985 6986 if (t.currenttime) { 6987 t.currenttime.html(mejs.Utility.secondsToTimeCode(t.media.currentTime, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25)); 6988 } 6989 }, 6990 6991 updateDuration: function() { 6992 var t = this; 6993 6994 //Toggle the long video class if the video is longer than an hour. 6995 t.container.toggleClass("mejs-long-video", t.media.duration > 3600); 6996 6997 if (t.durationD && (t.options.duration > 0 || t.media.duration)) { 6998 t.durationD.html(mejs.Utility.secondsToTimeCode(t.options.duration > 0 ? t.options.duration : t.media.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25)); 6999 } 7000 } 7001 }); 7002 7003})(mejs.$); 7004 7005(function($) { 7006 7007 $.extend(mejs.MepDefaults, { 7008 muteText: mejs.i18n.t('Mute Toggle'), 7009 allyVolumeControlText: mejs.i18n.t('Use Up/Down Arrow keys to increase or decrease volume.'), 7010 hideVolumeOnTouchDevices: true, 7011 7012 audioVolume: 'horizontal', 7013 videoVolume: 'vertical' 7014 }); 7015 7016 $.extend(MediaElementPlayer.prototype, { 7017 buildvolume: function(player, controls, layers, media) { 7018 7019 // Android and iOS don't support volume controls 7020 if ((mejs.MediaFeatures.isAndroid || mejs.MediaFeatures.isiOS) && this.options.hideVolumeOnTouchDevices) 7021 return; 7022 7023 var t = this, 7024 mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume, 7025 mute = (mode == 'horizontal') ? 7026 7027 // horizontal version 7028 $('<div class="mejs-button mejs-volume-button mejs-mute">' + 7029 '<button type="button" aria-controls="' + t.id + 7030 '" title="' + t.options.muteText + 7031 '" aria-label="' + t.options.muteText + 7032 '"></button>'+ 7033 '</div>' + 7034 '<a href="javascript:void(0);" class="mejs-horizontal-volume-slider">' + // outer background 7035 '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' + 7036 '<div class="mejs-horizontal-volume-total"></div>'+ // line background 7037 '<div class="mejs-horizontal-volume-current"></div>'+ // current volume 7038 '<div class="mejs-horizontal-volume-handle"></div>'+ // handle 7039 '</a>' 7040 ) 7041 .appendTo(controls) : 7042 7043 // vertical version 7044 $('<div class="mejs-button mejs-volume-button mejs-mute">'+ 7045 '<button type="button" aria-controls="' + t.id + 7046 '" title="' + t.options.muteText + 7047 '" aria-label="' + t.options.muteText + 7048 '"></button>'+ 7049 '<a href="javascript:void(0);" class="mejs-volume-slider">'+ // outer background 7050 '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' + 7051 '<div class="mejs-volume-total"></div>'+ // line background 7052 '<div class="mejs-volume-current"></div>'+ // current volume 7053 '<div class="mejs-volume-handle"></div>'+ // handle 7054 '</a>'+ 7055 '</div>') 7056 .appendTo(controls), 7057 volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'), 7058 volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'), 7059 volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'), 7060 volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'), 7061 7062 positionVolumeHandle = function(volume, secondTry) { 7063 7064 if (!volumeSlider.is(':visible') && typeof secondTry == 'undefined') { 7065 volumeSlider.show(); 7066 positionVolumeHandle(volume, true); 7067 volumeSlider.hide(); 7068 return; 7069 } 7070 7071 // correct to 0-1 7072 volume = Math.max(0,volume); 7073 volume = Math.min(volume,1); 7074 7075 // ajust mute button style 7076 if (volume === 0) { 7077 mute.removeClass('mejs-mute').addClass('mejs-unmute'); 7078 mute.children('button').attr('title', mejs.i18n.t('Unmute')).attr('aria-label', mejs.i18n.t('Unmute')); 7079 } else { 7080 mute.removeClass('mejs-unmute').addClass('mejs-mute'); 7081 mute.children('button').attr('title', mejs.i18n.t('Mute')).attr('aria-label', mejs.i18n.t('Mute')); 7082 } 7083 7084 // top/left of full size volume slider background 7085 var totalPosition = volumeTotal.position(); 7086 // position slider 7087 if (mode == 'vertical') { 7088 var 7089 // height of the full size volume slider background 7090 totalHeight = volumeTotal.height(), 7091 7092 // the new top position based on the current volume 7093 // 70% volume on 100px height == top:30px 7094 newTop = totalHeight - (totalHeight * volume); 7095 7096 // handle 7097 volumeHandle.css('top', Math.round(totalPosition.top + newTop - (volumeHandle.height() / 2))); 7098 7099 // show the current visibility 7100 volumeCurrent.height(totalHeight - newTop ); 7101 volumeCurrent.css('top', totalPosition.top + newTop); 7102 } else { 7103 var 7104 // height of the full size volume slider background 7105 totalWidth = volumeTotal.width(), 7106 7107 // the new left position based on the current volume 7108 newLeft = totalWidth * volume; 7109 7110 // handle 7111 volumeHandle.css('left', Math.round(totalPosition.left + newLeft - (volumeHandle.width() / 2))); 7112 7113 // rezize the current part of the volume bar 7114 volumeCurrent.width( Math.round(newLeft) ); 7115 } 7116 }, 7117 handleVolumeMove = function(e) { 7118 7119 var volume = null, 7120 totalOffset = volumeTotal.offset(); 7121 7122 // calculate the new volume based on the moust position 7123 if (mode === 'vertical') { 7124 7125 var 7126 railHeight = volumeTotal.height(), 7127 totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10), 7128 newY = e.pageY - totalOffset.top; 7129 7130 volume = (railHeight - newY) / railHeight; 7131 7132 // the controls just hide themselves (usually when mouse moves too far up) 7133 if (totalOffset.top === 0 || totalOffset.left === 0) { 7134 return; 7135 } 7136 7137 } else { 7138 var 7139 railWidth = volumeTotal.width(), 7140 newX = e.pageX - totalOffset.left; 7141 7142 volume = newX / railWidth; 7143 } 7144 7145 // ensure the volume isn't outside 0-1 7146 volume = Math.max(0,volume); 7147 volume = Math.min(volume,1); 7148 7149 // position the slider and handle 7150 positionVolumeHandle(volume); 7151 7152 // set the media object (this will trigger the volumechanged event) 7153 if (volume === 0) { 7154 media.setMuted(true); 7155 } else { 7156 media.setMuted(false); 7157 } 7158 media.setVolume(volume); 7159 }, 7160 mouseIsDown = false, 7161 mouseIsOver = false;
7162 7163 // SLIDER 7164 7165 mute 7166 .hover(function() { 7167 volumeSlider.show(); 7168 mouseIsOver = true; 7169 }, function() { 7170 mouseIsOver = false; 7171 7172 if (!mouseIsDown && mode == 'vertical') { 7173 volumeSlider.hide(); 7174 } 7175 }); 7176 7177 var updateVolumeSlider = function (e) { 7178 7179 var volume = Math.floor(media.volume*100); 7180 7181 volumeSlider.attr({ 7182 'aria-label': mejs.i18n.t('volumeSlider'), 7183 'aria-valuemin': 0, 7184 'aria-valuemax': 100, 7185 'aria-valuenow': volume, 7186 'aria-valuetext': volume+'%', 7187 'role': 'slider', 7188 'tabindex': 0 7189 }); 7190 7191 }; 7192 7193 volumeSlider 7194 .bind('mouseover', function() { 7195 mouseIsOver = true; 7196 }) 7197 .bind('mousedown', function (e) { 7198 handleVolumeMove(e); 7199 t.globalBind('mousemove.vol', function(e) { 7200 handleVolumeMove(e); 7201 }); 7202 t.globalBind('mouseup.vol', function () { 7203 mouseIsDown = false; 7204 t.globalUnbind('.vol'); 7205 7206 if (!mouseIsOver && mode == 'vertical') { 7207 volumeSlider.hide(); 7208 } 7209 }); 7210 mouseIsDown = true; 7211 7212 return false; 7213 }) 7214 .bind('keydown', function (e) { 7215 var keyCode = e.keyCode; 7216 var volume = media.volume; 7217 switch (keyCode) { 7218 case 38: // Up 7219 volume += 0.1; 7220 break; 7221 case 40: // Down 7222 volume = volume - 0.1; 7223 break; 7224 default: 7225 return true; 7226 } 7227 7228 mouseIsDown = false; 7229 positionVolumeHandle(volume); 7230 media.setVolume(volume); 7231 return false; 7232 }) 7233 .bind('blur', function () { 7234 volumeSlider.hide(); 7235 }); 7236 7237 // MUTE button 7238 mute.find('button').click(function() { 7239 media.setMuted( !media.muted ); 7240 }); 7241 7242 //Keyboard input 7243 mute.find('button').bind('focus', function () { 7244 volumeSlider.show(); 7245 }); 7246 7247 // listen for volume change events from other sources 7248 media.addEventListener('volumechange', function(e) { 7249 if (!mouseIsDown) { 7250 if (media.muted) { 7251 positionVolumeHandle(0); 7252 mute.removeClass('mejs-mute').addClass('mejs-unmute'); 7253 } else { 7254 positionVolumeHandle(media.volume); 7255 mute.removeClass('mejs-unmute').addClass('mejs-mute'); 7256 } 7257 } 7258 updateVolumeSlider(e); 7259 }, false); 7260 7261 if (t.container.is(':visible')) { 7262 // set initial volume 7263 positionVolumeHandle(player.options.startVolume); 7264 7265 // mutes the media and sets the volume icon muted if the initial volume is set to 0 7266 if (player.options.startVolume === 0) { 7267 media.setMuted(true); 7268 } 7269 7270 // shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements 7271 if (media.pluginType === 'native') { 7272 media.setVolume(player.options.startVolume); 7273 } 7274 } 7275 } 7276 }); 7277 7278})(mejs.$); 7279(function($) { 7280 7281 $.extend(mejs.MepDefaults, { 7282 usePluginFullScreen: true, 7283 newWindowCallback: function() { return '';}, 7284 fullscreenText: mejs.i18n.t('Fullscreen') 7285 }); 7286 7287 $.extend(MediaElementPlayer.prototype, { 7288 7289 isFullScreen: false, 7290 7291 isNativeFullScreen: false, 7292 7293 isInIframe: false, 7294 7295 buildfullscreen: function(player, controls, layers, media) { 7296 7297 if (!player.isVideo) 7298 return; 7299 7300 player.isInIframe = (window.location != window.parent.location); 7301 7302 // native events 7303 if (mejs.MediaFeatures.hasTrueNativeFullScreen) { 7304 7305 // chrome doesn't alays fire this in an iframe 7306 var func = function(e) { 7307 if (player.isFullScreen) { 7308 if (mejs.MediaFeatures.isFullScreen()) { 7309 player.isNativeFullScreen = true; 7310 // reset the controls once we are fully in full screen 7311 player.setControlsSize(); 7312 } else { 7313 player.isNativeFullScreen = false; 7314 // when a user presses ESC 7315 // make sure to put the player back into place 7316 player.exitFullScreen(); 7317 } 7318 } 7319 }; 7320 7321 player.globalBind(mejs.MediaFeatures.fullScreenEventName, func); 7322 } 7323 7324 var t = this, 7325 normalHeight = 0, 7326 normalWidth = 0, 7327 container = player.container, 7328 fullscreenBtn = 7329 $('<div class="mejs-button mejs-fullscreen-button">' + 7330 '<button type="button" aria-controls="' + t.id + '" title="' + t.options.fullscreenText + '" aria-label="' + t.options.fullscreenText + '"></button>' + 7331 '</div>') 7332 .appendTo(controls); 7333 7334 if (t.media.pluginType === 'native' || (!t.options.usePluginFullScreen && !mejs.MediaFeatures.isFirefox)) { 7335 7336 fullscreenBtn.click(function() { 7337 var isFullScreen = (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || player.isFullScreen; 7338 7339 if (isFullScreen) { 7340 player.exitFullScreen(); 7341 } else { 7342 player.enterFullScreen(); 7343 } 7344 }); 7345 7346 } else { 7347 7348 var hideTimeout = null, 7349 supportsPointerEvents = (function() { 7350 // TAKEN FROM MODERNIZR 7351 var element = document.createElement('x'), 7352 documentElement = document.documentElement, 7353 getComputedStyle = window.getComputedStyle, 7354 supports; 7355 if(!('pointerEvents' in element.style)){ 7356 return false;
7357 } 7358 element.style.pointerEvents = 'auto'; 7359 element.style.pointerEvents = 'x'; 7360 documentElement.appendChild(element); 7361 supports = getComputedStyle && 7362 getComputedStyle(element, '').pointerEvents === 'auto'; 7363 documentElement.removeChild(element); 7364 return !!supports; 7365 })(); 7366 7367 // 7368 7369 if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :( 7370 7371 // allows clicking through the fullscreen button and controls down directly to Flash 7372 7373 /* 7374 When a user puts his mouse over the fullscreen button, the controls are disabled 7375 So we put a div over the video and another one on iether side of the fullscreen button 7376 that caputre mouse movement 7377 and restore the controls once the mouse moves outside of the fullscreen button 7378 */ 7379 7380 var fullscreenIsDisabled = false, 7381 restoreControls = function() { 7382 if (fullscreenIsDisabled) { 7383 // hide the hovers 7384 for (var i in hoverDivs) { 7385 hoverDivs[i].hide(); 7386 } 7387 7388 // restore the control bar 7389 fullscreenBtn.css('pointer-events', ''); 7390 t.controls.css('pointer-events', ''); 7391 7392 // prevent clicks from pausing video 7393 t.media.removeEventListener('click', t.clickToPlayPauseCallback); 7394 7395 // store for later 7396 fullscreenIsDisabled = false; 7397 } 7398 }, 7399 hoverDivs = {}, 7400 hoverDivNames = ['top', 'left', 'right', 'bottom'], 7401 i, len, 7402 positionHoverDivs = function() { 7403 var fullScreenBtnOffsetLeft = fullscreenBtn.offset().left - t.container.offset().left, 7404 fullScreenBtnOffsetTop = fullscreenBtn.offset().top - t.container.offset().top, 7405 fullScreenBtnWidth = fullscreenBtn.outerWidth(true), 7406 fullScreenBtnHeight = fullscreenBtn.outerHeight(true), 7407 containerWidth = t.container.width(), 7408 containerHeight = t.container.height(); 7409 7410 for (i in hoverDivs) { 7411 hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'}); 7412 } 7413 7414 // over video, but not controls 7415 hoverDivs['top'] 7416 .width( containerWidth ) 7417 .height( fullScreenBtnOffsetTop ); 7418 7419 // over controls, but not the fullscreen button 7420 hoverDivs['left'] 7421 .width( fullScreenBtnOffsetLeft ) 7422 .height( fullScreenBtnHeight ) 7423 .css({top: fullScreenBtnOffsetTop}); 7424 7425 // after the fullscreen button 7426 hoverDivs['right'] 7427 .width( containerWidth - fullScreenBtnOffsetLeft - fullScreenBtnWidth ) 7428 .height( fullScreenBtnHeight ) 7429 .css({top: fullScreenBtnOffsetTop, 7430 left: fullScreenBtnOffsetLeft + fullScreenBtnWidth}); 7431 7432 // under the fullscreen button 7433 hoverDivs['bottom'] 7434 .width( containerWidth ) 7435 .height( containerHeight - fullScreenBtnHeight - fullScreenBtnOffsetTop ) 7436 .css({top: fullScreenBtnOffsetTop + fullScreenBtnHeight}); 7437 }; 7438 7439 t.globalBind('resize', function() { 7440 positionHoverDivs(); 7441 }); 7442 7443 for (i = 0, len = hoverDivNames.length; i < len; i++) { 7444 hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide(); 7445 } 7446 7447 // on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash 7448 fullscreenBtn.on('mouseover',function() { 7449 7450 if (!t.isFullScreen) { 7451 7452 var buttonPos = fullscreenBtn.offset(), 7453 containerPos = player.container.offset(); 7454 7455 // move the button in Flash into place 7456 media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false); 7457 7458 // allows click through 7459 fullscreenBtn.css('pointer-events', 'none'); 7460 t.controls.css('pointer-events', 'none'); 7461 7462 // restore click-to-play 7463 t.media.addEventListener('click', t.clickToPlayPauseCallback); 7464 7465 // show the divs that will restore things 7466 for (i in hoverDivs) { 7467 hoverDivs[i].show(); 7468 } 7469 7470 positionHoverDivs(); 7471 7472 fullscreenIsDisabled = true; 7473 } 7474 7475 }); 7476 7477 // restore controls anytime the user enters or leaves fullscreen 7478 media.addEventListener('fullscreenchange', function(e) { 7479 t.isFullScreen = !t.isFullScreen; 7480 // don't allow plugin click to pause video - messes with 7481 // plugin's controls 7482 if (t.isFullScreen) { 7483 t.media.removeEventListener('click', t.clickToPlayPauseCallback); 7484 } else { 7485 t.media.addEventListener('click', t.clickToPlayPauseCallback); 7486 } 7487 restoreControls(); 7488 }); 7489 7490 7491 // the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events 7492 // so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button 7493 7494 t.globalBind('mousemove', function(e) { 7495 7496 // if the mouse is anywhere but the fullsceen button, then restore it all 7497 if (fullscreenIsDisabled) { 7498 7499 var fullscreenBtnPos = fullscreenBtn.offset(); 7500 7501 7502 if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) || 7503 e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true) 7504 ) { 7505 7506 fullscreenBtn.css('pointer-events', ''); 7507 t.controls.css('pointer-events', ''); 7508 7509 fullscreenIsDisabled = false;
7510 } 7511 } 7512 }); 7513 7514 7515 7516 } else { 7517 7518 // the hover state will show the fullscreen button in Flash to hover up and click 7519 7520 fullscreenBtn 7521 .on('mouseover', function() { 7522 7523 if (hideTimeout !== null) { 7524 clearTimeout(hideTimeout); 7525 delete hideTimeout; 7526 } 7527 7528 var buttonPos = fullscreenBtn.offset(), 7529 containerPos = player.container.offset(); 7530 7531 media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true); 7532 7533 }) 7534 .on('mouseout', function() { 7535 7536 if (hideTimeout !== null) { 7537 clearTimeout(hideTimeout); 7538 delete hideTimeout; 7539 } 7540 7541 hideTimeout = setTimeout(function() { 7542 media.hideFullscreenButton(); 7543 }, 1500); 7544 7545 7546 }); 7547 } 7548 } 7549 7550 player.fullscreenBtn = fullscreenBtn; 7551 7552 t.globalBind('keydown',function (e) { 7553 if (((mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || t.isFullScreen) && e.keyCode == 27) { 7554 player.exitFullScreen(); 7555 } 7556 }); 7557 7558 }, 7559 7560 cleanfullscreen: function(player) { 7561 player.exitFullScreen(); 7562 }, 7563 7564 containerSizeTimeout: null, 7565 7566 enterFullScreen: function() { 7567 7568 var t = this; 7569 7570 // firefox+flash can't adjust plugin sizes without resetting :( 7571 if (t.media.pluginType !== 'native' && (mejs.MediaFeatures.isFirefox || t.options.usePluginFullScreen)) { 7572 //t.media.setFullscreen(true); 7573 //player.isFullScreen = true; 7574 return; 7575 } 7576 7577 // set it to not show scroll bars so 100% will work 7578 $(document.documentElement).addClass('mejs-fullscreen'); 7579 7580 // store sizing 7581 normalHeight = t.container.height(); 7582 normalWidth = t.container.width(); 7583 7584 // attempt to do true fullscreen (Safari 5.1 and Firefox Nightly only for now) 7585 if (t.media.pluginType === 'native') { 7586 if (mejs.MediaFeatures.hasTrueNativeFullScreen) { 7587 7588 mejs.MediaFeatures.requestFullScreen(t.container[0]); 7589 //return; 7590 7591 if (t.isInIframe) { 7592 // sometimes exiting from fullscreen doesn't work 7593 // notably in Chrome <iframe>. Fixed in version 17 7594 setTimeout(function checkFullscreen() { 7595 7596 if (t.isNativeFullScreen) { 7597 var zoomMultiplier = window["devicePixelRatio"] || 1; 7598 // Use a percent error margin since devicePixelRatio is a float and not exact. 7599 var percentErrorMargin = 0.002; // 0.2% 7600 var windowWidth = zoomMultiplier * $(window).width(); 7601 var screenWidth = screen.width; 7602 var absDiff = Math.abs(screenWidth - windowWidth); 7603 var marginError = screenWidth * percentErrorMargin; 7604 7605 // check if the video is suddenly not really fullscreen 7606 if (absDiff > marginError) { 7607 // manually exit 7608 t.exitFullScreen(); 7609 } else { 7610 // test again 7611 setTimeout(checkFullscreen, 500); 7612 } 7613 } 7614 7615 7616 }, 500); 7617 } 7618 7619 } else if (mejs.MediaFeatures.hasSemiNativeFullScreen) { 7620 t.media.webkitEnterFullscreen(); 7621 return; 7622 } 7623 } 7624 7625 // check for iframe launch 7626 if (t.isInIframe) { 7627 var url = t.options.newWindowCallback(this); 7628 7629 7630 if (url !== '') { 7631 7632 // launch immediately 7633 if (!mejs.MediaFeatures.hasTrueNativeFullScreen) { 7634 t.pause(); 7635 window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no'); 7636 return; 7637 } else { 7638 setTimeout(function() { 7639 if (!t.isNativeFullScreen) { 7640 t.pause(); 7641 window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no'); 7642 } 7643 }, 250); 7644 } 7645 } 7646 7647 } 7648 7649 // full window code 7650 7651 7652 7653 // make full size 7654 t.container 7655 .addClass('mejs-container-fullscreen') 7656 .width('100%') 7657 .height('100%'); 7658 //.css({position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, overflow: 'hidden', width: '100%', height: '100%', 'z-index': 1000}); 7659 7660 // Only needed for safari 5.1 native full screen, can cause display issues elsewhere 7661 // Actually, it seems to be needed for IE8, too 7662 //if (mejs.MediaFeatures.hasTrueNativeFullScreen) { 7663 t.containerSizeTimeout = setTimeout(function() { 7664 t.container.css({width: '100%', height: '100%'}); 7665 t.setControlsSize(); 7666 }, 500); 7667 //} 7668 7669 if (t.media.pluginType === 'native') { 7670 t.$media 7671 .width('100%') 7672 .height('100%'); 7673 } else { 7674 t.container.find('.mejs-shim') 7675 .width('100%') 7676 .height('100%'); 7677 7678 //if (!mejs.MediaFeatures.hasTrueNativeFullScreen) { 7679 t.media.setVideoSize($(window).width(),$(window).height()); 7680 //} 7681 } 7682 7683 t.layers.children('div') 7684 .width('100%') 7685 .height('100%'); 7686 7687 if (t.fullscreenBtn) { 7688 t.fullscreenBtn 7689 .removeClass('mejs-fullscreen') 7690 .addClass('mejs-unfullscreen'); 7691 } 7692 7693 t.setControlsSize(); 7694 t.isFullScreen = true; 7695 7696 t.container.find('.mejs-captions-text').css('font-size', screen.width / t.width * 1.00 * 100 + '%'); 7697 t.container.find('.mejs-captions-position').css('bottom', '45px'); 7698 }, 7699 7700 exitFullScreen: function() { 7701 7702 var t = this; 7703 7704 // Prevent container from attempting to stretch a second time 7705 clearTimeout(t.containerSizeTimeout); 7706 7707 // firefox can't adjust plugins 7708 if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) { 7709 t.media.setFullscreen(false); 7710 //player.isFullScreen = false;
7711 return; 7712 } 7713 7714 // come outo of native fullscreen 7715 if (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || t.isFullScreen)) { 7716 mejs.MediaFeatures.cancelFullScreen(); 7717 } 7718 7719 // restore scroll bars to document 7720 $(document.documentElement).removeClass('mejs-fullscreen'); 7721 7722 t.container 7723 .removeClass('mejs-container-fullscreen') 7724 .width(normalWidth) 7725 .height(normalHeight); 7726 //.css({position: '', left: '', top: '', right: '', bottom: '', overflow: 'inherit', width: normalWidth + 'px', height: normalHeight + 'px', 'z-index': 1}); 7727 7728 if (t.media.pluginType === 'native') { 7729 t.$media 7730 .width(normalWidth) 7731 .height(normalHeight); 7732 } else { 7733 t.container.find('.mejs-shim') 7734 .width(normalWidth) 7735 .height(normalHeight); 7736 7737 t.media.setVideoSize(normalWidth, normalHeight); 7738 } 7739 7740 t.layers.children('div') 7741 .width(normalWidth) 7742 .height(normalHeight); 7743 7744 t.fullscreenBtn 7745 .removeClass('mejs-unfullscreen') 7746 .addClass('mejs-fullscreen'); 7747 7748 t.setControlsSize(); 7749 t.isFullScreen = false; 7750 7751 t.container.find('.mejs-captions-text').css('font-size',''); 7752 t.container.find('.mejs-captions-position').css('bottom', ''); 7753 } 7754 }); 7755 7756})(mejs.$); 7757 7758(function($) { 7759 7760 // Speed 7761 $.extend(mejs.MepDefaults, { 7762 7763 speeds: ['2.00', '1.50', '1.25', '1.00', '0.75'], 7764 7765 defaultSpeed: '1.00', 7766 7767 speedChar: 'x' 7768 7769 }); 7770 7771 $.extend(MediaElementPlayer.prototype, { 7772 7773 buildspeed: function(player, controls, layers, media) { 7774 var t = this; 7775 7776 if (t.media.pluginType == 'native') { 7777 var 7778 speedButton = null, 7779 speedSelector = null, 7780 playbackSpeed = null, 7781 inputId = null, 7782 html = '<div class="mejs-button mejs-speed-button">' + 7783 '<button type="button">' + t.options.defaultSpeed + t.options.speedChar + '</button>' + 7784 '<div class="mejs-speed-selector">' + 7785 '<ul>'; 7786 7787 if ($.inArray(t.options.defaultSpeed, t.options.speeds) === -1) { 7788 t.options.speeds.push(t.options.defaultSpeed); 7789 } 7790 7791 t.options.speeds.sort(function(a, b) { 7792 return parseFloat(b) - parseFloat(a); 7793 }); 7794 7795 for (var i = 0, il = t.options.speeds.length; i<il; i++) { 7796 inputId = t.id + '-speed-' + t.options.speeds[i]; 7797 html += '<li>' + 7798 '<input type="radio" name="speed" ' + 7799 'value="' + t.options.speeds[i] + '" ' + 7800 'id="' + inputId + '" ' + 7801 (t.options.speeds[i] == t.options.defaultSpeed ? ' checked' : '') + 7802 ' />' + 7803 '<label for="' + inputId + '" ' + 7804 (t.options.speeds[i] == t.options.defaultSpeed ? ' class="mejs-speed-selected"' : '') + 7805 '>' + t.options.speeds[i] + t.options.speedChar + '</label>' + 7806 '</li>'; 7807 } 7808 html += '</ul></div></div>'; 7809 7810 speedButton = $(html).appendTo(controls); 7811 speedSelector = speedButton.find('.mejs-speed-selector'); 7812 7813 playbackspeed = t.options.defaultSpeed; 7814 7815 speedSelector 7816 .on('click', 'input[type="radio"]', function() { 7817 var newSpeed = $(this).attr('value'); 7818 playbackspeed = newSpeed; 7819 media.playbackRate = parseFloat(newSpeed); 7820 speedButton.find('button').html(newSpeed + t.options.speedChar); 7821 speedButton.find('.mejs-speed-selected').removeClass('mejs-speed-selected'); 7822 speedButton.find('input[type="radio"]:checked').next().addClass('mejs-speed-selected'); 7823 }); 7824 7825 speedSelector 7826 .height( 7827 speedButton.find('.mejs-speed-selector ul').outerHeight(true) + 7828 speedButton.find('.mejs-speed-translations').outerHeight(true)) 7829 .css('top', (-1 * speedSelector.height()) + 'px'); 7830 } 7831 } 7832 }); 7833 7834})(mejs.$); 7835 7836(function($) { 7837 7838 // add extra default options 7839 $.extend(mejs.MepDefaults, { 7840 // this will automatically turn on a <track> 7841 startLanguage: '', 7842 7843 tracksText: mejs.i18n.t('Captions/Subtitles'), 7844 7845 // By default, no WAI-ARIA live region - don't make a 7846 // screen reader speak captions over an audio track. 7847 tracksAriaLive: false, 7848 7849 // option to remove the [cc] button when no <track kind="subtitles"> are present 7850 hideCaptionsButtonWhenEmpty: true, 7851 7852 // If true and we only have one track, change captions to popup 7853 toggleCaptionsButtonWhenOnlyOne: false, 7854 7855 // #id or .class 7856 slidesSelector: '' 7857 }); 7858 7859 $.extend(MediaElementPlayer.prototype, { 7860 7861 hasChapters: false, 7862 7863 cleartracks: function(player, controls, layers, media){ 7864 if(player) { 7865 if(player.captions) player.captions.remove(); 7866 if(player.chapters) player.chapters.remove(); 7867 if(player.captionsText) player.captionsText.remove(); 7868 if(player.captionsButton) player.captionsButton.remove(); 7869 } 7870 }, 7871 buildtracks: function(player, controls, layers, media) { 7872 if (player.tracks.length === 0) 7873 return; 7874 7875 var t = this, 7876 attr = t.options.tracksAriaLive ? 7877 'role="log" aria-live="assertive" aria-atomic="false"' : '', 7878 i, 7879 options = ''; 7880 7881 if (t.domNode.textTracks) { // if browser will do native captions, prefer mejs captions, loop through tracks and hide 7882 for (i = t.domNode.textTracks.length - 1; i >= 0; i--) { 7883 t.domNode.textTracks[i].mode = "hidden"; 7884 } 7885 } 7886 t.cleartracks(player, controls, layers, media); 7887 player.chapters = 7888 $('<div class="mejs-chapters mejs-layer"></div>') 7889 .prependTo(layers).hide(); 7890 player.captions = 7891 $('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" ' + 7892 attr + '><span class="mejs-captions-text"></span></div></div>') 7893 .prependTo(layers).hide(); 7894 player.captionsText = player.captions.find('.mejs-captions-text'); 7895 player.captionsButton = 7896 $('<div class="mejs-button mejs-captions-button">'+ 7897 '<button type="button" aria-controls="' + t.id + '" title="' + t.options.tracksText + '" aria-label="' + t.options.tracksText + '"></button>'+ 7898 '<div class="mejs-captions-selector">'+ 7899 '<ul>'+ 7900 '<li>'+ 7901 '<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' + 7902 '<label for="' + player.id + '_captions_none">' + mejs.i18n.t('None') +'</label>'+ 7903 '</li>' + 7904 '</ul>'+ 7905 '</div>'+ 7906 '</div>') 7907 .appendTo(controls); 7908 7909 7910 var subtitleCount = 0; 7911 for (i=0; i<player.tracks.length; i++) { 7912 if (player.tracks[i].kind == 'subtitles') { 7913 subtitleCount++; 7914 } 7915 } 7916 7917 // if only one language then just make the button a toggle 7918 if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount == 1){ 7919 // click 7920 player.captionsButton.on('click',function() { 7921 if (player.selectedTrack === null) { 7922 lang = player.tracks[0].srclang; 7923 } else { 7924 lang = 'none'; 7925 } 7926 player.setTrack(lang); 7927 }); 7928 } else { 7929 // hover or keyboard focus 7930 player.captionsButton.on( 'mouseenter focusin', function() { 7931 $(this).find('.mejs-captions-selector').css('visibility','visible'); 7932 }) 7933 7934 // handle clicks to the language radio buttons 7935 .on('click','input[type=radio]',function() { 7936 lang = this.value; 7937 player.setTrack(lang); 7938 }); 7939 7940 player.captionsButton.on( 'mouseleave focusout', function() { 7941 $(this).find(".mejs-captions-selector").css("visibility","hidden"); 7942 }); 7943 7944 } 7945 7946 if (!player.options.alwaysShowControls) { 7947 // move with controls 7948 player.container 7949 .bind('controlsshown', function () { 7950 // push captions above controls 7951 player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover'); 7952 7953 }) 7954 .bind('controlshidden', function () { 7955 if (!media.paused) { 7956 // move back to normal place 7957 player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover'); 7958 } 7959 }); 7960 } else { 7961 player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover'); 7962 } 7963 7964 player.trackToLoad = -1; 7965 player.selectedTrack = null; 7966 player.isLoadingTrack = false;
7967 7968 // add to list 7969 for (i=0; i<player.tracks.length; i++) { 7970 if (player.tracks[i].kind == 'subtitles') { 7971 player.addTrackButton(player.tracks[i].srclang, player.tracks[i].label); 7972 } 7973 } 7974 7975 // start loading tracks 7976 player.loadNextTrack(); 7977 7978 media.addEventListener('timeupdate',function(e) { 7979 player.displayCaptions(); 7980 }, false); 7981 7982 if (player.options.slidesSelector !== '') { 7983 player.slidesContainer = $(player.options.slidesSelector); 7984 7985 media.addEventListener('timeupdate',function(e) { 7986 player.displaySlides(); 7987 }, false); 7988 7989 } 7990 7991 media.addEventListener('loadedmetadata', function(e) { 7992 player.displayChapters(); 7993 }, false); 7994 7995 player.container.hover( 7996 function () { 7997 // chapters 7998 if (player.hasChapters) { 7999 player.chapters.css('visibility','visible'); 8000 player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight()); 8001 } 8002 }, 8003 function () { 8004 if (player.hasChapters && !media.paused) { 8005 player.chapters.fadeOut(200, function() { 8006 $(this).css('visibility','hidden'); 8007 $(this).css('display','block'); 8008 }); 8009 } 8010 }); 8011 8012 // check for autoplay 8013 if (player.node.getAttribute('autoplay') !== null) { 8014 player.chapters.css('visibility','hidden'); 8015 } 8016 }, 8017 8018 setTrack: function(lang){ 8019 8020 var t = this, 8021 i; 8022 8023 if (lang == 'none') { 8024 t.selectedTrack = null; 8025 t.captionsButton.removeClass('mejs-captions-enabled'); 8026 } else { 8027 for (i=0; i<t.tracks.length; i++) { 8028 if (t.tracks[i].srclang == lang) { 8029 if (t.selectedTrack === null) 8030 t.captionsButton.addClass('mejs-captions-enabled'); 8031 t.selectedTrack = t.tracks[i]; 8032 t.captions.attr('lang', t.selectedTrack.srclang); 8033 t.displayCaptions(); 8034 break; 8035 } 8036 } 8037 } 8038 }, 8039 8040 loadNextTrack: function() { 8041 var t = this; 8042 8043 t.trackToLoad++; 8044 if (t.trackToLoad < t.tracks.length) { 8045 t.isLoadingTrack = true; 8046 t.loadTrack(t.trackToLoad); 8047 } else { 8048 // add done? 8049 t.isLoadingTrack = false; 8050 8051 t.checkForTracks(); 8052 } 8053 }, 8054 8055 loadTrack: function(index){ 8056 var 8057 t = this, 8058 track = t.tracks[index], 8059 after = function() { 8060 8061 track.isLoaded = true; 8062 8063 // create button 8064 //t.addTrackButton(track.srclang); 8065 t.enableTrackButton(track.srclang, track.label); 8066 8067 t.loadNextTrack(); 8068 8069 }; 8070 8071 8072 $.ajax({ 8073 url: track.src, 8074 dataType: "text", 8075 success: function(d) { 8076 8077 // parse the loaded file 8078 if (typeof d == "string" && (/<tt\s+xml/ig).exec(d)) { 8079 track.entries = mejs.TrackFormatParser.dfxp.parse(d); 8080 } else { 8081 track.entries = mejs.TrackFormatParser.webvtt.parse(d); 8082 } 8083 8084 after(); 8085 8086 if (track.kind == 'chapters') { 8087 t.media.addEventListener('play', function(e) { 8088 if (t.media.duration > 0) { 8089 t.displayChapters(track); 8090 } 8091 }, false); 8092 } 8093 8094 if (track.kind == 'slides') { 8095 t.setupSlides(track); 8096 } 8097 }, 8098 error: function() { 8099 t.loadNextTrack(); 8100 } 8101 }); 8102 }, 8103 8104 enableTrackButton: function(lang, label) { 8105 var t = this; 8106 8107 if (label === '') { 8108 label = mejs.language.codes[lang] || lang; 8109 } 8110 8111 t.captionsButton 8112 .find('input[value=' + lang + ']') 8113 .prop('disabled',false) 8114 .siblings('label') 8115 .html( label ); 8116 8117 // auto select 8118 if (t.options.startLanguage == lang) { 8119 $('#' + t.id + '_captions_' + lang).prop('checked', true).trigger('click'); 8120 } 8121 8122 t.adjustLanguageBox(); 8123 }, 8124 8125 addTrackButton: function(lang, label) { 8126 var t = this; 8127 if (label === '') { 8128 label = mejs.language.codes[lang] || lang; 8129 } 8130 8131 t.captionsButton.find('ul').append( 8132 $('<li>'+ 8133 '<input type="radio" name="' + t.id + '_captions" id="' + t.id + '_captions_' + lang + '" value="' + lang + '" disabled="disabled" />' + 8134 '<label for="' + t.id + '_captions_' + lang + '">' + label + ' (loading)' + '</label>'+ 8135 '</li>') 8136 ); 8137 8138 t.adjustLanguageBox(); 8139 8140 // remove this from the dropdownlist (if it exists) 8141 t.container.find('.mejs-captions-translations option[value=' + lang + ']').remove(); 8142 }, 8143 8144 adjustLanguageBox:function() { 8145 var t = this; 8146 // adjust the size of the outer box 8147 t.captionsButton.find('.mejs-captions-selector').height( 8148 t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true) + 8149 t.captionsButton.find('.mejs-captions-translations').outerHeight(true) 8150 ); 8151 }, 8152 8153 checkForTracks: function() { 8154 var 8155 t = this, 8156 hasSubtitles = false;
8157 8158 // check if any subtitles 8159 if (t.options.hideCaptionsButtonWhenEmpty) { 8160 for (i=0; i<t.tracks.length; i++) { 8161 if (t.tracks[i].kind == 'subtitles') { 8162 hasSubtitles = true; 8163 break; 8164 } 8165 } 8166 8167 if (!hasSubtitles) { 8168 t.captionsButton.hide(); 8169 t.setControlsSize(); 8170 } 8171 } 8172 }, 8173 8174 displayCaptions: function() { 8175 8176 if (typeof this.tracks == 'undefined') 8177 return; 8178 8179 var 8180 t = this, 8181 i, 8182 track = t.selectedTrack; 8183 8184 if (track !== null && track.isLoaded) { 8185 for (i=0; i<track.entries.times.length; i++) { 8186 if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop) { 8187 // Set the line before the timecode as a class so the cue can be targeted if needed 8188 t.captionsText.html(track.entries.text[i]).attr('class', 'mejs-captions-text ' + (track.entries.times[i].identifier || '')); 8189 t.captions.show().height(0); 8190 return; // exit out if one is visible; 8191 } 8192 } 8193 t.captions.hide(); 8194 } else { 8195 t.captions.hide(); 8196 } 8197 }, 8198 8199 setupSlides: function(track) { 8200 var t = this; 8201 8202 t.slides = track; 8203 t.slides.entries.imgs = [t.slides.entries.text.length]; 8204 t.showSlide(0); 8205 8206 }, 8207 8208 showSlide: function(index) { 8209 if (typeof this.tracks == 'undefined' || typeof this.slidesContainer == 'undefined') { 8210 return; 8211 } 8212 8213 var t = this, 8214 url = t.slides.entries.text[index], 8215 img = t.slides.entries.imgs[index]; 8216 8217 if (typeof img == 'undefined' || typeof img.fadeIn == 'undefined') { 8218 8219 t.slides.entries.imgs[index] = img = $('<img src="' + url + '">') 8220 .on('load', function() { 8221 img.appendTo(t.slidesContainer) 8222 .hide() 8223 .fadeIn() 8224 .siblings(':visible') 8225 .fadeOut(); 8226 8227 }); 8228 8229 } else { 8230 8231 if (!img.is(':visible') && !img.is(':animated')) { 8232 8233 // 8234 8235 img.fadeIn() 8236 .siblings(':visible') 8237 .fadeOut(); 8238 } 8239 } 8240 8241 }, 8242 8243 displaySlides: function() { 8244 8245 if (typeof this.slides == 'undefined') 8246 return; 8247 8248 var 8249 t = this, 8250 slides = t.slides, 8251 i; 8252 8253 for (i=0; i<slides.entries.times.length; i++) { 8254 if (t.media.currentTime >= slides.entries.times[i].start && t.media.currentTime <= slides.entries.times[i].stop){ 8255 8256 t.showSlide(i); 8257 8258 return; // exit out if one is visible; 8259 } 8260 } 8261 }, 8262 8263 displayChapters: function() { 8264 var 8265 t = this, 8266 i; 8267 8268 for (i=0; i<t.tracks.length; i++) { 8269 if (t.tracks[i].kind == 'chapters' && t.tracks[i].isLoaded) { 8270 t.drawChapters(t.tracks[i]); 8271 t.hasChapters = true; 8272 break; 8273 } 8274 } 8275 }, 8276 8277 drawChapters: function(chapters) { 8278 var 8279 t = this, 8280 i, 8281 dur, 8282 //width, 8283 //left, 8284 percent = 0, 8285 usedPercent = 0; 8286 8287 t.chapters.empty(); 8288 8289 for (i=0; i<chapters.entries.times.length; i++) { 8290 dur = chapters.entries.times[i].stop - chapters.entries.times[i].start; 8291 percent = Math.floor(dur / t.media.duration * 100); 8292 if (percent + usedPercent > 100 || // too large 8293 i == chapters.entries.times.length-1 && percent + usedPercent < 100) // not going to fill it in 8294 { 8295 percent = 100 - usedPercent; 8296 } 8297 //width = Math.floor(t.width * dur / t.media.duration); 8298 //left = Math.floor(t.width * chapters.entries.times[i].start / t.media.duration); 8299 //if (left + width > t.width) { 8300 // width = t.width - left; 8301 //} 8302 8303 t.chapters.append( $( 8304 '<div class="mejs-chapter" rel="' + chapters.entries.times[i].start + '" style="left: ' + usedPercent.toString() + '%;width: ' + percent.toString() + '%;">' + 8305 '<div class="mejs-chapter-block' + ((i==chapters.entries.times.length-1) ? ' mejs-chapter-block-last' : '') + '">' + 8306 '<span class="ch-title">' + chapters.entries.text[i] + '</span>' + 8307 '<span class="ch-time">' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start) + '–' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop) + '</span>' + 8308 '</div>' + 8309 '</div>')); 8310 usedPercent += percent; 8311 } 8312 8313 t.chapters.find('div.mejs-chapter').click(function() { 8314 t.media.setCurrentTime( parseFloat( $(this).attr('rel') ) ); 8315 if (t.media.paused) { 8316 t.media.play(); 8317 } 8318 }); 8319 8320 t.chapters.show(); 8321 } 8322 }); 8323 8324 8325 8326 mejs.language = { 8327 codes: { 8328 af:'Afrikaans', 8329 sq:'Albanian', 8330 ar:'Arabic', 8331 be:'Belarusian', 8332 bg:'Bulgarian', 8333 ca:'Catalan', 8334 zh:'Chinese', 8335 'zh-cn':'Chinese Simplified', 8336 'zh-tw':'Chinese Traditional', 8337 hr:'Croatian', 8338 cs:'Czech', 8339 da:'Danish', 8340 nl:'Dutch', 8341 en:'English', 8342 et:'Estonian', 8343 fl:'Filipino', 8344 fi:'Finnish', 8345 fr:'French', 8346 gl:'Galician', 8347 de:'German', 8348 el:'Greek', 8349 ht:'Haitian Creole', 8350 iw:'Hebrew', 8351 hi:'Hindi', 8352 hu:'Hungarian', 8353 is:'Icelandic', 8354 id:'Indonesian', 8355 ga:'Irish', 8356 it:'Italian', 8357 ja:'Japanese', 8358 ko:'Korean', 8359 lv:'Latvian', 8360 lt:'Lithuanian', 8361 mk:'Macedonian', 8362 ms:'Malay', 8363 mt:'Maltese', 8364 no:'Norwegian', 8365 fa:'Persian', 8366 pl:'Polish', 8367 pt:'Portuguese', 8368 // 'pt-pt':'Portuguese (Portugal)', 8369 ro:'Romanian', 8370 ru:'Russian', 8371 sr:'Serbian', 8372 sk:'Slovak', 8373 sl:'Slovenian', 8374 es:'Spanish', 8375 sw:'Swahili', 8376 sv:'Swedish', 8377 tl:'Tagalog', 8378 th:'Thai', 8379 tr:'Turkish', 8380 uk:'Ukrainian', 8381 vi:'Vietnamese', 8382 cy:'Welsh', 8383 yi:'Yiddish' 8384 } 8385 }; 8386 8387 /* 8388 Parses WebVTT format which should be formatted as 8389 ================================ 8390 WEBVTT 8391 8392 1 8393 00:00:01,1 --> 00:00:05,000 8394 A line of text 8395 8396 2 8397 00:01:15,1 --> 00:02:05,000 8398 A second line of text 8399 8400 =============================== 8401 8402 Adapted from: http://www.delphiki.com/html5/playr 8403 */ 8404 mejs.TrackFormatParser = { 8405 webvtt: {
8406 pattern_timecode: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, 8407 8408 parse: function(trackText) { 8409 var 8410 i = 0, 8411 lines = mejs.TrackFormatParser.split2(trackText, /\r?\n/), 8412 entries = {text:[], times:[]}, 8413 timecode, 8414 text, 8415 identifier; 8416 for(; i<lines.length; i++) { 8417 timecode = this.pattern_timecode.exec(lines[i]); 8418 8419 if (timecode && i<lines.length) { 8420 if ((i - 1) >= 0 && lines[i - 1] !== '') { 8421 identifier = lines[i - 1]; 8422 } 8423 i++; 8424 // grab all the (possibly multi-line) text that follows 8425 text = lines[i]; 8426 i++; 8427 while(lines[i] !== '' && i<lines.length){ 8428 text = text + '\n' + lines[i]; 8429 i++; 8430 } 8431 text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>"); 8432 // Text is in a different array so I can use .join 8433 entries.text.push(text); 8434 entries.times.push( 8435 { 8436 identifier: identifier, 8437 start: (mejs.Utility.convertSMPTEtoSeconds(timecode[1]) === 0) ? 0.200 : mejs.Utility.convertSMPTEtoSeconds(timecode[1]), 8438 stop: mejs.Utility.convertSMPTEtoSeconds(timecode[3]), 8439 settings: timecode[5] 8440 }); 8441 } 8442 identifier = ''; 8443 } 8444 return entries; 8445 } 8446 }, 8447 // Thanks to Justin Capella: https://github.com/johndyer/mediaelement/pull/420 8448 dfxp: { 8449 parse: function(trackText) { 8450 trackText = $(trackText).filter("tt"); 8451 var 8452 i = 0, 8453 container = trackText.children("div").eq(0), 8454 lines = container.find("p"), 8455 styleNode = trackText.find("#" + container.attr("style")), 8456 styles, 8457 begin, 8458 end, 8459 text, 8460 entries = {text:[], times:[]}; 8461 8462 8463 if (styleNode.length) { 8464 var attributes = styleNode.removeAttr("id").get(0).attributes; 8465 if (attributes.length) { 8466 styles = {}; 8467 for (i = 0; i < attributes.length; i++) { 8468 styles[attributes[i].name.split(":")[1]] = attributes[i].value; 8469 } 8470 } 8471 } 8472 8473 for(i = 0; i<lines.length; i++) { 8474 var style; 8475 var _temp_times = { 8476 start: null, 8477 stop: null, 8478 style: null 8479 }; 8480 if (lines.eq(i).attr("begin")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin")); 8481 if (!_temp_times.start && lines.eq(i-1).attr("end")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end")); 8482 if (lines.eq(i).attr("end")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end")); 8483 if (!_temp_times.stop && lines.eq(i+1).attr("begin")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin")); 8484 if (styles) { 8485 style = ""; 8486 for (var _style in styles) { 8487 style += _style + ":" + styles[_style] + ";"; 8488 } 8489 } 8490 if (style) _temp_times.style = style; 8491 if (_temp_times.start === 0) _temp_times.start = 0.200; 8492 entries.times.push(_temp_times); 8493 text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>"); 8494 entries.text.push(text); 8495 if (entries.times.start === 0) entries.times.start = 2; 8496 } 8497 return entries; 8498 } 8499 }, 8500 split2: function (text, regex) { 8501 // normal version for compliant browsers 8502 // see below for IE fix 8503 return text.split(regex); 8504 } 8505 }; 8506 8507 // test for browsers with bad String.split method. 8508 if ('x\n\ny'.split(/\n/gi).length != 3) { 8509 // add super slow IE8 and below version 8510 mejs.TrackFormatParser.split2 = function(text, regex) { 8511 var 8512 parts = [], 8513 chunk = '', 8514 i; 8515 8516 for (i=0; i<text.length; i++) { 8517 chunk += text.substring(i,i+1); 8518 if (regex.test(chunk)) { 8519 parts.push(chunk.replace(regex, '')); 8520 chunk = ''; 8521 } 8522 } 8523 parts.push(chunk); 8524 return parts; 8525 }; 8526 } 8527 8528})(mejs.$); 8529 8530/* 8531* ContextMenu Plugin 8532* 8533* 8534*/ 8535 8536(function($) { 8537 8538$.extend(mejs.MepDefaults, 8539 { 'contextMenuItems': [ 8540 // demo of a fullscreen option 8541 { 8542 render: function(player) { 8543 8544 // check for fullscreen plugin 8545 if (typeof player.enterFullScreen == 'undefined') 8546 return null; 8547 8548 if (player.isFullScreen) { 8549 return mejs.i18n.t('Turn off Fullscreen'); 8550 } else { 8551 return mejs.i18n.t('Go Fullscreen'); 8552 } 8553 }, 8554 click: function(player) { 8555 if (player.isFullScreen) { 8556 player.exitFullScreen(); 8557 } else { 8558 player.enterFullScreen(); 8559 } 8560 } 8561 } 8562 , 8563 // demo of a mute/unmute button 8564 { 8565 render: function(player) { 8566 if (player.media.muted) { 8567 return mejs.i18n.t('Unmute'); 8568 } else { 8569 return mejs.i18n.t('Mute'); 8570 } 8571 }, 8572 click: function(player) { 8573 if (player.media.muted) { 8574 player.setMuted(false); 8575 } else { 8576 player.setMuted(true); 8577 } 8578 } 8579 }, 8580 // separator 8581 { 8582 isSeparator: true 8583 } 8584 , 8585 // demo of simple download video 8586 { 8587 render: function(player) { 8588 return mejs.i18n.t('Download Video'); 8589 }, 8590 click: function(player) { 8591 window.location.href = player.media.currentSrc; 8592 } 8593 } 8594 ]} 8595); 8596 8597 8598 $.extend(MediaElementPlayer.prototype, { 8599 buildcontextmenu: function(player, controls, layers, media) { 8600 8601 // create context menu
8602 player.contextMenu = $('<div class="mejs-contextmenu"></div>') 8603 .appendTo($('body')) 8604 .hide(); 8605 8606 // create events for showing context menu 8607 player.container.bind('contextmenu', function(e) { 8608 if (player.isContextMenuEnabled) { 8609 e.preventDefault(); 8610 player.renderContextMenu(e.clientX-1, e.clientY-1); 8611 return false; 8612 } 8613 }); 8614 player.container.bind('click', function() { 8615 player.contextMenu.hide(); 8616 }); 8617 player.contextMenu.bind('mouseleave', function() { 8618 8619 // 8620 player.startContextMenuTimer(); 8621 8622 }); 8623 }, 8624 8625 cleancontextmenu: function(player) { 8626 player.contextMenu.remove(); 8627 }, 8628 8629 isContextMenuEnabled: true, 8630 enableContextMenu: function() { 8631 this.isContextMenuEnabled = true; 8632 }, 8633 disableContextMenu: function() { 8634 this.isContextMenuEnabled = false; 8635 }, 8636 8637 contextMenuTimeout: null, 8638 startContextMenuTimer: function() { 8639 // 8640 8641 var t = this; 8642 8643 t.killContextMenuTimer(); 8644 8645 t.contextMenuTimer = setTimeout(function() { 8646 t.hideContextMenu(); 8647 t.killContextMenuTimer(); 8648 }, 750); 8649 }, 8650 killContextMenuTimer: function() { 8651 var timer = this.contextMenuTimer; 8652 8653 // 8654 8655 if (timer != null) { 8656 clearTimeout(timer); 8657 delete timer; 8658 timer = null; 8659 } 8660 }, 8661 8662 hideContextMenu: function() { 8663 this.contextMenu.hide(); 8664 }, 8665 8666 renderContextMenu: function(x,y) { 8667 8668 // alway re-render the items so that things like "turn fullscreen on" and "turn fullscreen off" are always written correctly 8669 var t = this, 8670 html = '', 8671 items = t.options.contextMenuItems; 8672 8673 for (var i=0, il=items.length; i<il; i++) { 8674 8675 if (items[i].isSeparator) { 8676 html += '<div class="mejs-contextmenu-separator"></div>'; 8677 } else { 8678 8679 var rendered = items[i].render(t); 8680 8681 // render can return null if the item doesn't need to be used at the moment 8682 if (rendered != null) { 8683 html += '<div class="mejs-contextmenu-item" data-itemindex="' + i + '" id="element-' + (Math.random()*1000000) + '">' + rendered + '</div>'; 8684 } 8685 } 8686 } 8687 8688 // position and show the context menu 8689 t.contextMenu 8690 .empty() 8691 .append($(html)) 8692 .css({top:y, left:x}) 8693 .show(); 8694 8695 // bind events 8696 t.contextMenu.find('.mejs-contextmenu-item').each(function() { 8697 8698 // which one is this? 8699 var $dom = $(this), 8700 itemIndex = parseInt( $dom.data('itemindex'), 10 ), 8701 item = t.options.contextMenuItems[itemIndex]; 8702 8703 // bind extra functionality? 8704 if (typeof item.show != 'undefined') 8705 item.show( $dom , t); 8706 8707 // bind click action 8708 $dom.click(function() { 8709 // perform click action 8710 if (typeof item.click != 'undefined') 8711 item.click(t); 8712 8713 // close 8714 t.contextMenu.hide(); 8715 }); 8716 }); 8717 8718 // stop the controls from hiding 8719 setTimeout(function() { 8720 t.killControlsTimer('rev3'); 8721 }, 100); 8722 8723 } 8724 }); 8725 8726})(mejs.$); 8727/** 8728 * Postroll plugin 8729 */ 8730(function($) { 8731 8732 $.extend(mejs.MepDefaults, { 8733 postrollCloseText: mejs.i18n.t('Close') 8734 }); 8735 8736 // Postroll 8737 $.extend(MediaElementPlayer.prototype, { 8738 buildpostroll: function(player, controls, layers, media) { 8739 var 8740 t = this, 8741 postrollLink = t.container.find('link[rel="postroll"]').attr('href'); 8742 8743 if (typeof postrollLink !== 'undefined') { 8744 player.postroll = 8745 $('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + t.options.postrollCloseText + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide(); 8746 8747 t.media.addEventListener('ended', function (e) { 8748 $.ajax({ 8749 dataType: 'html', 8750 url: postrollLink, 8751 success: function (data, textStatus) { 8752 layers.find('.mejs-postroll-layer-content').html(data); 8753 } 8754 }); 8755 player.postroll.show(); 8756 }, false); 8757 } 8758 } 8759 }); 8760 8761})(mejs.$);; 8762
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.