vendor: 12,142 bytes, lines 1-2
1/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 2!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(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.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:u,sort:t.sort,splice:t.splice},S.extend=S.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||m(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&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+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]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(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},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},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(p(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:v}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,y,s,c,v,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=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))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(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&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(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&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(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 ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);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&&E){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=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:
vendor: 12,219 bytes, line 2
2e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(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=se.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($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=y)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[S]?le(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:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?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=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!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 J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(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]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(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 Te(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 Ce(d,h,g,y,v,e){return y&&!y[S]&&(y=Ce(y)),v&&!v[S]&&(v=Ce(v,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(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=[be(we(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 Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[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?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.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=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=y[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=v[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+v.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(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&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.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(te,ne),ee.test(o[0].type)&&ve(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;
vendor: 5,189 bytes, line 2
2function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.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 S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.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&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.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){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.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},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 22,358 bytes, line 2
2nding",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 S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(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,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.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=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(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},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(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[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(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(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.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&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.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=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.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=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.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 ue={};function le(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]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.option=!!ce.lastChild;var ge={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 ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,v.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(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"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.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<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(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)Ee(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=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.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),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.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,y.handle)||S.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.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=S.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=((S.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<S(i,this).index(l):S.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(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(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[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,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&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.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},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(t,e){S.event.special[t]={setup:function(){return Se(this,t,Ce),!1},trigger:function(){return Se(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(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=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(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=m(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?S.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 He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(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&&(S.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return B(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&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ye(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=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},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&
2(a=a.replace($e,"$1")
vendor: 37,735 bytes, line 2
2),""!==a||ie(e)||(a=S.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.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 _e(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%",re.appendChild(u).appendChild(l);var e=C.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),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(v,{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=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var ze=["Webkit","Moz","ms"],Ue=E.createElement("div").style,Xe={};function Ve(e){var t=S.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[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}function Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!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,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=S.cssHooks[t]||S.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=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),v.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=X(t);return Re.test(t)||(t=Ve(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ge.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),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:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.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=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.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=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(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),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.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&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._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--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.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||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.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=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.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));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.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})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return B(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.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=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&A(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(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return B(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.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=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(S.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)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).addClass(t.call(this,e,vt(this)))}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).removeClass(t.call(this,e,vt(this)))}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(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 m(t)?this.each(function(e){S(this).toggleClass(t.call(this,e,vt(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=S(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=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:yt(S.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||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},v.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.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]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(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)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),v.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.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 Bt(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,S.ajaxSettings),t):Bt(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),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,y=S.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?S(v):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.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&&(y.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),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=E.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){y.crossDomain=!0}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=S.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in(g=S.event&&y.global)&&0==S.active++&&S.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(Et.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},y.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&&C.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]}(y,T,n)),!i&&-1<S.inArray("script",y.dataTypes)&&S.inArray("json",y.dataTypes)<0&&(y.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}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===y.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(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(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 m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!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(_t[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&&C.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()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.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 S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<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)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.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),m(t)&&(t=t.call(e,n,S.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)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.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"===S.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"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(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)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(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?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.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.mouseenter(e).mouseleave(t||e)}}),S.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){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
vendor: 18,483 bytes, lines 2-551
2 3/*! 4 * jQuery blockUI plugin 5 * Version 2.66.0-2013.10.09 6 * Requires jQuery v1.7 or later 7 * 8 * Examples at: http://malsup.com/jquery/block/ 9 * Copyright (c) 2007-2013 M. Alsup 10 * Dual licensed under the MIT and GPL licenses: 11 * http://www.opensource.org/licenses/mit-license.php 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * Thanks to Amir-Hossein Sobhi for some excellent contributions! 15 */ 16 17;(function() { 18/*jshint eqeqeq:false curly:false latedef:false */ 19"use strict"; 20 21 function setup($) { 22 $.fn._fadeIn = $.fn.fadeIn; 23 24 var noOp = $.noop || function() {}; 25 26 // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle 27 // confusing userAgent strings on Vista) 28 var msie = /MSIE/.test(navigator.userAgent); 29 var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent); 30 var mode = document.documentMode || 0; 31 var setExpr = $.isFunction( document.createElement('div').style.setExpression ); 32 33 // global $ methods for blocking/unblocking the entire page 34 $.blockUI = function(opts) { install(window, opts); }; 35 $.unblockUI = function(opts) { remove(window, opts); }; 36 37 // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl) 38 $.growlUI = function(title, message, timeout, onClose) { 39 var $m = $('<div class="growlUI"></div>'); 40 if (title) $m.append('<h1>'+title+'</h1>'); 41 if (message) $m.append('<h2>'+message+'</h2>'); 42 if (timeout === undefined) timeout = 3000; 43 44 // Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications 45 var callBlock = function(opts) { 46 opts = opts || {}; 47 48 $.blockUI({ 49 message: $m, 50 fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700, 51 fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000, 52 timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout, 53 centerY: false, 54 showOverlay: false, 55 onUnblock: onClose, 56 css: $.blockUI.defaults.growlCSS 57 }); 58 }; 59 60 callBlock(); 61 var nonmousedOpacity = $m.css('opacity'); 62 $m.mouseover(function() { 63 callBlock({ 64 fadeIn: 0, 65 timeout: 30000 66 }); 67 68 var displayBlock = $('.blockMsg'); 69 displayBlock.stop(); // cancel fadeout if it has started 70 displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency 71 }).mouseout(function() { 72 $('.blockMsg').fadeOut(1000); 73 }); 74 // End konapun additions 75 }; 76 77 // plugin method for blocking element content 78 $.fn.block = function(opts) { 79 if ( this[0] === window ) { 80 $.blockUI( opts ); 81 return this; 82 } 83 var fullOpts = $.extend({}, $.blockUI.defaults, opts || {}); 84 this.each(function() { 85 var $el = $(this); 86 if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked')) 87 return; 88 $el.unblock({ fadeOut: 0 }); 89 }); 90 91 return this.each(function() { 92 if ($.css(this,'position') == 'static') { 93 this.style.position = 'relative'; 94 $(this).data('blockUI.static', true); 95 } 96 this.style.zoom = 1; // force 'hasLayout' in ie 97 install(this, opts); 98 }); 99 }; 100 101 // plugin method for unblocking element content 102 $.fn.unblock = function(opts) { 103 if ( this[0] === window ) { 104 $.unblockUI( opts ); 105 return this; 106 } 107 return this.each(function() { 108 remove(this, opts); 109 }); 110 }; 111 112 $.blockUI.version = 2.66; // 2nd generation blocking at no extra cost! 113 114 // override these in your code to change the default behavior and style 115 $.blockUI.defaults = { 116 // message displayed when blocking (use null for no message) 117 message: '<h1>Please wait...</h1>', 118 119 title: null, // title string; only used when theme == true 120 draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded) 121 122 theme: false, // set to true to use with jQuery UI themes 123 124 // styles for the message when blocking; if you wish to disable 125 // these and use an external stylesheet then do this in your code: 126 // $.blockUI.defaults.css = {}; 127 css: { 128 padding: 0, 129 margin: 0, 130 width: '30%', 131 top: '40%', 132 left: '35%', 133 textAlign: 'center', 134 color: '#000', 135 border: '3px solid #aaa', 136 backgroundColor:'#fff', 137 cursor: 'wait' 138 }, 139 140 // minimal style set used when themes are used 141 themedCSS: { 142 width: '30%', 143 top: '40%', 144 left: '35%' 145 }, 146 147 // styles for the overlay 148 overlayCSS: { 149 backgroundColor: '#000', 150 opacity: 0.6, 151 cursor: 'wait' 152 }, 153 154 // style to replace wait cursor before unblocking to correct issue 155 // of lingering wait cursor 156 cursorReset: 'default', 157 158 // styles applied when using $.growlUI 159 growlCSS: { 160 width: '350px', 161 top: '10px', 162 left: '', 163 right: '10px', 164 border: 'none', 165 padding: '5px', 166 opacity: 0.6, 167 cursor: 'default', 168 color: '#fff', 169 backgroundColor: '#000', 170 '-webkit-border-radius':'10px', 171 '-moz-border-radius': '10px', 172 'border-radius': '10px' 173 }, 174 175 // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w 176 // (hat tip to Jorge H. N. de Vasconcelos) 177 /*jshint scripturl:true */ 178 iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', 179 180 // force usage of iframe in non-IE browsers (handy for blocking applets) 181 forceIframe: false, 182 183 // z-index for the blocking overlay 184 baseZ: 1000, 185 186 // set these to true to have the message automatically centered 187 centerX: true, // <-- only effects element blocking (page block controlled via css above) 188 centerY: true, 189 190 // allow body element to be stetched in ie6; this makes blocking look better 191 // on "short" pages. disable if you wish to prevent changes to the body height 192 allowBodyStretch: true, 193 194 // enable if you want key and mouse events to be disabled for content that is blocked 195 bindEvents: true, 196 197 // be default blockUI will supress tab navigation from leaving blocking content 198 // (if bindEvents is true) 199 constrainTabKey: true, 200 201 // fadeIn time in millis; set to 0 to disable fadeIn on block 202 fadeIn: 200, 203 204 // fadeOut time in millis; set to 0 to disable fadeOut on unblock 205 fadeOut: 400, 206 207 // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock 208 timeout: 0, 209 210 // disable if you don't want to show the overlay 211 showOverlay: true, 212 213 // if true, focus will be placed in the first available input field when 214 // page blocking 215 focusInput: true, 216 217 // elements that can receive focus 218 focusableElements: ':input:enabled:visible', 219 220 // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity) 221 // no longer needed in 2012 222 // applyPlatformOpacityRules: true, 223 224 // callback method invoked when fadeIn has completed and blocking message is visible 225 onBlock: null, 226 227 // callback method invoked when unblocking has completed; the callback is 228 // passed the element that has been unblocked (which is the window object for page 229 // blocks) and the options that were passed to the unblock call: 230 // onUnblock(element, options) 231 onUnblock: null, 232 233 // callback method invoked when the overlay area is clicked. 234 // setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used. 235 onOverlayClick: null, 236 237 // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493 238 quirksmodeOffsetHack: 4, 239 240 // class name of the message block 241 blockMsgClass: 'blockMsg', 242 243 // if it is already blocked, then ignore it (don't unblock and reblock) 244 ignoreIfBlocked: false 245 }; 246 247 // private data and functions follow... 248 249 var pageBlock = null; 250 var pageBlockEls = []; 251 252 function install(el, opts) { 253 var css, themedCSS; 254 var full = (el == window); 255 var msg = (opts && opts.message !== undefined ? opts.message : undefined); 256 opts = $.extend({}, $.blockUI.defaults, opts || {}); 257 258 if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked')) 259 return; 260 261 opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); 262 css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); 263 if (opts.onOverlayClick) 264 opts.overlayCSS.cursor = 'pointer'; 265 266 themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); 267 msg = msg === undefined ? opts.message : msg; 268 269 // remove the current block (if there is one) 270 if (full && pageBlock) 271 remove(window, {fadeOut:0}); 272 273 // if an existing element is being used as the blocking content then we capture 274 // its current place in the DOM (and current display style) so we can restore 275 // it when we unblock 276 if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { 277 var node = msg.jquery ? msg[0] : msg; 278 var data = {}; 279 $(el).data('blockUI.history', data); 280 data.el = node; 281 data.parent = node.parentNode; 282 data.display = node.style.display; 283 data.position = node.style.position; 284 if (data.parent) 285 data.parent.removeChild(node); 286 } 287 288 $(el).data('blockUI.onUnblock', opts.onUnblock); 289 var z = opts.baseZ; 290 291 // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; 292 // layer1 is the iframe layer which is used to supress bleed through of underlying content 293 // layer2 is the overlay layer which has opacity and a wait cursor (by default) 294 // layer3 is the message content that is displayed while blocking 295 var lyr1, lyr2, lyr3, s; 296 if (msie || opts.forceIframe) 297 lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'); 298 else 299 lyr1 = $('<div class="blockUI" style="display:none"></div>'); 300 301 if (opts.theme) 302 lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>'); 303 else 304 lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'); 305 306 if (opts.theme && full) { 307 s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">'; 308 if ( opts.title ) { 309 s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>'; 310 } 311 s += '<div class="ui-widget-content ui-dialog-content"></div>'; 312 s += '</div>'; 313 } 314 else if (opts.theme) { 315 s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">'; 316 if ( opts.title ) { 317 s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>'; 318 } 319 s += '<div class="ui-widget-content ui-dialog-content"></div>'; 320 s += '</div>'; 321 } 322 else if (full) { 323 s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>'; 324 } 325 else { 326 s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>'; 327 } 328 lyr3 = $(s); 329 330 // if we have a message, style it 331 if (msg) { 332 if (opts.theme) { 333 lyr3.css(themedCSS); 334 lyr3.addClass('ui-widget-content'); 335 } 336 else 337 lyr3.css(css); 338 } 339 340 // style the overlay 341 if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/) 342 lyr2.css(opts.overlayCSS); 343 lyr2.css('position', full ? 'fixed' : 'absolute'); 344 345 // make iframe layer transparent in IE 346 if (msie || opts.forceIframe) 347 lyr1.css('opacity',0.0); 348 349 //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); 350 var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el); 351 $.each(layers, function() { 352 this.appendTo($par); 353 }); 354 355 if (opts.theme && opts.draggable && $.fn.draggable) { 356 lyr3.draggable({ 357 handle: '.ui-dialog-titlebar', 358 cancel: 'li' 359 }); 360 } 361 362 // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) 363 var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0); 364 if (ie6 || expr) { 365 // give body 100% height 366 if (full && opts.allowBodyStretch && $.support.boxModel) 367 $('html,body').css('height','100%'); 368 369 // fix ie6 issue when blocked element has a border width 370 if ((ie6 || !$.support.boxModel) && !full) { 371 var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); 372 var fixT = t ? '(0 - '+t+')' : 0; 373 var fixL = l ? '(0 - '+l+')' : 0; 374 } 375 376 // simulate fixed position 377 $.each(layers, function(i,o) { 378 var s = o[0].style; 379 s.position = 'absolute'; 380 if (i < 2) { 381 if (full) 382 s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'); 383 else 384 s.setExpression('height','this.parentNode.offsetHeight + "px"'); 385 if (full) 386 s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'); 387 else 388 s.setExpression('width','this.parentNode.offsetWidth + "px"'); 389 if (fixL) s.setExpression('left', fixL); 390 if (fixT) s.setExpression('top', fixT); 391 } 392 else if (opts.centerY) { 393 if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); 394 s.marginTop = 0; 395 } 396 else if (!opts.centerY && full) { 397 var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0; 398 var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; 399 s.setExpression('top',expression); 400 } 401 }); 402 } 403 404 // show the message 405 if (msg) { 406 if (opts.theme) 407 lyr3.find('.ui-widget-content').append(msg); 408 else 409 lyr3.append(msg); 410 if (msg.jquery || msg.nodeType) 411 $(msg).show(); 412 } 413 414 if ((msie || opts.forceIframe) && opts.showOverlay) 415 lyr1.show(); // opacity is zero 416 if (opts.fadeIn) { 417 var cb = opts.onBlock ? opts.onBlock : noOp; 418 var cb1 = (opts.showOverlay && !msg) ? cb : noOp; 419 var cb2 = msg ? cb : noOp; 420 if (opts.showOverlay) 421 lyr2._fadeIn(opts.fadeIn, cb1); 422 if (msg) 423 lyr3._fadeIn(opts.fadeIn, cb2); 424 } 425 else { 426 if (opts.showOverlay) 427 lyr2.show(); 428 if (msg) 429 lyr3.show(); 430 if (opts.onBlock) 431 opts.onBlock(); 432 } 433 434 // bind key and mouse events 435 bind(1, el, opts); 436 437 if (full) { 438 pageBlock = lyr3[0]; 439 pageBlockEls = $(opts.focusableElements,pageBlock); 440 if (opts.focusInput) 441 setTimeout(focus, 20); 442 } 443 else 444 center(lyr3[0], opts.centerX, opts.centerY); 445 446 if (opts.timeout) { 447 // auto-unblock 448 var to = setTimeout(function() { 449 if (full) 450 $.unblockUI(opts); 451 else 452 $(el).unblock(opts); 453 }, opts.timeout); 454 $(el).data('blockUI.timeout', to); 455 } 456 } 457 458 // remove the block 459 function remove(el, opts) { 460 var count; 461 var full = (el == window); 462 var $el = $(el); 463 var data = $el.data('blockUI.history'); 464 var to = $el.data('blockUI.timeout'); 465 if (to) { 466 clearTimeout(to); 467 $el.removeData('blockUI.timeout'); 468 } 469 opts = $.extend({}, $.blockUI.defaults, opts || {}); 470 bind(0, el, opts); // unbind events 471 472 if (opts.onUnblock === null) { 473 opts.onUnblock = $el.data('blockUI.onUnblock'); 474 $el.removeData('blockUI.onUnblock'); 475 } 476 477 var els; 478 if (full) // crazy selector to handle odd field errors in ie6/7 479 els = $('body').children().filter('.blockUI').add('body > .blockUI'); 480 else 481 els = $el.find('>.blockUI'); 482 483 // fix cursor issue 484 if ( opts.cursorReset ) { 485 if ( els.length > 1 ) 486 els[1].style.cursor = opts.cursorReset; 487 if ( els.length > 2 ) 488 els[2].style.cursor = opts.cursorReset; 489 } 490 491 if (full) 492 pageBlock = pageBlockEls = null; 493 494 if (opts.fadeOut) { 495 count = els.length; 496 els.stop().fadeOut(opts.fadeOut, function() { 497 if ( --count === 0) 498 reset(els,data,opts,el); 499 }); 500 } 501 else 502 reset(els, data, opts, el); 503 } 504 505 // move blocking element back into the DOM where it started 506 function reset(els,data,opts,el) { 507 var $el = $(el); 508 if ( $el.data('blockUI.isBlocked') ) 509 return; 510 511 els.each(function(i,o) { 512 // remove via DOM calls so we don't lose event handlers 513 if (this.parentNode) 514 this.parentNode.removeChild(this); 515 }); 516 517 if (data && data.el) { 518 data.el.style.display = data.display; 519 data.el.style.position = data.position; 520 if (data.parent) 521 data.parent.appendChild(data.el); 522 $el.removeData('blockUI.history'); 523 } 524 525 if ($el.data('blockUI.static')) { 526 $el.css('position', 'static'); // #22 527 } 528 529 if (typeof opts.onUnblock == 'function') 530 opts.onUnblock(el,opts); 531 532 // fix issue in Safari 6 where block artifacts remain until reflow 533 var body = $(document.body), w = body.width(), cssW = body[0].style.width; 534 body.width(w-1).width(w); 535 body[0].style.width = cssW; 536 } 537 538 // bind/unbind the handler 539 function bind(b, el, opts) { 540 var full = el == window, $el = $(el); 541 542 // don't bother unbinding if there is nothing to unbind 543 if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) 544 return; 545 546 $el.data('blockUI.isBlocked', b); 547 548 // don't bind events when overlay is not in use or if bindEvents is false 549 if (!full || !opts.bindEvents || (b && !opts.showOverlay)) 550 return; 551
552 // bind anchors and inputs for mouse and key events 553 var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove'; 554 if (b) 555 $(document).bind(events, opts, handler); 556 else 557 $(document).unbind(events, handler); 558 559 // former impl... 560 // var $e = $('a,:input'); 561 // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); 562 } 563 564 // event handler to suppress keyboard/mouse events when blocking 565 function handler(e) { 566 // allow tab navigation (conditionally) 567 if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) { 568 if (pageBlock && e.data.constrainTabKey) { 569 var els = pageBlockEls; 570 var fwd = !e.shiftKey && e.target === els[els.length-1]; 571 var back = e.shiftKey && e.target === els[0]; 572 if (fwd || back) { 573 setTimeout(function(){focus(back);},10); 574 return false; 575 } 576 } 577 } 578 var opts = e.data; 579 var target = $(e.target); 580 if (target.hasClass('blockOverlay') && opts.onOverlayClick) 581 opts.onOverlayClick(e); 582 583 // allow events within the message content 584 if (target.parents('div.' + opts.blockMsgClass).length > 0) 585 return true; 586 587 // allow events for content that is not being blocked 588 return target.parents().children().filter('div.blockUI').length === 0; 589 } 590 591 function focus(back) { 592 if (!pageBlockEls) 593 return; 594 var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; 595 if (e) 596 e.focus(); 597 } 598 599 function center(el, x, y) { 600 var p = el.parentNode, s = el.style; 601 var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); 602 var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); 603 if (x) s.left = l > 0 ? (l+'px') : '0'; 604 if (y) s.top = t > 0 ? (t+'px') : '0'; 605 } 606 607 function sz(el, p) { 608 return parseInt($.css(el,p),10)||0; 609 } 610 611 } 612 613 614 /*global define:true */ 615 if (typeof define === 'function' && define.amd && define.amd.jQuery) { 616 define(['jquery'], setup); 617 } else { 618 setup(jQuery); 619 } 620 621})(); 622/*! 623 * Copyright 2012, Chris Wanstrath 624 * Released under the MIT License 625 * https://github.com/defunkt/jquery-pjax 626 */ 627 628(function ($) { 629 630 // When called on a container with a selector, fetches the href with 631 // ajax into the container or with the data-pjax attribute on the link 632 // itself. 633 // 634 // Tries to make sure the back button and ctrl+click work the way 635 // you'd expect. 636 // 637 // Exported as $.fn.pjax 638 // 639 // Accepts a jQuery ajax options object that may include these 640 // pjax specific options: 641 // 642 // 643 // container - String selector for the element where to place the response body. 644 // push - Whether to pushState the URL. Defaults to true (of course). 645 // replace - Want to use replaceState instead? That's cool. 646 // 647 // For convenience the second parameter can be either the container or 648 // the options object. 649 // 650 // Returns the jQuery object 651 function fnPjax(selector, container, options) { 652 options = optionsFor(container, options) 653 return this.on('click.pjax', selector, function (event) { 654 var opts = options 655 if (!opts.container) { 656 opts = $.extend({}, options) 657 opts.container = $(this).attr('data-pjax') 658 } 659 handleClick(event, opts) 660 }) 661 } 662 663 // Public: pjax on click handler 664 // 665 // Exported as $.pjax.click. 666 // 667 // event - "click" jQuery.Event 668 // options - pjax options 669 // 670 // Examples 671 // 672 // $(document).on('click', 'a', $.pjax.click) 673 // // is the same as 674 // $(document).pjax('a') 675 // 676 // Returns nothing. 677 function handleClick(event, container, options) { 678 options = optionsFor(container, options) 679 680 var link = event.currentTarget 681 var $link = $(link) 682 683 if (link.tagName.toUpperCase() !== 'A') 684 throw "$.fn.pjax or $.pjax.click requires an anchor element" 685 686 // Middle click, cmd click, and ctrl click should open 687 // links in a new tab as normal. 688 if (event.which > 1 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) 689 return 690 691 // Ignore cross origin links 692 if (location.protocol !== link.protocol || location.hostname !== link.hostname) 693 return 694
vendor: 28,341 bytes, lines 695-1514
695 // Ignore case when a hash is being tacked on the current URL 696 if (link.href.indexOf('#') > -1 && stripHash(link) == stripHash(location)) 697 return 698 699 // Ignore event with default prevented 700 if (event.isDefaultPrevented()) 701 return 702 703 var defaults = { 704 url: link.href, 705 container: $link.attr('data-pjax'), 706 target: link 707 } 708 709 var opts = $.extend({}, defaults, options) 710 var clickEvent = $.Event('pjax:click') 711 $link.trigger(clickEvent, [opts]) 712 713 if (!clickEvent.isDefaultPrevented()) { 714 pjax(opts) 715 event.preventDefault() 716 $link.trigger('pjax:clicked', [opts]) 717 } 718 } 719 720 // Public: pjax on form submit handler 721 // 722 // Exported as $.pjax.submit 723 // 724 // event - "click" jQuery.Event 725 // options - pjax options 726 // 727 // Examples 728 // 729 // $(document).on('submit', 'form', function(event) { 730 // $.pjax.submit(event, '[data-pjax-container]') 731 // }) 732 // 733 // Returns nothing. 734 function handleSubmit(event, container, options) { 735 options = optionsFor(container, options) 736 737 var form = event.currentTarget 738 var $form = $(form) 739 740 if (form.tagName.toUpperCase() !== 'FORM') 741 throw "$.pjax.submit requires a form element" 742 743 var defaults = { 744 type: ($form.attr('method') || 'GET').toUpperCase(), 745 url: $form.attr('action'), 746 container: $form.attr('data-pjax'), 747 target: form 748 } 749 750 if (defaults.type !== 'GET' && window.FormData !== undefined) { 751 defaults.data = new FormData(form) 752 defaults.processData = false 753 defaults.contentType = false 754 } else { 755 // Can't handle file uploads, exit 756 if ($form.find(':file').length) { 757 return 758 } 759 760 // Fallback to manually serializing the fields 761 defaults.data = $form.serializeArray() 762 } 763 764 pjax($.extend({}, defaults, options)) 765 766 event.preventDefault() 767 } 768 769 // Loads a URL with ajax, puts the response body inside a container, 770 // then pushState()'s the loaded URL. 771 // 772 // Works just like $.ajax in that it accepts a jQuery ajax 773 // settings object (with keys like url, type, data, etc). 774 // 775 // Accepts these extra keys: 776 // 777 // container - String selector for where to stick the response body. 778 // push - Whether to pushState the URL. Defaults to true (of course). 779 // replace - Want to use replaceState instead? That's cool. 780 // 781 // Use it just like $.ajax: 782 // 783 // var xhr = $.pjax({ url: this.href, container: '#main' }) 784 // console.log( xhr.readyState ) 785 // 786 // Returns whatever $.ajax returns. 787 function pjax(options) { 788 options = $.extend(true, {}, $.ajaxSettings, pjax.defaults, options) 789 790 if ($.isFunction(options.url)) { 791 options.url = options.url() 792 } 793 794 var hash = parseURL(options.url).hash 795 796 var containerType = $.type(options.container) 797 if (containerType !== 'string') { 798 throw "expected string value for 'container' option; got " + containerType 799 } 800 var context = options.context = $(options.container) 801 if (!context.length) { 802 throw "the container selector '" + options.container + "' did not match anything" 803 } 804 805 // We want the browser to maintain two separate internal caches: one 806 // for pjax'd partial page loads and one for normal page loads. 807 // Without adding this secret parameter, some browsers will often 808 // confuse the two. 809 if (!options.data) options.data = {} 810 if ($.isArray(options.data)) { 811 options.data.push({ name: '_pjax', value: options.container }) 812 } else { 813 options.data._pjax = options.container 814 } 815 816 function fire(type, args, props) { 817 if (!props) props = {} 818 props.relatedTarget = options.target 819 var event = $.Event(type, props) 820 context.trigger(event, args) 821 return !event.isDefaultPrevented() 822 } 823 824 var timeoutTimer 825 826 options.beforeSend = function (xhr, settings) { 827 // No timeout for non-GET requests 828 // Its not safe to request the resource again with a fallback method. 829 if (settings.type !== 'GET') { 830 settings.timeout = 0 831 } 832 833 xhr.setRequestHeader('X-PJAX', 'true') 834 xhr.setRequestHeader('X-PJAX-Container', options.container) 835 836 if (!fire('pjax:beforeSend', [xhr, settings])) 837 return false 838 839 if (settings.timeout > 0) { 840 timeoutTimer = setTimeout(function () { 841 if (fire('pjax:timeout', [xhr, options])) 842 xhr.abort('timeout') 843 }, settings.timeout) 844 845 // Clear timeout setting so jquerys internal timeout isn't invoked 846 settings.timeout = 0 847 } 848 849 var url = parseURL(settings.url) 850 if (hash) url.hash = hash 851 options.requestUrl = stripInternalParams(url) 852 } 853 854 options.complete = function (xhr, textStatus) { 855 if (timeoutTimer) 856 clearTimeout(timeoutTimer) 857 858 fire('pjax:complete', [xhr, textStatus, options]) 859 860 fire('pjax:end', [xhr, options]) 861 } 862 863 options.error = function (xhr, textStatus, errorThrown) { 864 var container = extractContainer("", xhr, options) 865 866 var allowed = fire('pjax:error', [xhr, textStatus, errorThrown, options]) 867 if (options.type == 'GET' && textStatus !== 'abort' && allowed) { 868 locationReplace(container.url) 869 } 870 } 871 872 options.success = function (data, status, xhr) { 873 var previousState = pjax.state 874 875 // If $.pjax.defaults.version is a function, invoke it first. 876 // Otherwise it can be a static string. 877 var currentVersion = (typeof $.pjax.defaults.version === 'function') ? 878 $.pjax.defaults.version() : 879 $.pjax.defaults.version 880 881 var latestVersion = xhr.getResponseHeader('X-PJAX-Version') 882 883 var container = extractContainer(data, xhr, options) 884 885 var url = parseURL(container.url) 886 if (hash) { 887 url.hash = hash 888 container.url = url.href 889 } 890 891 // If there is a layout version mismatch, hard load the new url 892 if (currentVersion && latestVersion && currentVersion !== latestVersion) { 893 locationReplace(container.url) 894 return 895 } 896 897 // If the new response is missing a body, hard load the page 898 if (!container.contents) { 899 locationReplace(container.url) 900 return 901 } 902 903 pjax.state = { 904 id: options.id || uniqueId(), 905 url: container.url, 906 title: container.title, 907 container: options.container, 908 fragment: options.fragment, 909 timeout: options.timeout 910 } 911 912 if (options.push || options.replace) { 913 window.history.replaceState(pjax.state, container.title, container.url) 914 } 915 916 // Only blur the focus if the focused element is within the container. 917 var blurFocus = $.contains(options.container, document.activeElement) 918 919 // Clear out any focused controls before inserting new page contents. 920 if (blurFocus) { 921 try { 922 document.activeElement.blur() 923 } catch (e) { } 924 } 925 926 if (container.title) document.title = container.title 927 928 fire('pjax:beforeReplace', [container.contents, options], { 929 state: pjax.state, 930 previousState: previousState 931 }) 932 context.html(container.contents) 933 934 // FF bug: Won't autofocus fields that are inserted via JS. 935 // This behavior is incorrect. So if theres no current focus, autofocus 936 // the last field. 937 // 938 // http://www.w3.org/html/wg/drafts/html/master/forms.html 939 var autofocusEl = context.find('input[autofocus], textarea[autofocus]').last()[0] 940 if (autofocusEl && document.activeElement !== autofocusEl) { 941 autofocusEl.focus() 942 } 943 944 executeScriptTags(container.scripts) 945 946 var scrollTo = options.scrollTo 947 948 // Ensure browser scrolls to the element referenced by the URL anchor 949 if (hash) { 950 var name = decodeURIComponent(hash.slice(1)) 951 var target = document.getElementById(name) || document.getElementsByName(name)[0] 952 if (target) scrollTo = $(target).offset().top 953 } 954 955 if (typeof scrollTo == 'number') $(window).scrollTop(scrollTo) 956 957 fire('pjax:success', [data, status, xhr, options]) 958 } 959 960 961 // Initialize pjax.state for the initial page load. Assume we're 962 // using the container and options of the link we're loading for the 963 // back button to the initial page. This ensures good back button 964 // behavior. 965 if (!pjax.state) { 966 pjax.state = { 967 id: uniqueId(), 968 url: window.location.href, 969 title: document.title, 970 container: options.container, 971 fragment: options.fragment, 972 timeout: options.timeout 973 } 974 window.history.replaceState(pjax.state, document.title) 975 } 976 977 // Cancel the current request if we're already pjaxing 978 abortXHR(pjax.xhr) 979 980 pjax.options = options 981 var xhr = pjax.xhr = $.ajax(options) 982 983 if (xhr.readyState > 0) { 984 if (options.push && !options.replace) { 985 // Cache current container element before replacing it 986 cachePush(pjax.state.id, [options.container, cloneContents(context)]) 987 988 window.history.pushState(null, "", options.requestUrl) 989 } 990 991 fire('pjax:start', [xhr, options]) 992 fire('pjax:send', [xhr, options]) 993 } 994 995 return pjax.xhr 996 } 997 998 // Public: Reload current page with pjax. 999 // 1000 // Returns whatever $.pjax returns. 1001 function pjaxReload(container, options) { 1002 var defaults = { 1003 url: window.location.href, 1004 push: false, 1005 replace: true, 1006 scrollTo: false 1007 } 1008 1009 return pjax($.extend(defaults, optionsFor(container, options))) 1010 } 1011 1012 // Internal: Hard replace current state with url. 1013 // 1014 // Work for around WebKit 1015 // https://bugs.webkit.org/show_bug.cgi?id=93506 1016 // 1017 // Returns nothing. 1018 function locationReplace(url) { 1019 window.history.replaceState(null, "", pjax.state.url) 1020 window.location.replace(url) 1021 } 1022 1023 1024 var initialPop = true 1025 var initialURL = window.location.href 1026 var initialState = window.history.state 1027 1028 // Initialize $.pjax.state if possible 1029 // Happens when reloading a page and coming forward from a different 1030 // session history. 1031 if (initialState && initialState.container) { 1032 pjax.state = initialState 1033 } 1034 1035 // Non-webkit browsers don't fire an initial popstate event 1036 if ('state' in window.history) { 1037 initialPop = false 1038 } 1039 1040 // popstate handler takes care of the back and forward buttons 1041 // 1042 // You probably shouldn't use pjax on pages with other pushState 1043 // stuff yet. 1044 function onPjaxPopstate(event) { 1045 1046 // Hitting back or forward should override any pending PJAX request. 1047 if (!initialPop) { 1048 abortXHR(pjax.xhr) 1049 } 1050 1051 var previousState = pjax.state 1052 var state = event.state 1053 var direction 1054 1055 if (state && state.container) { 1056 // When coming forward from a separate history session, will get an 1057 // initial pop with a state we are already at. Skip reloading the current 1058 // page. 1059 if (initialPop && initialURL == state.url) return 1060 1061 if (previousState) { 1062 // If popping back to the same state, just skip. 1063 // Could be clicking back from hashchange rather than a pushState. 1064 if (previousState.id === state.id) return 1065 1066 // Since state IDs always increase, we can deduce the navigation direction 1067 direction = previousState.id < state.id ? 'forward' : 'back' 1068 } 1069 1070 var cache = cacheMapping[state.id] || [] 1071 var containerSelector = cache[0] || state.container 1072 var container = $(containerSelector), contents = cache[1] 1073 1074 if (container.length) { 1075 if (previousState) { 1076 // Cache current container before replacement and inform the 1077 // cache which direction the history shifted. 1078 cachePop(direction, previousState.id, [containerSelector, cloneContents(container)]) 1079 } 1080 1081 var popstateEvent = $.Event('pjax:popstate', { 1082 state: state, 1083 direction: direction 1084 }) 1085 container.trigger(popstateEvent) 1086 1087 var options = { 1088 id: state.id, 1089 url: state.url, 1090 container: containerSelector, 1091 push: false, 1092 fragment: state.fragment, 1093 timeout: state.timeout, 1094 scrollTo: false 1095 } 1096 1097 if (contents) { 1098 container.trigger('pjax:start', [null, options]) 1099 1100 pjax.state = state 1101 if (state.title) document.title = state.title 1102 var beforeReplaceEvent = $.Event('pjax:beforeReplace', { 1103 state: state, 1104 previousState: previousState 1105 }) 1106 container.trigger(beforeReplaceEvent, [contents, options]) 1107 container.html(contents) 1108 1109 container.trigger('pjax:end', [null, options]) 1110 } else { 1111 pjax(options) 1112 } 1113 1114 // Force reflow/relayout before the browser tries to restore the 1115 // scroll position. 1116 container[0].offsetHeight 1117 } else { 1118 locationReplace(location.href) 1119 } 1120 } 1121 initialPop = false 1122 } 1123 1124 // Fallback version of main pjax function for browsers that don't 1125 // support pushState. 1126 // 1127 // Returns nothing since it retriggers a hard form submission. 1128 function fallbackPjax(options) { 1129 var url = $.isFunction(options.url) ? options.url() : options.url, 1130 method = options.type ? options.type.toUpperCase() : 'GET' 1131 1132 var form = $('<form>', { 1133 method: method === 'GET' ? 'GET' : 'POST', 1134 action: url, 1135 style: 'display:none' 1136 }) 1137 1138 if (method !== 'GET' && method !== 'POST') { 1139 form.append($('<input>', { 1140 type: 'hidden', 1141 name: '_method', 1142 value: method.toLowerCase() 1143 })) 1144 } 1145 1146 var data = options.data 1147 if (typeof data === 'string') { 1148 $.each(data.split('&'), function (index, value) { 1149 var pair = value.split('=') 1150 form.append($('<input>', { type: 'hidden', name: pair[0], value: pair[1] })) 1151 }) 1152 } else if ($.isArray(data)) { 1153 $.each(data, function (index, value) { 1154 form.append($('<input>', { type: 'hidden', name: value.name, value: value.value })) 1155 }) 1156 } else if (typeof data === 'object') { 1157 var key 1158 for (key in data) 1159 form.append($('<input>', { type: 'hidden', name: key, value: data[key] })) 1160 } 1161 1162 $(document.body).append(form) 1163 form.submit() 1164 } 1165 1166 // Internal: Abort an XmlHttpRequest if it hasn't been completed, 1167 // also removing its event handlers. 1168 function abortXHR(xhr) { 1169 if (xhr && xhr.readyState < 4) { 1170 xhr.onreadystatechange = $.noop 1171 xhr.abort() 1172 } 1173 } 1174 1175 // Internal: Generate unique id for state object. 1176 // 1177 // Use a timestamp instead of a counter since ids should still be 1178 // unique across page loads. 1179 // 1180 // Returns Number. 1181 function uniqueId() { 1182 return (new Date).getTime() 1183 } 1184 1185 function cloneContents(container) { 1186 var cloned = container.clone() 1187 // Unmark script tags as already being eval'd so they can get executed again 1188 // when restored from cache. HAXX: Uses jQuery internal method. 1189 cloned.find('script').each(function () { 1190 if (!this.src) jQuery._data(this, 'globalEval', false) 1191 }) 1192 return cloned.contents() 1193 } 1194 1195 // Internal: Strip internal query params from parsed URL. 1196 // 1197 // Returns sanitized url.href String. 1198 function stripInternalParams(url) { 1199 url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '') 1200 return url.href.replace(/\?($|#)/, '$1') 1201 } 1202 1203 // Internal: Parse URL components and returns a Locationish object. 1204 // 1205 // url - String URL 1206 // 1207 // Returns HTMLAnchorElement that acts like Location. 1208 function parseURL(url) { 1209 var a = document.createElement('a') 1210 a.href = url 1211 return a 1212 } 1213 1214 // Internal: Return the `href` component of given URL object with the hash 1215 // portion removed. 1216 // 1217 // location - Location or HTMLAnchorElement 1218 // 1219 // Returns String 1220 function stripHash(location) { 1221 return location.href.replace(/#.*/, '') 1222 } 1223 1224 // Internal: Build options Object for arguments. 1225 // 1226 // For convenience the first parameter can be either the container or 1227 // the options object. 1228 // 1229 // Examples 1230 // 1231 // optionsFor('#container') 1232 // // => {container: '#container'} 1233 // 1234 // optionsFor('#container', {push: true}) 1235 // // => {container: '#container', push: true} 1236 // 1237 // optionsFor({container: '#container', push: true}) 1238 // // => {container: '#container', push: true} 1239 // 1240 // Returns options Object. 1241 function optionsFor(container, options) { 1242 if (container && options) { 1243 options = $.extend({}, options) 1244 options.container = container 1245 return options 1246 } else if ($.isPlainObject(container)) { 1247 return container 1248 } else { 1249 return { container: container } 1250 } 1251 } 1252 1253 // Internal: Filter and find all elements matching the selector. 1254 // 1255 // Where $.fn.find only matches descendants, findAll will test all the 1256 // top level elements in the jQuery object as well. 1257 // 1258 // elems - jQuery object of Elements 1259 // selector - String selector to match 1260 // 1261 // Returns a jQuery object. 1262 function findAll(elems, selector) { 1263 return elems.filter(selector).add(elems.find(selector)) 1264 } 1265 1266 function parseHTML(html) { 1267 return $.parseHTML(html, document, true) 1268 } 1269 1270 // Internal: Extracts container and metadata from response. 1271 // 1272 // 1. Extracts X-PJAX-URL header if set 1273 // 2. Extracts inline <title> tags 1274 // 3. Builds response Element and extracts fragment if set 1275 // 1276 // data - String response data 1277 // xhr - XHR response 1278 // options - pjax options Object 1279 // 1280 // Returns an Object with url, title, and contents keys. 1281 function extractContainer(data, xhr, options) { 1282 var obj = {}, fullDocument = /<html/i.test(data) 1283 1284 // Prefer X-PJAX-URL header if it was set, otherwise fallback to 1285 // using the original requested url. 1286 var serverUrl = xhr.getResponseHeader('X-PJAX-URL') 1287 obj.url = serverUrl ? stripInternalParams(parseURL(serverUrl)) : options.requestUrl 1288 1289 // Attempt to parse response html into elements 1290 if (fullDocument) { 1291 var $head = $(parseHTML(data.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])) 1292 var $body = $(parseHTML(data.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0])) 1293 } else { 1294 var $head = $body = $(parseHTML(data)) 1295 } 1296 1297 // If response data is empty, return fast 1298 if ($body.length === 0) 1299 return obj 1300 1301 // If there's a <title> tag in the header, use it as 1302 // the page's title. 1303 obj.title = findAll($head, 'title').last().text() 1304 1305 if (options.fragment) { 1306 // If they specified a fragment, look for it in the response 1307 // and pull it out. 1308 if (options.fragment === 'body') { 1309 var $fragment = $body 1310 } else { 1311 var $fragment = findAll($body, options.fragment).first() 1312 } 1313 1314 if ($fragment.length) { 1315 obj.contents = options.fragment === 'body' ? $fragment : $fragment.contents() 1316 1317 // If there's no title, look for data-title and title attributes 1318 // on the fragment 1319 if (!obj.title) 1320 obj.title = $fragment.attr('title') || $fragment.data('title') 1321 } 1322 1323 } else if (!fullDocument) { 1324 obj.contents = $body 1325 } 1326 1327 // Clean up any <title> tags 1328 if (obj.contents) { 1329 // Remove any parent title elements 1330 obj.contents = obj.contents.not(function () { return $(this).is('title') }) 1331 1332 // Then scrub any titles from their descendants 1333 obj.contents.find('title').remove() 1334 1335 // Gather all script[src] elements 1336 obj.scripts = findAll(obj.contents, 'script[src]').remove() 1337 obj.contents = obj.contents.not(obj.scripts) 1338 } 1339 1340 // Trim any whitespace off the title 1341 if (obj.title) obj.title = $.trim(obj.title) 1342 1343 return obj 1344 } 1345 1346 // Load an execute scripts using standard script request. 1347 // 1348 // Avoids jQuery's traditional $.getScript which does a XHR request and 1349 // globalEval. 1350 // 1351 // scripts - jQuery object of script Elements 1352 // 1353 // Returns nothing. 1354 function executeScriptTags(scripts) { 1355 if (!scripts) return 1356 1357 var existingScripts = $('script[src]') 1358 1359 scripts.each(function () { 1360 var src = this.src 1361 var matchedScripts = existingScripts.filter(function () { 1362 return this.src === src 1363 }) 1364 if (matchedScripts.length) return 1365 1366 var script = document.createElement('script') 1367 var type = $(this).attr('type') 1368 if (type) script.type = type 1369 script.src = $(this).attr('src') 1370 document.head.appendChild(script) 1371 }) 1372 } 1373 1374 // Internal: History DOM caching class. 1375 var cacheMapping = {} 1376 var cacheForwardStack = [] 1377 var cacheBackStack = [] 1378 1379 // Push previous state id and container contents into the history 1380 // cache. Should be called in conjunction with `pushState` to save the 1381 // previous container contents. 1382 // 1383 // id - State ID Number 1384 // value - DOM Element to cache 1385 // 1386 // Returns nothing. 1387 function cachePush(id, value) { 1388 cacheMapping[id] = value 1389 cacheBackStack.push(id) 1390 1391 // Remove all entries in forward history stack after pushing a new page. 1392 trimCacheStack(cacheForwardStack, 0) 1393 1394 // Trim back history stack to max cache length. 1395 trimCacheStack(cacheBackStack, pjax.defaults.maxCacheLength) 1396 } 1397 1398 // Shifts cache from directional history cache. Should be 1399 // called on `popstate` with the previous state id and container 1400 // contents. 1401 // 1402 // direction - "forward" or "back" String 1403 // id - State ID Number 1404 // value - DOM Element to cache 1405 // 1406 // Returns nothing. 1407 function cachePop(direction, id, value) { 1408 var pushStack, popStack 1409 cacheMapping[id] = value 1410 1411 if (direction === 'forward') { 1412 pushStack = cacheBackStack 1413 popStack = cacheForwardStack 1414 } else { 1415 pushStack = cacheForwardStack 1416 popStack = cacheBackStack 1417 } 1418 1419 pushStack.push(id) 1420 if (id = popStack.pop()) 1421 delete cacheMapping[id] 1422 1423 // Trim whichever stack we just pushed to to max cache length. 1424 trimCacheStack(pushStack, pjax.defaults.maxCacheLength) 1425 } 1426 1427 // Trim a cache stack (either cacheBackStack or cacheForwardStack) to be no 1428 // longer than the specified length, deleting cached DOM elements as necessary. 1429 // 1430 // stack - Array of state IDs 1431 // length - Maximum length to trim to 1432 // 1433 // Returns nothing. 1434 function trimCacheStack(stack, length) { 1435 while (stack.length > length) 1436 delete cacheMapping[stack.shift()] 1437 } 1438 1439 // Public: Find version identifier for the initial page load. 1440 // 1441 // Returns String version or undefined. 1442 function findVersion() { 1443 return $('meta').filter(function () { 1444 var name = $(this).attr('http-equiv') 1445 return name && name.toUpperCase() === 'X-PJAX-VERSION' 1446 }).attr('content') 1447 } 1448 1449 // Install pjax functions on $.pjax to enable pushState behavior. 1450 // 1451 // Does nothing if already enabled. 1452 // 1453 // Examples 1454 // 1455 // $.pjax.enable() 1456 // 1457 // Returns nothing. 1458 function enable() { 1459 $.fn.pjax = fnPjax 1460 $.pjax = pjax 1461 $.pjax.enable = $.noop 1462 $.pjax.disable = disable 1463 $.pjax.click = handleClick 1464 $.pjax.submit = handleSubmit 1465 $.pjax.reload = pjaxReload 1466 $.pjax.defaults = { 1467 timeout: 650, 1468 push: true, 1469 replace: false, 1470 type: 'GET', 1471 dataType: 'html', 1472 scrollTo: 0, 1473 maxCacheLength: 20, 1474 version: findVersion 1475 } 1476 $(window).on('popstate.pjax', onPjaxPopstate) 1477 } 1478 1479 // Disable pushState behavior. 1480 // 1481 // This is the case when a browser doesn't support pushState. It is 1482 // sometimes useful to disable pushState for debugging on a modern 1483 // browser. 1484 // 1485 // Examples 1486 // 1487 // $.pjax.disable() 1488 // 1489 // Returns nothing. 1490 function disable() { 1491 $.fn.pjax = function () { return this } 1492 $.pjax = fallbackPjax 1493 $.pjax.enable = enable 1494 $.pjax.disable = $.noop 1495 $.pjax.click = $.noop 1496 $.pjax.submit = $.noop 1497 $.pjax.reload = function () { window.location.reload() } 1498 1499 $(window).off('popstate.pjax', onPjaxPopstate) 1500 } 1501 1502 1503 // Add the state property to jQuery's event object so we can use it in 1504 // $(window).bind('popstate') 1505 if ($.event.props && $.inArray('state', $.event.props) < 0) { 1506 $.event.props.push('state') 1507 } else if (!('state' in $.Event.prototype)) { 1508 $.event.addProp('state') 1509 } 1510 1511 // Is pjax supported by this browser? 1512 $.support.pjax = 1513 window.history && window.history.pushState && window.history.replaceState && 1514 // pushState isn't reliable on iOS until 5.
vendor: 4,750 bytes, lines 1515-1521
1515 !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/) 1516 1517 $.support.pjax ? enable() : disable() 1518 1519})(jQuery); 1520/*! selectize.js - v0.12.4 | https://github.com/selectize/selectize.js | Apache License (v2) */ 1521!function(a,b){"function"==typeof define&&define.amd?define("sifter",b):"object"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(a=e(String(a||"").toLowerCase()),!a||!a.length)return[];var b,c,d,g,i=[],j=a.split(/ +/);for(b=0,c=j.length;b<c;b++){if(d=f(j[b]),this.settings.diacritics)for(g in h)h.hasOwnProperty(g)&&(d=d.replace(new RegExp(g,"g"),h[g]));i.push({string:j[b],regex:new RegExp(d,"i")})}return i},a.prototype.iterator=function(a,b){var c;c=g(a)?Array.prototype.forEach||function(a){for(var b=0,c=this.length;b<c;b++)a(this[b],b,this)}:function(a){for(var b in this)this.hasOwnProperty(b)&&a(this[b],b,this)},c.apply(a,[b])},a.prototype.getScoreFunction=function(a,b){var c,e,f,g,h;c=this,a=c.prepareSearch(a,b),f=a.tokens,e=a.options.fields,g=f.length,h=a.options.nesting;var i=function(a,b){var c,d;return a?(a=String(a||""),d=a.search(b.regex),d===-1?0:(c=b.string.length/a.length,0===d&&(c+=.5),c)):0},j=function(){var a=e.length;return a?1===a?function(a,b){return i(d(b,e[0],h),a)}:function(b,c){for(var f=0,g=0;f<a;f++)g+=i(d(c,e[f],h),b);return g/a}:function(){return 0}}();return g?1===g?function(a){return j(f[0],a)}:"and"===a.options.conjunction?function(a){for(var b,c=0,d=0;c<g;c++){if(b=j(f[c],a),b<=0)return 0;d+=b}return d/g}:function(a){for(var b=0,c=0;b<g;b++)c+=j(f[b],a);return c/g}:function(){return 0}},a.prototype.getSortFunction=function(a,c){var e,f,g,h,i,j,k,l,m,n,o;if(g=this,a=g.prepareSearch(a,c),o=!a.query&&c.sort_empty||c.sort,m=function(a,b){return"$score"===a?b.score:d(g.items[b.id],a,c.nesting)},i=[],o)for(e=0,f=o.length;e<f;e++)(a.query||"$score"!==o[e].field)&&i.push(o[e]);if(a.query){for(n=!0,e=0,f=i.length;e<f;e++)if("$score"===i[e].field){n=!1;break}n&&i.unshift({field:"$score",direction:"desc"})}else for(e=0,f=i.length;e<f;e++)if("$score"===i[e].field){i.splice(e,1);break}for(l=[],e=0,f=i.length;e<f;e++)l.push("desc"===i[e].direction?-1:1);return j=i.length,j?1===j?(h=i[0].field,k=l[0],function(a,c){return k*b(m(h,a),m(h,c))}):function(a,c){var d,e,f;for(d=0;d<j;d++)if(f=i[d].field,e=l[d]*b(m(f,a),m(f,c)))return e;return 0}:null},a.prototype.prepareSearch=function(a,b){if("object"==typeof a)return a;b=c({},b);var d=b.fields,e=b.sort,f=b.sort_empty;return d&&!g(d)&&(b.fields=[d]),e&&!g(e)&&(b.sort=[e]),f&&!g(f)&&(b.sort_empty=[f]),{options:b,query:String(a||"").toLowerCase(),tokens:this.tokenize(a),total:0,items:[]}},a.prototype.search=function(a,b){var c,d,e,f,g=this;return d=this.prepareSearch(a,b),b=d.options,a=d.query,f=b.score||g.getScoreFunction(d),a.length?g.iterator(g.items,function(a,e){c=f(a),(b.filter===!1||c>0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:a<b?-1:0:(a=i(String(a||"")),b=i(String(b||"")),a>b?1:b>a?-1:0)},c=function(a,b){var c,d,e,f;for(c=1,d=arguments.length;c<d;c++)if(f=arguments[c])for(e in f)f.hasOwnProperty(e)&&(a[e]=f[e]);return a},d=function(a,b,c){if(a&&b){if(!c)return a[b];for(var d=b.split(".");d.length&&(a=a[d.shift()]););return a}},e=function(a){return(a+"").replace(/^\s+|\s+$|/g,"")},f=function(a){return(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},g=Array.isArray||"undefined"!=typeof $&&$.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},h={a:"[aá¸á¸ÄÄÃâÇÇȺⱥȦȧẠạÃäÃà ÃáÄÄÃÃ£Ã Ã¥Ä ÄÃÄ Ä]",b:"[bâ¢Î²ÎB฿ðá]",c:"[cÄÄÄÄÄÄÄÄCÌcÌÃçá¸á¸È»È¼ÆÆÉá´ï¼£ï½]",d:"[dÄÄá¸á¸á¸á¸á¸á¸á¸á¸á¸á¸ÄÄD̦d̦ÆÉÆÉÆÆáµá¶á¶È¡á´ Dï½Ã°]",e:"[eÃéÃèÃêá¸á¸ÄÄÄÄẼẽá¸á¸áººáº»ÄÄÃëÄÄȨȩÄÄá¶ÉÉÈÈ áº¾áº¿á»á»á»á» á»á»á¸á¸á¸á¸á¸á¸ÈÈẸẹá»á»â±¸á´ï¼¥ï½ ÉÇÆÆÎµ]",f:"[fÆÆá¸á¸]",g:"[gÉ¢â²Ç¤Ç¥ÄÄÄÄĢģÆÉ Ä Ä¡]",h:"[hĤĥĦħḨḩáºáºá¸¤á¸¥á¸¢á¸£É¦Ê°Ç¶Æ]",i:"[iÃÃÃìĬÄÃîÇÇÃïḮḯĨĩĮįĪīá»á»ÈÈÈÈá»á»á¸¬á¸ÆÉ¨É¨Ìáµ»á¶Ä°iIıɪIï½]",j:"[jȷĴĵÉÉÊÉʲ]",k:"[kÆÆêêḰḱǨǩḲḳḴḵκϰâ]",l:"[lÅÅĽľĻļĹĺḶḷḸḹḼḽḺḻĿÅȽÆâ± ⱡⱢɫɬᶠÉÈ´ÊLï½]",n:"[nÅÅǸǹÅÅÃñá¹á¹ Å Åá¹á¹á¹á¹á¹á¹NÌnÌÆÉ²È Æáµ°á¶É³ÈµÉ´ï¼®ï½ÅÅ]",o:"[oÃøÃöÃóÃòÃôÇÇÅÅÅÅȮȯá»á»ÆÉµÆ Æ¡á»á»ÅÅ
1521ÃõǪǫÈÈÕÖ
]",p:"[pá¹á¹á¹á¹â±£áµ½Æ¤Æ¥áµ±]",q:"[qêêÊ ÉÉêêqÌ]",r:"[rÅÅÉÉÅÅÅÅá¹á¹ÈÈÈÈá¹á¹â±¤É½]",s:"[sÅÅṠṡṢṣê¨ê©ÅÅÅ Å¡ÅÅÈÈSÌsÌ]",t:"[tÅ¤Å¥á¹ªá¹«Å¢Å£á¹¬á¹Æ®ÊÈÈṰṱṮṯƬÆ]",u:"[uŬÅÉÊỤụÃüÃúÃùÃûÇÇŰűŬů¯Æ°á»¦á»§ÅªÅ«Å¨Å©Å²Å³ÈÈâª]",v:"[vṼṽṾṿƲÊêêâ±±Ê]",w:"[wáºáºáºáºÅ´Åµáºáº
áºáºáºáº]",x:"[xáºáºáºáºÏ]",y:"[yÃýỲỳŶŷŸÿỸỹáºáºá»´á»µÉÉÆ³Æ´]",z:"[zŹźáºáºÅ½Å¾Å»Å¼áºáºáºáºÆµÆ¶]"},i=function(){var a,b,c,d,e="",f={};for(c in h)if(h.hasOwnProperty(c))for(d=h[c].substring(2,h[c].length-1),e+=d,a=0,b=d.length;a<b;a++)f[d.charAt(a)]=c;var g=new RegExp("["+e+"]","g");return function(a){return a.replace(g,function(a){return f[a]}).toLowerCase()}}();return a}),function(a,b){"function"==typeof define&&define.amd?define("microplugin",b):"object"==typeof exports?module.exports=b():a.MicroPlugin=b()}(this,function(){var a={};a.mixin=function(a){a.plugins={},a.prototype.initializePlugins=function(a){var c,d,e,f=this,g=[];if(f.plugins={names:[],settings:{},requested:{},loaded:{}},b.isArray(a))for(c=0,d=a.length;c<d;c++)"string"==typeof a[c]?g.push(a[c]):(f.plugins.settings[a[c].name]=a[c].options,g.push(a[c].name));else if(a)for(e in a)a.hasOwnProperty(e)&&(f.plugins.settings[e]=a[e],g.push(e));for(;g.length;)f.require(g.shift())},a.prototype.loadPlugin=function(b){var c=this,d=c.plugins,e=a.plugins[b];if(!a.plugins.hasOwnProperty(b))throw new Error('Unable to find "'+b+'" plugin');d.requested[b]=!0,d.loaded[b]=e.fn.apply(c,[c.plugins.settings[b]||{}]),d.names.push(b)},a.prototype.require=function(a){var b=this,c=b.plugins;if(!b.plugins.loaded.hasOwnProperty(a)){if(c.requested[a])throw new Error('Plugin has circular dependency ("'+a+'")');b.loadPlugin(a)}return c.loaded[a]},a.define=function(b,c){a.plugins[b]={name:b,fn:c}}};var b={isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}};return a}),function(a,b){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],b):"object"==typeof exports?module.exports=b(require("jquery"),require("sifter"),require("microplugin")):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){"use strict";var d=function(a,b){if("string"!=typeof b||b.length){var c="string"==typeof b?new RegExp(b,"i"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(var j=0;j<a.childNodes.length;++j)j+=d(a.childNodes[j]);return b};return a.each(function(){d(this)})}};a.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var a=this.parentNode;a.replaceChild(this.firstChild,this),a.normalize()}).end()};var e=function(){};e.prototype={on:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},off:function(a,b){var c=arguments.length;return 0===c?delete this._events:1===c?delete this._events[a]:(this._events=this._events||{},void(a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)))},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;b<this._events[a].length;b++)this._events[a][b].apply(this,Array.prototype.slice.call(arguments,1))}},e.mixin=function(a){for(var b=["on","off","trigger"],c=0;c<b.length;c++)a.prototype[b[c]]=e.prototype[b[c]]};var f=/Mac/.test(navigator.userAgent),g=65,h=13,i=27,j=37,k=38,l=80,m=39,n=40,o=78,p=8,q=46,r=16,s=f?91:17,t=f?18:17,u=9,v=1,w=2,x=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("input").validity,y=function(a){return"undefined"!=typeof a},z=function(a){return"undefined"==typeof a||null===a?null:"boolean"==typeof a?a?"1":"0":a+""},A=function(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},B={};B.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},B.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var C=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},D=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},E=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];return b.indexOf(c)===-1?e.apply(a,arguments):void(f[c]=arguments)},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},F=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},G=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},H=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d<e;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},I=function(b,c){if(!b)return 0;var d=a("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(b).appendTo("body");H(c,d,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var e=d.width();return d.remove(),e},J=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||a.data("grow")!==!1)&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=97&&f<=122||f>=65&&f<=90||f>
vendor: 8,356 bytes, line 1521
1521=48&&f<=57||32===f,f===q||f===p?(l=G(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):f===p&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):f===q&&"undefined"!=typeof l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),i=I(e,a)+4,i!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},K=function(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML},L=function(a,b){b||(b={});var c="Selectize";console.error(c+": "+a),b.explanation&&(console.group&&console.group(),console.error(b.explanation),console.group&&console.groupEnd())},M=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?v:w,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++M.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:D(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e<f;e++)i.registerOption(i.settings.options[e]);delete i.settings.options}if(i.settings.optgroups){for(e=0,f=i.settings.optgroups.length;e<f;e++)i.registerOptionGroup(i.settings.optgroups[e]);delete i.settings.optgroups}i.settings.mode=i.settings.mode||(1===i.settings.maxItems?"single":"multi"),"boolean"!=typeof i.settings.hideSelected&&(i.settings.hideSelected="multi"===i.settings.mode),i.initializePlugins(i.settings.plugins),i.setupCallbacks(),i.setupTemplates(),i.setup()};return e.mixin(M),"undefined"!=typeof c?c.mixin(M):L("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),a.extend(M.prototype,{setup:function(){var b,c,d,e,g,h,i,j,k,l,m=this,n=m.settings,o=m.eventNS,p=a(window),q=a(document),u=m.$input;if(i=m.settings.mode,j=u.attr("class")||"",b=a("<div>").addClass(n.wrapperClass).addClass(j).addClass(i),c=a("<div>").addClass(n.inputClass).addClass("items").appendTo(b),d=a('<input type="text" autocomplete="off" />').appendTo(c).attr("tabindex",u.is(":disabled")?"-1":m.tabIndex),h=a(n.dropdownParent||b),e=a("<div>").addClass(n.dropdownClass).addClass(i).hide().appendTo(h),g=a("<div>").addClass(n.dropdownContentClass).appendTo(e),(l=u.attr("id"))&&(d.attr("id",l+"-selectized"),a("label[for='"+l+"']").attr("for",l+"-selectized")),m.settings.copyClassesToDropdown&&e.addClass(j),b.css({width:u[0].style.width}),m.plugins.names.length&&(k="plugin-"+m.plugins.names.join(" plugin-"),b.addClass(k),e.addClass(k)),(null===n.maxItems||n.maxItems>1)&&m.tagType===v&&u.attr("multiple","multiple"),m.settings.placeholder&&d.attr("placeholder",n.placeholder),!m.settings.splitOn&&m.settings.delimiter){var w=m.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");m.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}u.attr("autocorrect")&&d.attr("autocorrect",u.attr("autocorrect")),u.attr("autocapitalize")&&d.attr("autocapitalize",u.attr("autocapitalize")),m.$wrapper=b,m.$control=c,m.$control_input=d,m.$dropdown=e,m.$dropdown_content=g,e.on("mouseenter","[data-selectable]",function(){return m.onOptionHover.apply(m,arguments)}),e.on("mousedown click","[data-selectable]",function(){return m.onOptionSelect.apply(m,arguments)}),F(c,"mousedown","*:not(input)",function(){return m.onItemSelect.apply(m,arguments)}),J(d),c.on({mousedown:function(){return m.onMouseDown.apply(m,arguments)},click:function(){return m.onClick.apply(m,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return m.onKeyDown.apply(m,arguments)},keyup:function(){return m.onKeyUp.apply(m,arguments)},keypress:function(){return m.onKeyPress.apply(m,arguments)},resize:function(){m.positionDropdown.apply(m,[])},blur:function(){return m.onBlur.apply(m,arguments)},focus:function(){return m.ignoreBlur=!1,m.onFocus.apply(m,arguments)},paste:function(){return m.onPaste.apply(m,arguments)}}),q.on("keydown"+o,function(a){m.isCmdDown=a[f?"metaKey":"ctrlKey"],m.isCtrlDown=a[f?"altKey":"ctrlKey"],m.isShiftDown=a.shiftKey}),q.on("keyup"+o,function(a){a.keyCode===t&&(m.isCtrlDown=!1),a.keyCode===r&&(m.isShiftDown=!1),a.keyCode===s&&(m.isCmdDown=!1)}),q.on("mousedown"+o,function(a){if(m.isFocused){if(a.target===m.$dropdown[0]||a.target.parentNode===m.$dropdown[0])return!1;m.$control.has(a.target).length||a.target===m.$control[0]||m.blur(a.target)}}),p.on(["scroll"+o,"resize"+o].join(" "),function(){m.isOpen&&m.positionDropdown.apply(m,arguments)}),p.on("mousemove"+o,function(){m.ignoreHover=!1}),this.revertSettings={$children:u.children().detach(),tabindex:u.attr("tabindex")},u.attr("tabindex",-1).hide().after(m.$wrapper),a.isArray(n.items)&&(m.setValue(n.items),delete n.items),x&&u.on("invalid"+o,function(a){a.preventDefault(),m.isInvalid=!0,m.refreshState()}),m.updateOriginalInput(),m.refreshItems(),m.refreshState(),m.updatePlaceholder(),m.isSetup=!0,u.is(":disabled")&&m.disable(),m.on("change",this.onChange),u.data("selectize",m),u.addClass("selectized"),m.trigger("initialize"),n.preload===!0&&m.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'<div class="optgroup">'+a.html+"</div>"},optgroup_header:function(a,b){return'<div class="optgroup-header">'+b(a[d])+"</div>"},option:function(a,b){return'<div class="option">'+b(a[c])+"</div>"},item:function(a,b){return'<div class="item">'+b(a[c])+"</div>"},option_create:function(a,b){return'<div class="create">Add <strong>'+b(a.input)+"</strong>…</div>"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]],b&&this.on(a,b))},onClick:function(a){var b=this;b.isFocused||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;return c.isFull()||c.isInputHidden||c.isLocked?void b.preventDefault():void(c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;e<f;e++)c.createItem(d[e])},0))},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&"multi"===this.settings.mode&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){var b=(a.target===this.$control_input[0],this);if(b.isLocked)return void(a.keyCode!==u&&a.preventDefault());switch(a.keyCode){case g:if(b.isCmdDown)return void b.selectAll();break;case i:return void(b.isOpen&&(a.preventDefault(),a.stopPropagation(),b.close()));case o:if(!a.ctrlKey||a.altKey)break;case n:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);
1521c.length&&b.setActiveOption(c,!0,!0)}return void a.preventDefault();case l:if(!a.ctrlKey||a.altKey)break;case k:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return void a.preventDefault();case h:return void(b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault()));case j:return void b.advanceSelection(-1,a);case m:return void b.advanceSelection(1,a);case u:return b.settings.selectOnTab&&b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),b.isFull()||a.preventDefault()),void(b.settings.create&&b.createItem()&&a.preventDefault());case p:case q:return void b.deleteSelection(a)}return!b.isFull()&&!b.isInputHidden||(f?a.metaKey:a.ctrlKey)?void 0:void a.preventDefault()},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||"";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger("type",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this,c=b.isFocused;return b.isDisabled?(b.blur(),a&&a.preventDefault(),!1):void(b.ignoreFocus||(b.isFocused=!0,"focus"===b.settings.preload&&b.onSearchChange(""),c||b.trigger("focus"),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState()))},onBlur:function(a,b){var c=this;if(c.isFocused&&(c.isFocused=!1,!c.ignoreFocus)){if(!c.ignoreBlur&&document.activeElement===c.$dropdown_content[0])return c.ignoreBlur=!0,void c.onFocus(a);var d=function(){c.close(),c.setTextboxValue(""),c.setActiveItem(null),c.setActiveOption(null),c.setCaret(c.items.length),c.refreshState(),b&&b.focus&&b.focus(),c.ignoreFocus=!1,c.trigger("blur")};c.ignoreFocus=!0,c.settings.create&&c.settings.createOnBlur?c.createItem(null,!1,d):d()}},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass("create")?e.createItem(null,function(){e.settings.closeAfterSelect&&e.close()}):(c=d.attr("data-value"),"undefined"!=typeof c&&(e.lastQuery=null,e.setTextboxValue(""),e.addItem(c),e.settings.closeAfterSelect?e.close():!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c))))},onItemSelect:function(a){var b=this;b.isLocked||"multi"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass(b.settings.loadingClass);b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass(b.settings.loadingClass),b.trigger("load",a)}])},setTextboxValue:function(a){var b=this.$control_input,c=b.val()!==a;c&&(b.val(a).triggerHandler("update"),this.lastValue=a)},getValue:function(){return this.tagType===v&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(a,b){var c=b?[]:["change"];E(this,c,function(){this.clear(b),this.addItems(a,b)})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if("single"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass("active"),l.$activeItems=[],void(l.isFocused&&l.showInput());if(d=c&&c.type.toLowerCase(),"mousedown"===d&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(".active:last"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],l.$activeItems.indexOf(i)===-1&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}}
vendor: 19,571 bytes, lines 1521-1522
1521,setActiveOption:function(b,c,d){var e,f,g,h,i,j=this;j.$activeOption&&j.$activeOption.removeClass("active"),j.$activeOption=null,b=a(b),b.length&&(j.$activeOption=b.addClass("active"),!c&&y(c)||(e=j.$dropdown_content.height(),f=j.$activeOption.outerHeight(!0),c=j.$dropdown_content.scrollTop()||0,g=j.$activeOption.offset().top-j.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?j.$dropdown_content.stop().animate({scrollTop:i},d?j.settings.scrollDuration:0):g<c&&j.$dropdown_content.stop().animate({scrollTop:h},d?j.settings.scrollDuration:0)))},selectAll:function(){var a=this;"single"!==a.settings.mode&&(a.$activeItems=Array.prototype.slice.apply(a.$control.children(":not(input)").addClass("active")),a.$activeItems.length&&(a.hideInput(),a.close()),a.focus())},hideInput:function(){var a=this;a.setTextboxValue(""),a.$control_input.css({opacity:0,position:"absolute",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(a){this.$control_input[0].blur(),this.onBlur(null,a)},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return"string"==typeof b&&(b=[{field:b}]),{fields:a.searchField,conjunction:a.searchConjunction,sort:b}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&(e=f.settings.score.apply(this,[b]),"function"!=typeof e))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)f.items.indexOf(z(d.items[c].id))!==-1&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;"undefined"==typeof b&&(b=!0);var t=this,u=a.trim(t.$control_input.val()),v=t.search(u),w=t.$dropdown_content,x=t.$activeOption&&z(t.$activeOption.attr("data-value"));for(g=v.items.length,"number"==typeof t.settings.maxOptions&&(g=Math.min(g,t.settings.maxOptions)),h={},i=[],c=0;c<g;c++)for(j=t.options[v.items[c].id],k=t.render("option",j),l=j[t.settings.optgroupField]||"",m=a.isArray(l)?l:[l],e=0,f=m&&m.length;e<f;e++)l=m[e],t.optgroups.hasOwnProperty(l)||(l=""),h.hasOwnProperty(l)||(h[l]=document.createDocumentFragment(),i.push(l)),h[l].appendChild(k);for(this.settings.lockOptgroupOrder&&i.sort(function(a,b){var c=t.optgroups[a].$order||0,d=t.optgroups[b].$order||0;return c-d}),n=document.createDocumentFragment(),c=0,g=i.length;c<g;c++)l=i[c],t.optgroups.hasOwnProperty(l)&&h[l].childNodes.length?(o=document.createDocumentFragment(),o.appendChild(t.render("optgroup_header",t.optgroups[l])),o.appendChild(h[l]),n.appendChild(t.render("optgroup",a.extend({},t.optgroups[l],{html:K(o),dom:o})))):n.appendChild(h[l]);if(w.html(n),t.settings.highlight&&v.query.length&&v.tokens.length)for(w.removeHighlight(),c=0,g=v.tokens.length;c<g;c++)d(w,v.tokens[c].regex);if(!t.settings.hideSelected)for(c=0,g=t.items.length;c<g;c++)t.getOption(t.items[c]).addClass("selected");p=t.canCreate(u),p&&(w.prepend(t.render("option_create",{input:u})),s=a(w[0].childNodes[0])),t.hasOptions=v.items.length>0||p,t.hasOptions?(v.items.length>0?(r=x&&t.getOption(x),r&&r.length?q=r:"single"===t.settings.mode&&t.items.length&&(q=t.getOption(t.items[0])),q&&q.length||(q=s&&!t.settings.addPrecedence?t.getAdjacentOption(s,1):w.find("[data-selectable]:first"))):q=s,t.setActiveOption(q),b&&!t.isOpen&&t.open()):(t.setActiveOption(null),b&&t.isOpen&&t.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c<d;c++)f.addOption(b[c]);else(e=f.registerOption(b))&&(f.userOptions[e]=!0,f.lastQuery=null,f.trigger("option_add",e,b))},registerOption:function(a){var b=z(a[this.settings.valueField]);return"undefined"!=typeof b&&null!==b&&!this.options.hasOwnProperty(b)&&(a.$order=a.$order||++this.order,this.options[b]=a,b)},registerOptionGroup:function(a){var b=z(a[this.settings.optgroupValueField]);return!!b&&(a.$order=a.$order||++this.order,this.optgroups[b]=a,b)},addOptionGroup:function(a,b){b[this.settings.optgroupValueField]=a,(a=this.registerOptionGroup(b))&&this.trigger("optgroup_add",a,b)},removeOptionGroup:function(a){this.optgroups.hasOwnProperty(a)&&(delete this.optgroups[a],this.renderCache={},this.trigger("optgroup_remove",a))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(b,c){var d,e,f,g,h,i,j,k=this;if(b=z(b),f=z(c[k.settings.valueField]),null!==b&&k.options.hasOwnProperty(b)){if("string"!=typeof f)throw new Error("Value must be set in option data");j=k.options[b].$order,f!==b&&(delete k.options[b],g=k.items.indexOf(b),g!==-1&&k.items.splice(g,1,f)),c.$order=c.$order||j,k.options[f]=c,h=k.renderCache.item,i=k.renderCache.option,h&&(delete h[b],delete h[f]),i&&(delete i[b],delete i[f]),k.items.indexOf(f)!==-1&&(d=k.getItem(b),e=a(k.render("item",c)),d.hasClass("active")&&e.addClass("active"),d.replaceWith(e)),k.lastQuery=null,k.isOpen&&k.refreshOptions(!1)}},removeOption:function(a,b){var c=this;a=z(a);var d=c.renderCache.item,e=c.renderCache.option;d&&delete d[a],e&&delete e[a],delete c.userOptions[a],delete c.options[a],c.lastQuery=null,c.trigger("option_remove",a),c.removeItem(a,b)},clearOptions:function(){var a=this;a.loadedSearches={},a.userOptions={},a.renderCache={},a.options=a.sifter.items={},a.lastQuery=null,a.trigger("option_clear"),a.clear()},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},getElementWithValue:function(b,c){if(b=z(b),"undefined"!=typeof b&&null!==b)for(var d=0,e=c.length;d<e;d++)if(c[d].getAttribute("data-value")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItems:function(b,c){for(var d=a.isArray(b)?b:[b],e=0,f=d.length;e<f;e++)this.isPending=e<f-1,this.addItem(d[e],c)},addItem:function(b,c){var d=c?[]:["change"];E(this,d,function(){var d,e,f,g,h,i=this,j=i.settings.mode;return b=z(b),i.items.indexOf(b)!==-1?void("single"===j&&i.close()):void(i.options.hasOwnProperty(b)&&("single"===j&&i.clear(c),"multi"===j&&i.isFull()||(d=a(i.render("item",i.options[b])),h=i.isFull(),i.items.splice(i.caretPos,0,b),i.insertAtCaret(d),(!i.isPending||!h&&i.isFull())&&i.refreshState(),i.isSetup&&(f=i.$dropdown_content.find("[data-selectable]"),i.isPending||(e=i.getOption(b),g=i.getAdjacentOption(e,1).attr("data-value"),i.refreshOptions(i.isFocused&&"single"!==j),g&&i.setActiveOption(i.getOption(g))),!f.length||i.isFull()?i.close():i.positionDropdown(),i.updatePlaceholder(),i.trigger("item_add",b,d),i.updateOriginalInput({silent:c})))))})},removeItem:function(b,c){var d,e,f,g=this;d=b instanceof a?b:g.getItem(b),b=z(d.attr("data-value")),e=g.items.indexOf(b),e!==-1&&(d.remove(),d.hasClass("active")&&(f=g.$activeItems.indexOf(d[0]),g.$activeItems.splice(f,1)),g.items.splice(e,1),g.lastQuery=null,!g.settings.persist&&g.userOptions.hasOwnProperty(b)&&g.removeOption(b,c),e<g.caretPos&&g.setCaret(g.caretPos-1),g.refreshState(),g.updatePlaceholder(),g.updateOriginalInput({silent:c}),g.positionDropdown(),g.trigger("item_remove",b,d))},createItem:function(b,c){var d=this,e=d.caretPos;b=b||a.trim(d.$control_input.val()||"");var f=arguments[arguments.length-1];if("function"!=typeof f&&(f=function(){}),"boolean"!=typeof c&&(c=!0),!d.canCreate(b))return f(),!1;d.lock();var g="function"==typeof d.settings.create?this.settings.create:function(a){var b={};return b[d.settings.labelField]=a,b[d.settings.valueField]=a,b},h=C(function(a){if(d.unlock(),!a||"object"!=typeof a)return f();var b=z(a[d.settings.valueField]);return"string"!=typeof b?f():(d.setTextboxValue(""),d.addOption(a),d.setCaret(e),d.addItem(b),d.refreshOptions(c&&"single"!==d.settings.mode),void f(a))}),i=g.apply(this,[b,h]);return"undefined"!=typeof i&&h(i),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var a=!this.items.length;this.isInvalid=a,this.$control_input.prop("required",a),this.$input.prop("required",!a)},refreshClasses:function(){var b=this,c=b.isFull(),d=b.isLocked;b.$wrapper.toggleClass("rtl",b.rtl),b.$control.toggleClass("focus",b.isFocused).toggleClass("disabled",b.isDisabled).toggleClass("required",b.isRequired).toggleClass("invalid",b.isInvalid).toggleClass("locked",d).toggleClass("full",c).toggleClass("not-full",!c).toggleClass("input-active",b.isFocused&&!b.isInputHidden).toggleClass("dropdown-active",b.isOpen).toggleClass("has-options",!a.isEmptyObject(b.options)).toggleClass("has-items",b.items.length>0),b.$control_input.data("grow",!c&&!d)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},f.tagType===v){for(d=[],b=0,c=f.items.length;b<c;b++)e=f.options[f.items[b]][f.settings.labelField]||"",d.push('<option value="'+A(f.items[b])+'" selected="selected">'+A(e)+"</option>");d.length||this.$input.attr("multiple")||d.push('<option value="" selected="selected"></option>'), 1522f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&(a.hideInput(),a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a.outerWidth(),top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(b){var c=Math.min(this.caretPos,this.items.length);0===c?this.$control.prepend(b):a(this.$control[0].childNodes[c]).before(b),this.setCaret(c+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&b.keyCode===p?-1:1,f=G(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c<d;c++)g.push(a(l.$activeItems[c]).attr("data-value"));b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||"single"===l.settings.mode)&&l.items.length&&(e<0&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&l.settings.onDelete.apply(l,[g])===!1)return!1;for("undefined"!=typeof h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h,i=this;0!==a&&(i.rtl&&(a*=-1),c=a>0?"last":"first",d=G(i.$control_input[0]),i.isFocused&&!i.isInputHidden?(f=i.$control_input.val().length,g=a<0?0===d.start&&0===d.length:d.start===f,g&&!f&&i.advanceCaret(a,b)):(h=i.$control.children(".active:"+c),h.length&&(e=i.$control.children(":not(input)").index(h),i.setActiveItem(null),i.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;d<e;d++)g=a(f[d]).detach(),d<b?c.$control_input.before(g):c.$control.append(g)}c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop("disabled",!0),a.$control_input.prop("disabled",!0).prop("tabindex",-1),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop("disabled",!1),a.$control_input.prop("disabled",!1).prop("tabindex",a.tabIndex),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(d.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:d.tabindex}).show(),b.$control_input.removeData("grow"),b.$input.removeData("selectize"),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(b,c){var d,e,f="",g=!1,h=this;return"option"!==b&&"item"!==b||(d=z(c[h.settings.valueField]),g=!!d),g&&(y(h.renderCache[b])||(h.renderCache[b]={}),h.renderCache[b].hasOwnProperty(d))?h.renderCache[b][d]:(f=a(h.settings.render[b].apply(this,[c,A])),"option"===b||"option_create"===b?f.attr("data-selectable",""):"optgroup"===b&&(e=c[h.settings.optgroupValueField]||"",f.attr("data-group",e)),"option"!==b&&"item"!==b||f.attr("data-value",d||""),g&&(h.renderCache[b][d]=f[0]),f[0])},clearCache:function(a){var b=this;"undefined"==typeof a?b.renderCache={}:delete b.renderCache[a]},canCreate:function(a){var b=this;if(!b.settings.create)return!1;var c=b.settings.createFilter;return a.length&&("function"!=typeof c||c.apply(b,[a]))&&("string"!=typeof c||new RegExp(c).test(a))&&(!(c instanceof RegExp)||c.test(a))}}),M.count=0,M.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.optgroupField,i=d.optgroupLabelField,j=d.optgroupValueField,k=function(b,c){var h,i,j,k,l=b.attr(e);if(l)for(c.options=JSON.parse(l),h=0,i=c.options.length;h<i;h++)c.items.push(c.options[h][g]);else{var m=a.trim(b.val()||"");if(!d.allowEmptyOption&&!m.length)return;for(j=m.split(d.delimiter),h=0,i=j.length;h<i;h++)k={},k[f]=j[h],k[g]=j[h],c.options.push(k);c.items=j}},l=function(b,c){var k,l,m,n,o=c.options,p={},q=function(a){var b=e&&a.attr(e);return"string"==typeof b&&b.length?JSON.parse(b):null},r=function(b,e){b=a(b);var i=z(b.val());if(i||d.allowEmptyOption)if(p.hasOwnProperty(i)){if(e){var j=p[i][h];j?a.isArray(j)?j.push(e):p[i][h]=[j,e]:p[i][h]=e}}else{var k=q(b)||{};k[f]=k[f]||b.text(),k[g]=k[g]||i,k[h]=k[h]||e,p[i]=k,o.push(k),b.is(":selected")&&c.items.push(i)}},s=function(b){var d,e,f,g,h;for(b=a(b),f=b.attr("label"),f&&(g=q(b)||{},g[i]=f,g[j]=f,c.optgroups.push(g)),h=a("option",b),d=0,e=h.length;d<e;d++)r(h[d],f)};for(c.maxItems=b.attr("multiple")?null:1,n=b.children(),k=0,l=n.length;k<l;k++)m=n[k].tagName.toLowerCase(),"optgroup"===m?s(n[k]):"option"===m&&r(n[k])};return this.each(function(){if(!this.selectize){var e,f=a(this),g=this.tagName.toLowerCase(),h=f.attr("placeholder")||f.attr("data-placeholder");h||d.allowEmptyOption||(h=f.children('option[value=""]').text());var i={placeholder:h,options:[],optgroups:[],items:[]};"select"===g?l(f,i):k(f,i),e=new M(f,a.extend(!0,{},c,i,b))}})},a.fn.selectize.defaults=M.defaults,a.fn.selectize.support={validity:x},M.define("drag_drop",function(b){if(!a.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var c=this;c.lock=function(){var a=c.lock;return function(){var b=c.$control.data("sortable");return b&&b.disable(),a.apply(c,arguments)}}(),c.unlock=function(){var a=c.unlock;return function(){var b=c.$control.data("sortable");return b&&b.enable(),a.apply(c,arguments)}}(),c.setup=function(){var b=c.setup;return function(){b.apply(this,arguments);var d=c.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:c.isLocked,start:function(a,b){b.placeholder.css("width",b.helper.css("width")),d.css({overflow:"visible"})},stop:function(){d.css({overflow:"hidden"});var b=c.$activeItems?c.$activeItems.slice():null,e=[];d.children("[data-value]").each(function(){e.push(a(this).attr("data-value"))}),c.setValue(e),c.setActiveItem(b)}})}}()}}),M.define("dropdown_header",function(b){var c=this;b=a.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(a){return'<div class="'+a.headerClass+'"><div class="'+a.titleRowClass+'"><span class="'+a.labelClass+'">'+a.title+'</span><a href="javascript:void(0)" class="'+a.closeClass+'">×</a></div></div>'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),M.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},this.onKeyDown=function(){var a=c.onKeyDown;return function(b){var d,e,f,g;return!this.isOpen||b.keyCode!==j&&b.keyCode!==m?a.apply(this,arguments):(c.ignoreHover=!0,g=this.$activeOption.closest("[data-group]"),d=g.find("[data-selectable]").index(this.$activeOption),g=b.keyCode===j?g.prev("[data-group]"):g.next("[data-group]"),f=g.find("[data-selectable]"),e=f.eq(Math.min(f.length-1,d)),void(e.length&&this.setActiveOption(e)))}}();var d=function(){var a,b=d.width,c=document;return"undefined"==typeof b&&(a=c.createElement("div"),a.innerHTML='<div style="width:50px;height:50px;position:absolute;
1522left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),f=k.length,f&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e<f;e++)g=Math.max(g,k.eq(e).height());k.css({height:g})}b.equalizeWidth&&(j=c.$dropdown_content.innerWidth()-d(),h=Math.round(j/f),k.css({width:h}),f>1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(B.after(this,"positionDropdown",e),B.after(this,"refreshOptions",e))}),M.define("remove_button",function(b){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);var c=function(b,c){c.className="remove-single";var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){return a+b};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr("id"),i=(a("#"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()},d=function(b,c){var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()};return"single"===this.settings.mode?void c(this,b):void d(this,b)}),M.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return b.keyCode===p&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1,d>=0&&d<this.items.length)?(e=this.options[this.items[d]],this.deleteSelection(b)&&(this.setTextboxValue(a.text.apply(this,[e])),this.refreshOptions(!0)),void b.preventDefault()):c.apply(this,arguments)}}()}),M}); 1523/* NUGET: BEGIN LICENSE TEXT 1524 * 1525 * Microsoft grants you the right to use these script files for the sole 1526 * purpose of either: (i) interacting through your browser with the Microsoft 1527 * website or online service, subject to the applicable licensing or use 1528 * terms; or (ii) using the files as included with a Microsoft product subject 1529 * to that product's license terms. Microsoft reserves all other rights to the 1530 * files not expressly granted by Microsoft, whether by implication, estoppel 1531 * or otherwise. Insofar as a script file is dual licensed under GPL, 1532 * Microsoft neither took the code under GPL nor distributes it thereunder but 1533 * under the terms set out in this paragraph. All notices and licenses 1534 * below are for informational purposes only. 1535 * 1536 * NUGET: END LICENSE TEXT */ 1537/* 1538** Unobtrusive Ajax support library for jQuery 1539** Copyright (C) Microsoft Corporation. All rights reserved. 1540*/ 1541(function (a) { var b = "unobtrusiveAjaxClick", d = "unobtrusiveAjaxClickTarget", h = "unobtrusiveValidation"; function c(d, b) { var a = window, c = (d || "").split("."); while (a && c.length) a = a[c.shift()]; if (typeof a === "function") return a; b.push(d); return Function.constructor.apply(null, b) } function e(a) { return a === "GET" || a === "POST" } function g(b, a) { !e(a) && b.setRequestHeader("X-HTTP-Method-Override", a) } function i(c, b, e) { var d; if (e.indexOf("application/x-javascript") !== -1) return; d = (c.getAttribute("data-ajax-mode") || "").toUpperCase(); a(c.getAttribute("data-ajax-update")).each(function (f, c) { var e; switch (d) { case "BEFORE": e = c.firstChild; a("<div />").html(b).contents().each(function () { c.insertBefore(this, e) }); break; case "AFTER": a("<div />").html(b).contents().each(function () { c.appendChild(this) }); break; case "REPLACE-WITH": a(c).replaceWith(b); break; default: a(c).html(b) } }) } function f(b, d) { var j, k, f, h; j = b.getAttribute("data-ajax-confirm"); if (j && !window.confirm(j)) return; k = a(b.getAttribute("data-ajax-loading")); h = parseInt(b.getAttribute("data-ajax-loading-duration"), 10) || 0; a.extend(d, { type: b.getAttribute("data-ajax-method") || undefined, url: b.getAttribute("data-ajax-url") || undefined, cache: !!b.getAttribute("data-ajax-cache"), beforeSend: function (d) { var a; g(d, f); a = c(b.getAttribute("data-ajax-begin"), ["xhr"]).apply(b, arguments); a !== false && k.show(h); return a }, complete: function () { k.hide(h); c(b.getAttribute("data-ajax-complete"), ["xhr", "status"]).apply(b, arguments) }, success: function (a, e, d) { i(b, a, d.getResponseHeader("Content-Type") || "text/html"); c(b.getAttribute("data-ajax-success"), ["data", "status", "xhr"]).apply(b, arguments) }, error: function () { c(b.getAttribute("data-ajax-failure"), ["xhr", "status", "error"]).apply(b, arguments) } }); d.data.push({ name: "X-Requested-With", value: "XMLHttpRequest" }); f = d.type.toUpperCase(); if (!e(f)) { d.type = "POST"; d.data.push({ name: "X-HTTP-Method-Override", value: f }) } a.ajax(d) } function j(c) { var b = a(c).data(h); return !b || !b.validate || b.validate() } a(document).on("click", "a[data-ajax=true]", function (a) { a.preventDefault(); f(this, { url: this.href, type: "GET", data: [] }) }); a(document).on("click", "form[data-ajax=true] input[type=image]", function (c) { var g = c.target.name, e = a(c.target), f = a(e.parents("form")[0]), d = e.offset();
vendor: 9,010 bytes, lines 1541-1547
1541 f.data(b, [{ name: g + ".x", value: Math.round(c.pageX - d.left) }, { name: g + ".y", value: Math.round(c.pageY - d.top) }]); setTimeout(function () { f.removeData(b) }, 0) }); a(document).on("click", "form[data-ajax=true] :submit", function (e) { var g = e.currentTarget.name, f = a(e.target), c = a(f.parents("form")[0]); c.data(b, g ? [{ name: g, value: e.currentTarget.value }] : []); c.data(d, f); setTimeout(function () { c.removeData(b); c.removeData(d) }, 0) }); a(document).on("submit", "form[data-ajax=true]", function (h) { var e = a(this).data(b) || [], c = a(this).data(d), g = c && c.hasClass("cancel"); h.preventDefault(); if (!g && !j(this)) return; f(this, { url: this.action, type: this.method || "GET", data: e.concat(a(this).serializeArray()) }) }) })(jQuery); 1542/*! jQuery UI - v1.13.2 - 2022-07-14 1543* http://jqueryui.com 1544* Includes: widget.js, position.js, data.js, disable-selection.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, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js 1545* Copyright jQuery Foundation and other contributors; Licensed MIT */ 1546 1547!function (t) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery) }(function (V) { "use strict"; V.ui = V.ui || {}; V.ui.version = "1.13.2"; var n, i = 0, a = Array.prototype.hasOwnProperty, r = Array.prototype.slice; V.cleanData = (n = V.cleanData, function (t) { for (var e, i, s = 0; null != (i = t[s]); s++)(e = V._data(i, "events")) && e.remove && V(i).triggerHandler("remove"); n(t) }), V.widget = function (t, i, e) { var s, n, o, a = {}, r = t.split(".")[0], l = r + "-" + (t = t.split(".")[1]); return e || (e = i, i = V.Widget), Array.isArray(e) && (e = V.extend.apply(null, [{}].concat(e))), V.expr.pseudos[l.toLowerCase()] = function (t) { return !!V.data(t, l) }, V[r] = V[r] || {}, s = V[r][t], n = V[r][t] = function (t, e) { if (!this || !this._createWidget) return new n(t, e); arguments.length && this._createWidget(t, e) }, V.extend(n, s, { version: e.version, _proto: V.extend({}, e), _childConstructors: [] }), (o = new i).options = V.widget.extend({}, o.options), V.each(e, function (e, s) { function n() { return i.prototype[e].apply(this, arguments) } function o(t) { return i.prototype[e].apply(this, t) } a[e] = "function" == typeof s ? function () { var t, e = this._super, i = this._superApply; return this._super = n, this._superApply = o, t = s.apply(this, arguments), this._super = e, this._superApply = i, t } : s }), n.prototype = V.widget.extend(o, { widgetEventPrefix: s && o.widgetEventPrefix || t }, a, { constructor: n, namespace: r, widgetName: t, widgetFullName: l }), s ? (V.each(s._childConstructors, function (t, e) { var i = e.prototype; V.widget(i.namespace + "." + i.widgetName, n, e._proto) }), delete s._childConstructors) : i._childConstructors.push(n), V.widget.bridge(t, n), n }, V.widget.extend = function (t) { for (var e, i, s = r.call(arguments, 1), n = 0, o = s.length; n < o; n++)for (e in s[n]) i = s[n][e], a.call(s[n], e) && void 0 !== i && (V.isPlainObject(i) ? t[e] = V.isPlainObject(t[e]) ? V.widget.extend({}, t[e], i) : V.widget.extend({}, i) : t[e] = i); return t }, V.widget.bridge = function (o, e) { var a = e.prototype.widgetFullName || o; V.fn[o] = function (i) { var t = "string" == typeof i, s = r.call(arguments, 1), n = this; return t ? this.length || "instance" !== i ? this.each(function () { var t, e = V.data(this, a); return "instance" === i ? (n = e, !1) : e ? "function" != typeof e[i] || "_" === i.charAt(0) ? V.error("no such method '" + i + "' for " + o + " widget instance") : (t = e[i].apply(e, s)) !== e && void 0 !== t ? (n = t && t.jquery ? n.pushStack(t.get()) : t, !1) : void 0 : V.error("cannot call methods on " + o + " prior to initialization; attempted to call method '" + i + "'") }) : n = void 0 : (s.length && (i = V.widget.extend.apply(null, [i].concat(s))), this.each(function () { var t = V.data(this, a); t ? (t.option(i || {}), t._init && t._init()) : V.data(this, a, new e(i, this)) })), n } }, V.Widget = function () { }, V.Widget._childConstructors = [], V.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: !1, create: null }, _createWidget: function (t, e) { e = V(e || this.defaultElement || this)[0], this.element = V(e), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = V(), this.hoverable = V(), this.focusable = V(), this.classesElementLookup = {}, e !== this && (V.data(e, this.widgetFullName, this), this._on(!0, this.element, { remove: function (t) { t.target === e && this.destroy() } }), this.document = V(e.style ? e.ownerDocument : e.document || e), this.window = V(this.document[0].defaultView || this.document[0].parentWindow)), this.options = V.widget.extend({}, this.options, this._getCreateOptions(), t), this._create(), this.options.disabled && this._setOptionDisabled(this.options.disabled), this._trigger("create", null, this._getCreateEventData()), this._init() }, _getCreateOptions: function () { return {} }, _getCreateEventData: V.noop, _create: V.noop, _init: V.noop, destroy: function () { var i = this; this._destroy(), V.each(this.classesElementLookup, function (t, e) { i._removeClass(e, t) }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr("aria-disabled"), this.bindings.off(this.eventNamespace) }, _destroy: V.noop, widget: function () { return this.element }, option: function (t, e) { var i, s, n, o = t; if (0 === arguments.length) return V.widget.extend({}, this.options); if ("string" == typeof t) if (o = {}, t = (i = t.split(".")).shift(), i.length) { for (s = o[t] = V.widget.extend({}, this.options[t]), n = 0; n < i.length - 1; n++)s[i[n]] = s[i[n]] || {}, s = s[i[n]]; if (t = i.pop(), 1 === arguments.length) return void 0 === s[t] ? null : s[t]; s[t] = e } else { if (1 === arguments.length) return void 0 === this.options[t] ? null : this.options[t]; o[t] = e } return this._setOptions(o), this }, _setOptions: function (t) { for (var 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 (t) { var e, i, s; for (e in t) s = this.classesElementLookup[e], t[e] !== this.options.classes[e] && s && s.length && (i = V(s.get()), this._removeClass(s, e), i.addClass(this._classes({ element: i, keys: e, classes: t, 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 (n) { var o = [], a = this; function t(t, e) { for (var i, s = 0; s < t.length; s++)i = a.classesElementLookup[t[s]] || V(), i = n.add ? (function () { var i = []; n.element.each(function (t, e) { V.map(a.classesElementLookup, function (t) { return t }).some(function (t) { return t.is(e) }) || i.push(e) }), a._on(V(i), { remove: "_untrackClassesElement" }) }(), V(V.uniqueSort(i.get().concat(n.element.get())))) : V(i.not(n.element).get()), a.classesElementLookup[t[s]] = i, o.push(t[s]), e && n.classes[t[s]] && o.push(n.classes[t[s]]) } return (n = V.extend({ element: this.element, classes: this.options.classes || {} }, n)).keys && t(n.keys.match(/\S+/g) || [], !0), n.extra && t(n.extra.match(/\S+/g) || []), o.join(" ") }, _untrackClassesElement: function (i) { var s = this; V.each(s.classesElementLookup, function (t, e) { -1 !== V.inArray(i.target, e) && (s.classesElementLookup[t] = V(e.not(i.target).get())) }), this._off(V(i.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) { var n = "string" == typeof t || null === t, i = { extra:
vendor: 4,865 bytes, line 1547
1547n ? e : i, keys: n ? t : e, element: n ? this.element : t, add: s = "boolean" == typeof s ? s : i }; return i.element.toggleClass(this._classes(i), s), this }, _on: function (n, o, t) { var a, r = this; "boolean" != typeof n && (t = o, o = n, n = !1), t ? (o = a = V(o), this.bindings = this.bindings.add(o)) : (t = o, o = this.element, a = this.widget()), V.each(t, function (t, e) { function i() { if (n || !0 !== r.options.disabled && !V(this).hasClass("ui-state-disabled")) return ("string" == typeof e ? r[e] : e).apply(r, arguments) } "string" != typeof e && (i.guid = e.guid = e.guid || i.guid || V.guid++); var s = t.match(/^([\w:-]*)\s*(.*)$/), t = s[1] + r.eventNamespace, s = s[2]; s ? a.on(t, s, i) : o.on(t, i) }) }, _off: function (t, e) { e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.off(e), this.bindings = V(this.bindings.not(t).get()), this.focusable = V(this.focusable.not(t).get()), this.hoverable = V(this.hoverable.not(t).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 (t) { this.hoverable = this.hoverable.add(t), this._on(t, { mouseenter: function (t) { this._addClass(V(t.currentTarget), null, "ui-state-hover") }, mouseleave: function (t) { this._removeClass(V(t.currentTarget), null, "ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t), this._on(t, { focusin: function (t) { this._addClass(V(t.currentTarget), null, "ui-state-focus") }, focusout: function (t) { this._removeClass(V(t.currentTarget), null, "ui-state-focus") } }) }, _trigger: function (t, e, i) { var s, n, o = this.options[t]; if (i = i || {}, (e = V.Event(e)).type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), e.target = this.element[0], n = e.originalEvent) for (s in n) s in e || (e[s] = n[s]); return this.element.trigger(e, i), !("function" == typeof o && !1 === o.apply(this.element[0], [e].concat(i)) || e.isDefaultPrevented()) } }, V.each({ show: "fadeIn", hide: "fadeOut" }, function (o, a) { V.Widget.prototype["_" + o] = function (e, t, i) { var s, n = (t = "string" == typeof t ? { effect: t } : t) ? !0 !== t && "number" != typeof t && t.effect || a : o; "number" == typeof (t = t || {}) ? t = { duration: t } : !0 === t && (t = {}), s = !V.isEmptyObject(t), t.complete = i, t.delay && e.delay(t.delay), s && V.effects && V.effects.effect[n] ? e[o](t) : n !== o && e[n] ? e[n](t.duration, t.easing, i) : e.queue(function (t) { V(this)[o](), i && i.call(e[0]), t() }) } }); var s, x, k, o, l, h, c, u, C; V.widget; function D(t, e, i) { return [parseFloat(t[0]) * (u.test(t[0]) ? e / 100 : 1), parseFloat(t[1]) * (u.test(t[1]) ? i / 100 : 1)] } function I(t, e) { return parseInt(V.css(t, e), 10) || 0 } function T(t) { return null != t && t === t.window } x = Math.max, k = Math.abs, o = /left|center|right/, l = /top|center|bottom/, h = /[\+\-]\d+(\.[\d]+)?%?/, c = /^\w+/, u = /%$/, C = V.fn.position, V.position = { scrollbarWidth: function () { if (void 0 !== s) return s; var t, e = V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"), i = e.children()[0]; return V("body").append(e), t = i.offsetWidth, e.css("overflow", "scroll"), t === (i = i.offsetWidth) && (i = e[0].clientWidth), e.remove(), s = t - i }, getScrollInfo: function (t) { var e = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"), i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"), e = "scroll" === e || "auto" === e && t.width < t.element[0].scrollWidth; return { width: "scroll" === i || "auto" === i && t.height < t.element[0].scrollHeight ? V.position.scrollbarWidth() : 0, height: e ? V.position.scrollbarWidth() : 0 } }, getWithinInfo: function (t) { var e = V(t || window), i = T(e[0]), s = !!e[0] && 9 === e[0].nodeType; return { element: e, isWindow: i, isDocument: s, offset: !i && !s ? V(t).offset() : { left: 0, top: 0 }, scrollLeft: e.scrollLeft(), scrollTop: e.scrollTop(), width: e.outerWidth(), height: e.outerHeight() } } }, V.fn.position = function (u) { if (!u || !u.of) return C.apply(this, arguments); var d, p, f, g, m, t, _ = "string" == typeof (u = V.extend({}, u)).of ? V(document).find(u.of) : V(u.of), v = V.position.getWithinInfo(u.within), b = V.position.getScrollInfo(v), y = (u.collision || "flip").split(" "), w = {}, e = 9 === (t = (e = _)[0]).nodeType ? { width: e.width(), height: e.height(), offset: { top: 0, left: 0 } } : T(t) ? { width: e.width(), height: e.height(), offset: { top: e.scrollTop(), left: e.scrollLeft() } } : t.preventDefault ? { width: 0, height: 0, offset: { top: t.pageY, left: t.pageX } } : { width: e.outerWidth(), height: e.outerHeight(), offset: e.offset() };
vendor: 5,743 bytes, line 1547
1547 return _[0].preventDefault && (u.at = "left top"), p = e.width, f = e.height, m = V.extend({}, g = e.offset), V.each(["my", "at"], function () { var t, e, i = (u[this] || "").split(" "); (i = 1 === i.length ? o.test(i[0]) ? i.concat(["center"]) : l.test(i[0]) ? ["center"].concat(i) : ["center", "center"] : i)[0] = o.test(i[0]) ? i[0] : "center", i[1] = l.test(i[1]) ? i[1] : "center", t = h.exec(i[0]), e = h.exec(i[1]), w[this] = [t ? t[0] : 0, e ? e[0] : 0], u[this] = [c.exec(i[0])[0], c.exec(i[1])[0]] }), 1 === y.length && (y[1] = y[0]), "right" === u.at[0] ? m.left += p : "center" === u.at[0] && (m.left += p / 2), "bottom" === u.at[1] ? m.top += f : "center" === u.at[1] && (m.top += f / 2), d = D(w.at, p, f), m.left += d[0], m.top += d[1], this.each(function () { var i, t, a = V(this), r = a.outerWidth(), l = a.outerHeight(), e = I(this, "marginLeft"), s = I(this, "marginTop"), n = r + e + I(this, "marginRight") + b.width, o = l + s + I(this, "marginBottom") + b.height, h = V.extend({}, m), c = D(w.my, a.outerWidth(), a.outerHeight()); "right" === u.my[0] ? h.left -= r : "center" === u.my[0] && (h.left -= r / 2), "bottom" === u.my[1] ? h.top -= l : "center" === u.my[1] && (h.top -= l / 2), h.left += c[0], h.top += c[1], i = { marginLeft: e, marginTop: s }, V.each(["left", "top"], function (t, e) { V.ui.position[y[t]] && V.ui.position[y[t]][e](h, { targetWidth: p, targetHeight: f, elemWidth: r, elemHeight: l, collisionPosition: i, collisionWidth: n, collisionHeight: o, offset: [d[0] + c[0], d[1] + c[1]], my: u.my, at: u.at, within: v, elem: a }) }), u.using && (t = function (t) { var e = g.left - h.left, i = e + p - r, s = g.top - h.top, n = s + f - l, o = { target: { element: _, left: g.left, top: g.top, width: p, height: f }, element: { element: a, left: h.left, top: h.top, width: r, height: l }, horizontal: i < 0 ? "left" : 0 < e ? "right" : "center", vertical: n < 0 ? "top" : 0 < s ? "bottom" : "middle" }; p < r && k(e + i) < p && (o.horizontal = "center"), f < l && k(s + n) < f && (o.vertical = "middle"), x(k(e), k(i)) > x(k(s), k(n)) ? o.important = "horizontal" : o.important = "vertical", u.using.call(this, t, o) }), a.offset(V.extend(h, { using: t })) }) }, V.ui.position = { fit: { left: function (t, e) { var i = e.within, s = i.isWindow ? i.scrollLeft : i.offset.left, n = i.width, o = t.left - e.collisionPosition.marginLeft, a = s - o, r = o + e.collisionWidth - n - s; e.collisionWidth > n ? 0 < a && r <= 0 ? (i = t.left + a + e.collisionWidth - n - s, t.left += a - i) : t.left = !(0 < r && a <= 0) && r < a ? s + n - e.collisionWidth : s : 0 < a ? t.left += a : 0 < r ? t.left -= r : t.left = x(t.left - o, t.left) }, top: function (t, e) { var i = e.within, s = i.isWindow ? i.scrollTop : i.offset.top, n = e.within.height, o = t.top - e.collisionPosition.marginTop, a = s - o, r = o + e.collisionHeight - n - s; e.collisionHeight > n ? 0 < a && r <= 0 ? (i = t.top + a + e.collisionHeight - n - s, t.top += a - i) : t.top = !(0 < r && a <= 0) && r < a ? s + n - e.collisionHeight : s : 0 < a ? t.top += a : 0 < r ? t.top -= r : t.top = x(t.top - o, t.top) } }, flip: { left: function (t, e) { var i = e.within, s = i.offset.left + i.scrollLeft, n = i.width, o = i.isWindow ? i.scrollLeft : i.offset.left, a = t.left - e.collisionPosition.marginLeft, r = a - o, l = a + e.collisionWidth - n - o, h = "left" === e.my[0] ? -e.elemWidth : "right" === e.my[0] ? e.elemWidth : 0, i = "left" === e.at[0] ? e.targetWidth : "right" === e.at[0] ? -e.targetWidth : 0, a = -2 * e.offset[0]; r < 0 ? ((s = t.left + h + i + a + e.collisionWidth - n - s) < 0 || s < k(r)) && (t.left += h + i + a) : 0 < l && (0 < (o = t.left - e.collisionPosition.marginLeft + h + i + a - o) || k(o) < l) && (t.left += h + i + a) }, top: function (t, e) { var i = e.within, s = i.offset.top + i.scrollTop, n = i.height, o = i.isWindow ? i.scrollTop : i.offset.top, a = t.top - e.collisionPosition.marginTop, r = a - o, l = a + e.collisionHeight - n - o, h = "top" === e.my[1] ? -e.elemHeight : "bottom" === e.my[1] ? e.elemHeight : 0, i = "top" === e.at[1] ? e.targetHeight : "bottom" === e.at[1] ? -e.targetHeight : 0, a = -2 * e.offset[1]; r < 0 ? ((s = t.top + h + i + a + e.collisionHeight - n - s) < 0 || s < k(r)) && (t.top += h + i + a) : 0 < l && (0 < (o = t.top - e.collisionPosition.marginTop + h + i + a - o) || k(o) < l) && (t.top += h + i + a) } }, flipfit: { left: function () { V.ui.position.flip.left.apply(this, arguments), V.ui.position.fit.left.apply(this, arguments) }, top: function () { V.ui.position.flip.top.apply(this, arguments), V.ui.position.fit.top.apply(this, arguments) } } }; V.ui.position, V.extend(V.expr.pseudos, { data: V.expr.createPseudo ? V.expr.createPseudo(function (e) { return function (t) { return !!V.data(t, e) } }) : function (t, e, i) { return !!V.data(t, i[3]) } }), V.fn.extend({ disableSelection: (t = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown", function () { return this.on(t + ".ui-disableSelection", function (t) { t.preventDefault() }) }), enableSelection: function () { return this.off(".ui-disableSelection") } }); var t, d = V, p = {}, e = p.toString, f = /^([\-+])=\s*(\d+\.?\d*)/, g = [{ 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) / 25
vendor: 14,569 bytes, line 1547
15475).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]] } }], m = d.Color = function (t, e, i, s) { return new d.Color.fn.parse(t, e, i, s) }, _ = { 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" } } } }, v = { byte: { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } }, b = m.support = {}, y = d("<p>")[0], w = d.each; function P(t) { return null == t ? t + "" : "object" == typeof t ? p[e.call(t)] || "object" : typeof t } function M(t, e, i) { var s = v[e.type] || {}; return null == t ? i || !e.def ? null : e.def : (t = s.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : s.mod ? (t + s.mod) % s.mod : Math.min(s.max, Math.max(0, t))) } function S(s) { var n = m(), o = n._rgba = []; return s = s.toLowerCase(), w(g, function (t, e) { var i = e.re.exec(s), i = i && e.parse(i), e = e.space || "rgba"; if (i) return i = n[e](i), n[_[e].cache] = i[_[e].cache], o = n._rgba = i._rgba, !1 }), o.length ? ("0,0,0,0" === o.join() && d.extend(o, B.transparent), n) : B[s] } 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 } y.style.cssText = "background-color:rgba(1,1,1,.5)", b.rgba = -1 < y.style.backgroundColor.indexOf("rgba"), w(_, function (t, e) { e.cache = "_" + t, e.props.alpha = { idx: 3, type: "percent", def: 1 } }), d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (t, e) { p["[object " + e + "]"] = e.toLowerCase() }), (m.fn = d.extend(m.prototype, { parse: function (n, t, e, i) { if (void 0 === n) return this._rgba = [null, null, null, null], this; (n.jquery || n.nodeType) && (n = d(n).css(t), t = void 0); var o = this, s = P(n), a = this._rgba = []; return void 0 !== t && (n = [n, t, e, i], s = "array"), "string" === s ? this.parse(S(n) || B._default) : "array" === s ? (w(_.rgba.props, function (t, e) { a[e.idx] = M(n[e.idx], e) }), this) : "object" === s ? (w(_, n instanceof m ? function (t, e) { n[e.cache] && (o[e.cache] = n[e.cache].slice()) } : function (t, i) { var s = i.cache; w(i.props, function (t, e) { if (!o[s] && i.to) { if ("alpha" === t || null == n[t]) return; o[s] = i.to(o._rgba) } o[s][e.idx] = M(n[t], e, !0) }), o[s] && d.inArray(null, o[s].slice(0, 3)) < 0 && (null == o[s][3] && (o[s][3] = 1), i.from && (o._rgba = i.from(o[s]))) }), this) : void 0 }, is: function (t) { var n = m(t), o = !0, a = this; return w(_, function (t, e) { var i, s = n[e.cache]; return s && (i = a[e.cache] || e.to && e.to(a._rgba) || [], w(e.props, function (t, e) { if (null != s[e.idx]) return o = s[e.idx] === i[e.idx] })), o }), o }, _space: function () { var i = [], s = this; return w(_, function (t, e) { s[e.cache] && i.push(t) }), i.pop() }, transition: function (t, a) { var e = (h = m(t))._space(), i = _[e], t = 0 === this.alpha() ? m("transparent") : this, r = t[i.cache] || i.to(t._rgba), l = r.slice(), h = h[i.cache]; return w(i.props, function (t, e) { var i = e.idx, s = r[i], n = h[i], o = v[e.type] || {}; null !== n && (null === s ? l[i] = n : (o.mod && (n - s > o.mod / 2 ? s += o.mod : s - n > o.mod / 2 && (s -= o.mod)), l[i] = M((n - s) * a + s, e))) }), this[e](l) }, blend: function (t) { if (1 === this._rgba[3]) return this; var e = this._rgba.slice(), i = e.pop(), s = m(t)._rgba; return m(d.map(e, function (t, e) { return (1 - i) * s[e] + i * t })) }, toRgbaString: function () { var t = "rgba(", e = d.map(this._rgba, function (t, e) { return null != t ? t : 2 < e ? 1 : 0 }); return 1 === e[3] && (e.pop(), t = "rgb("), t + e.join() + ")" }, toHslaString: function () { var t = "hsla(", e = d.map(this.hsla(), function (t, e) { return null == t && (t = 2 < e ? 1 : 0), t = e && e < 3 ? Math.round(100 * t) + "%" : t }); return 1 === e[3] && (e.pop(), t = "hsl("), t + e.join() + ")" }, toHexString: function (t) { var e = this._rgba.slice(), i = e.pop(); return t && e.push(~~(255 * i)), "#" + d.map(e, function (t) { return 1 === (t = (t || 0).toString(16)).length ? "0" + t : t }).join("") }, toString: function () { return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() } })).parse.prototype = m.fn, _.hsla.to = function (t) { if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]]; var e = t[0] / 255, i = t[1] / 255, s = t[2] / 255, n = t[3], o = Math.max(e, i, s), a = Math.min(e, i, s), r = o - a, l = o + a, t = .5 * l, i = a === o ? 0 : e === o ? 60 * (i - s) / r + 360 : i === o ? 60 * (s - e) / r + 120 : 60 * (e - i) / r + 240, l = 0 == r ? 0 : t <= .5 ? r / l : r / (2 - l); return [Math.round(i) % 360, l, t, null == n ? 1 : n] }, _.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], t = t[3], i = s <= .5 ? s * (1 + i) : s + i - s * i, s = 2 * s - i; return [Math.round(255 * H(s, i, e + 1 / 3)), Math.round(255 * H(s, i, e)), Math.round(255 * H(s, i, e - 1 / 3)), t] }, w(_, function (l, t) { var e = t.props, o = t.cache, a = t.to, r = t.from; m.fn[l] = function (t) { if (a && !this[o] && (this[o] = a(this._rgba)), void 0 === t) return this[o].slice(); var i = P(t), s = "array" === i || "object" === i ? t : arguments, n = this[o].slice(); return w(e, function (t, e) { t = s["object" === i ? t : e.idx]; null == t && (t = n[e.idx]), n[e.idx] = M(t, e) }), r ? ((t = m(r(n)))[o] = n, t) : m(n) }, w(e, function (a, r) { m.fn[a] || (m.fn[a] = function (t) { var e, i = P(t), s = "alpha" === a ? this._hsla ? "hsla" : "rgba" : l, n = this[s](), o = n[r.idx]; return "undefined" === i ? o : ("function" === i && (i = P(t = t.call(this, o))), null == t && r.empty ? this : ("string" === i && (e = f.exec(t)) && (t = o + parseFloat(e[2]) * ("+" === e[1] ? 1 : -1)), n[r.idx] = t, this[s](n))) }) }) }), (m.hook = function (t) { t = t.split(" "); w(t, function (t, o) { d.cssHooks[o] = { set: function (t, e) { var i, s, n = ""; if ("transparent" !== e && ("string" !== P(e) || (i = S(e)))) { if (e = m(i || e), !b.rgba && 1 !== e._rgba[3]) { for (s = "backgroundColor" === o ? t.parentNode : t; ("" === n || "transparent" === n) && s && s.style;)try { n = d.css(s, "backgroundColor"), s = s.parentNode } catch (t) { } e = e.blend(n && "transparent" !== n ? n : "_default") } e = e.toRgbaString() } try { t.style[o] = e } catch (t) { } } }, d.fx.step[o] = function (t) { t.colorInit || (t.start = m(t.elem, o), t.end = m(t.end), t.colorInit = !0), d.cssHooks[o].set(t.elem, t.start.transition(t.end, t.pos)) } }) })("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), d.cssHooks.borderColor = { expand: function (i) { var s = {}; return w(["Top", "Right", "Bottom", "Left"], function (t, e) { s["border" + e + "Color"] = i }), s } }; var z, A, O, N, E, W, F, L, R, Y, B = d.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" }, j = "ui-effects-", q = "ui-effects-style", K = "ui-effects-animated"; function U(t) { var e, i, s = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, n = {}; if (s && s.length && s[0] && s[s[0]]) for (i = s.length; i--;)"string" == typeof s[e = s[i]] && (n[e.replace(/-([\da-z])/gi, function (t, e) { return e.toUpperCase() })] = s[e]); else for (e in s) "string" == typeof s[e] && (n[e] = s[e]); return n } function X(t, e, i, s) { return t = { effect: t = V.isPlainObject(t) ? (e = t).effect : t }, "function" == typeof (e = null == e ? {} : e) && (s = e, i = null, e = {}), "number" != typeof e && !V.fx.speeds[e] || (s = i, i = e, e = {}), "function" == typeof i && (s = i, i = null), e && V.extend(t, e), i = i || e.duration, t.duration = V.fx.off ? 0 : "number" == typeof i ? i : i in V.fx.speeds ? V.fx.speeds[i] : V.fx.speeds._default, t.complete = s || e.complete, t } function $(t) { return !t || "number" == typeof t || V.fx.speeds[t] || ("string" == typeof t && !V.effects.effect[t] || ("function" == typeof t || "object" == typeof t && !t.effect)) } function G(t, e) { var i = e.outerWidth(), e = e.outerHeight(), t = /^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, e, 0]; return { top: parseFloat(t[1]) || 0, right: "auto" === t[2] ? i : parseFloat(t[2]), bottom: "auto" === t[3] ? e : parseFloat(t[3]), left: parseFloat(t[4]) || 0 } } V.effects = { effect: {} }, N = ["add", "remove", "toggle"], E = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }, V.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, e) { V.fx.step[e] = function (t) { ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (d.style(t.elem, e, t.end), t.setAttr = !0) } }), V.fn.addBack || (V.fn.addBack = function (t) { return this.add(null == t ? this.prevObject : this.prevObject.filter(t)) }), V.effects.animateClass = function (n, t, e, i) { var o = V.speed(t, e, i); return this.queue(function () { var i = V(this), t = i.attr("class") || "", e = (e = o.children ? i.find("*").addBack() : i).map(function () { return { el: V(this), start: U(this) } }), s = function () { V.each(N, function (t, e) { n[e] && i[e + "Class"](n[e]) }) }; s(), e = e.map(function () { return this.end = U(this.el[0]), this.diff = function (t, e) { var i, s, n = {}; for (i in e) s = e[i], t[i] !== s && (E[i] || !V.fx.step[i] && isNaN(parseFloat(s)) || (n[i] = s)); return n }(this.start, this.end), this }), i.attr("class", t), e = e.map(function () { var t = this, e = V.Deferred(), i = V.extend({}, o, { queue: !1, complete: function () { e.resolve(t) } }); return this.el.animate(this.diff, i), e.promise() }), V.when.apply(V, e.get()).done(function () { s(), V.each(arguments, function () { var e = this.el; V.each(this.diff, function (t) { e.css(t, "") }) }), o.complete.call(i[0]) }) }) }, V.fn.extend({ addClass: (O = V.fn.addClass, function (t, e, i, s) { return e ? V.effects.animateClass.call(this, { add: t }, e, i, s) : O.apply(this, arguments) }), removeClass: (A = V.fn.removeClass, function (t, e, i, s) { return 1 < arguments.length ? V.effects.animateClass.call(this, { remove: t }, e, i, s) : A.apply(this, arguments) }), toggleClass: (z = V.fn.toggleClass, function (t, e, i, s, n) { return "boolean" == typeof e || void 0 === e ? i ? V.effects.animateClass.call(this, e ? { add: t } : { remove: t }, i, s, n) : z.apply(this, arguments) : V.effects.animateClass.call(this, { toggle: t }, e, i, s) }), switchClass: function (t, e, i, s, n) { return V.effects.animateClass.call(this, { add: e, remove: t }, i, s, n) } }), V.expr && V.expr.pseudos && V.expr.pseudos.animated && (V.expr.pseudos.animated = (W = V.expr.pseudos.animated, function (t) { return !!V(t).data(K) || W(t) })), !1 !== V.uiBackCompat && V.extend(V.effects, { save: function (t, e) { for (var i = 0, s = e.length; i < s; i++)null !== e[i] && t.data(j + 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(j + e[s]), t.css(e[s], i)) }, setMode: function (t, e) { return e = "toggle" === e ? t.is(":hidden") ? "show" : "hide" : e }, createWrapper: function (i) { if (i.parent().is(".ui-effects-wrapper")) return i.parent(); var s = { width: i.outerWidth(!0), height: i.outerHeight(!0), float: i.css("float") }, t = V("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), e = { width: i.width(), height: i.height() }, n = document.activeElement; try { n.id } catch (t) { n = document.body } return i.wrap(t), i[0] !== n && !V.contains(i[0], n) || V(n).trigger("focus"), t = i.parent(), "static" === i.css("position") ? (t.css({ position: "relative" }), i.css({ position: "relative" })) : (V.extend(s, { position: i.css("position"), zIndex: i.css("z-index") }), V.each(["top", "left", "bottom", "right"], function (t, e) { s[e] = i.css(e), isNaN(parseInt(s[e], 10)) && (s[e] = "auto") }), i.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), i.css(e), t.css(s).show() }, removeWrapper: function (t) { var e = document.activeElement; return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), t[0] !== e && !V.contains(t[0], e) || V(e).trigger("focus")), t } }), V.extend(V.effects, { version: "1.13.2", define: function (t, e, i) { return i || (i = e, e = "effect"), V.effects.effect[t] = i, V.effects.effect[t].mode = e, i }, 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, e = "vertical" !== i ? (e || 100) / 100 : 1; return { height: t.height() * e, width: t.width() * s, outerHeight: t.outerHeight() * e, 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(); 1 < e && s.splice.apply(s, [1, 0].concat(s.splice(e, i))), t.dequeue() }, saveStyle: function (t) { t.data(q, t[0].style.cssText) }, restoreStyle: function (t) { t[0].style.cssText = t.data(q) || "", t.removeData(q) }, mode: function (t, e) { t = t.is(":hidden"); return "toggle" === e && (e = t ? "show" : "hide"), e = (t ? "hide" === e : "show" === 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 }
vendor: 18,303 bytes, line 1547
1547switch (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 (t) { var e, i = t.css("position"), s = t.position(); return t.css({ marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()), /^(static|relative)/.test(i) && (i = "absolute", e = V("<" + t[0].nodeName + ">").insertAfter(t).css({ display: /^(inline|ruby)/.test(t.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight"), float: t.css("float") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"), t.data(j + "placeholder", e)), t.css({ position: i, left: s.left, top: s.top }), e }, removePlaceholder: function (t) { var e = j + "placeholder", i = t.data(e); i && (i.remove(), t.removeData(e)) }, cleanUp: function (t) { V.effects.restoreStyle(t), V.effects.removePlaceholder(t) }, setTransition: function (s, t, n, o) { return o = o || {}, V.each(t, function (t, e) { var i = s.cssUnit(e); 0 < i[0] && (o[e] = i[0] * n + i[1]) }), o } }), V.fn.extend({ effect: function () { function t(t) { var e = V(this), i = V.effects.mode(e, r) || o; e.data(K, !0), l.push(i), o && ("show" === i || i === o && "hide" === i) && e.show(), o && "none" === i || V.effects.saveStyle(e), "function" == typeof t && t() } var s = X.apply(this, arguments), n = V.effects.effect[s.effect], o = n.mode, e = s.queue, i = e || "fx", a = s.complete, r = s.mode, l = []; return V.fx.off || !n ? r ? this[r](s.duration, a) : this.each(function () { a && a.call(this) }) : !1 === e ? this.each(t).each(h) : this.queue(i, t).queue(i, h); function h(t) { var e = V(this); function i() { "function" == typeof a && a.call(e[0]), "function" == typeof t && t() } s.mode = l.shift(), !1 === V.uiBackCompat || o ? "none" === s.mode ? (e[r](), i()) : n.call(e[0], s, function () { e.removeData(K), V.effects.cleanUp(e), "hide" === s.mode && e.hide(), i() }) : (e.is(":hidden") ? "hide" === r : "show" === r) ? (e[r](), i()) : n.call(e[0], s, i) } }, show: (R = V.fn.show, function (t) { if ($(t)) return R.apply(this, arguments); t = X.apply(this, arguments); return t.mode = "show", this.effect.call(this, t) }), hide: (L = V.fn.hide, function (t) { if ($(t)) return L.apply(this, arguments); t = X.apply(this, arguments); return t.mode = "hide", this.effect.call(this, t) }), toggle: (F = V.fn.toggle, function (t) { if ($(t) || "boolean" == typeof t) return F.apply(this, arguments); t = X.apply(this, arguments); return t.mode = "toggle", this.effect.call(this, t) }), cssUnit: function (t) { var i = this.css(t), s = []; return V.each(["em", "px", "%", "pt"], function (t, e) { 0 < i.indexOf(e) && (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)") : G(this.css("clip"), this) }, transfer: function (t, e) { var i = V(this), s = V(t.to), n = "fixed" === s.css("position"), o = V("body"), a = n ? o.scrollTop() : 0, r = n ? o.scrollLeft() : 0, o = s.offset(), o = { top: o.top - a, left: o.left - r, height: s.innerHeight(), width: s.innerWidth() }, s = i.offset(), l = V("<div class='ui-effects-transfer'></div>"); l.appendTo("body").addClass(t.className).css({ top: s.top - a, left: s.left - r, height: i.innerHeight(), width: i.innerWidth(), position: n ? "fixed" : "absolute" }).animate(o, t.duration, t.easing, function () { l.remove(), "function" == typeof e && e() }) } }), V.fx.step.clip = function (t) { t.clipInit || (t.start = V(t.elem).cssClip(), "string" == typeof t.end && (t.end = G(t.end, t.elem)), t.clipInit = !0), V(t.elem).cssClip({ top: t.pos * (t.end.top - t.start.top) + t.start.top, right: t.pos * (t.end.right - t.start.right) + t.start.right, bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom, left: t.pos * (t.end.left - t.start.left) + t.start.left }) }, Y = {}, V.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, t) { Y[t] = function (t) { return Math.pow(t, e + 2) } }), V.extend(Y, { 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((80 * (t - 1) - 7.5) * Math.PI / 15) }, Back: function (t) { return t * t * (3 * t - 2) }, Bounce: function (t) { for (var e, i = 4; 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) } }), V.each(Y, function (t, e) { V.easing["easeIn" + t] = e, V.easing["easeOut" + t] = function (t) { return 1 - e(1 - t) }, V.easing["easeInOut" + t] = function (t) { return t < .5 ? e(2 * t) / 2 : 1 - e(-2 * t + 2) / 2 } }); y = V.effects, V.effects.define("blind", "hide", function (t, e) { var i = { up: ["bottom", "top"], vertical: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], horizontal: ["right", "left"], right: ["left", "right"] }, s = V(this), n = t.direction || "up", o = s.cssClip(), a = { clip: V.extend({}, o) }, r = V.effects.createPlaceholder(s); a.clip[i[n][0]] = a.clip[i[n][1]], "show" === t.mode && (s.cssClip(a.clip), r && r.css(V.effects.clipToBox(a)), a.clip = o), r && r.animate(V.effects.clipToBox(a), t.duration, t.easing), s.animate(a, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), V.effects.define("bounce", function (t, e) { var i, s, n = V(this), o = t.mode, a = "hide" === o, r = "show" === o, l = t.direction || "up", h = t.distance, c = t.times || 5, o = 2 * c + (r || a ? 1 : 0), u = t.duration / o, d = t.easing, p = "up" === l || "down" === l ? "top" : "left", f = "up" === l || "left" === l, g = 0, t = n.queue().length; for (V.effects.createPlaceholder(n), l = n.css(p), h = h || n["top" == p ? "outerHeight" : "outerWidth"]() / 3, r && ((s = { opacity: 1 })[p] = l, n.css("opacity", 0).css(p, f ? 2 * -h : 2 * h).animate(s, u, d)), a && (h /= Math.pow(2, c - 1)), (s = {})[p] = l; g < c; g++)(i = {})[p] = (f ? "-=" : "+=") + h, n.animate(i, u, d).animate(s, u, d), h = a ? 2 * h : h / 2; a && ((i = { opacity: 0 })[p] = (f ? "-=" : "+=") + h, n.animate(i, u, d)), n.queue(e), V.effects.unshift(n, t, 1 + o) }), V.effects.define("clip", "hide", function (t, e) { var i = {}, s = V(this), n = t.direction || "vertical", o = "both" === n, a = o || "horizontal" === n, o = o || "vertical" === n, n = s.cssClip(); i.clip = { top: o ? (n.bottom - n.top) / 2 : n.top, right: a ? (n.right - n.left) / 2 : n.right, bottom: o ? (n.bottom - n.top) / 2 : n.bottom, left: a ? (n.right - n.left) / 2 : n.left }, V.effects.createPlaceholder(s), "show" === t.mode && (s.cssClip(i.clip), i.clip = n), s.animate(i, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), V.effects.define("drop", "hide", function (t, e) { var i = V(this), s = "show" === t.mode, n = t.direction || "left", o = "up" === n || "down" === n ? "top" : "left", a = "up" === n || "left" === n ? "-=" : "+=", r = "+=" == a ? "-=" : "+=", l = { opacity: 0 }; V.effects.createPlaceholder(i), n = t.distance || i["top" == o ? "outerHeight" : "outerWidth"](!0) / 2, l[o] = a + n, s && (i.css(l), l[o] = r + n, l.opacity = 1), i.animate(l, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), V.effects.define("explode", "hide", function (t, e) { var i, s, n, o, a, r, l = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, h = l, c = V(this), u = "show" === t.mode, d = c.show().css("visibility", "hidden").offset(), p = Math.ceil(c.outerWidth() / h), f = Math.ceil(c.outerHeight() / l), g = []; function m() { g.push(this), g.length === l * h && (c.css({ visibility: "visible" }), V(g).remove(), e()) } for (i = 0; i < l; i++)for (o = d.top + i * f, r = i - (l - 1) / 2, s = 0; s < h; s++)n = d.left + s * p, a = s - (h - 1) / 2, c.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -s * p, top: -i * f }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: p, height: f, left: n + (u ? a * p : 0), top: o + (u ? r * f : 0), opacity: u ? 0 : 1 }).animate({ left: n + (u ? 0 : a * p), top: o + (u ? 0 : r * f), opacity: u ? 1 : 0 }, t.duration || 500, t.easing, m) }), V.effects.define("fade", "toggle", function (t, e) { var i = "show" === t.mode; V(this).css("opacity", i ? 0 : 1).animate({ opacity: i ? 1 : 0 }, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), V.effects.define("fold", "hide", function (e, t) { var i = V(this), s = e.mode, n = "show" === s, o = "hide" === s, a = e.size || 15, r = /([0-9]+)%/.exec(a), l = !!e.horizFirst ? ["right", "bottom"] : ["bottom", "right"], h = e.duration / 2, c = V.effects.createPlaceholder(i), u = i.cssClip(), d = { clip: V.extend({}, u) }, p = { clip: V.extend({}, u) }, f = [u[l[0]], u[l[1]]], s = i.queue().length; r && (a = parseInt(r[1], 10) / 100 * f[o ? 0 : 1]), d.clip[l[0]] = a, p.clip[l[0]] = a, p.clip[l[1]] = 0, n && (i.cssClip(p.clip), c && c.css(V.effects.clipToBox(p)), p.clip = u), i.queue(function (t) { c && c.animate(V.effects.clipToBox(d), h, e.easing).animate(V.effects.clipToBox(p), h, e.easing), t() }).animate(d, h, e.easing).animate(p, h, e.easing).queue(t), V.effects.unshift(i, s, 4) }), V.effects.define("highlight", "show", function (t, e) { var i = V(this), s = { backgroundColor: i.css("backgroundColor") }; "hide" === t.mode && (s.opacity = 0), V.effects.saveStyle(i), i.css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }).animate(s, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), V.effects.define("size", function (s, e) { var n, i = V(this), t = ["fontSize"], o = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], a = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], r = s.mode, l = "effect" !== r, h = s.scale || "both", c = s.origin || ["middle", "center"], u = i.css("position"), d = i.position(), p = V.effects.scaledDimensions(i), f = s.from || p, g = s.to || V.effects.scaledDimensions(i, 0); V.effects.createPlaceholder(i), "show" === r && (r = f, f = g, g = r), n = { from: { y: f.height / p.height, x: f.width / p.width }, to: { y: g.height / p.height, x: g.width / p.width } }, "box" !== h && "both" !== h || (n.from.y !== n.to.y && (f = V.effects.setTransition(i, o, n.from.y, f), g = V.effects.setTransition(i, o, n.to.y, g)), n.from.x !== n.to.x && (f = V.effects.setTransition(i, a, n.from.x, f), g = V.effects.setTransition(i, a, n.to.x, g))), "content" !== h && "both" !== h || n.from.y !== n.to.y && (f = V.effects.setTransition(i, t, n.from.y, f), g = V.effects.setTransition(i, t, n.to.y, g)), c && (c = V.effects.getBaseline(c, p), f.top = (p.outerHeight - f.outerHeight) * c.y + d.top, f.left = (p.outerWidth - f.outerWidth) * c.x + d.left, g.top = (p.outerHeight - g.outerHeight) * c.y + d.top, g.left = (p.outerWidth - g.outerWidth) * c.x + d.left), delete f.outerHeight, delete f.outerWidth, i.css(f), "content" !== h && "both" !== h || (o = o.concat(["marginTop", "marginBottom"]).concat(t), a = a.concat(["marginLeft", "marginRight"]), i.find("*[width]").each(function () { var t = V(this), e = V.effects.scaledDimensions(t), i = { height: e.height * n.from.y, width: e.width * n.from.x, outerHeight: e.outerHeight * n.from.y, outerWidth: e.outerWidth * n.from.x }, e = { height: e.height * n.to.y, width: e.width * n.to.x, outerHeight: e.height * n.to.y, outerWidth: e.width * n.to.x }; n.from.y !== n.to.y && (i = V.effects.setTransition(t, o, n.from.y, i), e = V.effects.setTransition(t, o, n.to.y, e)), n.from.x !== n.to.x && (i = V.effects.setTransition(t, a, n.from.x, i), e = V.effects.setTransition(t, a, n.to.x, e)), l && V.effects.saveStyle(t), t.css(i), t.animate(e, s.duration, s.easing, function () { l && V.effects.restoreStyle(t) }) })), i.animate(g, { queue: !1, duration: s.duration, easing: s.easing, complete: function () { var t = i.offset(); 0 === g.opacity && i.css("opacity", f.opacity), l || (i.css("position", "static" === u ? "relative" : u).offset(t), V.effects.saveStyle(i)), e() } }) }), V.effects.define("scale", function (t, e) { var i = V(this), s = t.mode, s = parseInt(t.percent, 10) || (0 === parseInt(t.percent, 10) || "effect" !== s ? 0 : 100), s = V.extend(!0, { from: V.effects.scaledDimensions(i), to: V.effects.scaledDimensions(i, s, t.direction || "both"), origin: t.origin || ["middle", "center"] }, t); t.fade && (s.from.opacity = 1, s.to.opacity = 0), V.effects.effect.size.call(this, s, e) }), V.effects.define("puff", "hide", function (t, e) { t = V.extend(!0, {}, t, { fade: !0, percent: parseInt(t.percent, 10) || 150 }); V.effects.effect.scale.call(this, t, e) }), V.effects.define("pulsate", "show", function (t, e) { var i = V(this), s = t.mode, n = "show" === s, o = 2 * (t.times || 5) + (n || "hide" === s ? 1 : 0), a = t.duration / o, r = 0, l = 1, s = i.queue().length; for (!n && i.is(":visible") || (i.css("opacity", 0).show(), r = 1); l < o; l++)i.animate({ opacity: r }, a, t.easing), r = 1 - r; i.animate({ opacity: r }, a, t.easing), i.queue(e), V.effects.unshift(i, s, 1 + o) }), V.effects.define("shake", function (t, e) { var i = 1, s = V(this), n = t.direction || "left", o = t.distance || 20, a = t.times || 3, r = 2 * a + 1, l = Math.round(t.duration / r), h = "up" === n || "down" === n ? "top" : "left", c = "up" === n || "left" === n, u = {}, d = {}, p = {}, n = s.queue().length; for (V.effects.createPlaceholder(s), u[h] = (c ? "-=" : "+=") + o, d[h] = (c ? "+=" : "-=") + 2 * o, p[h] = (c ? "-=" : "+=") + 2 * o, s.animate(u, l, t.easing); i < a; i++)s.animate(d, l, t.easing).animate(p, l, t.easing); s.animate(d, l, t.easing).animate(u, l / 2, t.easing).queue(e), V.effects.unshift(s, n, 1 + r) }), V.effects.define("slide", "show", function (t, e) { var i, s, n = V(this), o = { up: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], right: ["left", "right"] }, a = t.mode, r = t.direction || "left", l = "up" === r || "down" === r ? "top" : "left", h = "up" === r || "left" === r, c = t.distance || n["top" == l ? "outerHeight" : "outerWidth"](!0), u = {}; V.effects.createPlaceholder(n), i = n.cssClip(), s = n.position()[l], u[l] = (h ? -1 : 1) * c + s, u.clip = n.cssClip(), u.clip[o[r][1]] = u.clip[o[r][0]], "show" === a && (n.cssClip(u.clip), n.css(l, u[l]), u.clip = i, u[l] = s), n.animate(u, { queue: !1, duration: t.duration, easing: t.easing, complete: e }) }), y = !1 !== V.uiBackCompat ? V.effects.define("transfer", function (t, e) { V(this).transfer(t, e) }) : y; V.ui.focusable = function (t, e) { var i, s, n, o, a = t.nodeName.toLowerCase(); return "area" === a ? (s = (i = t.parentNode).name, !(!t.href || !s || "map" !== i.nodeName.toLowerCase()) && (0 < (s = V("img[usemap='#" + s + "']")).length && s.is(":visible"))) : (/^(input|select|textarea|button|object)$/.test(a) ? (n = !t.disabled) && (o = V(t).closest("fieldset")[0]) && (n = !o.disabled) : n = "a" === a && t.href || e, n && V(t).is(":visible") && function (t) { var e = t.css("visibility"); for (; "inherit" === e;)t = t.parent(), e = t.css("visibility"); return "visible" === e }(V(t))) }, V.extend(V.expr.pseudos, { focusable: function (t) { return V.ui.focusable(t, null != V.attr(t, "tabindex")) } }); var Q, J; V.ui.focusable, V.fn._form = function () { return "string" == typeof this[0].form ? this.closest("form") : V(this[0].form) }, V.ui.formResetMixin = { _formResetHandler: function () { var e = V(this); setTimeout(function () { var t = e.data("ui-form-reset-instances"); V.each(t, function () { this.refresh() }) }) }, _bindFormResetHandler: function () { var t; this.form = this.element._form(), this.form.length && ((t = this.form.data("ui-form-reset-instances") || []).length || this.form.on("reset.ui-form-reset", this._formResetHandler), t.push(this), this.form.data("ui-form-reset-instances", t)) }, _unbindFormResetHandler: function () { var t; this.form.length && ((t = this.form.data("ui-form-reset-instances")).splice(V.inArray(this, t), 1), t.length ? this.form.data("ui-form-reset-instances", t) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")) } }; V.expr.pseudos || (V.expr.pseudos = V.expr[":"]), V.uniqueSort || (V.uniqueSort = V.unique), V.escapeSelector || (Q = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, J = function (t, e) { return e ? "\0" === t ? "�" : t.slice(0, -1) + "\\" + t.charCodeAt(t.length - 1).toString(16) + " " : "\\" + t }, V.escapeSelector = function (t) { return (t + "").replace(Q, J) }), V.fn.even && V.fn.odd || V.fn.extend({ even: function () { return this.filter(function (t) { return t % 2 == 0 }) }, odd: function () { return this.filter(function (t) { return t % 2 == 1 }) } }); var Z; V.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 }, V.fn.labels = function () { var t, e, i; return this.length ? this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (e = this.eq(0).parents("label"), (t = this.attr("id")) && (i = (i = this.eq(0).parents().last()).add((i.length ? i : this).siblings()), t = "label[for='" + V.escapeSelector(t) + "']", e = e.add(i.find(t).addBack(t))), this.pushStack(e)) : this.pushStack([]) }, V.fn.scrollParent = function (t) { var e = this.css("position"), i = "absolute" === e, s = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/, t = this.parents().filter(function () { var t = V(this); return (!i || "static" !== t.css("position")) && s.test(t.css("overflow") + t.css("overflow-y") + t.css("overflow-x")) }).eq(0); return "fixed" !== e && t.length ? t : V(this[0].ownerDocument || document) }, V.extend(V.expr.pseudos, { tabbable: function (t) { var e = V.attr(t, "tabindex"), i = null != e; return (!i || 0 <= e) && V.ui.focusable(t, i) } }), V.fn.extend({ uniqueId: (Z = 0, function () { return this.each(function () { this.id || (this.id = "ui-id-" + ++
vendor: 31,408 bytes, line 1547
1547Z) }) }), removeUniqueId: function () { return this.each(function () { /^ui-id-\d+$/.test(this.id) && V(this).removeAttr("id") }) } }), V.widget("ui.accordion", { version: "1.13.2", 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)").even()) }, 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 t = this.options; this.prevShow = this.prevHide = V(), this._addClass("ui-accordion", "ui-widget ui-helper-reset"), this.element.attr("role", "tablist"), t.collapsible || !1 !== t.active && null != t.active || (t.active = 0), this._processPanels(), t.active < 0 && (t.active += this.headers.length), this._refresh() }, _getCreateEventData: function () { return { header: this.active, panel: this.active.length ? this.active.next() : V() } }, _createIcons: function () { var t, e = this.options.icons; e && (t = V("<span>"), this._addClass(t, "ui-accordion-header-icon", "ui-icon " + e.header), t.prependTo(this.headers), t = this.active.children(".ui-accordion-header-icon"), this._removeClass(t, e.header)._addClass(t, null, e.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) { "active" !== t ? ("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())) : this._activate(e) }, _setOptionDisabled: function (t) { this._super(t), this.element.attr("aria-disabled", t), this._toggleClass(null, "ui-state-disabled", !!t), this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!t) }, _keydown: function (t) { if (!t.altKey && !t.ctrlKey) { var e = V.ui.keyCode, i = this.headers.length, s = this.headers.index(t.target), n = !1; switch (t.keyCode) { case e.RIGHT: case e.DOWN: n = this.headers[(s + 1) % i]; break; case e.LEFT: case e.UP: n = this.headers[(s - 1 + i) % i]; break; case e.SPACE: case e.ENTER: this._eventHandler(t); break; case e.HOME: n = this.headers[0]; break; case e.END: n = this.headers[i - 1] }n && (V(t.target).attr("tabIndex", -1), V(n).attr("tabIndex", 0), V(n).trigger("focus"), t.preventDefault()) } }, _panelKeyDown: function (t) { t.keyCode === V.ui.keyCode.UP && t.ctrlKey && V(t.currentTarget).prev().trigger("focus") }, refresh: function () { var t = this.options; this._processPanels(), !1 === t.active && !0 === t.collapsible || !this.headers.length ? (t.active = !1, this.active = V()) : !1 === t.active ? this._activate(0) : this.active.length && !V.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = V()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active), 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 i, t = this.options, e = t.heightStyle, s = this.element.parent(); this.active = this._findActive(t.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 t = V(this), e = t.uniqueId().attr("id"), i = t.next(), s = i.uniqueId().attr("id"); t.attr("aria-controls", s), i.attr("aria-labelledby", e) }).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(t.event), "fill" === e ? (i = s.height(), this.element.siblings(":visible").each(function () { var t = V(this), e = t.css("position"); "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0)) }), this.headers.each(function () { i -= V(this).outerHeight(!0) }), this.headers.next().each(function () { V(this).height(Math.max(0, i - V(this).innerHeight() + V(this).height())) }).css("overflow", "auto")) : "auto" === e && (i = 0, this.headers.next().each(function () { var t = V(this).is(":visible"); t || V(this).show(), i = Math.max(i, V(this).css("height", "").height()), t || V(this).hide() }).height(i)) }, _activate: function (t) { t = this._findActive(t)[0]; t !== this.active[0] && (t = t || this.active[0], this._eventHandler({ target: t, currentTarget: t, preventDefault: V.noop })) }, _findActive: function (t) { return "number" == typeof t ? this.headers.eq(t) : V() }, _setupEvents: function (t) { var i = { keydown: "_keydown" }; t && V.each(t.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 (t) { var e = this.options, i = this.active, s = V(t.currentTarget), n = s[0] === i[0], o = n && e.collapsible, a = o ? V() : s.next(), r = i.next(), a = { oldHeader: i, oldPanel: r, newHeader: o ? V() : s, newPanel: a }; t.preventDefault(), n && !e.collapsible || !1 === this._trigger("beforeActivate", t, a) || (e.active = !o && this.headers.index(s), this.active = n ? V() : s, this._toggle(a), this._removeClass(i, "ui-accordion-header-active", "ui-state-active"), e.icons && (i = i.children(".ui-accordion-header-icon"), this._removeClass(i, null, e.icons.activeHeader)._addClass(i, null, e.icons.header)), n || (this._removeClass(s, "ui-accordion-header-collapsed")._addClass(s, "ui-accordion-header-active", "ui-state-active"), e.icons && (n = s.children(".ui-accordion-header-icon"), this._removeClass(n, null, e.icons.header)._addClass(n, null, e.icons.activeHeader)), this._addClass(s.next(), "ui-accordion-content-active"))) }, _toggle: function (t) { var e = t.newPanel, i = this.prevShow.length ? this.prevShow : t.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = e, this.prevHide = i, this.options.animate ? this._animate(e, i, t) : (i.hide(), e.show(), this._toggleComplete(t)), i.attr({ "aria-hidden": "true" }), i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }), e.length && i.length ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : e.length && this.headers.filter(function () { return 0 === parseInt(V(this).attr("tabIndex"), 10) }).attr("tabIndex", -1), e.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _animate: function (t, i, e) { var s, n, o, a = this, r = 0, l = t.css("box-sizing"), h = t.length && (!i.length || t.index() < i.index()), c = this.options.animate || {}, u = h && c.down || c, h = function () { a._toggleComplete(e) }; return n = (n = "string" == typeof u ? u : n) || u.easing || c.easing, o = (o = "number" == typeof u ? u : o) || u.duration || c.duration, i.length ? t.length ? (s = t.show().outerHeight(), i.animate(this.hideProps, { duration: o, easing: n, step: function (t, e) { e.now = Math.round(t) } }), void t.hide().animate(this.showProps, { duration: o, easing: n, complete: h, step: function (t, e) { e.now = Math.round(t), "height" !== e.prop ? "content-box" === l && (r += e.now) : "content" !== a.options.heightStyle && (e.now = Math.round(s - i.outerHeight() - r), r = 0) } })) : i.animate(this.hideProps, o, n, h) : t.animate(this.showProps, o, n, h) }, _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"), e.length && (e.parent()[0].className = e.parent()[0].className), this._trigger("activate", null, t) } }), V.ui.safeActiveElement = function (e) { var i; try { i = e.activeElement } catch (t) { i = e.body } return i = !(i = i || e.body).nodeName ? e.body : i }, V.widget("ui.menu", { version: "1.13.2", 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 (t) { var e = V(t.target), i = V(V.ui.safeActiveElement(this.document[0])); !this.mouseHandled && e.not(".ui-state-disabled").length && (this.select(t), t.isPropagationStopped() || (this.mouseHandled = !0), e.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && i.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 (t) { this._delay(function () { V.contains(this.element[0], V.ui.safeActiveElement(this.document[0])) || this.collapseAll(t) }) }, keydown: "_keydown" }), this.refresh(), this._on(this.document, { click: function (t) { this._closeOnDocumentClick(t) && this.collapseAll(t, !0), this.mouseHandled = !1 } }) }, _activateItem: function (t) { var e, i; this.previousFilter || t.clientX === this.lastMousePosition.x && t.clientY === this.lastMousePosition.y || (this.lastMousePosition = { x: t.clientX, y: t.clientY }, e = V(t.target).closest(".ui-menu-item"), i = V(t.currentTarget), e[0] === i[0] && (i.is(".ui-state-active") || (this._removeClass(i.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(t, i)))) }, _destroy: function () { var t = 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(), t.children().each(function () { var t = V(this); t.data("ui-menu-submenu-caret") && t.remove() }) }, _keydown: function (t) { var e, i, s, n = !0; switch (t.keyCode) { case V.ui.keyCode.PAGE_UP: this.previousPage(t); break; case V.ui.keyCode.PAGE_DOWN: this.nextPage(t); break; case V.ui.keyCode.HOME: this._move("first", "first", t); break; case V.ui.keyCode.END: this._move("last", "last", t); break; case V.ui.keyCode.UP: this.previous(t); break; case V.ui.keyCode.DOWN: this.next(t); break; case V.ui.keyCode.LEFT: this.collapse(t); break; case V.ui.keyCode.RIGHT: this.active && !this.active.is(".ui-state-disabled") && this.expand(t); break; case V.ui.keyCode.ENTER: case V.ui.keyCode.SPACE: this._activate(t); break; case V.ui.keyCode.ESCAPE: this.collapse(t); break; default: e = this.previousFilter || "", s = n = !1, i = 96 <= t.keyCode && t.keyCode <= 105 ? (t.keyCode - 96).toString() : String.fromCharCode(t.keyCode), clearTimeout(this.filterTimer), i === e ? s = !0 : i = e + i, e = this._filterMenuItems(i), (e = s && -1 !== e.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : e).length || (i = String.fromCharCode(t.keyCode), e = this._filterMenuItems(i)), e.length ? (this.focus(t, e), this.previousFilter = i, this.filterTimer = this._delay(function () { delete this.previousFilter }, 1e3)) : delete this.previousFilter }n && t.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 t, e, s = this, n = this.options.icons.submenu, i = this.element.find(this.options.menus); this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length), e = i.filter(":not(.ui-menu)").hide().attr({ role: this.options.role, "aria-hidden": "true", "aria-expanded": "false" }).each(function () { var t = V(this), e = t.prev(), i = V("<span>").data("ui-menu-submenu-caret", !0); s._addClass(i, "ui-menu-icon", "ui-icon " + n), e.attr("aria-haspopup", "true").prepend(i), t.attr("aria-labelledby", e.attr("id")) }), this._addClass(e, "ui-menu", "ui-widget ui-widget-content ui-front"), (t = i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function () { var t = V(this); s._isDivider(t) && s._addClass(t, "ui-menu-divider", "ui-widget-content") }), i = (e = t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({ tabIndex: -1, role: this._itemRole() }), this._addClass(e, "ui-menu-item")._addClass(i, "ui-menu-item-wrapper"), t.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !V.contains(this.element[0], this.active[0]) && this.blur() }, _itemRole: function () { return { menu: "menuitem", listbox: "option" }[this.options.role] }, _setOption: function (t, e) { var i; "icons" === t && (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; this.blur(t, t && "focus" === t.type), this._scrollIntoView(e), this.active = e.first(), i = this.active.children(".ui-menu-item-wrapper"), this._addClass(i, null, "ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", i.attr("id")), i = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"), this._addClass(i, 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 (t) { var e, i, s; this._hasScroll() && (i = parseFloat(V.css(this.activeMenu[0], "borderTopWidth")) || 0, s = parseFloat(V.css(this.activeMenu[0], "paddingTop")) || 0, e = t.offset().top - this.activeMenu.offset().top - i - s, i = this.activeMenu.scrollTop(), s = this.activeMenu.height(), t = t.outerHeight(), e < 0 ? this.activeMenu.scrollTop(i + e) : s < e + t && this.activeMenu.scrollTop(i + e - s + t)) }, 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 (t) { var e = V.extend({ of: this.active }, this.options.position); clearTimeout(this.timer), this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"), t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(e) }, collapseAll: function (e, i) { clearTimeout(this.timer), this.timer = this._delay(function () { var t = i ? this.element : V(e && e.target).closest(this.element.find(".ui-menu")); t.length || (t = this.element), this._close(t), this.blur(e), this._removeClass(t.find(".ui-state-active"), null, "ui-state-active"), this.activeMenu = t }, i ? 0 : this.delay) }, _close: function (t) { (t = t || (this.active ? this.active.parent() : this.element)).find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false") }, _closeOnDocumentClick: function (t) { return !V(t.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; (s = this.active ? "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 (t) { var e, i, s; this.active ? this.isLastItem() || (this._hasScroll() ? (i = this.active.offset().top, s = this.element.innerHeight(), 0 === V.fn.jquery.indexOf("3.2.") && (s += this.element[0].offsetHeight - this.element.outerHeight()), this.active.nextAll(".ui-menu-item").each(function () { return (e = V(this)).offset().top - i - s < 0 }), this.focus(t, e)) : this.focus(t, this._menuItems(this.activeMenu)[this.active ? "last" : "first"]())) : this.next(t) }, previousPage: function (t) { var e, i, s; this.active ? this.isFirstItem() || (this._hasScroll() ? (i = this.active.offset().top, s = this.element.innerHeight(), 0 === V.fn.jquery.indexOf("3.2.") && (s += this.element[0].offsetHeight - this.element.outerHeight()), this.active.prevAll(".ui-menu-item").each(function () { return 0 < (e = V(this)).offset().top - i + s }), this.focus(t, e)) : this.focus(t, this._menuItems(this.activeMenu).first())) : this.next(t) }, _hasScroll: function () { return this.element.outerHeight() < this.element.prop("scrollHeight") }, select: function (t) { this.active = this.active || V(t.target).closest(".ui-menu-item"); var e = { item: this.active }; this.active.has(".ui-menu").length || this.collapseAll(t, !0), this._trigger("select", t, e) }, _filterMenuItems: function (t) { var t = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), e = new RegExp("^" + t, "i"); return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function () { return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text())) }) } }); V.widget("ui.autocomplete", { version: "1.13.2", 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 i, s, n, t = this.element[0].nodeName.toLowerCase(), e = "textarea" === t, t = "input" === t; this.isMultiLine = e || !t && this._isContentEditable(this.element), this.valueMethod = this.element[e || t ? "val" : "text"], this.isNewMenu = !0, this._addClass("ui-autocomplete-input"), this.element.attr("autocomplete", "off"), this._on(this.element, { keydown: function (t) { if (this.element.prop("readOnly")) s = n = i = !0; else { s = n = i = !1; var e = V.ui.keyCode; switch (t.keyCode) { case e.PAGE_UP: i = !0, this._move("previousPage", t); break; case e.PAGE_DOWN: i = !0, this._move("nextPage", t); break; case e.UP: i = !0, this._keyEvent("previous", t); break; case e.DOWN: i = !0, this._keyEvent("next", t); break; case e.ENTER: this.menu.active && (i = !0, t.preventDefault(), this.menu.select(t)); break; case e.TAB: this.menu.active && this.menu.select(t); break; case e.ESCAPE: this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(t), t.preventDefault()); break; default: s = !0, this._searchTimeout(t) } } }, keypress: function (t) { if (i) return i = !1, void (this.isMultiLine && !this.menu.element.is(":visible") || t.preventDefault()); if (!s) { var e = V.ui.keyCode; switch (t.keyCode) { case e.PAGE_UP: this._move("previousPage", t); break; case e.PAGE_DOWN: this._move("nextPage", t); break; case e.UP: this._keyEvent("previous", t); break; case e.DOWN: this._keyEvent("next", t) } } }, input: function (t) { if (n) return n = !1, void t.preventDefault(); this._searchTimeout(t) }, focus: function () { this.selectedItem = null, this.previous = this._value() }, blur: function (t) { clearTimeout(this.searching), this.close(t), this._change(t) } }), this._initSource(), this.menu = V("<ul>").appendTo(this._appendTo()).menu({ role: null }).hide().attr({ unselectable: "on" }).menu("instance"), this._addClass(this.menu.element, "ui-autocomplete", "ui-front"), this._on(this.menu.element, { mousedown: function (t) { t.preventDefault() }, menufocus: function (t, e) { var i, s; if (this.isNewMenu && (this.isNewMenu = !1, t.originalEvent && /^mouse/.test(t.originalEvent.type))) return this.menu.blur(), void this.document.one("mousemove", function () { V(t.target).trigger(t.originalEvent) }); s = e.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", t, { item: s }) && t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(s.value), (i = e.item.attr("aria-label") || s.value) && String.prototype.trim.call(i).length && (clearTimeout(this.liveRegionTimer), this.liveRegionTimer = this._delay(function () { this.liveRegion.html(V("<div>").text(i)) }, 100)) }, menuselect: function (t, e) { var i = e.item.data("ui-autocomplete-item"), s = this.previous; this.element[0] !== V.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = s, this._delay(function () { this.previous = s, this.selectedItem = i })), !1 !== this._trigger("select", t, { item: i }) && this._value(i.value), this.term = this._value(), this.close(t), this.selectedItem = i } }), this.liveRegion = V("<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 (t) { var e = this.menu.element[0]; return t.target === this.element[0] || t.target === e || V.contains(e, t.target) }, _closeOnClickOutside: function (t) { this._isEventTargetInWidget(t) || this.close() }, _appendTo: function () { var t = this.options.appendTo; return t = !(t = !(t = t && (t.jquery || t.nodeType ? V(t) : this.document.find(t).eq(0))) || !t[0] ? this.element.closest(".ui-front, dialog") : t).length ? this.document[0].body : t }, _initSource: function () { var i, s, n = this; Array.isArray(this.options.source) ? (i = this.options.source, this.source = function (t, e) { e(V.ui.autocomplete.filter(i, t.term)) }) : "string" == typeof this.options.source ? (s = this.options.source, this.source = function (t, e) { n.xhr && n.xhr.abort(), n.xhr = V.ajax({ url: s, data: t, dataType: "json", success: function (t) { e(t) }, error: function () { e([]) } }) }) : this.source = this.options.source }, _searchTimeout: function (s) { clearTimeout(this.searching), this.searching = this._delay(function () { var t = this.term === this._value(), e = this.menu.element.is(":visible"), i = s.altKey || s.ctrlKey || s.metaKey || s.shiftKey; t && (e || i) || (this.selectedItem = null, this.search(null, s)) }, 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 e = ++this.requestIndex; return function (t) { e === this.requestIndex && this.__response(t), 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 (t) { return t.length && t[0].label && t[0].value ? t : V.map(t, function (t) { return "string" == typeof t ? { label: t, value: t } : V.extend({}, t, { label: t.label || t.value, value: t.value || t.label }) }) }, _suggest: function (t) { var e = this.menu.element.empty(); this._renderMenu(e, t), this.isNewMenu = !0, this.menu.refresh(), e.show(), this._resizeMenu(), e.position(V.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 (i, t) { var s = this; V.each(t, function (t, e) { s._renderItemData(i, e) }) }, _renderItemData: function (t, e) { return this._renderItem(t, e).data("ui-autocomplete-item", e) }, _renderItem: function (t, e) { return V("<li>").append(V("<div>").text(e.label)).appendTo(t) }, _move: function (t, e) { if (this.menu.element.is(":visible")) return this.menu.isFirstItem() && /^previous/.test(t) || this.menu.isLastItem() && /^next/.test(t) ? (this.isMultiLine || this._value(this.term), void this.menu.blur()) : void this.menu[t](e); this.search(null, 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()) }, _isContentEditable: function (t) { if (!t.length) return !1; var e = t.prop("contentEditable"); return "inherit" === e ? this._isContentEditable(t.parent()) : "true" === e } }), V.extend(V.ui.autocomplete, { escapeRegex: function (t) { return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") }, filter: function (t, e) { var i = new RegExp(V.ui.autocomplete.escapeRegex(e), "i"); return V.grep(t, function (t) { return i.test(t.label || t.value || t) }) } }), V.widget("ui.autocomplete", V.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function (t) { return t + (1 < t ? " results are" : " result is") + " available, use up and down arrow keys to navigate." } } }, __response: function (t) { var e; this._superApply(arguments), this.options.disabled || this.cancelSearch || (e = t && t.length ? this.options.messages.results(t.length) : this.options.messages.noResults, clearTimeout(this.liveRegionTimer), this.liveRegionTimer = this._delay(function () { this.liveRegion.html(V("<div>").text(e)) }, 100)) } }); V.ui.autocomplete; var tt = /ui-corner-([a-z]){2,6}/g; V.widget("ui.controlgroup", { version: "1.13.2", 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 o = this, a = []; V.each(this.options.items, function (s, t) { var e, n = {}; if (t) return "controlgroupLabel" === s ? ((e = o.element.find(t)).each(function () { var t = V(this); t.children(".ui-controlgroup-label-contents").length || t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>") }), o._addClass(e, null, "ui-widget ui-widget-content ui-state-default"), void (a = a.concat(e.get()))) : void (V.fn[s] && (n = o["_" + s + "Options"] ? o["_" + s + "Options"]("middle") : { classes: {} }, o.element.find(t).each(function () { var t = V(this), e = t[s]("instance"), i = V.widget.extend({}, n); "button" === s && t.parent(".ui-spinner").length || ((e = e || t[
vendor: 4,792 bytes, line 1547
1547s]()[s]("instance")) && (i.classes = o._resolveClassesValues(i.classes, e)), t[s](i), i = t[s]("widget"), V.data(i[0], "ui-controlgroup-data", e || t[s]("instance")), a.push(i[0])) }))) }), this.childWidgets = V(V.uniqueSort(a)), this._addClass(this.childWidgets, "ui-controlgroup-item") }, _callChildMethod: function (e) { this.childWidgets.each(function () { var t = V(this).data("ui-controlgroup-data"); t && t[e] && t[e]() }) }, _updateCornerClass: function (t, e) { e = 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, e) }, _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) { t = this._buildSimpleOptions(t, "ui-spinner"); return t.classes["ui-spinner-up"] = "", t.classes["ui-spinner-down"] = "", t }, _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 (i, s) { var n = {}; return V.each(i, function (t) { var e = s.options.classes[t] || "", e = String.prototype.trim.call(e.replace(tt, "")); n[t] = (e + " " + i[t]).replace(/\s+/g, " ") }), n }, _setOption: function (t, e) { "direction" === t && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(t, e), "disabled" !== t ? this.refresh() : this._callChildMethod(e ? "disable" : "enable") }, refresh: function () { var n, o = this; this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction), "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"), this._initWidgets(), n = this.childWidgets, (n = this.options.onlyVisible ? n.filter(":visible") : n).length && (V.each(["first", "last"], function (t, e) { var i, s = n[e]().data("ui-controlgroup-data"); s && o["_" + s.widgetName + "Options"] ? ((i = o["_" + s.widgetName + "Options"](1 === n.length ? "only" : e)).classes = o._resolveClassesValues(i.classes, s), s.element[s.widgetName](i)) : o._updateCornerClass(n[e](), e) }), this._callChildMethod("refresh")) } }); V.widget("ui.checkboxradio", [V.ui.formResetMixin, { version: "1.13.2", options: { disabled: null, label: null, icon: !0, classes: { "ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all" } }, _getCreateOptions: function () { var t, e = this._super() || {}; return this._readType(), t = this.element.labels(), this.label = V(t[t.length - 1]), this.label.length || V.error("No label found for checkboxradio widget"), this.originalLabel = "", (t = this.label.contents().not(this.element[0])).length && (this.originalLabel += t.clone().wrapAll("<div></div>").parent().html()), this.originalLabel && (e.label = this.originalLabel), null != (t = this.element[0].disabled) && (e.disabled = t), e }, _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 t = this.element[0].nodeName.toLowerCase(); this.type = this.element[0].type, "input" === t && /radio|checkbox/.test(this.t
vendor: 1,502 bytes, line 1547
1547ype) || V.error("Can't create checkboxradio on element.nodeName=" + t + " and element.type=" + this.type) }, _enhance: function () { this._updateIcon(this.element[0].checked) }, widget: function () { return this.label }, _getRadioGroup: function () { var t = this.element[0].name, e = "input[name='" + V.escapeSelector(t) + "']"; return t ? (this.form.length ? V(this.form[0].elements).filter(e) : V(e).filter(function () { return 0 === V(this)._form().length })).not(this.element) : V([]) }, _toggleClasses: function () { var t = this.element[0].checked; this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t), this.options.icon && "checkbox" === this.type && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", t)._toggleClass(this.icon, null, "ui-icon-blank", !t), "radio" === this.type && this._getRadioGroup().each(function () { var t = V(this).checkboxradio("instance"); t && t._removeClass(t.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) return this._toggleClass(this.label, null, "ui-state-disabled", e), void (this.element[0].disabled = e); this.refresh() } }, _updateIcon: function (t) { var e = "ui-icon ui-icon-background "; this.options.icon ? (this.icon || (this.icon = V("<span>"), this.iconSpace = V("<span> </span>
1547"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), "checkbox" === this.type ? (e += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, t ? "ui-icon-blank" : "ui-icon-check")) : e += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", e), t || 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])), (t = this.iconSpace ? 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 }) } }]); var et; V.ui.checkboxradio; V.widget("ui.button", { version: "1.13.2", 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 (t) { t.keyCode === V.ui.keyCode.SPACE && (t.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 (t, e) { var i = "iconPosition" !== t, s = i ? this.options.iconPosition : e, t = "top" === s || "bottom" === s; this.icon ? i && this._removeClass(this.icon, null, this.options.icon) : (this.icon = V("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")), i && this._addClass(this.icon, null, e), this._attachIcon(s), t ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = V("<span> </span>
1547"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(s)) }, _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 : t).showLabel, i = (void 0 === t.icon ? this.options : 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) && 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() } }), !1 !== V.uiBackCompat && (V.widget("ui.button", V.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.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = "end"), this._super() }, _setOption: function (t, e) { "text" !== t ? ("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)) : this._super("showLabel", e) } }), V.fn.button = (et = V.fn.button, function (i) { var t = "string" == typeof i, s = Array.prototype.slice.call(arguments, 1), n = this; return t ? this.length || "instance" !== i ? this.each(function () { var t = V(this).attr("type"), e = V.data(this, "ui-" + ("checkbox" !== t && "radio" !== t ? "button" : "checkboxradio")); return "instance" === i ? (n = e, !1) : e ? "function" != typeof e[i] || "_" === i.charAt(0) ? V.error("no such method '" + i + "' for button widget instance") : (t = e[i].apply(e, s)) !== e && void 0 !== t ? (n = t && t.jquery ? n.pushStack(t.get()) : t, !1) : void 0 : V.error("cannot call methods on button prior to initialization; attempted to call method '" + i + "'") }) : n = void 0 : (s.length && (i = V.widget.extend.apply(null, [i].concat(s))), this.each(function () { var t = V(this).attr("type"), e = "checkbox" !== t && "radio" !== t ? "button" : "checkboxradio", t = V.data(this, "ui-" + e); t ? (t.option(i || {}), t._init && t._init()) : "button" != e ? V(this).checkboxradio(V.extend({ icon: !1 }, i)) : et.call(V(this), i) })), n }), V.fn.buttonset = function () { return V.ui.controlgroup || V.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)) }); var it; V.ui.button; function st() { 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", "
vendor: 6,016 bytes, line 1547
1547November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "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 }, V.extend(this._defaults, this.regional[""]), this.regional.en = V.extend(!0, {}, this.regional[""]), this.regional["en-US"] = V.extend(!0, {}, this.regional.en), this.dpDiv = nt(V("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) } function nt(t) { var e = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return t.on("mouseout", e, function () { V(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && V(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && V(this).removeClass("ui-datepicker-next-hover") }).on("mouseover", e, ot) } function ot() { V.datepicker._isDisabledDatepicker((it.inline ? it.dpDiv.parent() : it.input)[0]) || (V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), V(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && V(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && V(this).addClass("ui-datepicker-next-hover")) } function at(t, e) { for (var i in V.extend(t, e), e) null == e[i] && (t[i] = e[i]); return t } V.extend(V.ui, { datepicker: { version: "1.13.2" } }), V.extend(st.prototype, { markerClassName: "hasDatepicker", maxRows: 4, _widgetDatepicker: function () { return this.dpDiv }, setDefaults: function (t) { return at(this._defaults, t || {}), this }, _attachDatepicker: function (t, e) { var i, s = t.nodeName.toLowerCase(), n = "div" === s || "span" === s; t.id || (this.uuid += 1, t.id = "dp" + this.uuid), (i = this._newInst(V(t), n)).settings = V.extend({}, e || {}), "input" === s ? this._connectDatepicker(t, i) : n && this._inlineDatepicker(t, i) }, _newInst: function (t, e) { return { id: t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"), input: t, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: e, dpDiv: e ? nt(V("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv } }, _connectDatepicker: function (t, e) { var i = V(t); e.append = V([]), e.trigger = V([]), i.hasClass(this.markerClassName) || (this._attachments(i, e), i.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(e), V.data(t, "datepicker", e), e.settings.disabled && this._disableDatepicker(t)) }, _attachments: function (t, e) { var i, s = this._get(e, "appendText"), n = this._get(e, "isRTL"); e.append && e.append.remove(), s && (e.append = V("<span>").addClass(this._appendClass).text(s), t[n ? "before" : "after"](e.append)), t.off("focus", this._showDatepicker), e.trigger && e.trigger.remove(), "focus" !== (i = this._get(e, "showOn")) && "both" !== i || t.on("focus", this._showDatepicker), "button" !== i && "both" !== i || (s = this._get(e, "buttonText"), i = this._get(e, "buttonImage"), this._get(e, "buttonImageOnly") ? e.trigger = V("<img>").addClass(this._triggerClass).attr({ src: i, alt: s, title: s }) : (e.trigger = V("<button type='button'>").addClass(this._triggerClass), i ? e.trigger.html(V("<img>").attr({ src: i, alt: s, title: s })) : e.trigger.text(s)), t[n ? "before" : "after"](e.trigger), e.trigger.on("click", function () { return V.datepicker._datepickerShowing && V.datepicker._lastInput === t[0] ? V.datepicker._hideDatepicker() : (V.datepicker._datepickerShowing && V.datepicker._lastInput !== t[0] && V.datepicker._hideDatepicker(), V.datepicker._showDatepicker(t[0])), !1 })) }, _autoSize: function (t) { var e, i, s, n, o, a; this._get(t, "autoSize") && !t.inline && (o = new Date(2009, 11, 20), (a = this._get(t, "dateFormat")).match(/[DM]/) && (e = function (t) { for (n = s = i = 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 (t, e) { var i = V(t); i.hasClass(this.markerClassName) || (i.addClass(this.markerClassName).append(e.dpDiv), V.data(t, "datepicker", e), this._setDate(e, this._getDefaultDate(e), !0), this._updateDatepicker(e), this._updateAlternate(e), e.settings.disabled && this._disableDatepicker(t), e.dpDiv.css("display", "block")) }, _dialogDatepicker: function (t, e, i, s, n) { var o, a = this._dialogInst; return a || (this.uuid += 1, o = "dp" + this.uuid, this._dialogInput = V("<input type='text' id='" + o + "' style='position: absolute; top: -100px; width: 0px;'/>
1547"), this._dialogInput.on("keydown", this._doKeyDown), V("body").append(this._dialogInput), (a = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}, V.data(this._dialogInput[0], "datepicker", a)), at(a.settings, s || {}), e = e && e.constructor === Date ? this._formatDate(a, e) : e, this._dialogInput.val(e), this._pos = n ? n.length ? n : [n.pageX, n.pageY] : null, this._pos || (o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, e = document.documentElement.scrollLeft || document.body.scrollLeft, n = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [o / 2 - 100 + e, s / 2 - 150 + n]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), a.settings.onSelect = i, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), V.blockUI && V.blockUI(this.dpDiv), V.data(this._dialogInput[0], "datepicker", a), this }, _destroyDatepicker: function (t) { var e, i = V(t), s = V.data(t, "datepicker"); i.hasClass(this.markerClassName) && (e = t.nodeName.toLowerCase(), V.removeData(t, "datepicker"), "input" === e ? (s.append.remove(), s.trigger.remove(), i.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : "div" !== e && "span" !== e || i.removeClass(this.markerClassName).empty(), it === s && (it = null, this._curInst = null)) }, _enableDatepicker: function (e) { var t, i = V(e), s = V.data(e, "datepicker"); i.hasClass(this.markerClassName) && ("input" === (t = e.nodeName.toLowerCase()) ? (e.disabled = !1, s.trigger.filter("button").each(function () { this.disabled = !1 }).end().filter("img").css({ opacity: "1.0", cursor: "" })) : "div" !== t && "span" !== t || ((i = i.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = V.map(this._disabledInputs, function (t) { return t === e ? null : t })) }, _disableDatepicker: function (e) { var t, i = V(e), s = V.data(e, "datepicker"); i.hasClass(this.markerClassName) && ("input" === (t = e.nodeName.toLowerCase()) ? (e.disabled = !0, s.trigger.filter("button").each(function () { this.disabled = !0 }).end().filter("img").css({ opacity: "0.5", cursor: "default" })) : "div" !== t && "span" !== t || ((i = i.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = V.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 (t) { try { return V.data(t, "datepicker") } catch (t) { throw "Missing instance data for this datepicker" } }, _optionDatepicker: function (t, e, i) { var s, n, o = this._getInst(t); if (2 === arguments.length && "string" == typeof e) return "defaults" === e ? V.extend({}, V.datepicker._defaults) : o ? "all" === e ? V.extend({}, o.settings) : this._get(o, e) : null; s = e || {}, "string" == typeof e && ((s = {})[e] = i), o && (this._curInst === o && this._hideDatepicker(), n = this._getDateDatepicker(t, !0), e = this._getMinMaxDate(o, "min"), i = this._getMinMaxDate(o, "max"), at(o.settings, s), null !== e && void 0 !== s.dateFormat && void 0 === s.minDate && (o.settings.minDate = this._formatDate(o, e)), null !== i && void 0 !== s.dateFormat && void 0 === s.maxDate && (o.settings.maxDate = this._formatDate(o, i)), "disabled" in s && (s.disabled ? this._disableDatepicker(t) : this._enableDatepicker(t)), this._attachments(V(t), o), this._autoSize(o), this._setDate(o, n), this._updateAlternate(o), this._updateDatepicker(o)) }, _changeDatepicker: function (t, e, i) { this._optionDatepicker(t, e, i) }, _refreshDatepicker: function (t) { t = this._getInst(t); t && this._updateDatepicker(t) }, _setDateDatepicker: function (t, e) { t = this._getInst(t); t && (this._setDate(t, e), this._updateDatepicker(t), this._updateAlternate(t)) }, _getDateDatepicker: function (t, e) { t = this._getInst(t); return t && !t.inline && this._setDateFromField(t, e), t ? this._getDate(t) : null }, _doKeyDown: function (t) { var e, i, s = V.datepicker._getInst(t.target), n = !0, o = s.dpDiv.is(".ui-datepicker-rtl"); if (s._keyEvent = !0, V.datepicker._datepickerShowing) switch (t.keyCode) { case 9: V.datepicker._hideDatepicker(), n = !1; break; case 13: return (i = V("td." + V.datepicker._dayOverClass + ":not(." + V.datepicker._currentClass + ")", s.dpDiv))[0] && V.datepicker._selectDay(t.target, s.selectedMonth, s.selectedYear, i[0]), (e = V.datepicker._get(s, "onSelect")) ? (i = V.datepicker._formatDate(s), e.apply(s.input ? s.input[0] : null, [i, s])) : V.datepicker._hideDatepicker(), !1; case 27: V.datepicker._hideDatepicker(); break; case 33: V.datepicker._adjustDate(t.target, t.ctrlKey ? -V.datepicker._get(s, "stepBigMonths") : -V.datepicker._get(s, "stepMonths"), "M"); break; case 34: V.datepicker._adjustDate(t.target, t.ctrlKey ? +V.datepicker._get(s, "stepBigMonths") : +V.datepicker._get(s, "stepMonths"), "M"); break; case 35: (t.ctrlKey || t.metaKey) && V.datepicker._clearDate(t.target), n = t.ctrlKey || t.metaKey; break; case 36: (t.ctrlKey || t.metaKey) && V.datepicker._gotoToday(t.target), n = t.ctrlKey || t.metaKey; break; case 37: (t.ctrlKey || t.metaKey) && V.datepicker._adjustDate(t.target, o ? 1 : -1, "D"), n = t.ctrlKey || t.metaKey, t.originalEvent.altKey && V.datepicker._adjustDate(t.target, t.ctrlKey ? -V.datepicker._get(s, "stepBigMonths") : -V.datepicker._get(s, "stepMonths"), "M"); break; case 38: (t.ctrlKey || t.metaKey) && V.datepicker._adjustDate(t.target, -7, "D"), n = t.ctrlKey || t.metaKey; break; case 39: (t.ctrlKey || t.metaKey) && V.datepicker._adjustDate(t.target, o ? -1 : 1, "D"), n = t.ctrlKey || t.metaKey, t.originalEvent.altKey && V.datepicker._adjustDate(t.target, t.ctrlKey ? +V.datepicker._get(s, "stepBigMonths") : +V.datepicker._get(s, "stepMonths"), "M"); break; case 40: (t.ctrlKey || t.metaKey) && V.datepicker._adjustDate(t.target, 7, "D"), n = t.ctrlKey || t.metaKey; break; default: n = !1 } else 36 === t.keyCode && t.ctrlKey ? V.datepicker._showDatepicker(this) : n = !1; n && (t.preventDefault(), t.stopPropagation()) }, _doKeyPress: function (t) { var e, i = V.datepicker._getInst(t.target); if (V.datepicker._get(i, "constrainInput")) return e = V.datepicker._possibleChars(V.datepicker._get(i, "dateFormat")), i = String.fromCharCode(null == t.charCode ? t.keyCode : t.charCode), t.ctrlKey || t.metaKey || i < " " || !e || -1 < e.indexOf(i) }, _doKeyUp: function (t) { t = V.datepicker._getInst(t.target); if (t.input.val() !== t.lastVal) try { V.datepicker.parseDate(V.datepicker._get(t, "dateFormat"), t.input ? t.input.val() : null, V.datepicker._getFormatConfig(t)) && (V.datepicker._setDateFromField(t), V.datepicker._updateAlternate(t), V.datepicker._updateDatepicker(t)) } catch (t) { } return !0 }, _showDatepicker: function (t) { var e, i, s, n; "input" !== (t = t.target || t).nodeName.toLowerCase() && (t = V("input", t.parentNode)[0]), V.datepicker._isDisabledDatepicker(t) || V.datepicker._lastInput === t || (n = V.datepicker._getInst(t), V.datepicker._curInst && V.datepicker._curInst !== n && (V.datepicker._curInst.dpDiv.stop(!0, !0), n && V.datepicker._datepickerShowing && V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])), !1 !== (i = (s = V.datepicker._get(n, "beforeShow")) ? s.apply(t, [t, n]) : {}) && (at(n.settings, i), n.lastVal = null, V.datepicker._lastInput = t, V.datepicker._setDateFromField(n), V.datepicker._inDialog && (t.value = ""), V.datepicker._pos || (V.datepicker._pos = V.datepicker._findPos(t), V.datepicker._pos[1] += t.offsetHeight), e = !1, V(t).parents().each(function () { return !(e |= "fixed" === V(this).css("position")) }), s = { left: V.datepicker._pos[0], top: V.datepicker._pos[1] }, V.datepicker._pos = null, n.dpDiv.empty(), n.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), V.datepicker._updateDatepicker(n), s = V.datepicker._checkOffset(n, s, e), n.dpDiv.css({ position: V.datepicker._inDialog && V.blockUI ? "static" : e ? "fixed" : "absolute", display: "none", left: s.left + "px", top: s.top + "px" }), n.inline || (i = V.datepicker._get(n, "showAnim"), s = V.datepicker._get(n, "duration"), n.dpDiv.css("z-index", function (t) { for (var e, i; t.length && t[0] !== document;) { if (("absolute" === (e = t.css("position")) || "relative" === e || "fixed" === e) && (i = parseInt(t.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i; t = t.parent() } return 0 }(V(t)) + 1), V.datepicker._datepickerShowing = !0, V.effects && V.effects.effect[i] ? n.dpDiv.show(i, V.datepicker._get(n, "showOptions"), s) : n.dpDiv[i || "show"](i ? s : null), V.datepicker._shouldFocusInput(n) && n.input.trigger("focus"), V.datepicker._curInst = n))) }, _updateDatepicker: function (t) { this.maxRows = 4, (it = t).dpDiv.empty().append(this._generateHTML(t)), this._attachHandlers(t);
vendor: 7,716 bytes, line 1547
1547 var e, i = this._getNumberOfMonths(t), s = i[1], n = t.dpDiv.find("." + this._dayOverClass + " a"), o = V.datepicker._get(t, "onUpdateDatepicker"); 0 < n.length && ot.apply(n.get(0)), t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), 1 < s && t.dpDiv.addClass("ui-datepicker-multi-" + s).css("width", 17 * s + "em"), t.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t === V.datepicker._curInst && V.datepicker._datepickerShowing && V.datepicker._shouldFocusInput(t) && t.input.trigger("focus"), t.yearshtml && (e = t.yearshtml, setTimeout(function () { e === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml), e = t.yearshtml = null }, 0)), o && o.apply(t.input ? t.input[0] : null, [t]) }, _shouldFocusInput: function (t) { return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus") }, _checkOffset: function (t, e, i) { var s = t.dpDiv.outerWidth(), n = t.dpDiv.outerHeight(), o = t.input ? t.input.outerWidth() : 0, a = t.input ? t.input.outerHeight() : 0, r = document.documentElement.clientWidth + (i ? 0 : V(document).scrollLeft()), l = document.documentElement.clientHeight + (i ? 0 : V(document).scrollTop()); return e.left -= this._get(t, "isRTL") ? s - o : 0, e.left -= i && e.left === t.input.offset().left ? V(document).scrollLeft() : 0, e.top -= i && e.top === t.input.offset().top + a ? V(document).scrollTop() : 0, e.left -= Math.min(e.left, e.left + s > r && s < r ? Math.abs(e.left + s - r) : 0), e.top -= Math.min(e.top, e.top + n > l && n < l ? Math.abs(n + a) : 0), e }, _findPos: function (t) { for (var e = this._getInst(t), i = this._get(e, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || V.expr.pseudos.hidden(t));)t = t[i ? "previousSibling" : "nextSibling"]; return [(e = V(t).offset()).left, e.top] }, _hideDatepicker: function (t) { var e, i, s = this._curInst; !s || t && s !== V.data(t, "datepicker") || this._datepickerShowing && (e = this._get(s, "showAnim"), i = this._get(s, "duration"), t = function () { V.datepicker._tidyDialog(s) }, V.effects && (V.effects.effect[e] || V.effects[e]) ? s.dpDiv.hide(e, V.datepicker._get(s, "showOptions"), i, t) : s.dpDiv["slideDown" === e ? "slideUp" : "fadeIn" === e ? "fadeOut" : "hide"](e ? i : null, t), e || t(), this._datepickerShowing = !1, (t = this._get(s, "onClose")) && t.apply(s.input ? s.input[0] : null, [s.input ? s.input.val() : "", s]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), V.blockUI && (V.unblockUI(), V("body").append(this.dpDiv))), this._inDialog = !1) }, _tidyDialog: function (t) { t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar") }, _checkExternalClick: function (t) { var e; V.datepicker._curInst && (e = V(t.target), t = V.datepicker._getInst(e[0]), (e[0].id === V.datepicker._mainDivId || 0 !== e.parents("#" + V.datepicker._mainDivId).length || e.hasClass(V.datepicker.markerClassName) || e.closest("." + V.datepicker._triggerClass).length || !V.datepicker._datepickerShowing || V.datepicker._inDialog && V.blockUI) && (!e.hasClass(V.datepicker.markerClassName) || V.datepicker._curInst === t) || V.datepicker._hideDatepicker()) }, _adjustDate: function (t, e, i) { var s = V(t), t = this._getInst(s[0]); this._isDisabledDatepicker(s[0]) || (this._adjustInstDate(t, e, i), this._updateDatepicker(t)) }, _gotoToday: function (t) { var e = V(t), i = this._getInst(e[0]); this._get(i, "gotoCurrent") && i.currentDay ? (i.selectedDay = i.currentDay, i.drawMonth = i.selectedMonth = i.currentMonth, i.drawYear = i.selectedYear = i.currentYear) : (t = new Date, i.selectedDay = t.getDate(), i.drawMonth = i.selectedMonth = t.getMonth(), i.drawYear = i.selectedYear = t.getFullYear()), this._notifyChange(i), this._adjustDate(e) }, _selectMonthYear: function (t, e, i) { var s = V(t), t = this._getInst(s[0]); t["selected" + ("M" === i ? "Month" : "Year")] = t["draw" + ("M" === i ? "Month" : "Year")] = parseInt(e.options[e.selectedIndex].value, 10), this._notifyChange(t), this._adjustDate(s) }, _selectDay: function (t, e, i, s) { var n = V(t); V(s).hasClass(this._unselectableClass) || this._isDisabledDatepicker(n[0]) || ((n = this._getInst(n[0])).selectedDay = n.currentDay = parseInt(V("a", s).attr("data-date")), n.selectedMonth = n.currentMonth = e, n.selectedYear = n.currentYear = i, this._selectDate(t, this._formatDate(n, n.currentDay, n.currentMonth, n.currentYear))) }, _clearDate: function (t) { t = V(t); this._selectDate(t, "") }, _selectDate: function (t, e) { var i = V(t), t = this._getInst(i[0]); e = null != e ? e : this._formatDate(t), t.input && t.input.val(e), this._updateAlternate(t), (i = this._get(t, "onSelect")) ? i.apply(t.input ? t.input[0] : null, [e, t]) : t.input && t.input.trigger("change"), t.inline ? this._updateDatepicker(t) : (this._hideDatepicker(), this._lastInput = t.input[0], "object" != typeof t.input[0] && t.input.trigger("focus"), this._lastInput = null) }, _updateAlternate: function (t) { var e, i, s = this._get(t, "altField"); s && (e = this._get(t, "altFormat") || this._get(t, "dateFormat"), i = this._getDate(t), t = this.formatDate(e, i, this._getFormatConfig(t)), V(document).find(s).val(t)) }, noWeekends: function (t) { t = t.getDay(); return [0 < t && t < 6, ""] }, iso8601Week: function (t) { var e = new Date(t.getTime()); return e.setDate(e.getDate() + 4 - (e.getDay() || 7)), t = e.getTime(), e.setMonth(0), e.setDate(1), Math.floor(Math.round((t - e) / 864e5) / 7) + 1 }, parseDate: function (e, n, t) { if (null == e || null == n) throw "Invalid arguments"; if ("" === (n = "object" == typeof n ? n.toString() : n + "")) return null; for (var i, s, o, a = 0, r = (t ? t.shortYearCutoff : null) || this._defaults.shortYearCutoff, r = "string" != typeof r ? r : (new Date).getFullYear() % 100 + parseInt(r, 10), l = (t ? t.dayNamesShort : null) || this._defaults.dayNamesShort, h = (t ? t.dayNames : null) || this._defaults.dayNames, c = (t ? t.monthNamesShort : null) || this._defaults.monthNamesShort, u = (t ? t.monthNames : null) || this._defaults.monthNames, d = -1, p = -1, f = -1, g = -1, m = !1, _ = function (t) { t = w + 1 < e.length && e.charAt(w + 1) === t; return t && w++, t }, v = function (t) { var e = _(t), e = "@" === t ? 14 : "!" === t ? 20 : "y" === t && e ? 4 : "o" === t ? 3 : 2, e = new RegExp("^\\d{" + ("y" === t ? e : 1) + "," + e + "}"), e = n.substring(a).match(e); if (!e) throw "Missing number at position " + a; return a += e[0].length, parseInt(e[0], 10) }, b = function (t, e, i) { var s = -1, e = V.map(_(t) ? i : e, function (t, e) { return [[e, t]] }).sort(function (t, e) { return -(t[1].length - e[1].length) }); if (V.each(e, function (t, e) { var i = e[1]; if (n.substr(a, i.length).toLowerCase() === i.toLowerCase()) return s = e[0], a += i.length, !1 }), -1 !== s) return s + 1; throw "Unknown name at position " + a }, y = function () { if (n.charAt(a) !== e.charAt(w)) throw "Unexpected literal at position " + a; a++ }, w = 0; w < e.length; w++)if (m) "'" !== e.charAt(w) || _("'") ? y() : m = !1; else switch (e.charAt(w)) { case "d": f = v("d"); break; case "D": b("D", l, h); break; case "o": g = v("o"); break; case "m": p = v("m"); break; case "M": p = b("M", c, u); break; case "y": d = v("y"); break; case "@": d = (o = new Date(v("@"))).getFullYear(), p = o.getMonth() + 1, f = o.getDate(); break; case "!": d = (o = new Date((v("!") - this._ticksTo1970) / 1e4)).getFullYear(), p = o.getMonth() + 1, f = o.getDate(); break;
vendor: 10,110 bytes, line 1547
1547 case "'": _("'") ? y() : m = !0; break; default: y() }if (a < n.length && (s = n.substr(a), !/^\s+/.test(s))) throw "Extra/unparsed characters found in date: " + s; if (-1 === d ? d = (new Date).getFullYear() : d < 100 && (d += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (d <= r ? 0 : -100)), -1 < g) for (p = 1, f = g; ;) { if (f <= (i = this._getDaysInMonth(d, p - 1))) break; p++, f -= i } if ((o = this._daylightSavingAdjust(new Date(d, p - 1, f))).getFullYear() !== d || o.getMonth() + 1 !== p || o.getDate() !== f) throw "Invalid date"; return o }, 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: 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 60 * 60 * 1e7, formatDate: function (e, t, i) { if (!t) return ""; function s(t, e, i) { var s = "" + e; if (c(t)) for (; s.length < i;)s = "0" + s; return s } function n(t, e, i, s) { return (c(t) ? s : i)[e] } var o, a = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, r = (i ? i.dayNames : null) || this._defaults.dayNames, l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, h = (i ? i.monthNames : null) || this._defaults.monthNames, c = function (t) { t = o + 1 < e.length && e.charAt(o + 1) === t; return t && o++, t }, u = "", d = !1; if (t) for (o = 0; o < e.length; o++)if (d) "'" !== e.charAt(o) || c("'") ? u += e.charAt(o) : d = !1; else switch (e.charAt(o)) { case "d": u += s("d", t.getDate(), 2); break; case "D": u += n("D", t.getDay(), a, r); break; case "o": u += s("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3); break; case "m": u += s("m", t.getMonth() + 1, 2); break; case "M": u += n("M", t.getMonth(), l, h); break; case "y": u += c("y") ? t.getFullYear() : (t.getFullYear() % 100 < 10 ? "0" : "") + t.getFullYear() % 100; break; case "@": u += t.getTime(); break; case "!": u += 1e4 * t.getTime() + this._ticksTo1970; break; case "'": c("'") ? u += "'" : d = !0; break; default: u += e.charAt(o) }return u }, _possibleChars: function (e) { for (var t = "", i = !1, s = function (t) { t = n + 1 < e.length && e.charAt(n + 1) === t; return t && n++, t }, n = 0; n < e.length; n++)if (i) "'" !== e.charAt(n) || s("'") ? t += e.charAt(n) : i = !1; else switch (e.charAt(n)) { case "d": case "m": case "y": case "@": t += "0123456789"; break; case "D": case "M": return null; case "'": s("'") ? t += "'" : i = !0; break; default: t += e.charAt(n) }return t }, _get: function (t, e) { return (void 0 !== t.settings[e] ? t.settings : 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 (r, t, e) { var i, s, t = null == t || "" === t ? e : "string" == typeof t ? function (t) { try { return V.datepicker.parseDate(V.datepicker._get(r, "dateFormat"), t, V.datepicker._getFormatConfig(r)) } catch (t) { } for (var e = (t.toLowerCase().match(/^c/) ? V.datepicker._getDate(r) : null) || new Date, i = e.getFullYear(), s = e.getMonth(), n = e.getDate(), o = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, a = o.exec(t); a;) { switch (a[2] || "d") { case "d": case "D": n += parseInt(a[1], 10); break; case "w": case "W": n += 7 * parseInt(a[1], 10); break; case "m": case "M": s += parseInt(a[1], 10), n = Math.min(n, V.datepicker._getDaysInMonth(i, s)); break; case "y": case "Y": i += parseInt(a[1], 10), n = Math.min(n, V.datepicker._getDaysInMonth(i, s)) }a = o.exec(t) } return new Date(i, s, n) }(t) : "number" == typeof t ? isNaN(t) ? e : (i = t, (s = new Date).setDate(s.getDate() + i), s) : new Date(t.getTime()); return (t = t && "Invalid Date" === t.toString() ? e : t) && (t.setHours(0), t.setMinutes(0), t.setSeconds(0), t.setMilliseconds(0)), this._daylightSavingAdjust(t) }, _daylightSavingAdjust: function (t) { return t ? (t.setHours(12 < t.getHours() ? t.getHours() + 2 : 0), t) : null }, _setDate: function (t, e, i) { var s = !e, n = t.selectedMonth, o = t.selectedYear, e = this._restrictMinMax(t, this._determineDate(t, e, new Date)); t.selectedDay = t.currentDay = e.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = e.getMonth(), t.drawYear = t.selectedYear = t.currentYear = e.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 (t) { var e = this._get(t, "stepMonths"), i = "#" + t.id.replace(/\\\\/g, "\\"); t.dpDiv.find("[data-handler]").map(function () { var t = { prev: function () { V.datepicker._adjustDate(i, -e, "M") }, next: function () { V.datepicker._adjustDate(i, +e, "M") }, hide: function () { V.datepicker._hideDatepicker() }, today: function () { V.datepicker._gotoToday(i) }, selectDay: function () { return V.datepicker._selectDay(i, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1 }, selectMonth: function () { return V.datepicker._selectMonthYear(i, this, "M"), !1 }, selectYear: function () { return V.datepicker._selectMonthYear(i, this, "Y"), !1 } }; V(this).on(this.getAttribute("data-event"), t[this.getAttribute("data-handler")]) }) }, _generateHTML: function (t) { var e, 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, A = new Date, O = this._daylightSavingAdjust(new Date(A.getFullYear(), A.getMonth(), A.getDate())), N = this._get(t, "isRTL"), E = this._get(t, "showButtonPanel"), W = this._get(t, "hideIfNoPrevNext"), F = this._get(t, "navigationAsDateFormat"), L = this._getNumberOfMonths(t), R = this._get(t, "showCurrentAtPos"), A = this._get(t, "stepMonths"), Y = 1 !== L[0] || 1 !== L[1], B = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)), j = this._getMinMaxDate(t, "min"), q = this._getMinMaxDate(t, "max"), K = t.drawMonth - R, U = t.drawYear; if (K < 0 && (K += 12, U--), q) for (e = this._daylightSavingAdjust(new Date(q.getFullYear(), q.getMonth() - L[0] * L[1] + 1, q.getDate())), e = j && e < j ? j : e; this._daylightSavingAdjust(new Date(U, K, 1)) > e;)--K < 0 && (K = 11, U--); for (t.drawMonth = K, t.drawYear = U, R = this._get(t, "prevText"), R = F ? this.formatDate(R, this._daylightSavingAdjust(new Date(U, K - A, 1)), this._getFormatConfig(t)) : R, i = this._canAdjustMonth(t, -1, U, K) ? V("<a>").attr({ class: "ui-datepicker-prev ui-corner-all", "data-handler": "prev", "data-event": "click", title: R }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N ? "e" : "w")).text(R))[0].outerHTML : W ? "" : V("<a>").attr({ class: "ui-datepicker-prev ui-corner-all ui-state-disabled", title: R }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N ? "e" : "w")).text(R))[0].outerHTML, R = this._get(t, "nextText"), R = F ? this.formatDate(R, this._daylightSavingAdjust(new Date(U, K + A, 1)), this._getFormatConfig(t)) : R, s = this._canAdjustMonth(t, 1, U, K) ? V("<a>").attr({ class: "ui-datepicker-next ui-corner-all", "data-handler": "next", "data-event": "click", title: R }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N ? "w" : "e")).text(R))[0].outerHTML : W ? "" : V("<a>").attr({ class: "ui-datepicker-next ui-corner-all ui-state-disabled", title: R }).append(V("<span>").attr("class", "ui-icon ui-icon-circle-triangle-" + (N ? "w" : "e")).text(R))[0].outerHTML, A = this._get(t, "currentText"), W = this._get(t, "gotoCurrent") && t.currentDay ? B : O, A = F ? this.formatDate(A, W, this._getFormatConfig(t)) : A, R = "", t.inline || (R = V("<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(t, "closeText"))[0].outerHTML), F = "", E && (F = V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N ? R : "").append(this._isInRange(t, W) ? V("<button>").attr({ type: "button", class: "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all", "data-handler": "today", "data-event": "click" }).text(A) : "").append(N ? "" : R)[0].outerHTML), n = parseInt(this._get(t, "firstDay"), 10), n = isNaN(n) ? 0 : n, o = this._get(t, "showWeek"), a = this._get(t, "dayNames"), r = this._get(t, "dayNamesMin"), l = this._get(t, "monthNames"), h = this._get(t, "monthNamesShort"), c = this._get(t, "beforeShowDay"), u = this._get(t, "showOtherMonths"), d = this._get(t, "selectOtherMonths"), p = this._getDefaultDate(t), f = "", m = 0; m < L[0]; m++) { for (_ = "", this.maxRows = 4, v = 0; v < L[1]; v++) { if (b = this._daylightSavingAdjust(new Date(U, K, t.selectedDay)), y = " ui-corner-all", w = "", Y) { if (w += "<div class='ui-datepicker-group", 1 < L[1]) switch (v) { case 0: w += " ui-datepicker-group-first", y = " ui-corner-" + (N ? "right" : "left"); break; case L[1] - 1: w += " ui-datepicker-group-last", y = " ui-corner-" + (N ? "left" : "right"); break; default: w += " ui-datepicker-group-middle", y = "" }w += "'>" } for (w += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + y + "'>
1547" + (/all|left/.test(y) && 0 === m ? N ? s : i : "") + (/all|right/.test(y) && 0 === m ? N ? i : s : "") + this._generateMonthYearHeader(t, K, U, j, q, 0 < m || 0 < v, l, h) + "</div><table class='ui-datepicker-calendar'><thead><tr>", x = o ? "<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>" : "", g = 0; g < 7; g++)x += "<th scope='col'" + (5 <= (g + n + 6) % 7 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + a[k = (g + n) % 7] + "'>" + r[k] + "</span></th>"; for (w += x + "</tr></thead><tbody>", D = this._getDaysInMonth(U, K), U === t.selectedYear && K === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, D)), C = (this._getFirstDayOfMonth(U, K) - n + 7) % 7, D = Math.ceil((C + D) / 7), I = Y && this.maxRows > D ? this.maxRows : D, this.maxRows = I, T = this._daylightSavingAdjust(new Date(U, K, 1 - C)), P = 0; P < I; P++) { for (w += "<tr>", M = o ? "<td class='ui-datepicker-week-col'>" + this._get(t, "calculateWeek")(T) + "</td>" : "", g = 0; g < 7; g++)S = c ? c.apply(t.input ? t.input[0] : null, [T]) : [!0, ""], z = (H = T.getMonth() !== K) && !d || !S[0] || j && T < j || q && q < T, M += "<td class='" + (5 <= (g + n + 6) % 7 ? " ui-datepicker-week-end" : "") + (H ? " ui-datepicker-other-month" : "") + (T.getTime() === b.getTime() && K === t.selectedMonth && t._keyEvent || p.getTime() === T.getTime() && p.getTime() === b.getTime() ? " " + this._dayOverClass : "") + (z ? " " + this._unselectableClass + " ui-state-disabled" : "") + (H && !u ? "" : " " + S[1] + (T.getTime() === B.getTime() ? " " + this._currentClass : "") + (T.getTime() === O.getTime() ? " ui-datepicker-today" : "")) + "'" + (H && !u || !S[2] ? "" : " title='" + S[2].replace(/'/g, "'") + "'") + (z ? "" : " data-handler='selectDay' data-event='click' data-month='" + T.getMonth() + "' data-year='" + T.getFullYear() + "'") + ">" + (H && !u ? " " : z ? "<span class='ui-state-default'>" + T.getDate() + "</span>" : "<a class='ui-state-default" + (T.getTime() === O.getTime() ? " ui-state-highlight" : "") + (T.getTime() === B.getTime() ? " ui-state-active" : "") + (H ? " ui-priority-secondary" : "") + "' href='#' aria-current='" + (T.getTime() === B.getTime() ? "true" : "false") + "' data-date='" + T.getDate() + "'>" + T.getDate() + "</a>") + "</td>", T.setDate(T.getDate() + 1), T = this._daylightSavingAdjust(T); w += M + "</tr>" } 11 < ++K && (K = 0, U++), _ += w += "</tbody></table>" + (Y ? "</div>" + (0 < L[0] && v === L[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : "") } f += _ } return f += F, t._keyEvent = !1, f }, _generateMonthYearHeader: function (t, e, i, s, n, o, a, r) { var l, h, c, u, d, p, f = this._get(t, "changeMonth"), g = this._get(t, "changeYear"), m = this._get(t, "showMonthAfterYear"), _ = this._get(t, "selectMonthLabel"), v = this._get(t, "selectYearLabel"), b = "<div class='ui-datepicker-title'>", y = ""; if (o || !f) y += "<span class='ui-datepicker-month'>" + a[e] + "</span>"; else { for (l = s && s.getFullYear() === i, h = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' aria-label='" + _ + "' data-handler='selectMonth' data-event='change'>", c = 0; c < 12; c++)(!l || c >= s.getMonth()) && (!h || c <= n.getMonth()) && (y += "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] + "</option>"); y += "</select>" } if (m || (b += y + (!o && f && g ? "" : " ")), !t.yearshtml) if (t.yearshtml = "", o || !g) b += "<span class='ui-datepicker-year'>" + i + "</span>"; else { for (a = this._get(t, "yearRange").split(":"), u = (new Date).getFullYear(), d = (_ = function (t) { t = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? u + parseInt(t, 10) : parseInt(t, 10); return isNaN(t) ? u : t })(a[0]), p = Math.max(d, _(a[1] || "")), d = s ? Math.max(d, s.getFullYear()) : d, p = n ? Math.min(p, n.getFullYear()) : p, t.yearshtml += "<select class='ui-datepicker-year' aria-label='" + v + "' data-handler='selectYear' data-event='change'>"; d <= p; d++)t.yearshtml += "<option value='" + d + "'" + (d === i ? " selected='selected'" : "") + ">" + d + "</option>"; t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null } return b += this._get(t, "yearSuffix"), m && (b += (!o && f && g ? "" : " ") + y), b += "</div>" }, _adjustInstDate: function (t, e, i) { var s = t.selectedYear + ("Y" === i ? e : 0), n = t.selectedMonth + ("M" === i ? e : 0), e = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0), e = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, e))); t.selectedDay = e.getDate(), t.drawMonth = t.selectedMonth = e.getMonth(), t.drawYear = t.selectedYear = e.getFullYear(), "M" !== i && "Y" !== i || this._notifyChange(t) }, _restrictMinMax: function (t, e) { var i = this._getMinMaxDate(t, "min"), t = this._getMinMaxDate(t, "max"), e = i && e < i ? i : e; return t && t < e ? t : e }, _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) { t = this._get(t, "numberOfMonths"); return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t }, _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), n = this._daylightSavingAdjust(new Date(i, s + (e < 0 ? e : n[0] * n[1]), 1)); return e < 0 && n.setDate(this._getDaysInMonth(n.getFullYear(), n.getMonth())), this._isInRange(t, n) }, _isInRange: function (t, e) { var i = this._getMinMaxDate(t, "min"), s = this._getMinMaxDate(t, "max"), n = null, o = null, a = this._get(t, "yearRange"); return a && (t = a.split(":"), a = (new Date).getFullYear(), n = parseInt(t[0], 10), o = parseInt(t[1], 10), t[0].match(/[+\-].*/) && (n += a), t[1].match(/[+\-].*/) && (o += a)), (!i || e.getTime() >= i.getTime()) && (!s || e.getTime() <= s.getTime()) && (!n || e.getFullYear() >= n) && (!o || e.getFullYear() <= o) }, _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); e = 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"), e, this._getFormatConfig(t)) } }), V.fn.datepicker = function (t) { if (!this.length) return this; V.datepicker.initialized || (V(document).on("mousedown", V.datepicker._checkExternalClick), V.datepicker.initialized = !0), 0 === V("#" + V.datepicker._mainDivId).length && V("body").append(V.datepicker.dpDiv); var e = Array.prototype.slice.call(arguments, 1); return "string" == typeof t && ("isDisabled" === t || "getDate" === t || "widget" === t) || "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? V.datepicker["_" + t + "Datepicker"].apply(V.datepicker, [this[0]].concat(e)) : this.each(function () { "string" == typeof t ? V.datepicker["_" + t + "Datepicker"].apply(V.datepicker, [this].concat(e)) : V.datepicker._attachDatepicker(this, t) }) }, V.datepicker = new st, V.datepicker.initialized = !1, V.datepicker.uuid = (ne
vendor: 4,455 bytes, line 1547
1547w Date).getTime(), V.datepicker.version = "1.13.2"; V.datepicker, V.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); var rt = !1; V(document).on("mouseup", function () { rt = !1 }); V.widget("ui.mouse", { version: "1.13.2", 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 (t) { if (!0 === V.data(t.target, e.widgetName + ".preventClickEvent")) return V.removeData(t.target, e.widgetName + ".preventClickEvent"), t.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 (t) { if (!rt) { this._mouseMoved = !1, this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t; var e = this, i = 1 === t.which, s = !("string" != typeof this.options.cancel || !t.target.nodeName) && V(t.target).closest(this.options.cancel).length; return i && !s && this._mouseCapture(t) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { e.mouseDelayMet = !0 }, this.options.delay)), this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = !1 !== this._mouseStart(t), !this._mouseStarted) ? (t.preventDefault(), !0) : (!0 === V.data(t.target, this.widgetName + ".preventClickEvent") && V.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (t) { return e._mouseMove(t) }, this._mouseUpDelegate = function (t) { return e._mouseUp(t) }, this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), rt = !0)) : !0 } }, _mouseMove: function (t) { if (this._mouseMoved) { if (V.ui.ie && (!document.documentMode || document.documentMode < 9) && !t.button) return this._mouseUp(t); if (!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 (t) { this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && V.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), this.ignoreMissingWhich = !1, rt = !1, t.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 } }), V.ui.plugin = { add: function (t, e, i) { var s, n = V.ui[t].prototype; for (s in i) n.plugins[s] = n.plugins[s] || [], n.plugins[s].push([e, i[s]]) }, 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) } }, V.ui.safeBlur = function (t) { t && "body" !== t.nodeName.toLowerCase() && V(t).trigger("blur") }; V.widget("ui.draggable", V.ui.mouse, { version: "1.13.2", 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, snap
vendor: 11,728 bytes, line 1547
1547Mode: "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 () { (this.helper || this.element).is(".ui-draggable-dragging") ? this.destroyOnClear = !0 : (this._removeHandleClassName(), this._mouseDestroy()) }, _mouseCapture: function (t) { var e = this.options; return !(this.helper || e.disabled || 0 < V(t.target).closest(".ui-resizable-handle").length) && (this.handle = this._getHandle(t), !!this.handle && (this._blurActiveElement(t), this._blockFrames(!0 === e.iframeFix ? "iframe" : e.iframeFix), !0)) }, _blockFrames: function (t) { this.iframeBlocks = this.document.find(t).map(function () { var t = V(this); return V("<div>").css("position", "absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _blurActiveElement: function (t) { var e = V.ui.safeActiveElement(this.document[0]); V(t.target).closest(e).length || V.ui.safeBlur(e) }, _mouseStart: function (t) { var e = this.options; return this.helper = this._createHelper(t), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), V.ui.ddmanager && (V.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 = 0 < this.helper.parents().filter(function () { return "fixed" === V(this).css("position") }).length, this.positionAbs = this.element.offset(), this._refreshOffsets(t), this.originalPosition = this.position = this._generatePosition(t, !1), this.originalPageX = t.pageX, this.originalPageY = t.pageY, e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt), this._setContainment(), !1 === this._trigger("start", t) ? (this._clear(), !1) : (this._cacheHelperProportions(), V.ui.ddmanager && !e.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), V.ui.ddmanager && V.ui.ddmanager.dragStart(this, t), !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 (t, e) { if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t, !0), this.positionAbs = this._convertPositionTo("absolute"), !e) { e = this._uiHash(); if (!1 === this._trigger("drag", t, e)) return this._mouseUp(new V.Event("mouseup", t)), !1; this.position = e.position } return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", V.ui.ddmanager && V.ui.ddmanager.drag(this, t), !1 }, _mouseStop: function (t) { var e = this, i = !1; return V.ui.ddmanager && !this.options.dropBehaviour && (i = V.ui.ddmanager.drop(this, t)), this.dropped && (i = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !i || "valid" === this.options.revert && i || !0 === this.options.revert || "function" == typeof this.options.revert && this.options.revert.call(this.element, i) ? V(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { !1 !== e._trigger("stop", t) && e._clear() }) : !1 !== this._trigger("stop", t) && this._clear(), !1 }, _mouseUp: function (t) { return this._unblockFrames(), V.ui.ddmanager && V.ui.ddmanager.dragStop(this, t), this.handleElement.is(t.target) && this.element.trigger("focus"), V.ui.mouse.prototype._mouseUp.call(this, t) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new V.Event("mouseup", { target: this.element[0] })) : this._clear(), this }, _getHandle: function (t) { return !this.options.handle || !!V(t.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 (t) { var e = this.options, i = "function" == typeof e.helper, t = i ? V(e.helper.apply(this.element[0], [t])) : "clone" === e.helper ? this.element.clone().removeAttr("id") : this.element; return t.parents("body").length || t.appendTo("parent" === e.appendTo ? this.element[0].parentNode : e.appendTo), i && t[0] === this.element[0] && this._setPositionRelative(), t[0] === this.element[0] || /(fixed|absolute)/.test(t.css("position")) || t.css("position", "absolute"), t }, _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(" ")), "left" in (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : 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 t = this.offsetParent.offset(), e = this.document[0]; return "absolute" === this.cssPosition && this.scrollParent[0] !== e && V.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), { top: (t = this._isRootNode(this.offsetParent[0]) ? { top: 0, left: 0 } : t).top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.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 t, e, i, s = this.options, n = this.document[0]; this.relativeContainer = null, s.containment ? "window" !== s.containment ? "document" !== s.containment ? s.containment.constructor !== Array ? ("parent" === s.containment && (s.containment = this.helper[0].parentNode), (i = (e = V(s.containment))[0]) && (t = /(scroll|auto)/.test(e.css("overflow")), this.containment = [(parseInt(e.css("borderLeftWidth"), 10) || 0) + (parseInt(e.css("paddingLeft"), 10) || 0), (parseInt(e.css("borderTopWidth"), 10) || 0) + (parseInt(e.css("paddingTop"), 10) || 0), (t ? Math.max(i.scrollWidth, i.offsetWidth) : i.offsetWidth) - (parseInt(e.css("borderRightWidth"), 10) || 0) - (parseInt(e.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(i.scrollHeight, i.offsetHeight) : i.offsetHeight) - (parseInt(e.css("borderBottomWidth"), 10) || 0) - (parseInt(e.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = e)) : this.containment = s.containment : this.containment = [0, 0, V(n).width() - this.helperProportions.width - this.margins.left, (V(n).height() || n.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = [V(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, V(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, V(window).scrollLeft() + V(window).width() - this.helperProportions.width - this.margins.left, V(window).scrollTop() + (V(window).height() || n.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = null }, _convertPositionTo: function (t, e) { e = e || this.position; var i = "absolute" === t ? 1 : -1, t = 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 : t ? 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 : t ? 0 : this.offset.scroll.left) * i } }, _generatePosition: function (t, e) { var i, s = this.options, n = this._isRootNode(this.scrollParent[0]), o = t.pageX, a = t.pageY; return n && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), e && (this.containment && (i = this.relativeContainer ? (i = this.relativeContainer.offset(), [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top]) : this.containment, t.pageX - this.offset.click.left < i[0] && (o = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (a = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (o = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (a = i[3] + this.offset.click.top)), s.grid && (t = s.grid[1] ? this.originalPageY + Math.round((a - this.originalPageY) / s.grid[1]) * s.grid[1] : this.originalPageY, a = !i || t - this.offset.click.top >= i[1] || t - this.offset.click.top > i[3] ? t : t - this.offset.click.top >= i[1] ? t - s.grid[1] : t + s.grid[1], t = s.grid[0] ? this.originalPageX + Math.round((o - this.originalPageX) / s.grid[0]) * s.grid[0] : this.originalPageX, o = !i || t - this.offset.click.left >= i[0] || t - this.offset.click.left > i[2] ? t : t - this.offset.click.left >= i[0] ? t - s.grid[0] : t + s.grid[0]), "y" === s.axis && (o = this.originalPageX), "x" === s.axis && (a = this.originalPageY)), { top: a - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : n ? 0 : this.offset.scroll.top), left: o - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : n ? 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 (t, e, i) { return i = i || this._uiHash(), V.ui.plugin.call(this, t, [e, i, this], !0), /^(drag|start|stop
vendor: 6,922 bytes, line 1547
1547)/.test(t) && (this.positionAbs = this._convertPositionTo("absolute"), i.offset = this.positionAbs), V.Widget.prototype._trigger.call(this, t, e, i) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } } }), V.ui.plugin.add("draggable", "connectToSortable", { start: function (e, t, i) { var s = V.extend({}, t, { item: i.element }); i.sortables = [], V(i.options.connectToSortable).each(function () { var t = V(this).sortable("instance"); t && !t.options.disabled && (i.sortables.push(t), t.refreshPositions(), t._trigger("activate", e, s)) }) }, stop: function (e, t, i) { var s = V.extend({}, t, { item: i.element }); i.cancelHelperRemoval = !1, V.each(i.sortables, function () { var t = this; t.isOver ? (t.isOver = 0, i.cancelHelperRemoval = !0, t.cancelHelperRemoval = !1, t._storedCSS = { position: t.placeholder.css("position"), top: t.placeholder.css("top"), left: t.placeholder.css("left") }, t._mouseStop(e), t.options.helper = t.options._helper) : (t.cancelHelperRemoval = !0, t._trigger("deactivate", e, s)) }) }, drag: function (i, s, n) { V.each(n.sortables, function () { var t = !1, e = this; e.positionAbs = n.positionAbs, e.helperProportions = n.helperProportions, e.offset.click = n.offset.click, e._intersectsWith(e.containerCache) && (t = !0, V.each(n.sortables, function () { return this.positionAbs = n.positionAbs, this.helperProportions = n.helperProportions, this.offset.click = n.offset.click, t = this !== e && this._intersectsWith(this.containerCache) && V.contains(e.element[0], this.element[0]) ? !1 : t })), t ? (e.isOver || (e.isOver = 1, n._parent = s.helper.parent(), e.currentItem = s.helper.appendTo(e.element).data("ui-sortable-item", !0), e.options._helper = e.options.helper, e.options.helper = function () { return s.helper[0] }, i.target = e.currentItem[0], e._mouseCapture(i, !0), e._mouseStart(i, !0, !0), e.offset.click.top = n.offset.click.top, e.offset.click.left = n.offset.click.left, e.offset.parent.left -= n.offset.parent.left - e.offset.parent.left, e.offset.parent.top -= n.offset.parent.top - e.offset.parent.top, n._trigger("toSortable", i), n.dropped = e.element, V.each(n.sortables, function () { this.refreshPositions() }), n.currentItem = n.element, e.fromOutside = n), e.currentItem && (e._mouseDrag(i), s.position = e.position)) : e.isOver && (e.isOver = 0, e.cancelHelperRemoval = !0, e.options._revert = e.options.revert, e.options.revert = !1, e._trigger("out", i, e._uiHash(e)), e._mouseStop(i, !0), e.options.revert = e.options._revert, e.options.helper = e.options._helper, e.placeholder && e.placeholder.remove(), s.helper.appendTo(n._parent), n._refreshOffsets(i), s.position = n._generatePosition(i, !0), n._trigger("fromSortable", i), n.dropped = !1, V.each(n.sortables, function () { this.refreshPositions() })) }) } }), V.ui.plugin.add("draggable", "cursor", { start: function (t, e, i) { var s = V("body"), i = i.options; s.css("cursor") && (i._cursor = s.css("cursor")), s.css("cursor", i.cursor) }, stop: function (t, e, i) { i = i.options; i._cursor && V("body").css("cursor", i._cursor) } }), V.ui.plugin.add("draggable", "opacity", { start: function (t, e, i) { e = V(e.helper), i = i.options; e.css("opacity") && (i._opacity = e.css("opacity")), e.css("opacity", i.opacity) }, stop: function (t, e, i) { i = i.options; i._opacity && V(e.helper).css("opacity", i._opacity) } }), V.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 (t, e, i) { var s = i.options, n = !1, o = i.scrollParentNotHidden[0], a = i.document[0]; o !== a && "HTML" !== o.tagName ? (s.axis && "x" === s.axis || (i.overflowOffset.top + o.offsetHeight - t.pageY < s.scrollSensitivity ? o.scrollTop = n = o.scrollTop + s.scrollSpeed : t.pageY - i.overflowOffset.top < s.scrollSensitivity && (o.scrollTop = n = o.scrollTop - s.scrollSpeed)), s.axis && "y" === s.axis || (i.overflowOffset.left + o.offsetWidth - t.pageX < s.scrollSensitivity ? o.scrollLeft = n = o.scrollLeft + s.scrollSpeed : t.pageX - i.overflowOffset.left < s.scrollSensitivity && (o.scrollLeft = n = o.scrollLeft - s.scrollSpeed))) : (s.axis && "x" === s.axis || (t.pageY - V(a).scrollTop() < s.scrollSensitivity ? n = V(a).scrollTop(V(a).scrollTop() - s.scrollSpeed) : V(window).height() - (t.pageY - V(a).scrollTop()) < s.scrollSensitivity && (n = V(a).scrollTop(V(a).scrollTop() + s.scrollSpeed))), s.axis && "y" === s.axis || (t.pageX - V(a).scrollLeft() < s.scrollSensitivity ? n = V(a).scrollLeft(V(a).scrollLeft() - s.scrollSpeed) : V(window).width() - (t.pageX - V(a).scrollLeft()) < s.scrollSensitivity && (n = V(a).scrollLeft(V(a).scrollLeft() + s.scrollSpeed)))), !1 !== n && V.ui.ddmanager && !s.dropBehaviour && V.ui.ddmanager.prepareOffsets(i, t) } }), V.ui.plugin.add("draggable", "snap", { start: function (t, e, i) { var s = i.options; i.snapElements = [], V(s.snap.constructor !== String ? s.snap.items || ":data(ui-draggable)" : s.snap).each(function () { var t = V(this), e = t.offset(); this !== i.element[0] && i.snapElements.push({ item: this, width: t.outerWidth(), height: t.outerHeight(), top: e.top, left: e.left }) }) }, drag: function (t, e, i) { for (var s, n, o, a, r, l, h, c, u, d = i.options, p = d.snapTolerance, f = e.offset.left, g = f + i.helperProportions.width, m = e.offset.top, _ = m + i.helperProportions.height, v = i.snapElements.length - 1; 0 <= v; v--)l = (r = i.snapElements[v].left - i.margins.left) + i.snapElements[v].width, c = (h = i.snapElements[v].top - i.margins.top) + i.snapElements[v].height, g < r - p || l + p < f || _ < h - p || c + p < m || !V.contains(i.snapElements[v].item.ownerDocument, i.snapElements[v].item) ? (i.snapElements[v].snapping && i.options.snap.release && i.options.snap.release.call(i.element, t, V.extend(i._uiHash(), { snapItem: i.snapElements[v].item })), i.snapElements[v].snapping = !1) : ("inner" !== d.snapMode && (s = Math.abs(h - _) <= p, n = Math.abs(c - m) <= p, o = Math.abs(r - g) <= p, a = Math.abs(l - f) <= p, s && (e.position.top = i._convertPositionTo("relative", { top: h - i.helperProportions.height, left: 0 }).top), n && (e.position.top = i._convertPositionTo("relative", { top: c, left: 0 }).top), o && (e.position.left = i._convertPositionTo("relative", { top: 0, left: r - i.helperProportions.width }).left), a && (e.position.left = i._convertPositionTo("relative", { top: 0, left: l }).left)), u = s || n || o || a, "outer" !== d.snapMode && (s = Math.abs(h - m) <= p, n = Math.abs(c - _) <= p, o = Math.abs(r - f) <= p, a = Math.abs(l - g) <= p, s && (e.position.top = i._convertPositionTo("relative", { top: h, left
vendor: 28,547 bytes, line 1547
1547: 0 }).top), n && (e.position.top = i._convertPositionTo("relative", { top: c - i.helperProportions.height, left: 0 }).top), o && (e.position.left = i._convertPositionTo("relative", { top: 0, left: r }).left), a && (e.position.left = i._convertPositionTo("relative", { top: 0, left: l - i.helperProportions.width }).left)), !i.snapElements[v].snapping && (s || n || o || a || u) && i.options.snap.snap && i.options.snap.snap.call(i.element, t, V.extend(i._uiHash(), { snapItem: i.snapElements[v].item })), i.snapElements[v].snapping = s || n || o || a || u) } }), V.ui.plugin.add("draggable", "stack", { start: function (t, e, i) { var s, i = i.options, i = V.makeArray(V(i.stack)).sort(function (t, e) { return (parseInt(V(t).css("zIndex"), 10) || 0) - (parseInt(V(e).css("zIndex"), 10) || 0) }); i.length && (s = parseInt(V(i[0]).css("zIndex"), 10) || 0, V(i).each(function (t) { V(this).css("zIndex", s + t) }), this.css("zIndex", s + i.length)) } }), V.ui.plugin.add("draggable", "zIndex", { start: function (t, e, i) { e = V(e.helper), i = i.options; e.css("zIndex") && (i._zIndex = e.css("zIndex")), e.css("zIndex", i.zIndex) }, stop: function (t, e, i) { i = i.options; i._zIndex && V(e.helper).css("zIndex", i._zIndex) } }); V.ui.draggable; V.widget("ui.resizable", V.ui.mouse, { version: "1.13.2", 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 (t, e) { if ("hidden" === V(t).css("overflow")) return !1; var i = e && "left" === e ? "scrollLeft" : "scrollTop", e = !1; if (0 < t[i]) return !0; try { t[i] = 1, e = 0 < t[i], t[i] = 0 } catch (t) { } return e }, _create: function () { var t, e = this.options, i = this; this._addClass("ui-resizable"), V.extend(this, { _aspectRatio: !!e.aspectRatio, aspectRatio: e.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: e.helper || e.ghost || e.animate ? e.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(V("<div class='ui-wrapper'></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, t = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(t), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(t), this._proportionallyResize()), this._setupHandles(), e.autoHide && V(this.element).on("mouseenter", function () { e.disabled || (i._removeClass("ui-resizable-autohide"), i._handles.show()) }).on("mouseleave", function () { e.disabled || i.resizing || (i._addClass("ui-resizable-autohide"), i._handles.hide()) }), this._mouseInit() }, _destroy: function () { this._mouseDestroy(), this._addedHandles.remove(); function t(t) { V(t).removeData("resizable").removeData("ui-resizable").off(".resizable") } var e; return this.elementIsWrapper && (t(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), t(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 t, e, i, s, n, o = this.options, a = this; if (this.handles = o.handles || (V(".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 = V(), this._addedHandles = V(), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), i = this.handles.split(","), this.handles = {}, e = 0; e < i.length; e++)s = "ui-resizable-" + (t = String.prototype.trim.call(i[e])), n = V("<div>"), this._addClass(n, "ui-resizable-handle " + s), n.css({ zIndex: o.zIndex }), this.handles[t] = ".ui-resizable-" + t, this.element.children(this.handles[t]).length || (this.element.append(n), this._addedHandles = this._addedHandles.add(n)); this._renderAxis = function (t) { var e, i, s; for (e in t = t || this.element, this.handles) this.handles[e].constructor === String ? this.handles[e] = this.element.children(this.handles[e]).first().show() : (this.handles[e].jquery || this.handles[e].nodeType) && (this.handles[e] = V(this.handles[e]), this._on(this.handles[e], { mousedown: a._mouseDown })), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (i = V(this.handles[e], this.element), s = /sw|ne|nw|se|n|s/.test(e) ? i.outerHeight() : i.outerWidth(), i = ["padding", /ne|nw|n/.test(e) ? "Top" : /se|sw|s/.test(e) ? "Bottom" : /^e$/.test(e) ? "Right" : "Left"].join(""), t.css(i, s), this._proportionallyResize()), this._handles = this._handles.add(this.handles[e]) }, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.on("mouseover", function () { a.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), a.axis = n && n[1] ? n[1] : "se") }), o.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")) }, _removeHandles: function () { this._addedHandles.remove() }, _mouseCapture: function (t) { var e, i, s = !1; for (e in this.handles) (i = V(this.handles[e])[0]) !== t.target && !V.contains(i, t.target) || (s = !0); return !this.options.disabled && s }, _mouseStart: function (t) { var e, i, s = this.options, n = this.element; return this.resizing = !0, this._renderProxy(), e = this._num(this.helper.css("left")), i = this._num(this.helper.css("top")), s.containment && (e += V(s.containment).scrollLeft() || 0, i += V(s.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: e, top: i }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: n.width(), height: n.height() }, this.originalSize = this._helper ? { width: n.outerWidth(), height: n.outerHeight() } : { width: n.width(), height: n.height() }, this.sizeDiff = { width: n.outerWidth() - n.width(), height: n.outerHeight() - n.height() }, this.originalPosition = { left: e, top: i }, this.originalMousePosition = { left: t.pageX, top: t.pageY }, this.aspectRatio = "number" == typeof s.aspectRatio ? s.aspectRatio : this.originalSize.width / this.originalSize.height || 1, s = V(".ui-resizable-" + this.axis).css("cursor"), V("body").css("cursor", "auto" === s ? this.axis + "-resize" : s), this._addClass("ui-resizable-resizing"), this._propagate("start", t), !0 }, _mouseDrag: function (t) { var e = this.originalMousePosition, i = this.axis, s = t.pageX - e.left || 0, e = t.pageY - e.top || 0, i = this._change[i]; return this._updatePrevProperties(), i && (e = i.apply(this, [t, s, e]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (e = this._updateRatio(e, t)), e = this._respectSize(e, t), this._updateCache(e), this._propagate("resize", t), e = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), V.isEmptyObject(e) || (this._updatePrevProperties(), this._trigger("resize", t, this.ui()), this._applyChanges())), !1 }, _mouseStop: function (t) { this.resizing = !1; var e, i, s, n = this.options, o = this; return this._helper && (s = (e = (i = this._proportionallyResizeElements).length && /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left") ? 0 : o.sizeDiff.height, i = e ? 0 : o.sizeDiff.width, e = { width: o.helper.width() - i, height: o.helper.height() - s }, i = parseFloat(o.element.css("left")) + (o.position.left - o.originalPosition.left) || null, s = parseFloat(o.element.css("top")) + (o.position.top - o.originalPosition.top) || null, n.animate || this.element.css(V.extend(e, { top: s, left: i })), o.helper.height(o.size.height), o.helper.width(o.size.width), this._helper && !n.animate && this._proportionallyResize()), V("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", t), 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.size.width !== this.prevSize.width && (t.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (t.height = this.size.height + "px"), this.helper.css(t), t }, _updateVirtualBoundaries: function (t) { var e, i, s = this.options, n = { minWidth: this._isNumber(s.minWidth) ? s.minWidth : 0, maxWidth: this._isNumber(s.maxWidth) ? s.maxWidth : 1 / 0, minHeight: this._isNumber(s.minHeight) ? s.minHeight : 0, maxHeight: this._isNumber(s.maxHeight) ? s.maxHeight : 1 / 0 }; (this._aspectRatio || t) && (e = n.minHeight * this.aspectRatio, i = n.minWidth / this.aspectRatio, s = n.maxHeight * this.aspectRatio, t = n.maxWidth / this.aspectRatio, e > n.minWidth && (n.minWidth = e), i > n.minHeight && (n.minHeight = i), s < n.maxWidth && (n.maxWidth = s), t < n.maxHeight && (n.maxHeight = t)), this._vBoundaries = n }, _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), i = /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 && i && (t.top = l - e.minHeight), n && i && (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] } }, _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 t = this.element, e = this.options; this.elementOffset = t.offset(), this._helper ? (this.helper = this.helper || V("<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: ++e.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 (t, e, i) { return V.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, e, i])) }, sw: function (t, e, i) { return V.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, e, i])) }, ne: function (t, e, i) { return V.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, e, i])) }, nw: function (t, e, i) { return V.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, e, i])) } }, _propagate: function (t, e) { V.ui.plugin.call(this, t, [e, this.ui()]), "resize" !== t && this._trigger(t, e, 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 } } }), V.ui.plugin.add("resizable", "animate", { stop: function (e) { var i = V(this).resizable("instance"), t = i.options, s = i._proportionallyResizeElements, n = s.length && /textarea/i.test(s[0].nodeName), o = n && i._hasScroll(s[0], "left") ? 0 : i.sizeDiff.height, a = n ? 0 : i.sizeDiff.width, n = { width: i.size.width - a, height: i.size.height - o }, a = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, o = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null; i.element.animate(V.extend(n, o && a ? { top: o, left: a } : {}), { duration: t.animateDuration, easing: t.animateEasing, step: function () { var t = { width: parseFloat(i.element.css("width")), height: parseFloat(i.element.css("height")), top: parseFloat(i.element.css("top")), left: parseFloat(i.element.css("left")) }; s && s.length && V(s[0]).css({ width: t.width, height: t.height }), i._updateCache(t), i._propagate("resize", e) } }) } }), V.ui.plugin.add("resizable", "containment", { start: function () { var i, s, n = V(this).resizable("instance"), t = n.options, e = n.element, o = t.containment, a = o instanceof V ? o.get(0) : /parent/.test(o) ? e.parent().get(0) : o; a && (n.containerElement = V(a), /document/.test(o) || o === document ? (n.containerOffset = { left: 0, top: 0 }, n.containerPosition = { left: 0, top: 0 }, n.parentData = { element: V(document), left: 0, top: 0, width: V(document).width(), height: V(document).height() || document.body.parentNode.scrollHeight }) : (i = V(a), s = [], V(["Top", "Right", "Left", "Bottom"]).each(function (t, e) { s[t] = n._num(i.css("padding" + e)) }), n.containerOffset = i.offset(), n.containerPosition = i.position(), n.containerSize = { height: i.innerHeight() - s[3], width: i.innerWidth() - s[1] }, t = n.containerOffset, e = n.containerSize.height, o = n.containerSize.width, o = n._hasScroll(a, "left") ? a.scrollWidth : o, e = n._hasScroll(a) ? a.scrollHeight : e, n.parentData = { element: a, left: t.left, top: t.top, width: o, height: e })) }, resize: function (t) { var e = V(this).resizable("instance"), i = e.options, s = e.containerOffset, n = e.position, o = e._aspectRatio || t.shiftKey, a = { top: 0, left: 0 }, r = e.containerElement, t = !0; r[0] !== document && /static/.test(r.css("position")) && (a = s), n.left < (e._helper ? s.left : 0) && (e.size.width = e.size.width + (e._helper ? e.position.left - s.left : e.position.left - a.left), o && (e.size.height = e.size.width / e.aspectRatio, t = !1), e.position.left = i.helper ? s.left : 0), n.top < (e._helper ? s.top : 0) && (e.size.height = e.size.height + (e._helper ? e.position.top - s.top : e.position.top), o && (e.size.width = e.size.height * e.aspectRatio, t = !1), e.position.top = e._helper ? s.top : 0), i = e.containerElement.get(0) === e.element.parent().get(0), n = /relative|absolute/.test(e.containerElement.css("position")), i && n ? (e.offset.left = e.parentData.left + e.position.left, e.offset.top = e.parentData.top + e.position.top) : (e.offset.left = e.element.offset().left, e.offset.top = e.element.offset().top), n = Math.abs(e.sizeDiff.width + (e._helper ? e.offset.left - a.left : e.offset.left - s.left)), s = Math.abs(e.sizeDiff.height + (e._helper ? e.offset.top - a.top : e.offset.top - s.top)), n + e.size.width >= e.parentData.width && (e.size.width = e.parentData.width - n, o && (e.size.height = e.size.width / e.aspectRatio, t = !1)), s + e.size.height >= e.parentData.height && (e.size.height = e.parentData.height - s, o && (e.size.width = e.size.height * e.aspectRatio, t = !1)), t || (e.position.left = e.prevPosition.left, e.position.top = e.prevPosition.top, e.size.width = e.prevSize.width, e.size.height = e.prevSize.height) }, stop: function () { var t = V(this).resizable("instance"), e = t.options, i = t.containerOffset, s = t.containerPosition, n = t.containerElement, o = V(t.helper), a = o.offset(), r = o.outerWidth() - t.sizeDiff.width, o = o.outerHeight() - t.sizeDiff.height; t._helper && !e.animate && /relative/.test(n.css("position")) && V(this).css({ left: a.left - s.left - i.left, width: r, height: o }), t._helper && !e.animate && /static/.test(n.css("position")) && V(this).css({ left: a.left - s.left - i.left, width: r, height: o }) } }), V.ui.plugin.add("resizable", "alsoResize", { start: function () { var t = V(this).resizable("instance").options; V(t.alsoResize).each(function () { var t = V(this); t.data("ui-resizable-alsoresize", { width: parseFloat(t.width()), height: parseFloat(t.height()), left: parseFloat(t.css("left")), top: parseFloat(t.css("top")) }) }) }, resize: function (t, i) { var e = V(this).resizable("instance"), s = e.options, n = e.originalSize, o = e.originalPosition, a = { height: e.size.height - n.height || 0, width: e.size.width - n.width || 0, top: e.position.top - o.top || 0, left: e.position.left - o.left || 0 }; V(s.alsoResize).each(function () { var t = V(this), s = V(this).data("ui-resizable-alsoresize"), n = {}, e = t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; V.each(e, function (t, e) { var i = (s[e] || 0) + (a[e] || 0); i && 0 <= i && (n[e] = i || null) }), t.css(n) }) }, stop: function () { V(this).removeData("ui-resizable-alsoresize") } }), V.ui.plugin.add("resizable", "ghost", { start: function () { var t = V(this).resizable("instance"), e = t.size; t.ghost = t.originalElement.clone(), t.ghost.css({ opacity: .25, display: "block", position: "relative", height: e.height, width: e.width, margin: 0, left: 0, top: 0 }), t._addClass(t.ghost, "ui-resizable-ghost"), !1 !== V.uiBackCompat && "string" == typeof t.options.ghost && t.ghost.addClass(this.options.ghost), t.ghost.appendTo(t.helper) }, resize: function () { var t = V(this).resizable("instance"); t.ghost && t.ghost.css({ position: "relative", height: t.size.height, width: t.size.width }) }, stop: function () { var t = V(this).resizable("instance"); t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0)) } }), V.ui.plugin.add("resizable", "grid", { resize: function () { var t, e = V(this).resizable("instance"), i = e.options, s = e.size, n = e.originalSize, o = e.originalPosition, a = e.axis, r = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid, l = r[0] || 1, h = r[1] || 1, c = Math.round((s.width - n.width) / l) * l, u = Math.round((s.height - n.height) / h) * h, d = n.width + c, p = n.height + u, f = i.maxWidth && i.maxWidth < d, g = i.maxHeight && i.maxHeight < p, m = i.minWidth && i.minWidth > d, s = i.minHeight && i.minHeight > p; i.grid = r, m && (d += l), s && (p += h), f && (d -= l), g && (p -= h), /^(se|s|e)$/.test(a) ? (e.size.width = d, e.size.height = p) : /^(ne)$/.test(a) ? (e.size.width = d, e.size.height = p, e.position.top = o.top - u) : /^(sw)$/.test(a) ? (e.size.width = d, e.size.height = p, e.position.left = o.left - c) : ((p - h <= 0 || d - l <= 0) && (t = e._getPaddingPlusBorderDimensions(this)), 0 < p - h ? (e.size.height = p, e.position.top = o.top - u) : (p = h - t.height, e.size.height = p, e.position.top = o.top + n.height - p), 0 < d - l ? (e.size.width = d, e.position.left = o.left - c) : (d = l - t.width, e.size.width = d, e.position.left = o.left + n.width - d)) } }); V.ui.resizable; V.widget("ui.dialog", { version: "1.13.2", 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 (t) { var e = V(this).css(t).offset().top; e < 0 && V(this).css("top", t.top - e) } }, resizable: !0, show: null, title: null, 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 && V.fn.draggable && this._makeDraggable(), this.options.resizable && V.fn.resizable && this._makeResizable(), this._isOpen = !1, this._trackFocus() }, _init: function () { this.options.autoOpen && this.open() }, _appendTo: function () { var t = this.options.appendTo; return t && (t.jquery || t.nodeType) ? V(t) : this.document.find(t || "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: V.noop, enable: V.noop, close: function (t) { var e = this; this._isOpen && !1 !== this._trigger("beforeClose", t) && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () { e._trigger("close", t) })) }, isOpen: function () { return this._isOpen }, moveToTop: function () { this._moveToTop() }, _moveToTop: function (t, e) { var i = !1, s = this.uiDialog.siblings(".ui-front:visible").map(function () { return +V(this).css("z-index") }).get(), s = Math.max.apply(null, s); return s >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", s + 1), i = !0), i && !e && this._trigger("focus", t), i }, open: function () { var t = this; this._isOpen ? this._moveToTop() && this._focusTabbable() : (this._isOpen = !0, this.opener = V(V.ui.safeActiveElement(this.document[0])), 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 () { t._focusTabbable(), t._trigger("focus") }), this._makeFocusTarget(), this._trigger("open")) }, _focusTabbable: function () { var t = this._focusedElement; (t = !(t = !(t = !(t = !(t = t || this.element.find("[autofocus]")).length ? this.element.find(":tabbable") : t).length ? this.uiDialogButtonPane.find(":tabbable") : t).length ? this.uiDialogTitlebarClose.filter(":tabbable") : t).length ? this.uiDialog : t).eq(0).trigger("focus") }, _restoreTabbableFocus: function () { var t = V.ui.safeActiveElement(this.document[0]); this.uiDialog[0] === t || V.contains(this.uiDialog[0], t) || this._focusTabbable() }, _keepFocus: function (t) { t.preventDefault(), this._restoreTabbableFocus(), this._delay(this._restoreTabbableFocus) }, _createWrapper: function () { this.uiDialog = V("<div>").hide().attr({ tabIndex: -1, role: "dialog" }).appendTo(this._appendTo()), this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"), this._on(this.uiDialog, { keydown: function (t) { if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === V.ui.keyCode.ESCAPE) return t.preventDefault(), void this.close(t); var e, i, s; t.keyCode !== V.ui.keyCode.TAB || t.isDefaultPrevented() || (e = this.uiDialog.find(":tabbable"), i = e.first(), s = e.last(), t.target !== s[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== i[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (this._delay(function () { s.trigger("focus") }), t.preventDefault()) : (this._delay(function () { i.trigger("focus") }), t.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 t; this.uiDialogTitlebar = V("<div>"), this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"), this._on(this.uiDialogTitlebar, { mousedown: function (t) { V(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus") } }), this.uiDialogTitlebarClose = V("<button type='button'></button>").button({ label: V("<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) } }), t = V("<span>").uniqueId().prependTo(this.uiDialogTitlebar), this._addClass(t, "ui-dialog-title"), this._title(t), this.uiDialogTitlebar.prepe
vendor: 4,142 bytes, line 1547
1547ndTo(this.uiDialog), this.uiDialog.attr({ "aria-labelledby": t.attr("id") }) }, _title: function (t) { this.options.title ? t.text(this.options.title) : t.html(" ") }, _createButtonPane: function () { this.uiDialogButtonPane = V("<div>"), this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"), this.uiButtonSet = V("<div>").appendTo(this.uiDialogButtonPane), this._addClass(this.uiButtonSet, "ui-dialog-buttonset"), this._createButtons() }, _createButtons: function () { var s = this, t = this.options.buttons; this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), V.isEmptyObject(t) || Array.isArray(t) && !t.length ? this._removeClass(this.uiDialog, "ui-dialog-buttons") : (V.each(t, function (t, e) { var i; e = V.extend({ type: "button" }, e = "function" == typeof e ? { click: e, text: t } : e), i = e.click, t = { icon: e.icon, iconPosition: e.iconPosition, showLabel: e.showLabel, icons: e.icons, text: e.text }, delete e.click, delete e.icon, delete e.iconPosition, delete e.showLabel, delete e.icons, "boolean" == typeof e.text && delete e.text, V("<button></button>", e).button(t).appendTo(s.uiButtonSet).on("click", function () { i.apply(s.element[0], arguments) }) }), this._addClass(this.uiDialog, "ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog)) }, _makeDraggable: function () { var n = this, o = this.options; function a(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 (t, e) { n._addClass(V(this), "ui-dialog-dragging"), n._blockFrames(), n._trigger("dragStart", t, a(e)) }, drag: function (t, e) { n._trigger("drag", t, a(e)) }, stop: function (t, e) { var i = e.offset.left - n.document.scrollLeft(), s = e.offset.top - n.document.scrollTop(); o.position = { my: "left top", at: "left" + (0 <= i ? "+" : "") + i + " top" + (0 <= s ? "+" : "") + s, of: n.window }, n._removeClass(V(this), "ui-dialog-dragging"), n._unblockFrames(), n._trigger("dragStop", t, a(e)) } }) }, _makeResizable: function () { var n = this, o = this.options, t = o.resizable, e = this.uiDialog.css("position"), t = "string" == typeof t ? t : "n,e,s,w,se,sw,ne,nw"; function a(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: o.maxWidth, maxHeight: o.maxHeight, minWidth: o.minWidth, minHeight: this._minHeight(), handles: t, start: function (t, e) { n._addClass(V(this), "ui-dialog-resizing"), n._blockFrames(), n._trigger("resizeStart", t, a(e)) }, resize: function (t, e) { n._trigger("resize", t, a(e)) }, stop: function (t, e) { var i = n.uiDialog.offset(), s = i.left - n.document.scrollLeft(), i = i.top - n.document.scrollTop(); o.height = n.uiDialog.height(), o.width = n.uiDialog.width(), o.position = { my: "left top", at: "left" + (0 <= s ? "+" : "") + s + " top" + (0 <= i ? "+" : "") + i, of: n.window }, n._removeClass(V(this), "ui-dialog-resizing"), n._unblockFrames(), n._trigger("resizeStop", t, a(e)) } }).css("position", e) }, _trackFocus: function () { this._on(this.widget(), { focusin: function (t) { this._makeFocusTarget(), this._focusedElement = V(t.target) } }) }, _makeFocusTarget: function () { this._untrackInstance(), this._trackingInstances().unshift(this) }, _untrackInstance: function () { var t = this._trackingInstances(), e = V.inArray(this, t); -1 !== e && t.splice(e, 1) }, _trackingInstances: function () { var t = this.document.data("ui-dialog-instances"); return 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 (t) { var i = this, s = !1, n = {};
vendor: 15,644 bytes, line 1547
1547 V.each(t, 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 (t, e) { var i, s = this.uiDialog; "disabled" !== t && (this._super(t, e), "appendTo" === t && this.uiDialog.appendTo(this._appendTo()), "buttons" === t && this._createButtons(), "closeText" === t && this.uiDialogTitlebarClose.button({ label: V("<a>").text("" + this.options.closeText).html() }), "draggable" === t && ((i = s.is(":data(ui-draggable)")) && !e && s.draggable("destroy"), !i && e && this._makeDraggable()), "position" === t && this._position(), "resizable" === t && ((i = s.is(":data(ui-resizable)")) && !e && s.resizable("destroy"), i && "string" == typeof e && s.resizable("option", "handles", e), i || !1 === e || this._makeResizable()), "title" === t && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) }, _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 t = V(this); return V("<div>").css({ position: "absolute", width: t.outerWidth(), height: t.outerHeight() }).appendTo(t.parent()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _allowInteraction: function (t) { return !!V(t.target).closest(".ui-dialog").length || !!V(t.target).closest(".ui-datepicker").length }, _createOverlay: function () { var i, s; this.options.modal && (i = V.fn.jquery.substring(0, 4), s = !0, this._delay(function () { s = !1 }), this.document.data("ui-dialog-overlays") || this.document.on("focusin.ui-dialog", function (t) { var e; s || ((e = this._trackingInstances()[0])._allowInteraction(t) || (t.preventDefault(), e._focusTabbable(), "3.4." !== i && "3.5." !== i || e._delay(e._restoreTabbableFocus))) }.bind(this)), this.overlay = V("<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 () { var t; this.options.modal && this.overlay && ((t = this.document.data("ui-dialog-overlays") - 1) ? 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) } }), !1 !== V.uiBackCompat && V.widget("ui.dialog", V.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) } }); V.ui.dialog; function lt(t, e, i) { return e <= t && t < e + i } V.widget("ui.droppable", { version: "1.13.2", 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 (t) { V.ui.ddmanager.droppables[t] = V.ui.ddmanager.droppables[t] || [], V.ui.ddmanager.droppables[t].push(this) }, _splice: function (t) { for (var e = 0; e < t.length; e++)t[e] === this && t.splice(e, 1) }, _destroy: function () { var t = V.ui.ddmanager.droppables[this.options.scope]; this._splice(t) }, _setOption: function (t, e) { var i; "accept" === t ? this.accept = "function" == typeof e ? e : function (t) { return t.is(e) } : "scope" === t && (i = V.ui.ddmanager.droppables[this.options.scope], this._splice(i), this._addToManager(e)), this._super(t, e) }, _activate: function (t) { var e = V.ui.ddmanager.current; this._addActiveClass(), e && this._trigger("activate", t, this.ui(e)) }, _deactivate: function (t) { var e = V.ui.ddmanager.current; this._removeActiveClass(), e && this._trigger("deactivate", t, this.ui(e)) }, _over: function (t) { var e = V.ui.ddmanager.current; e && (e.currentItem || e.element)[0] !== this.element[0] && this.accept.call(this.element[0], e.currentItem || e.element) && (this._addHoverClass(), this._trigger("over", t, this.ui(e))) }, _out: function (t) { var e = V.ui.ddmanager.current; e && (e.currentItem || e.element)[0] !== this.element[0] && this.accept.call(this.element[0], e.currentItem || e.element) && (this._removeHoverClass(), this._trigger("out", t, this.ui(e))) }, _drop: function (e, t) { var i = t || V.ui.ddmanager.current, s = !1; return !(!i || (i.currentItem || i.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { var t = V(this).droppable("instance"); if (t.options.greedy && !t.options.disabled && t.options.scope === i.options.scope && t.accept.call(t.element[0], i.currentItem || i.element) && V.ui.intersect(i, V.extend(t, { offset: t.element.offset() }), t.options.tolerance, e)) return !(s = !0) }), !s && (!!this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", e, this.ui(i)), 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") } }), V.ui.intersect = function (t, e, i, s) { if (!e.offset) return !1; var n = (t.positionAbs || t.position.absolute).left + t.margins.left, o = (t.positionAbs || t.position.absolute).top + t.margins.top, a = n + t.helperProportions.width, r = o + t.helperProportions.height, l = e.offset.left, h = e.offset.top, c = l + e.proportions().width, u = h + e.proportions().height; switch (i) { case "fit": return l <= n && a <= c && h <= o && r <= u; case "intersect": return l < n + t.helperProportions.width / 2 && a - t.helperProportions.width / 2 < c && h < o + t.helperProportions.height / 2 && r - t.helperProportions.height / 2 < u; case "pointer": return lt(s.pageY, h, e.proportions().height) && lt(s.pageX, l, e.proportions().width); case "touch": return (h <= o && o <= u || h <= r && r <= u || o < h && u < r) && (l <= n && n <= c || l <= a && a <= c || n < l && c < a); default: return !1 } }, !(V.ui.ddmanager = { current: null, droppables: { default: [] }, prepareOffsets: function (t, e) { var i, s, n = V.ui.ddmanager.droppables[t.options.scope] || [], o = e ? e.type : null, a = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); t: for (i = 0; i < n.length; i++)if (!(n[i].options.disabled || t && !n[i].accept.call(n[i].element[0], t.currentItem || t.element))) { for (s = 0; s < a.length; s++)if (a[s] === n[i].element[0]) { n[i].proportions().height = 0; continue t } n[i].visible = "none" !== n[i].element.css("display"), n[i].visible && ("mousedown" === o && n[i]._activate.call(n[i], e), n[i].offset = n[i].element.offset(), n[i].proportions({ width: n[i].element[0].offsetWidth, height: n[i].element[0].offsetHeight })) } }, drop: function (t, e) { var i = !1; return V.each((V.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () { this.options && (!this.options.disabled && this.visible && V.ui.intersect(t, this, this.options.tolerance, e) && (i = this._drop.call(this, e) || i), !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, e))) }), i }, dragStart: function (t, e) { t.element.parentsUntil("body").on("scroll.droppable", function () { t.options.refreshPositions || V.ui.ddmanager.prepareOffsets(t, e) }) }, drag: function (n, o) { n.options.refreshPositions && V.ui.ddmanager.prepareOffsets(n, o), V.each(V.ui.ddmanager.droppables[n.options.scope] || [], function () { var t, e, i, s; this.options.disabled || this.greedyChild || !this.visible || (s = !(i = V.ui.intersect(n, this, this.options.tolerance, o)) && this.isover ? "isout" : i && !this.isover ? "isover" : null) && (this.options.greedy && (e = this.options.scope, (i = this.element.parents(":data(ui-droppable)").filter(function () { return V(this).droppable("instance").options.scope === e })).length && ((t = V(i[0]).droppable("instance")).greedyChild = "isover" === s)), t && "isover" === s && (t.isover = !1, t.isout = !0, t._out.call(t, o)), this[s] = !0, this["isout" === s ? "isover" : "isout"] = !1, this["isover" === s ? "_over" : "_out"].call(this, o), t && "isout" === s && (t.isout = !1, t.isover = !0, t._over.call(t, o))) }) }, dragStop: function (t, e) { t.element.parentsUntil("body").off("scroll.droppable"), t.options.refreshPositions || V.ui.ddmanager.prepareOffsets(t, e) } }) !== V.uiBackCompat && V.widget("ui.droppable", V.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) } }); V.ui.droppable, V.widget("ui.progressbar", { version: "1.13.2", 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 = V("<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 t = this.options.value, e = this._percentage(); this.valueDiv.toggle(this.indeterminate || t > this.min).width(e.toFixed(0) + "%"), this._toggleClass(this.valueDiv, "ui-progressbar-complete", null, t === this.options.max)._toggleClass("ui-progressbar-indeterminate", null, this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = V("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": t }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== t && (this.oldValue = t, this._trigger("change")), t === this.options.max && this._trigger("complete") } }), V.widget("ui.selectable", V.ui.mouse, { version: "1.13.2", 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 i = this; this._addClass("ui-selectable"), this.dragged = !1, this.refresh = function () { i.elementPos = V(i.element[0]).offset(), i.selectees = V(i.options.filter, i.element[0]), i._addClass(i.selectees, "ui-selectee"), i.selectees.each(function () { var t = V(this), e = t.offset(), e = { left: e.left - i.elementPos.left, top: e.top - i.elementPos.top }; V.data(this, "selectable-item", { element: this, $element: t, left: e.left, top: e.top, right: e.left + t.outerWidth(), bottom: e.top + t.outerHeight(), startselected: !1, selected: t.hasClass("ui-selected"), selecting: t.hasClass("ui-selecting"), unselecting: t.hasClass("ui-unselecting") }) }) }, this.refresh(), this._mouseInit(), this.helper = V("<div>"), this._addClass(this.helper, "ui-selectable-helper") }, _destroy: function () { this.selectees.removeData("selectable-item"), this._mouseDestroy() }, _mouseStart: function (i) { var s = this, t = this.options; this.opos = [i.pageX, i.pageY], this.elementPos = V(this.element[0]).offset(), this.options.disabled || (this.selectees = V(t.filter, this.element[0]), this._trigger("start", i), V(t.appendTo).append(this.helper), this.helper.css({ left: i.pageX, top: i.pageY, width: 0, height: 0 }), t.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { var t = V.data(this, "selectable-item"); t.startselected = !0, i.metaKey || i.ctrlKey || (s._removeClass(t.$element, "ui-selected"), t.selected = !1, s._addClass(t.$element, "ui-unselecting"), t.unselecting = !0, s._trigger("unselecting", i, { unselecting: t.element })) }), V(i.target).parents().addBack().each(function () { var t, e = V.data(this, "selectable-item"); if (e) return t = !i.metaKey && !i.ctrlKey || !e.$element.hasClass("ui-selected"), s._removeClass(e.$element, t ? "ui-unselecting" : "ui-selected")._addClass(e.$element, t ? "ui-selecting" : "ui-unselecting"), e.unselecting = !t, e.selecting = t, (e.selected = t) ? s._trigger("selecting", i, { selecting: e.element }) : s._trigger("unselecting", i, { unselecting: e.element }), !1 })) }, _mouseDrag: function (s) { if (this.dragged = !0, !this.options.disabled) { var t, n = this, o = this.options, a = this.opos[0], r = this.opos[1], l = s.pageX, h = s.pageY;
vendor: 8,452 bytes, line 1547
1547 return l < a && (t = l, l = a, a = t), h < r && (t = h, h = r, r = t), this.helper.css({ left: a, top: r, width: l - a, height: h - r }), this.selectees.each(function () { var t = V.data(this, "selectable-item"), e = !1, i = {}; t && t.element !== n.element[0] && (i.left = t.left + n.elementPos.left, i.right = t.right + n.elementPos.left, i.top = t.top + n.elementPos.top, i.bottom = t.bottom + n.elementPos.top, "touch" === o.tolerance ? e = !(i.left > l || i.right < a || i.top > h || i.bottom < r) : "fit" === o.tolerance && (e = i.left > a && i.right < l && i.top > r && i.bottom < h), e ? (t.selected && (n._removeClass(t.$element, "ui-selected"), t.selected = !1), t.unselecting && (n._removeClass(t.$element, "ui-unselecting"), t.unselecting = !1), t.selecting || (n._addClass(t.$element, "ui-selecting"), t.selecting = !0, n._trigger("selecting", s, { selecting: t.element }))) : (t.selecting && ((s.metaKey || s.ctrlKey) && t.startselected ? (n._removeClass(t.$element, "ui-selecting"), t.selecting = !1, n._addClass(t.$element, "ui-selected"), t.selected = !0) : (n._removeClass(t.$element, "ui-selecting"), t.selecting = !1, t.startselected && (n._addClass(t.$element, "ui-unselecting"), t.unselecting = !0), n._trigger("unselecting", s, { unselecting: t.element }))), t.selected && (s.metaKey || s.ctrlKey || t.startselected || (n._removeClass(t.$element, "ui-selected"), t.selected = !1, n._addClass(t.$element, "ui-unselecting"), t.unselecting = !0, n._trigger("unselecting", s, { unselecting: t.element }))))) }), !1 } }, _mouseStop: function (e) { var i = this; return this.dragged = !1, V(".ui-unselecting", this.element[0]).each(function () { var t = V.data(this, "selectable-item"); i._removeClass(t.$element, "ui-unselecting"), t.unselecting = !1, t.startselected = !1, i._trigger("unselected", e, { unselected: t.element }) }), V(".ui-selecting", this.element[0]).each(function () { var t = V.data(this, "selectable-item"); i._removeClass(t.$element, "ui-selecting")._addClass(t.$element, "ui-selected"), t.selecting = !1, t.selected = !0, t.startselected = !0, i._trigger("selected", e, { selected: t.element }) }), this._trigger("stop", e), this.helper.remove(), !1 } }), V.widget("ui.selectmenu", [V.ui.formResetMixin, { version: "1.13.2", 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 t = this.element.uniqueId().attr("id"); this.ids = { element: t, button: t + "-button", menu: t + "-menu" }, this._drawButton(), this._drawMenu(), this._bindFormResetHandler(), this._rendered = !1, this.menuItems = V() }, _drawButton: function () { var t, e = this, i = 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 = V("<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"), t = V("<span>").appendTo(this.button), this._addClass(t, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button), this.buttonItem = this._renderButtonItem(i).appendTo(this.button), !1 !== this.options.width && this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function () { e._rendered || e._refreshMenu() }) }, _drawMenu: function () { var i = this; this.menu = V("<ul>", { "aria-hidden": "true", "aria-labelledby": this.ids.button, id: this.ids.menu }), this.menuWrap = V("<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, e) { t.preventDefault(), i._setSelection(), i._select(e.item.data("ui-selectmenu-item"), t) }, focus: function (t, e) { e = e.item.data("ui-selectmenu-item"); null != i.focusIndex && e.index !== i.focusIndex && (i._trigger("focus", t, { item: e }), i.isOpen || i._select(e, t)), i.focusIndex = e.index, i.button.attr("aria-activedescendant", i.menuItems.eq(e.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 = this.element.find("option"); this.menu.empty(), this._parseOptions(t), 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, t.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) { 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(V.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 (t) { var e = V("<span>"); return this._setText(e, t.label), this._addClass(e, "ui-selectmenu-text"), e }, _renderMenu: function (s, t) { var n = this, o = ""; V.each(t, function (t, e) { var i; e.optgroup !== o && (i = V("<li>", { text: e.optgroup }), n._addClass(i, "ui-selectmenu-optgroup", "ui-menu-divider" + (e.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), i.appendTo(s), o = e.optgroup), n._renderItemData(s, e) }) }, _renderItemData: function (t, e) { return this._renderItem(t, e).data("ui-selectmenu-item", e) }, _renderItem: function (t, e) { var i = V("<li>"), s = V("<div>", { title: e.element.attr("title") }); return e.disabled && this._addClass(i, null, "ui-state-disabled"), this._setText(s, e.label), i.append(s).appendTo(t) }, _setText: function (t, e) { e ? t.text(e) : t.html(" ") }, _move: function (t, e) { var i, s = ".ui-menu-item"; this.isOpen ? i = this.menuItems.eq(this.focusIndex).parent("li") : (i = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), s += ":not(.ui-state-disabled)"), (s = "first" === t || "last" === t ? i["first" === t ? "prevAll" : "nextAll"](s).eq(-1) : i[t + "All"](s).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 && (window.getSelection ? ((t = window.getSelection()).removeAllRanges(), t.addRange(this.range)) : this.range.select(), this.button.trigger("focus")) }, _documentClick: { mousedown: function (t) { this.isOpen && (V(t.target).closest(".ui-selectmenu-menu, #" + V.escapeSelector(this.ids.button)).length || this.close(t)) } }, _buttonEvents: { mousedown: function () { var t; window.getSelection ? (t = window.getSelection()).rangeCount && (this.range = t.getRangeAt(0)) : this.range = document.selection.createRange() }, click: function (t) { this._setSelection(), this._toggle(t) }
vendor: 6,476 bytes, line 1547
1547, keydown: function (t) { var e = !0; switch (t.keyCode) { case V.ui.keyCode.TAB: case V.ui.keyCode.ESCAPE: this.close(t), e = !1; break; case V.ui.keyCode.ENTER: this.isOpen && this._selectFocusedItem(t); break; case V.ui.keyCode.UP: t.altKey ? this._toggle(t) : this._move("prev", t); break; case V.ui.keyCode.DOWN: t.altKey ? this._toggle(t) : this._move("next", t); break; case V.ui.keyCode.SPACE: this.isOpen ? this._selectFocusedItem(t) : this._toggle(t); break; case V.ui.keyCode.LEFT: this._move("prev", t); break; case V.ui.keyCode.RIGHT: this._move("next", t); break; case V.ui.keyCode.HOME: case V.ui.keyCode.PAGE_UP: this._move("first", t); break; case V.ui.keyCode.END: case V.ui.keyCode.PAGE_DOWN: this._move("last", t); break; default: this.menu.trigger(t), e = !1 }e && t.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) { t = this.menuItems.eq(t.index).attr("id"); this.button.attr({ "aria-labelledby": t, "aria-activedescendant": t }), this.menu.attr("aria-activedescendant", t) }, _setOption: function (t, e) { var i; "icons" === t && (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 t = this.options.appendTo; return t = !(t = !(t = t && (t.jquery || t.nodeType ? V(t) : this.document.find(t).eq(0))) || !t[0] ? this.element.closest(".ui-front, dialog") : t).length ? this.document[0].body : t }, _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; !1 !== t ? (null === t && (t = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(t)) : this.button.css("width", "") }, _resizeMenu: function () { this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1)) }, _getCreateOptions: function () { var t = this._super(); return t.disabled = this.element.prop("disabled"), t }, _parseOptions: function (t) { var i = this, s = []; t.each(function (t, e) { e.hidden || s.push(i._parseOption(V(e), t)) }), this.items = s }, _parseOption: function (t, e) { var i = t.parent("optgroup"); return { element: t, index: e, value: t.val(), label: t.text(), 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) } }]), V.widget("ui.slider", V.ui.mouse, { version: "1.13.2", 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 t, e = this.options, i = this.element.find(".ui-slider-handle"), s = [], n = e.values && e.values.length || 1; for (i.length > n && (i.slice(n).remove(), i = i.slice(0, n)), t = i.length; t < n; t++)s.push("<span tabindex='0'></span>"); this.handles = i.add(V(s.join("")).appendTo(this.element)), this._addClass(this.handles, "ui-slider-handle", "ui-state-default"), this.handle = this.handles.eq(0), this.handles.each(function (t) { V(this).data("ui-slider-handle-index", t).attr("tabIndex", 0) }) }, _createRange: function () { var t = this.options; t.range ? (!0 === t.range && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : Array.isArray(t.values) && (t.values = t.values.slice(0)) : t.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 = V("<div>").appendTo(this.element), this._addClass(this.range, "ui-slider-range")), "min" !== t.range && "max" !== t.range || this._addClass(this.range, "ui-slider-range-" + t.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 (t) { var i, s, n, o, e, a, r = this, l = this.options; return !l.disabled && (this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }, this.elementOffset = this.element.offset(), a = { x: t.pageX, y: t.pageY }, i = this._normValueFromMouse(a), s = this._valueMax() - this._valueMin() + 1, this.handles.each(function (t) { var e = Math.abs(i - r.values(t));
vendor: 16,384 bytes, line 1547
1547 (e < s || s === e && (t === r._lastChangedValue || r.values(t) === l.min)) && (s = e, n = V(this), o = t) }), !1 !== this._start(t, o) && (this._mouseSliding = !0, this._handleIndex = o, this._addClass(n, null, "ui-state-active"), n.trigger("focus"), e = n.offset(), a = !V(t.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = a ? { left: 0, top: 0 } : { left: t.pageX - e.left - n.width() / 2, top: t.pageY - e.top - n.height() / 2 - (parseInt(n.css("borderTopWidth"), 10) || 0) - (parseInt(n.css("borderBottomWidth"), 10) || 0) + (parseInt(n.css("marginTop"), 10) || 0) }, this.handles.hasClass("ui-state-hover") || this._slide(t, o, i), this._animateOff = !0)) }, _mouseStart: function () { return !0 }, _mouseDrag: function (t) { var e = { x: t.pageX, y: t.pageY }, e = this._normValueFromMouse(e); return this._slide(t, this._handleIndex, e), !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 }, _detectOrientation: function () { this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal" }, _normValueFromMouse: function (t) { var e, t = "horizontal" === this.orientation ? (e = this.elementSize.width, t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), t = t / e; return (t = 1 < t ? 1 : t) < 0 && (t = 0), "vertical" === this.orientation && (t = 1 - t), e = this._valueMax() - this._valueMin(), e = this._valueMin() + t * e, this._trimAlignValue(e) }, _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 ? 0 : 1), 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) { return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), void this._change(null, 0)) : this._value() }, values: function (t, e) { var i, s, n; if (1 < arguments.length) return this.options.values[t] = this._trimAlignValue(e), this._refreshValue(), void this._change(null, t); if (!arguments.length) return this._values(); if (!Array.isArray(t)) return this._hasMultipleValues() ? this._values(t) : this.value(); for (i = this.options.values, s = t, n = 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; 0 <= i; 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 t = this._trimAlignValue(t) }, _values: function (t) { var e, i; if (arguments.length) return t = this.options.values[t], t = this._trimAlignValue(t); if (this._hasMultipleValues()) { for (e = this.options.values.slice(), i = 0; i < e.length; i += 1)e[i] = this._trimAlignValue(e[i]); return e } return [] }, _trimAlignValue: function (t) { if (t <= this._valueMin()) return this._valueMin(); if (t >= this._valueMax()) return this._valueMax(); var e = 0 < this.options.step ? this.options.step : 1, i = (t - this._valueMin()) % e, t = t - i; return 2 * Math.abs(i) >= e && (t += 0 < i ? e : -e), parseFloat(t.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 t = null !== this.options.min ? Math.max(t, this._precisionOf(this.options.min)) : t }, _precisionOf: function (t) { var e = t.toString(), t = e.indexOf("."); return -1 === t ? 0 : e.length - t - 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, t, s, n, o = this.options.range, a = this.options, r = this, l = !this._animateOff && a.animate, h = {}; this._hasMultipleValues() ? this.handles.each(function (t) { i = (r.values(t) - r._valueMin()) / (r._valueMax() - r._valueMin()) * 100, h["horizontal" === r.orientation ? "left" : "bottom"] = i + "%", V(this).stop(1, 1)[l ? "animate" : "css"](h, a.animate), !0 === r.options.range && ("horizontal" === r.orientation ? (0 === t && r.range.stop(1, 1)[l ? "animate" : "css"]({ left: i + "%" }, a.animate), 1 === t && r.range[l ? "animate" : "css"]({ width: i - e + "%" }, { queue: !1, duration: a.animate })) : (0 === t && r.range.stop(1, 1)[l ? "animate" : "css"]({ bottom: i + "%" }, a.animate), 1 === t && r.range[l ? "animate" : "css"]({ height: i - e + "%" }, { queue: !1, duration: a.animate }))), e = i }) : (t = this.value(), s = this._valueMin(), n = this._valueMax(), i = n !== s ? (t - s) / (n - s) * 100 : 0, h["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[l ? "animate" : "css"](h, a.animate), "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({ width: i + "%" }, a.animate), "max" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({ width: 100 - i + "%" }, a.animate), "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({ height: i + "%" }, a.animate), "max" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({ height: 100 - i + "%" }, a.animate)) }, _handleEvents: { keydown: function (t) { var e, i, s, n = V(t.target).data("ui-slider-handle-index"); switch (t.keyCode) { case V.ui.keyCode.HOME: case V.ui.keyCode.END: case V.ui.keyCode.PAGE_UP: case V.ui.keyCode.PAGE_DOWN: case V.ui.keyCode.UP: case V.ui.keyCode.RIGHT: case V.ui.keyCode.DOWN: case V.ui.keyCode.LEFT: if (t.preventDefault(), !this._keySliding && (this._keySliding = !0, this._addClass(V(t.target), null, "ui-state-active"), !1 === this._start(t, n))) return }switch (s = this.options.step, e = i = this._hasMultipleValues() ? this.values(n) : this.value(), t.keyCode) { case V.ui.keyCode.HOME: i = this._valueMin(); break; case V.ui.keyCode.END: i = this._valueMax(); break; case V.ui.keyCode.PAGE_UP: i = this._trimAlignValue(e + (this._valueMax() - this._valueMin()) / this.numPages); break; case V.ui.keyCode.PAGE_DOWN: i = this._trimAlignValue(e - (this._valueMax() - this._valueMin()) / this.numPages); break; case V.ui.keyCode.UP: case V.ui.keyCode.RIGHT: if (e === this._valueMax()) return; i = this._trimAlignValue(e + s); break; case V.ui.keyCode.DOWN: case V.ui.keyCode.LEFT: if (e === this._valueMin()) return; i = this._trimAlignValue(e - s) }this._slide(t, n, i) }, keyup: function (t) { var e = V(t.target).data("ui-slider-handle-index"); this._keySliding && (this._keySliding = !1, this._stop(t, e), this._change(t, e), this._removeClass(V(t.target), null, "ui-state-active")) } } }), V.widget("ui.sortable", V.ui.mouse, { version: "1.13.2", 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 e <= t && 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 t = this; this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"), V.each(this.items, function () { t._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; 0 <= t; t--)this.items[t].item.removeData(this.widgetName + "-item"); return this }, _mouseCapture: function (t, e) { var i = null, s = !1, n = this; return !this.reverting && (!this.options.disabled && "static" !== this.options.type && (this._refreshItems(t), V(t.target).parents().each(function () { if (V.data(this, n.widgetName + "-item") === n) return i = V(this), !1 }), !!(i = V.data(t.target, n.widgetName + "-item") === n ? V(t.target) : i) && (!(this.options.handle && !e && (V(this.options.handle, i).find("*").addBack().each(function () { this === t.target && (s = !0) }), !s)) && (this.currentItem = i, this._removeCurrentsFromItems(), !0)))) }, _mouseStart: function (t, e, i) { var s, n, o = this.options; if ((this.currentContainer = this).refreshPositions(), this.appendTo = V("parent" !== o.appendTo ? o.appendTo : this.currentItem.parent()), this.helper = this._createHelper(t), 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 }, V.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top }, relative: this._getRelativeOffset() }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), o.cursorAt && this._adjustOffsetFromHelper(o.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(), V.extend(this.offset, { parent: this._getParentOffset() }), o.containment && this._setContainment(), o.cursor && "auto" !== o.cursor && (n = this.document.find("body"), this.storedCursor = n.css("cursor"), n.css("cursor", o.cursor), this.storedStylesheet = V("<style>*{ cursor: " + o.cursor + " !important; }</style>").appendTo(n)), o.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", o.zIndex)), o.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", o.opacity)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", t, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !i) for (s = this.containers.length - 1; 0 <= s; s--)this.containers[s]._trigger("activate", t, this._uiHash(this)); return V.ui.ddmanager && (V.ui.ddmanager.current = this), V.ui.ddmanager && !o.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t), 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(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, this.lastPositionAbs = this.positionAbs = this._convertPositionTo("absolute"), this._mouseDrag(t), !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 (t) { var e, i, s, n, o = this.options; for (this.position = this._generatePosition(t), 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"), o.scroll && !1 !== this._scroll(t) && (this._refreshItemPositions(!0), V.ui.ddmanager && !o.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t)), this.dragDirection = { vertical: this._getDragVerticalDirection(), horizontal: this._getDragHorizontalDirection() }, e = this.items.length - 1; 0 <= e; e--)if (s = (i = this.items[e]).item[0], (n = this._intersectsWithPointer(i)) && i.instance === this.currentContainer && !(s === this.currentItem[0] || this.placeholder[1 === n ? "next" : "prev"]()[0] === s || V.contains(this.placeholder[0], s) || "semi-dynamic" === this.options.type && V.contains(this.element[0], s))) { if (this.direction = 1 === n ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(i)) break; this._rearrange(t,
vendor: 8,672 bytes, line 1547
1547i), this._trigger("change", t, this._uiHash()); break } return this._contactContainers(t), V.ui.ddmanager && V.ui.ddmanager.drag(this, t), this._trigger("sort", t, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1 }, _mouseStop: function (t, e) { var i, s, n, o; if (t) return V.ui.ddmanager && !this.options.dropBehaviour && V.ui.ddmanager.drop(this, t), this.options.revert ? (s = (i = this).placeholder.offset(), o = {}, (n = this.options.axis) && "x" !== n || (o.left = s.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), n && "y" !== n || (o.top = s.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, V(this.helper).animate(o, parseInt(this.options.revert, 10) || 500, function () { i._clear(t) })) : this._clear(t, e), !1 }, cancel: function () { if (this.dragging) { this._mouseUp(new V.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 t = this.containers.length - 1; 0 <= t; t--)this.containers[t]._trigger("deactivate", null, this._uiHash(this)), this.containers[t].containerCache.over && (this.containers[t]._trigger("out", null, this._uiHash(this)), this.containers[t].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(), V.extend(this, { helper: null, dragging: !1, reverting: !1, _noFinalSort: null }), this.domPosition.prev ? V(this.domPosition.prev).after(this.currentItem) : V(this.domPosition.parent).prepend(this.currentItem)), this }, serialize: function (e) { var t = this._getItemsAsjQuery(e && e.connected), i = []; return e = e || {}, V(t).each(function () { var t = (V(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/); t && i.push((e.key || t[1] + "[]") + "=" + (e.key && e.expression ? t[1] : t[2])) }), !i.length && e.key && i.push(e.key + "="), i.join("&") }, toArray: function (t) { var e = this._getItemsAsjQuery(t && t.connected), i = []; return t = t || {}, e.each(function () { i.push(V(t.item || this).attr(t.attribute || "id") || "") }), i }, _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, h = "x" === this.options.axis || r < s + h && s + h < l, c = "y" === this.options.axis || o < e + c && 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"] ? h && c : 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 = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height), t = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width); return !(!e || !t) && (e = this.dragDirection.vertical, t = this.dragDirection.horizontal, this.floating ? "right" === t || "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, t = this.dragDirection.horizontal; return this.floating && t ? "right" === t && i || "left" === t && !i : s && ("down" === s && e || "up" === s && !e) }, _getDragVerticalDirection: function () { var t = this.positionAbs.top - this.lastPositionAbs.top; return 0 != t && (0 < t ? "down" : "up") }, _getDragHorizontalDirection: function () { var t = this.positionAbs.left - this.lastPositionAbs.left; return 0 != t && (0 < t ? "right" : "left") }, refresh: function (t) { return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this }, _connectWith: function () { var t = this.options; return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith }, _getItemsAsjQuery: function (t) { var e, i, s, n, o = [], a = [], r = this._connectWith(); if (r && t) for (e = r.length - 1; 0 <= e; e--)for (i = (s = V(r[e], this.document[0])).length - 1; 0 <= i; i--)(n = V.data(s[i], this.widgetFullName)) && n !== this && !n.options.disabled && a.push(["function" == typeof n.options.items ? n.options.items.call(n.element) : V(n.options.items, n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), n]); function l() { o.push(this) } for (a.push(["function" == typeof this.options.items ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : V(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), e = a.length - 1; 0 <= e; e--)a[e][0].each(l); return V(o) }, _removeCurrentsFromItems: function () { var i = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = V.grep(this.items, function (t) { for (var e = 0; e < i.length; e++)if (i[e] === t.item[0]) return !1; return !0 }) }, _refreshItems: function (t) { this.items = [], this.containers = [this]; var e, i, s, n, o, a, r, l, h = this.items, c = [["function" == typeof this.options.items ? this.options.items.call(this.element[0], t, { item: this.currentItem }) : V(this.options.items, this.element), this]], u = this._connectWith(); if (u && this.ready) for (e = u.length - 1; 0 <= e; e--)for (i = (s = V(u[e], this.document[0])).length - 1; 0 <= i; i--)(n = V.data(s[i], this.widgetFullName)) && n !== this && !n.options.disabled && (c.push(["function" == typeof n.options.items ? n.options.items.call(n.element[0], t, { item: this.currentItem }) : V(n.options.items, n.element), n]), this.containers.push(n)); for (e = c.length - 1; 0 <= e; e--)for (o = c[e][1], l = (a = c[e][i = 0]).length; i < l; i++)(r = V(a[i])).data(this.widgetName + "-item", o), h.push({ item: r, instance: o, width: 0, height: 0, left: 0, top: 0 }) }, _refreshItemPositions: function (t) { for (var e, i, s = this.items.length - 1; 0 <= s; s--)e = this.items[s], this.currentContainer && e.instance !== this.currentContainer && e.item[0] !== this.currentItem[0] || (i = this.options.toleranceElement ? V(this.options.toleranceElement, e.item) : e.item, t || (e.width = i.outerWidth(), e.height = i.outerHeight()), i = i.offset(), e.left = i.left, e.top = i.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; 0 <= e; 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 (i) { var s, n, o = (i = i || this).options; o.placeholder && o.placeholder.constructor !== String || (s = o.placeholder, n = i.currentItem[0].nodeName.toLowerCase(), o.placeholder = { element: function () { var t = V("<" + n + ">", i.document[0]); return i._addClass(t, "ui-sortable-placeholder", s || i.currentItem[0].className)._removeClass(t, "ui-sortable-helper"), "tbody" === n ? i._createTrPlaceholder(i.currentItem.find("tr").eq(0), V("<tr>", i.document[0]).appendTo(t)) : "tr" === n ? i._createTrPlaceholder(i.currentItem, t) : "img" === n && t.attr("src", i.currentItem.attr("src")), s || t.css("visibility", "hidden"), t }, update: function (t, e) { s && !o.forcePlaceholderSize || (e.height() && (!o.forcePlaceholderSize || "tbody" !== n && "tr" !== n) || e.height(i.currentItem.innerHe
vendor: 11,042 bytes, line 1547
1547ight() - parseInt(i.currentItem.css("paddingTop") || 0, 10) - parseInt(i.currentItem.css("paddingBottom") || 0, 10)), e.width() || e.width(i.currentItem.innerWidth() - parseInt(i.currentItem.css("paddingLeft") || 0, 10) - parseInt(i.currentItem.css("paddingRight") || 0, 10))) } }), i.placeholder = V(o.placeholder.element.call(i.element, i.currentItem)), i.currentItem.after(i.placeholder), o.placeholder.update(i, i.placeholder) }, _createTrPlaceholder: function (t, e) { var i = this; t.children().each(function () { V("<td> </td>", i.document[0]).attr("colspan", V(this).attr("colspan") || 1).appendTo(e) }) }, _contactContainers: function (t) { for (var e, i, s, n, o, a, r, l, h, c = null, u = null, d = this.containers.length - 1; 0 <= d; d--)V.contains(this.currentItem[0], this.containers[d].element[0]) || (this._intersectsWith(this.containers[d].containerCache) ? c && V.contains(this.containers[d].element[0], c.element[0]) || (c = this.containers[d], u = d) : this.containers[d].containerCache.over && (this.containers[d]._trigger("out", t, this._uiHash(this)), this.containers[d].containerCache.over = 0)); if (c) if (1 === this.containers.length) this.containers[u].containerCache.over || (this.containers[u]._trigger("over", t, this._uiHash(this)), this.containers[u].containerCache.over = 1); else { for (i = 1e4, s = null, n = (l = c.floating || this._isFloating(this.currentItem)) ? "left" : "top", o = l ? "width" : "height", h = l ? "pageX" : "pageY", e = this.items.length - 1; 0 <= e; e--)V.contains(this.containers[u].element[0], this.items[e].item[0]) && this.items[e].item[0] !== this.currentItem[0] && (a = this.items[e].item.offset()[n], r = !1, t[h] - a > this.items[e][o] / 2 && (r = !0), Math.abs(t[h] - a) < i && (i = Math.abs(t[h] - a), s = this.items[e], this.direction = r ? "up" : "down")); (s || this.options.dropOnEmpty) && (this.currentContainer !== this.containers[u] ? (s ? this._rearrange(t, s, null, !0) : this._rearrange(t, null, this.containers[u].element, !0), this._trigger("change", t, this._uiHash()), this.containers[u]._trigger("change", t, this._uiHash(this)), this.currentContainer = this.containers[u], 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[u]._trigger("over", t, this._uiHash(this)), this.containers[u].containerCache.over = 1) : this.currentContainer.containerCache.over || (this.containers[u]._trigger("over", t, this._uiHash()), this.currentContainer.containerCache.over = 1)) } }, _createHelper: function (t) { var e = this.options, t = "function" == typeof e.helper ? V(e.helper.apply(this.element[0], [t, this.currentItem])) : "clone" === e.helper ? this.currentItem.clone() : this.currentItem; return t.parents("body").length || this.appendTo[0].appendChild(t[0]), t[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") }), t[0].style.width && !e.forceHelperSize || t.width(this.currentItem.width()), t[0].style.height && !e.forceHelperSize || t.height(this.currentItem.height()), t }, _adjustOffsetFromHelper: function (t) { "string" == typeof t && (t = t.split(" ")), "left" in (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : 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 t = this.offsetParent.offset(); return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), { top: (t = this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && V.ui.ie ? { top: 0, left: 0 } : t).top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.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 t, e, i = this.options; "parent" === i.containment && (i.containment = this.helper[0].parentNode), "document" !== i.containment && "window" !== i.containment || (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === i.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === i.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(i.containment) || (t = V(i.containment)[0], e = V(i.containment).offset(), i = "hidden" !== V(t).css("overflow"), this.containment = [e.left + (parseInt(V(t).css("borderLeftWidth"), 10) || 0) + (parseInt(V(t).css("paddingLeft"), 10) || 0) - this.margins.left, e.top + (parseInt(V(t).css("borderTopWidth"), 10) || 0) + (parseInt(V(t).css("paddingTop"), 10) || 0) - this.margins.top, e.left + (i ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(V(t).css("borderLeftWidth"), 10) || 0) - (parseInt(V(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, e.top + (i ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(V(t).css("borderTopWidth"), 10) || 0) - (parseInt(V(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]) }, _convertPositionTo: function (t, e) { e = e || this.position; var i = "absolute" === t ? 1 : -1, s = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, t = /(html|body)/i.test(s[0].tagName); return { top: e.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : t ? 0 : s.scrollTop()) * i, left: e.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : t ? 0 : s.scrollLeft()) * i } }, _generatePosition: function (t) { var e = this.options, i = t.pageX, s = t.pageY, n = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, o = /(html|body)/i.test(n[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 && (t.pageX - this.offset.click.left < this.containment[0] && (i = this.containment[0] + this.offset.click.left), t.pageY - this.offset.click.top < this.containment[1] && (s = this.containment[1] + this.offset.click.top), t.pageX - this.offset.click.left > this.containment[2] && (i = this.containment[2] + this.offset.click.left), t.pageY - this.offset.click.top > this.containment[3] && (s = this.containment[3] + this.offset.click.top)), e.grid && (t = this.originalPageY + Math.round((s - this.originalPageY) / e.grid[1]) * e.grid[1], s = !this.containment || t - this.offset.click.top >= this.containment[1] && t - this.offset.click.top <= this.containment[3] ? t : t - this.offset.click.top >= this.containment[1] ? t - e.grid[1] : t + e.grid[1], t = this.originalPageX + Math.round((i - this.originalPageX) / e.grid[0]) * e.grid[0], i = !this.containment || t - this.offset.click.left >= this.containment[0] && t - this.offset.click.left <= this.containment[2] ? t : t - this.offset.click.left >= this.containment[0] ? t - e.grid[0] : t + e.grid[0])), { top: s - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : o ? 0 : n.scrollTop()), left: i - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : o ? 0 : n.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(e, i, s) { return function (t) { s._trigger(e, t, i._uiHash(i)) } } 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 (e) { return function (t) { e._trigger("receive", t, this._uiHash(this)) } }.call(this, this.currentContainer)), s.push(function (e) { return function (t) { e._trigger("update", t, this._uiHash(this)) } }.call(this, this.currentContainer)))), i = this.containers.length - 1; 0 <= i;
vendor: 23,463 bytes, line 1547
1547 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.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), 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 === V.Widget.prototype._trigger.apply(this, arguments) && this.cancel() }, _uiHash: function (t) { var e = t || this; return { helper: e.helper, placeholder: e.placeholder || V([]), position: e.position, originalPosition: e.originalPosition, offset: e.positionAbs, item: e.currentItem, sender: t ? t.element : null } } }); function ht(e) { return function () { var t = this.element.val(); e.apply(this, arguments), this._refresh(), t !== this.element.val() && this._trigger("change") } } V.widget("ui.spinner", { version: "1.13.2", 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 s = this._super(), n = this.element; return V.each(["min", "max", "step"], function (t, e) { var i = n.attr(e); null != i && i.length && (s[e] = i) }), s }, _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.cancelBlur ? delete this.cancelBlur : (this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", t)) }, mousewheel: function (t, e) { var i = V.ui.safeActiveElement(this.document[0]); if (this.element[0] === i && e) { if (!this.spinning && !this._start(t)) return !1; this._spin((0 < e ? 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 (t) { var e; function i() { this.element[0] === V.ui.safeActiveElement(this.document[0]) || (this.element.trigger("focus"), this.previous = e, this._delay(function () { this.previous = e })) } e = this.element[0] === V.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(), t.preventDefault(), i.call(this), this.cancelBlur = !0, this._delay(function () { delete this.cancelBlur, i.call(this) }), !1 !== this._start(t) && this._repeat(null, V(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (t) { if (V(t.currentTarget).hasClass("ui-state-active")) return !1 !== this._start(t) && void this._repeat(null, V(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "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()) && 0 < this.uiSpinner.height() && this.uiSpinner.height(this.uiSpinner.height()) }, _keydown: function (t) { var e = this.options, i = V.ui.keyCode; switch (t.keyCode) { case i.UP: return this._repeat(null, 1, t), !0; case i.DOWN: return this._repeat(null, -1, t), !0; case i.PAGE_UP: return this._repeat(null, e.page, t), !0; case i.PAGE_DOWN: return this._repeat(null, -e.page, t), !0 }return !1 }, _start: function (t) { return !(!this.spinning && !1 === this._trigger("start", t)) && (this.counter || (this.counter = 1), this.spinning = !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 t = null !== this.options.min ? Math.max(t, this._precisionOf(this.options.min)) : t }, _precisionOf: function (t) { var e = t.toString(), t = e.indexOf("."); return -1 === t ? 0 : e.length - t - 1 }, _adjustValue: function (t) { var e = this.options, i = null !== e.min ? e.min : 0, s = t - i; return t = i + Math.round(s / e.step) * e.step, t = parseFloat(t.toFixed(this._precision())), null !== e.max && t > e.max ? e.max : null !== e.min && t < e.min ? e.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; if ("culture" === t || "numberFormat" === t) return i = this._parse(this.element.val()), this.options[t] = e, void this.element.val(this._format(i)); "max" !== t && "min" !== t && "step" !== t || "string" == typeof e && (e = this._parse(e)), "icons" === t && (i = this.buttons.first().find(".ui-icon"), this._removeClass(i, null, this.options.icons.up), this._addClass(i, null, e.up), i = this.buttons.last().find(".ui-icon"), this._removeClass(i, null, this.options.icons.down), this._addClass(i, 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: ht(function (t) { this._super(t) }), _parse: function (t) { return "" === (t = "string" == typeof 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: ht(function (t) { this._stepUp(t) }), _stepUp: function (t) { this._start() && (this._spin((t || 1) * this.options.step), this._stop()) }, stepDown: ht(function (t) { this._stepDown(t) }), _stepDown: function (t) { this._start() && (this._spin((t || 1) * -this.options.step), this._stop()) }, pageUp: ht(function (t) { this._stepUp((t || 1) * this.options.page) }), pageDown: ht(function (t) { this._stepDown((t || 1) * this.options.page) }), value: function (t) { if (!arguments.length) return this._parse(this.element.val()); ht(this._value).call(this, t) }, widget: function () { return this.uiSpinner } }), !1 !== V.uiBackCompat && V.widget("ui.spinner", V.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>" } }); var ct; V.ui.spinner; V.widget("ui.tabs", { version: "1.13.2", 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: (ct = /#.*$/, function (t) { var e = t.href.replace(ct, ""), i = location.href.replace(ct, ""); try { e = decodeURIComponent(e) } catch (t) { } try { i = decodeURIComponent(i) } catch (t) { } return 1 < t.hash.length && e === i }), _create: function () { var e = this, t = this.options; this.running = !1, this._addClass("ui-tabs", "ui-widget ui-widget-content"), this._toggleClass("ui-tabs-collapsible", null, t.collapsible), this._processTabs(), t.active = this._initialActive(), Array.isArray(t.disabled) && (t.disabled = V.uniqueSort(t.disabled.concat(V.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(t.active) : this.active = V(), this._refresh(), this.active.length && this.load(t.active) }, _initialActive: function () { var i = this.options.active, t = this.options.collapsible, s = location.hash.substring(1); return null === i && (s && this.tabs.each(function (t, e) { if (V(e).attr("aria-controls") === s) return i = t, !1 }), null !== (i = null === i ? this.tabs.index(this.tabs.filter(".ui-tabs-active")) : i) && -1 !== i || (i = !!this.tabs.length && 0)), !1 !== i && -1 === (i = this.tabs.index(this.tabs.eq(i))) && (i = !t && 0), i = !t && !1 === i && this.anchors.length ? 0 : i }, _getCreateEventData: function () { return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : V() } }, _tabKeydown: function (t) { var e = V(V.ui.safeActiveElement(this.document[0])).closest("li"), i = this.tabs.index(e), s = !0; if (!this._handlePageNav(t)) { switch (t.keyCode) { case V.ui.keyCode.RIGHT: case V.ui.keyCode.DOWN: i++; break; case V.ui.keyCode.UP: case V.ui.keyCode.LEFT: s = !1, i--; break; case V.ui.keyCode.END: i = this.anchors.length - 1; break; case V.ui.keyCode.HOME: i = 0; break; case V.ui.keyCode.SPACE: return t.preventDefault(), clearTimeout(this.activating), void this._activate(i); case V.ui.keyCode.ENTER: return t.preventDefault(), clearTimeout(this.activating), void this._activate(i !== this.options.active && i); default: return }t.preventDefault(), clearTimeout(this.activating), i = this._focusNextTab(i, s), t.ctrlKey || t.metaKey || (e.attr("aria-selected", "false"), this.tabs.eq(i).attr("aria-selected", "true"), this.activating = this._delay(function () { this.option("active", i) }, this.delay)) } }, _panelKeydown: function (t) { this._handlePageNav(t) || t.ctrlKey && t.keyCode === V.ui.keyCode.UP && (t.preventDefault(), this.active.trigger("focus")) }, _handlePageNav: function (t) { return t.altKey && t.keyCode === V.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : t.altKey && t.keyCode === V.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 }, _findNextTab: function (t, e) { var i = this.tabs.length - 1; for (; -1 !== V.inArray(t = (t = i < t ? 0 : t) < 0 ? i : t, this.options.disabled);)t = e ? t + 1 : t - 1; return t }, _focusNextTab: function (t, e) { return t = this._findNextTab(t, e), this.tabs.eq(t).trigger("focus"), t }, _setOption: function (t, e) { "active" !== t ? (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)) : this._activate(e) }, _sanitizeSelector: function (t) { return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var t = this.options, e = this.tablist.children(":has(a[href])"); t.disabled = V.map(e.filter(".ui-state-disabled"), function (t) { return e.index(t) }), this._processTabs(), !1 !== t.active && this.anchors.length ? this.active.length && !V.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1, this.active = V()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1, this.active = V()), 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 l = this, t = this.tabs, e = this.anchors, i = 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 (t) { V(this).is(".ui-state-disabled") && t.preventDefault() }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { V(this).closest("li").is(".ui-state-disabled") && this.blur() }), 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 V("a", this)[0] }).attr({ tabIndex: -1 }), this._addClass(this.anchors, "ui-tabs-anchor"), this.panels = V(), this.anchors.each(function (t, e) { var i, s, n, o = V(e).uniqueId().attr("id"), a = V(e).closest("li"), r = a.attr("aria-controls"); l._isLocal(e) ? (n = (i = e.hash).substring(1), s = l.element.find(l._sanitizeSelector(i))) : (n = a.attr("aria-controls") || V({}).uniqueId()[0].id, (s = l.element.find(i = "#" + n)).length || (s = l._createPanel(n)).insertAfter(l.panels[t - 1] || l.tablist), s.attr("aria-live", "polite")), s.length && (l.panels = l.panels.add(s)), r && a.data("ui-tabs-aria-controls", r), a.attr({ "aria-controls": n, "aria-labelledby": o }), s.attr("aria-labelledby", o) }), this.panels.attr("role", "tabpanel"), this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"), t && (this._off(t.not(this.tabs)), this._off(e.not(this.anchors)), this._off(i.not(this.panels))) }, _getList: function () { return this.tablist || this.element.find("ol, ul").eq(0) }, _createPanel: function (t) { return V("<div>").attr("id", t).data("ui-tabs-destroy", !0) }, _setOptionDisabled: function (t) { var e, i; for (Array.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1), i = 0; e = this.tabs[i]; i++)e = V(e), !0 === t || -1 !== V.inArray(i, t) ? (e.attr("aria-disabled", "true"), this._addClass(e, null, "ui-state-disabled")) : (e.removeAttr("aria-disabled"), this._removeClass(e, null, "ui-state-disabled")); this.options.disabled = t, this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !0 === t) }, _setupEvents: function (t) { var i = {}; t && V.each(t.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 (t) { var i, e = this.element.parent(); "fill" === t ? (i = e.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () { var t = V(this), e = t.css("position"); "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0)) }), this.element.children().not(this.panels).each(function () { i -= V(this).outerHeight(!0) }), this.panels.each(function () { V(this).height(Math.max(0, i - V(this).innerHeight() + V(this).height())) }).css("overflow", "auto")) : "auto" === t && (i = 0, this.panels.each(function () { i = Math.max(i, V(this).height("").height()) }).height(i)) }, _eventHandler: function (t) { var e = this.options, i = this.active, s = V(t.currentTarget).closest("li"), n = s[0] === i[0], o = n && e.collapsible, a = o ? V() : this._getPanelForTab(s), r = i.length ? this._getPanelForTab(i) : V(), i = { oldTab: i, oldPanel: r, newTab: o ? V() : s, newPanel: a }; t.preventDefault(), s.hasClass("ui-state-disabled") || s.hasClass("ui-tabs-loading") || this.running || n && !e.collapsible || !1 === this._trigger("beforeActivate", t, i) || (e.active = !o && this.tabs.index(s), this.active = n ? V() : s, this.xhr && this.xhr.abort(), r.length || a.length || V.error("jQuery UI Tabs: Mismatching fragment identifier."), a.length && this.load(this.tabs.index(s), t), this._toggle(t, i)) }, _toggle: function (t, e) { var i = this, s = e.newPanel, n = e.oldPanel; function o() { i.running = !1, i._trigger("activate", t, e) } function a() { i._addClass(e.newTab.closest("li"), "ui-tabs-active", "ui-state-active"), s.length && i.options.show ? i._show(s, i.options.show, o) : (s.show(), o()) } this.running = !0, n.length && this.options.hide ? this._hide(n, this.options.hide, function () { i._removeClass(e.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), a() }) : (this._removeClass(e.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), n.hide(), a()), n.attr("aria-hidden", "true"), e.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }), s.length && n.length ? e.oldTab.attr("tabIndex", -1) : s.length && this.tabs.filter(function () { return 0 === V(this).attr("tabIndex") }).attr("tabIndex", -1), s.attr("aria-hidden", "false"), e.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _activate: function (t) { var t = this._findActive(t); t[0] !== this.active[0] && (t = (t = !t.length ? this.active : t).find(".ui-tabs-anchor")[0], this._eventHandler({ target: t, currentTarget: t, preventDefault: V.noop })) }, _findActive: function (t) { return !1 === t ? V() : this.tabs.eq(t) }, _getIndex: function (t) { return t = "string" == typeof t ? this.anchors.index(this.anchors.filter("[href$='" + V.escapeSelector(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 () { V.data(this, "ui-tabs-destroy") ? V(this).remove() : V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded") }), this.tabs.each(function () { var t = V(this), e = t.data("ui-tabs-aria-controls"); e ? t.attr("aria-controls", e).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls") }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "") }, enable: function (i) { var t = this.options.disabled; !1 !== t && (t = void 0 !== i && (i = this._getIndex(i), Array.isArray(t) ? V.map(t, function (t) { return t !== i ? t : null }) : V.map(this.tabs, function (t, e) { return e !== i ? e : null })), this._setOptionDisabled(t)) }, disable: function (t) { var e = this.options.disabled; if (!0 !== e) { if (void 0 === t) e = !0; else { if (t = this._getIndex(t), -1 !== V.inArray(t, e)) return; e = Array.isArray(e) ? V.merge([t], e).sort() : [t] } this._setOptionDisabled(e) } }, load: function (t, s) { t = this._getIndex(t); function n(t, e) { "abort" === e && o.panels.stop(!1, !0), o._removeClass(i, "ui-tabs-loading"), a.removeAttr("aria-busy"), t === o.xhr && delete o.xhr } var o = this, i = this.tabs.eq(t), t = i.find(".ui-tabs-anchor"), a = this._getPanelForTab(i), r = { tab: i, panel: a }; this._isLocal(t[0]) || (this.xhr = V.ajax(this._ajaxSettings(t, s, r)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(i, "ui-tabs-loading"), a.attr("aria-busy", "true"), this.xhr.done(function (t, e, i) { setTimeout(function () { a.html(t), o._trigger("load", s, r), n(i, e) }, 1) }).fail(function (t, e) { setTimeout(function () { n(t, e) }, 1) }))) }, _ajaxSettings: function (t, i, s) { var n = this; return { url: t.attr("href").replace(/#.*$/, ""), beforeSend: function (t, e) { return n._trigger("beforeLoad", i, V.extend({ jqXHR: t, ajaxSettings: e }, s)) } } }, _getPanelForTab: function (t) { t = V(t).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + t)) } }), !1 !== V.uiBackCompat && V.widget("ui.tabs", V.ui.tabs, { _processTabs: function () { this._superApply(arguments), this._addClass(this.tabs, "ui-tab") } }); V.ui.tabs; V.widget("ui.tooltip", { version: "1.13.2", options: { classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" }, content: function () { var t = V(this).attr("title"); return V("<a>").text(t).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 (t) { var e = t.data("ui-tooltip-id"), i = (t.attr("aria-describedby") || "").split(/\s+/), e = V.inArray(e, i); -1 !== e && i.splice(e, 1), t.removeData("ui-tooltip-id"), (i = String.prototype.trim.call(i.join(" "))) ? t.attr("aria-describedby", i) : t.removeAttr("aria-describedby") }
1547, _create: function () { this._on({ mouseover: "open", focusin: "open" }), this.tooltips = {}, this.parents = {}, this.liveRegion = V("<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 = V([]) }, _setOption: function (t, e) { var i = this; this._super(t, e), "content" === t && V.each(this.tooltips, function (t, e) { i._updateContent(e.element) }) }, _setOptionDisabled: function (t) { this[t ? "_disable" : "_enable"]() }, _disable: function () { var s = this; V.each(this.tooltips, function (t, e) { var i = V.Event("blur"); i.target = i.currentTarget = e.element[0], s.close(i, !0) }), this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () { var t = V(this); if (t.is("[title]")) return t.data("ui-tooltip-title", t.attr("title")).removeAttr("title") })) }, _enable: function () { this.disabledTitles.each(function () { var t = V(this); t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title")) }), this.disabledTitles = V([]) }, open: function (t) { var i = this, e = V(t ? t.target : this.element).closest(this.options.items); e.length && !e.data("ui-tooltip-id") && (e.attr("title") && e.data("ui-tooltip-title", e.attr("title")), e.data("ui-tooltip-open", !0), t && "mouseover" === t.type && e.parents().each(function () { var t, e = V(this); e.data("ui-tooltip-open") && ((t = V.Event("blur")).target = t.currentTarget = this, i.close(t, !0)), e.attr("title") && (e.uniqueId(), i.parents[this.id] = { element: this, title: e.attr("title") }, e.attr("title", "")) }), this._registerCloseHandlers(t, e), this._updateContent(e, t)) }, _updateContent: function (e, i) { var t = this.options.content, s = this, n = i ? i.type : null; if ("string" == typeof t || t.nodeType || t.jquery) return this._open(i, e, t); (t = t.call(e[0], function (t) { s._delay(function () { e.data("ui-tooltip-open") && (i && (i.type = n), this._open(i, e, t)) }) })) && this._open(i, e, t) }, _open: function (t, e, i) { var s, n, o, a = V.extend({}, this.options.position); function r(t) { a.of = t, n.is(":hidden") || n.position(a) } i && ((s = this._find(e)) ? s.tooltip.find(".ui-tooltip-content").html(i) : (e.is("[title]") && (t && "mouseover" === t.type ? e.attr("title", "") : e.removeAttr("title")), s = this._tooltip(e), n = s.tooltip, this._addDescribedBy(e, n.attr("id")), n.find(".ui-tooltip-content").html(i), this.liveRegion.children().hide(), (i = V("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"), i.removeAttr("id").find("[id]").removeAttr("id"), i.appendTo(this.liveRegion), this.options.track && t && /^mouse/.test(t.type) ? (this._on(this.document, { mousemove: r }), r(t)) : n.position(V.extend({ of: e }, this.options.position)), n.hide(), this._show(n, this.options.show), this.options.track && this.options.show && this.options.show.delay && (o = this.delayedShow = setInterval(function () { n.is(":visible") && (r(a.of), clearInterval(o)) }, 13)), this._trigger("open", t, { tooltip: n }))) }, _registerCloseHandlers: function (t, e) { var i = { keyup: function (t) { t.keyCode === V.ui.keyCode.ESCAPE && ((t = V.Event(t)).currentTarget = e[0], this.close(t, !0)) } }; e[0] !== this.element[0] && (i.remove = function () { var t = this._find(e); t && this._removeTooltip(t.tooltip) }), t && "mouseover" !== t.type || (i.mouseleave = "close"), t && "focusin" !== t.type || (i.focusout = "close"), this._on(!0, e, i) }, close: function (t) { var e, i = this, s = V(t ? t.currentTarget : this.element), n = this._find(s); n ? (e = n.tooltip, n.closing || (clearInterval(this.delayedShow), s.data("ui-tooltip-title") && !s.attr("title") && s.attr("title", s.data("ui-tooltip-title")), this._removeDescribedBy(s), n.hiding = !0, e.stop(!0), this._hide(e, this.options.hide, function () { i._removeTooltip(V(this)) }), s.removeData("ui-tooltip-open"), this._off(s, "mouseleave focusout keyup"), s[0] !== this.element[0] && this._off(s, "remove"), this._off(this.document, "mousemove"), t && "mouseleave" === t.type && V.each(this.parents, function (t, e) { V(e.element).attr("title", e.title), delete i.parents[t] }), n.closing = !0, this._trigger("close", t, { tooltip: e }), n.hiding || (n.closing = !1))) : s.removeData("ui-tooltip-open") }, _tooltip: function (t) { var e = V("<div>").attr("role", "tooltip"), i = V("<div>").appendTo(e), s = e.uniqueId().attr("id"); return this._addClass(i, "ui-tooltip-content"), this._addClass(e, "ui-tooltip", "ui-widget ui-widget-content"), e.appendTo(this._appendTo(t)), this.tooltips[s] = { element: t, tooltip: e } }, _find: function (t) { t = t.data("ui-tooltip-id"); return t ? this.tooltips[t] : null }, _removeTooltip: function (t) { clearInterval(this.delayedShow), t.remove(), delete this.tooltips[t.attr("id")] }, _appendTo: function (t) { t = t.closest(".ui-front, dialog"); return t = !t.length ? this.document[0].body : t }, _destroy: function () { var s = this; V.each(this.tooltips, function (t, e) { var i = V.Event("blur"), e = e.element; i.target = i.currentTarget = e[0], s.close(i, !0), V("#" + t).remove(), e.data("ui-tooltip-title") && (e.attr("title") || e.attr("title", e.data("ui-tooltip-title")), e.removeData("ui-tooltip-title")) }), this.liveRegion.remove() } }), !1 !== V.uiBackCompat && V.widget("ui.tooltip", V.ui.tooltip, { options: { tooltipClass: null }, _tooltip: function () { var t = this._superApply(arguments); return this.options.tooltipClass && t.tooltip.addClass(this.options.tooltipClass), t } }); V.ui.tooltip }); 1548 1549$.widget("ui.combobox", { 1550 _create: function () { 1551 var self = this; 1552 var select = this.element.hide(), 1553 selected = select.children(":selected"), 1554 value = selected.val() ? selected.text() : ""; 1555 var input = $("<input />") 1556 .insertAfter(select) 1557 .val(value) 1558 .autocomplete({ 1559 delay: 0, 1560 minLength: 0, 1561 source: function (request, response) { 1562 var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); 1563 response(select.children("option").map(function () { 1564 var text = $(this).text(); 1565 if (this.value && (!request.term || matcher.test(text))) 1566 return { 1567 label: text.replace( 1568 new RegExp( 1569 "(?![^&;]+;)(?!<[^<>]*)(" + 1570 $.ui.autocomplete.escapeRegex(request.term) + 1571 ")(?![^<>]*>)(?![^&;]+;)", "gi"), 1572 "<strong>$1</strong>"), 1573 value: text, 1574 option: this 1575 }; 1576 })); 1577 }, 1578 select: function (event, ui) { 1579 ui.item.option.selected = true; 1580 self._trigger("selected", event, { 1581 item: ui.item.option 1582 }); 1583 }, 1584 change: function (event, ui) { 1585 if (!ui.item) { 1586 var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex($(this).val()) + "$", "i"), 1587 valid = false; 1588 select.children("option").each(function () { 1589 if (this.value.match(matcher)) { 1590 this.selected = valid = true; 1591 return false; 1592 } 1593 }); 1594 if (!valid) { 1595 // remove invalid value, as it didn't match anything 1596 $(this).val(""); 1597 select.val(""); 1598 return false; 1599 } 1600 } 1601 } 1602 }) 1603 .addClass("input-1"); 1604 1605 input.autocomplete("instance")._renderItem = function (ul, item) { 1606 return $("<li></li>") 1607 .addClass('combobox-item') 1608 .data("item.autocomplete", item) 1609 .append("<a>" + item.label + "</a>") 1610 .appendTo(ul); 1611 }; 1612 1613 $("<button> </button>") 1614 .attr("tabIndex", -1) 1615 .attr("title", "Show All Items") 1616 .insertAfter(input) 1617 .button({ 1618 icons: { 1619 primary: "ui-icon-triangle-1-s" 1620 }, 1621 text: false 1622 }) 1623 .removeClass("ui-corner-all") 1624 .addClass("ui-corner-right ui-button-icon") 1625 .click(function (e) { 1626 e.preventDefault(); 1627 e.stopPropagation(); 1628 // close if already visible 1629 if (input.autocomplete("widget").is(":visible")) { 1630 input.autocomplete("close"); 1631 return; 1632 } 1633 // pass empty string as value to search for, displaying all results 1634 input.autocomplete("search", ""); 1635 input.focus(); 1636 }); 1637 } 1638}); 1639/*! 1640 * jQuery UI Touch Punch 0.2.3 1641 * 1642 * Copyright 2011â2014, Dave Furfero 1643 * Dual licensed under the MIT or GPL Version 2 licenses. 1644 * 1645 * Depends: 1646 * jquery.ui.widget.js 1647 * jquery.ui.mouse.js 1648 */ 1649!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); 1650/*! 1651 * ScrewDefaultButtons v2.0.6 1652 * http://screwdefaultbuttons.com/ 1653 * 1654 * Licensed under the MIT license. 1655 * Copyright 2013 Matt Solano http://mattsolano.com 1656 * 1657 * Date: Mon February 25 2013 1658 */ 1659 1660;(function( $, window, document, undefined ){ 1661 1662 var methods = { 1663 1664 init : function(options) { 1665 1666 var defaults = $.extend( { 1667 image: null, 1668 width: 50, 1669 height: 50, 1670 disabled: false 1671 }, options); 1672 1673 return this.each(function(){ 1674 1675 var $this = $(this); 1676 1677 var $thisImage = defaults.image; 1678 var dataImage = $this.data('sdb-image'); 1679 if (dataImage){ 1680 $thisImage = dataImage; 1681 } 1682 1683 $this.wrap('<div >').css({'display': 'none'}); 1684 1685 var buttonClass = $this.attr('class'); 1686 var buttonClick = $this.attr('onclick'); 1687 1688 var $thisParent = $this.parent('div'); 1689 1690 $thisParent.addClass(buttonClass); 1691 $thisParent.attr('onclick', buttonClick); 1692 1693 var uncheckedPos = 0; 1694 var checkedPos = -(defaults.height); 1695 if ($this.is(':disabled')){ 1696 uncheckedPos = -(defaults.height * 2); 1697 checkedPos = -(defaults.height * 3); 1698 } 1699 1700 $this.on('disableBtn', function(){ 1701 $this.attr('disabled', 'disabled'); 1702 uncheckedPos = -(defaults.height * 2); 1703 checkedPos = -(defaults.height * 3);
1704 $this.trigger('resetBackground'); 1705 }); 1706 1707 $this.on('enableBtn', function(){ 1708 $this.removeAttr('disabled'); 1709 uncheckedPos = 0; 1710 checkedPos = -(defaults.height); 1711 $this.trigger('resetBackground'); 1712 }); 1713 1714 $this.on('resetBackground', function(){ 1715 if ($this.is(':checked')){ 1716 $thisParent.css({ 1717 backgroundPosition: '0 ' + checkedPos + "px" 1718 }); 1719 } 1720 else { 1721 $thisParent.css({ 1722 backgroundPosition: '0 ' + uncheckedPos + "px" 1723 }); 1724 } 1725 }); 1726 1727 $this.trigger('resetBackground'); 1728 1729 if ($this.is(':checkbox')){ 1730 1731 $thisParent.on('click', function(){ 1732 if (!($this.is(':disabled'))){ 1733 $this.change(); 1734 } 1735 }); 1736 1737 $thisParent.addClass('styledCheckbox'); 1738 1739 $this.on('change', function(){ 1740 if ($this.prop('checked')){ 1741 $this.prop("checked", false); 1742 $thisParent.removeClass('checked'); 1743 /* 1744 $thisParent.css({ 1745 backgroundPosition: '0 ' + uncheckedPos + "px" 1746 }); 1747 */ 1748 } 1749 else { 1750 $this.prop("checked", true); 1751 $thisParent.addClass('checked'); 1752 /* 1753 $thisParent.css({ 1754 backgroundPosition: '0 ' + checkedPos + "px" 1755 }); 1756 */ 1757 } 1758 }); 1759 1760 } 1761 else if ($this.is(':radio')) { 1762 1763 $thisParent.addClass('styledRadio'); 1764 1765 var $thisName = $this.attr('name'); 1766 1767 $thisParent.on('click', function(){ 1768 if (!($this.prop('checked')) && !($this.is(':disabled'))){ 1769 $this.change(); 1770 } 1771 }); 1772 1773 1774 $this.on('change', function(){ 1775 if ($this.prop('checked')){ 1776 $this.prop("checked", false); 1777 $thisParent.css({ 1778 backgroundPosition: '0 ' + uncheckedPos + "px" 1779 });
1780 } 1781 else { 1782 $this.prop("checked", true); 1783 $thisParent.css({ 1784 backgroundPosition: '0 ' + checkedPos + "px" 1785 }); 1786 1787 var otherRadioBtns = $('input[name="'+ $thisName +'"]').not($this); 1788 otherRadioBtns.trigger('radioSwitch'); 1789 } 1790 }); 1791 1792 $this.on('radioSwitch', function(){ 1793 $thisParent.css({ 1794 backgroundPosition: '0 ' + uncheckedPos + "px" 1795 }); 1796 1797 }); 1798 1799 var $thisId = $(this).attr('id'); 1800 var $thisLabel = $('label[for="' + $thisId + '"]'); 1801 $thisLabel.on('click', function(){ 1802 $thisParent.trigger('click'); 1803 }); 1804 } 1805 1806 if(!$.support.leadingWhitespace){ 1807 var $thisId = $(this).attr('id'); 1808 var $thisLabel = $('label[for="' + $thisId + '"]'); 1809 $thisLabel.on('click', function(){ 1810 $thisParent.trigger('click'); 1811 }); 1812 } 1813 1814 }); 1815 1816 }, 1817 check : function() { 1818 return this.each(function(){ 1819 var $this = $(this); 1820 if (!methods.isChecked($this)){ 1821 $this.change(); 1822 } 1823 }); 1824 }, 1825 uncheck : function() { 1826 return this.each(function(){ 1827 var $this = $(this); 1828 if (methods.isChecked($this)){ 1829 $this.change(); 1830 } 1831 }); 1832 }, 1833 toggle: function(){ 1834 return this.each(function(){ 1835 var $this = $(this); 1836 $this.change(); 1837 }); 1838 }, 1839 disable : function() { 1840 return this.each(function(){ 1841 var $this = $(this); 1842 $this.trigger('disableBtn'); 1843 }); 1844 }, 1845 enable: function(){ 1846 return this.each(function(){ 1847 var $this = $(this); 1848 $this.trigger('enableBtn'); 1849 }); 1850 }, 1851 isChecked: function($this){ 1852 if ($this.prop('checked')){ 1853 return true; 1854 } 1855 return false; 1856 } 1857 }; 1858 1859 $.fn.screwDefaultButtons = function( method, options) { 1860 1861 // Method calling logic 1862 if ( methods[method] ) { 1863 return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); 1864 } else if ( typeof method === 'object' || ! method ) { 1865 return methods.init.apply( this, arguments ); 1866 } else { 1867 $.error( 'Method ' + method + ' does not exist on jQuery.screwDefaultButtons' ); 1868 } 1869 1870 }; 1871 1872 return this; 1873 1874})( jQuery ); 1875/*! 1876 * jQuery UI Sortable Animation 0.0.1 1877 * 1878 * Copyright 2015, Egor Sharapov 1879 * Licensed under the MIT license. 1880 * 1881 * Depends: 1882 * jquery.ui.sortable.js 1883 */ 1884(function (window, $) { 1885 var supports = {}, 1886 testProp = function (prefixes) { 1887 var testEl = document.createElement('div'), i, l; 1888 1889 for (i = 0; l = prefixes.length, i < l; i += 1) { 1890 if (document.createElement('div').style[prefixes[i]] != undefined) { 1891 return prefixes[i]; 1892 } 1893 } 1894 1895 return ''; 1896 }, 1897 prepareTransition = function ($el) { 1898 $el.offset(); 1899 return $el; 1900 }, 1901 last_top, 1902 css_animation = false; 1903 1904 // check for css-transforms support 1905 supports['transform'] = testProp([ 1906 'transform', 'WebkitTransform',
1907 'MozTransform', 'OTransform', 1908 'msTransform' 1909 ]); 1910 1911 // check for css-transitions support 1912 supports['transition'] = testProp([ 1913 'transition', 'WebkitTransition', 1914 'MozTransition', 'OTransition', 1915 'msTransition' 1916 ]); 1917 1918 // check for transitionEnd event 1919 supports['transitionend'] = function () { 1920 var prefixes = ['webkit', 'o', ''], 1921 i, l = prefixes.length; 1922 1923 for (i = 0; l = prefixes.length, i < l; i += 1) { 1924 if (("on" + prefixes[i] + "transitionend") in window) { 1925 return (prefixes[i] ? prefixes[i] + "T" : "t") + "ransitionEnd"; 1926 } 1927 } 1928 1929 return ''; 1930 }(); 1931 1932 css_animation = supports['transform'] && supports['transition'] && supports['transitionend']; 1933 1934 $.widget("app.sortable", $.ui.sortable, { 1935 options: { 1936 // adds the new `sortAnimate` option, turned off by default. 1937 sortAnimate: false, 1938 sortAnimateDuration: 150 1939 }, 1940 1941 // called internally by sortable when sortable 1942 // items are rearranged. 1943 _rearrange: function ( e, item ) { 1944 var $item, 1945 props = {}, 1946 offset; 1947 1948 // just call the original implementation of _rearrange() 1949 // if option `sortAnimate` is turned off 1950 // `currentContainer` used for animating received items 1951 // from another sortable container (`connectWith` option) 1952 if (!this.currentContainer.options.sortAnimate) { 1953 return this._superApply(arguments); 1954 } 1955 1956 $item = $(item.item[0]); 1957 // if moved up, then move item up to its height, 1958 // if moved down, then move item down 1959 offset = (this.direction == 'up' ? '' : '-') + ($item.height()) + 'px'; 1960 1961 // call original _rearrange() at first 1962 this._superApply(arguments); 1963 1964 // prepare starting css props 1965 if (css_animation) { 1966 props[supports['transform']] = 'translateY(' + offset + ')'; 1967 } else { 1968 props = { 1969 position: 'relative', 1970 top: offset 1971 }; 1972 } 1973 1974 // set starting css props on item 1975 $item.css(props); 1976 1977 // if css animations do not supported 1978 // use jQuery animations 1979 if (css_animation) { 1980 props[supports['transition']] = supports['transform'] + ' ' + this.options.sortAnimateDuration + 'ms'; 1981 props[supports['transform']] = ''; 1982 1983 prepareTransition($item) 1984 .css(props) 1985 .one(supports['transitionend'], function () { 1986 $item 1987 .css(supports['transform'], '') 1988 .css(supports['transition'], ''); 1989 }); 1990 } else { 1991 $item.animate({ 1992 top: '', 1993 position: '' 1994 }, this.options.sortAnimateDuration); 1995 } 1996 } 1997 }); 1998})(window, jQuery); 1999/* 2000== malihu jquery custom scrollbar plugin == 2001Version: 3.0.8 2002Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller 2003Author: malihu 2004Author URI: http://manos.malihu.gr 2005License: MIT License (MIT) 2006*/ 2007 2008/* 2009Copyright 2010 Manos Malihutsakis (email: [email protected]) 2010 2011Permission is hereby granted, free of charge, to any person obtaining a copy 2012of this software and associated documentation files (the "Software"), to deal 2013in the Software without restriction, including without limitation the rights 2014to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 2015copies of the Software, and to permit persons to whom the Software is 2016furnished to do so, subject to the following conditions: 2017 2018The above copyright notice and this permission notice shall be included in 2019all copies or substantial portions of the Software. 2020 2021THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2022IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2023FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2024AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2025LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2026OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 2027THE SOFTWARE. 2028*/ 2029 2030/* 2031The code below is fairly long, fully commented and should be normally used in development. 2032For production, use either the minified jquery.mCustomScrollbar.min.js script or 2033the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin 2034and dependencies (minified). 2035*/ 2036 2037(function (factory) { 2038 if (typeof module !== "undefined" && module.exports) { 2039 module.exports = factory; 2040 } else { 2041 factory(jQuery, window, document); 2042 } 2043}(function ($) { 2044 (function (init) { 2045 var _rjs = typeof define === "function" && define.amd, /* RequireJS */ 2046 _njs = typeof module !== "undefined" && module.exports, /* NodeJS */ 2047 _dlp = ("https:" == document.location.protocol) ? "https:" : "http:", /* location protocol */ 2048 _url = "cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js"; 2049 if (!_rjs) { 2050 if (_njs) { 2051 require("jquery-mousewheel")($); 2052 } else { 2053 /* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS 2054 (works when mCustomScrollbar fn is called on window load) */ 2055 $.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src=" + _dlp + "//" + _url + "%3E%3C/script%3E")); 2056 } 2057 } 2058 init(); 2059 }(function () { 2060 2061 /* 2062 ---------------------------------------- 2063 PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S) 2064 ---------------------------------------- 2065 */ 2066 2067 var pluginNS = "mCustomScrollbar", 2068 pluginPfx = "mCS", 2069 defaultSelector = ".mCustomScrollbar", 2070 2071 2072 2073 2074 2075 /* 2076 ---------------------------------------- 2077 DEFAULT OPTIONS 2078 ---------------------------------------- 2079 */ 2080 2081 defaults = { 2082 /* 2083 set element/content width/height programmatically 2084 values: boolean, pixels, percentage 2085 option default 2086 ------------------------------------- 2087 setWidth false 2088 setHeight false 2089 */ 2090 /* 2091 set the initial css top property of content 2092 values: string (e.g. "-100px", "10%" etc.) 2093 */ 2094 setTop: 0, 2095 /* 2096 set the initial css left property of content 2097 values: string (e.g. "-100px", "10%" etc.) 2098 */ 2099 setLeft: 0, 2100 /* 2101 scrollbar axis (vertical and/or horizontal scrollbars) 2102 values (string): "y", "x", "yx" 2103 */ 2104 axis: "y", 2105 /* 2106 position of scrollbar relative to content 2107 values (string): "inside", "outside" ("outside" requires elements with position:relative) 2108 */ 2109 scrollbarPosition: "inside", 2110 /* 2111 scrolling inertia 2112 values: integer (milliseconds) 2113 */ 2114 scrollInertia: 950, 2115 /* 2116 auto-adjust scrollbar dragger length 2117 values: boolean 2118 */ 2119 autoDraggerLength: true, 2120 /* 2121 auto-hide scrollbar when idle 2122 values: boolean 2123 option default 2124 ------------------------------------- 2125 autoHideScrollbar false 2126 */ 2127 /* 2128 auto-expands scrollbar on mouse-over and dragging 2129 values: boolean 2130 option default 2131 ------------------------------------- 2132 autoExpandScrollbar false 2133 */ 2134 /* 2135 always show scrollbar, even when there's nothing to scroll 2136 values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean 2137 */ 2138 alwaysShowScrollbar: 0, 2139 /* 2140 scrolling always snaps to a multiple of this number in pixels 2141 values: integer 2142 option default 2143 ------------------------------------- 2144 snapAmount null 2145 */ 2146 /* 2147 when snapping, snap with this number in pixels as an offset 2148 values: integer 2149 */ 2150 snapOffset: 0, 2151 /* 2152 mouse-wheel scrolling 2153 */ 2154 mouseWheel: { 2155 /* 2156 enable mouse-wheel scrolling 2157 values: boolean 2158 */ 2159 enable: true, 2160 /* 2161 scrolling amount in pixels 2162 values: "auto", integer 2163 */ 2164 scrollAmount: "auto", 2165 /* 2166 mouse-wheel scrolling axis 2167 the default scrolling direction when both vertical and horizontal scrollbars are present 2168 values (string): "y", "x" 2169 */ 2170 axis: "y", 2171 /* 2172 prevent the default behaviour which automatically scrolls the parent element
2172(s) when end of scrolling is reached 2173 values: boolean 2174 option default 2175 ------------------------------------- 2176 preventDefault null 2177 */ 2178 /* 2179 the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. 2180 values: "auto", integer 2181 "auto" uses the default OS/browser value 2182 */ 2183 deltaFactor: "auto", 2184 /* 2185 normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) 2186 values: boolean 2187 option default 2188 ------------------------------------- 2189 normalizeDelta null 2190 */ 2191 /* 2192 invert mouse-wheel scrolling direction 2193 values: boolean 2194 option default 2195 ------------------------------------- 2196 invert null 2197 */ 2198 /* 2199 the tags that disable mouse-wheel when cursor is over them 2200 */ 2201 disableOver: ["select", "option", "keygen", "datalist", "textarea"] 2202 }, 2203 /* 2204 scrollbar buttons 2205 */ 2206 scrollButtons: { 2207 /* 2208 enable scrollbar buttons 2209 values: boolean 2210 option default 2211 ------------------------------------- 2212 enable null 2213 */ 2214 /* 2215 scrollbar buttons scrolling type 2216 values (string): "stepless", "stepped" 2217 */ 2218 scrollType: "stepless", 2219 /* 2220 scrolling amount in pixels 2221 values: "auto", integer 2222 */ 2223 scrollAmount: "auto" 2224 /* 2225 tabindex of the scrollbar buttons 2226 values: false, integer 2227 option default 2228 ------------------------------------- 2229 tabindex null 2230 */ 2231 }, 2232 /* 2233 keyboard scrolling 2234 */ 2235 keyboard: { 2236 /* 2237 enable scrolling via keyboard 2238 values: boolean 2239 */ 2240 enable: true, 2241 /* 2242 keyboard scrolling type 2243 values (string): "stepless", "stepped" 2244 */ 2245 scrollType: "stepless", 2246 /* 2247 scrolling amount in pixels 2248 values: "auto", integer 2249 */ 2250 scrollAmount: "auto" 2251 }, 2252 /* 2253 enable content touch-swipe scrolling 2254 values: boolean, integer, string (number) 2255 integer values define the axis-specific minimum amount required for scrolling momentum 2256 */ 2257 contentTouchScroll: 25, 2258 /* 2259 advanced option parameters 2260 */ 2261 advanced: { 2262 /* 2263 auto-expand content horizontally (for "x" or "yx" axis) 2264 values: boolean 2265 option default 2266 ------------------------------------- 2267 autoExpandHorizontalScroll null 2268 */ 2269 /* 2270 auto-scroll to elements with focus 2271 */ 2272 autoScrollOnFocus: "input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", 2273 /* 2274 auto-update scrollbars on content, element or viewport resize 2275 should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. 2276 values: boolean 2277 */ 2278 updateOnContentResize: true, 2279 /* 2280 auto-update scrollbars each time each image inside the element is fully loaded 2281 values: boolean 2282 */ 2283 updateOnImageLoad: true 2284 /* 2285 auto-update scrollbars based on the amount and size changes of specific selectors 2286 useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size 2287 values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) 2288 a value of true (boolean) will auto-update scrollbars each time any element is changed 2289 option default 2290 ------------------------------------- 2291 updateOnSelectorChange null 2292 */ 2293 /* 2294 extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2") 2295 option default 2296 ------------------------------------- 2297 releaseDraggableSelectors null 2298 */ 2299 }, 2300 /* 2301 scrollbar theme 2302 values: string (see CSS/plugin URI for a list of ready-to-use themes) 2303 */ 2304 theme: "light", 2305 /* 2306 user defined callback functions 2307 */ 2308 callbacks: { 2309 /* 2310 Available callbacks: 2311 callback default 2312 ------------------------------------- 2313 onInit null 2314 onScrollStart null 2315 onScroll null 2316 onTotalScroll null 2317 onTotalScrollBack null 2318 whileScrolling null 2319 onOverflowY null 2320 onOverflowX null 2321 onOverflowYNone null 2322 onOverflowXNone null 2323 onImageLoad null 2324 onSelectorChange null 2325 onUpdate null 2326 */ 2327 onTotalScrollOffset: 0, 2328 onTotalScrollBackOffset: 0, 2329 alwaysTriggerOffsets: true 2330 } 2331 /* 2332 add scrollbar(s) on all elements matching the current selector, now and in the future 2333 values: boolean, string
vendor: 4,826 bytes, lines 2334-2448
2334 string values: "on" (enable), "once" (disable after first invocation), "off" (disable) 2335 liveSelector values: string (selector) 2336 option default 2337 ------------------------------------- 2338 live false 2339 liveSelector null 2340 */ 2341 }, 2342 2343 2344 2345 2346 2347 /* 2348 ---------------------------------------- 2349 VARS, CONSTANTS 2350 ---------------------------------------- 2351 */ 2352 2353 totalInstances = 0, /* plugin instances amount */ 2354 liveTimers = {}, /* live option timers */ 2355 oldIE = (window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */ 2356 touchActive = false, touchable, /* global touch vars (for touch and pointer events) */ 2357 /* general plugin classes */ 2358 classes = [ 2359 "mCSB_dragger_onDrag", "mCSB_scrollTools_onDrag", "mCS_img_loaded", "mCS_disabled", "mCS_destroyed", "mCS_no_scrollbar", 2360 "mCS-autoHide", "mCS-dir-rtl", "mCS_no_scrollbar_y", "mCS_no_scrollbar_x", "mCS_y_hidden", "mCS_x_hidden", "mCSB_draggerContainer", 2361 "mCSB_buttonUp", "mCSB_buttonDown", "mCSB_buttonLeft", "mCSB_buttonRight" 2362 ], 2363 2364 2365 2366 2367 2368 /* 2369 ---------------------------------------- 2370 METHODS 2371 ---------------------------------------- 2372 */ 2373 2374 methods = { 2375 2376 /* 2377 plugin initialization method 2378 creates the scrollbar(s), plugin data object and options 2379 ---------------------------------------- 2380 */ 2381 2382 init: function (options) { 2383 2384 var options = $.extend(true, {}, defaults, options), 2385 selector = _selector.call(this); /* validate selector */ 2386 2387 /* 2388 if live option is enabled, monitor for elements matching the current selector and 2389 apply scrollbar(s) when found (now and in the future) 2390 */ 2391 if (options.live) { 2392 var liveSelector = options.liveSelector || this.selector || defaultSelector, /* live selector(s) */ 2393 $liveSelector = $(liveSelector); /* live selector(s) as jquery object */ 2394 if (options.live === "off") { 2395 /* 2396 disable live if requested 2397 usage: $(selector).mCustomScrollbar({live:"off"}); 2398 */ 2399 removeLiveTimers(liveSelector); 2400 return; 2401 } 2402 liveTimers[liveSelector] = setTimeout(function () { 2403 /* call mCustomScrollbar fn on live selector(s) every half-second */ 2404 $liveSelector.mCustomScrollbar(options); 2405 if (options.live === "once" && $liveSelector.length) { 2406 /* disable live after first invocation */ 2407 removeLiveTimers(liveSelector); 2408 } 2409 }, 500); 2410 } else { 2411 removeLiveTimers(liveSelector); 2412 } 2413 2414 /* options backward compatibility (for versions < 3.0.0) and normalization */ 2415 options.setWidth = (options.set_width) ? options.set_width : options.setWidth; 2416 options.setHeight = (options.set_height) ? options.set_height : options.setHeight; 2417 options.axis = (options.horizontalScroll) ? "x" : _findAxis(options.axis); 2418 options.scrollInertia = options.scrollInertia > 0 && options.scrollInertia < 17 ? 17 : options.scrollInertia; 2419 if (typeof options.mouseWheel !== "object" && options.mouseWheel == true) { /* old school mouseWheel option (non-object) */ 2420 options.mouseWheel = { enable: true, scrollAmount: "auto", axis: "y", preventDefault: false, deltaFactor: "auto", normalizeDelta: false, invert: false } 2421 } 2422 options.mouseWheel.scrollAmount = !options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels; 2423 options.mouseWheel.normalizeDelta = !options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta; 2424 options.scrollButtons.scrollType = _findScrollButtonsType(options.scrollButtons.scrollType); 2425 2426 _theme(options); /* theme-specific options */ 2427 2428 /* plugin constructor */ 2429 return $(selector).each(function () { 2430 2431 var $this = $(this); 2432 2433 if (!$this.data(pluginPfx)) { /* prevent multiple instantiations */ 2434 2435 /* store options and create objects in jquery data */ 2436 $this.data(pluginPfx, { 2437 idx: ++totalInstances, /* instance index */ 2438 opt: options, /* options */ 2439 scrollRatio: { y: null, x: null }, /* scrollbar to content ratio */ 2440 overflowed: null, /* overflowed axis */ 2441 contentReset: { y: null, x: null }, /* object to check when content resets */ 2442 bindEvents: false, /* object to check if events are bound */ 2443 tweenRunning: false, /* object to check if tween is running */ 2444 sequential: {}, /* sequential scrolling object */ 2445 langDir: $this.css("direction"), /* detect/store direction (ltr or rtl) */ 2446 cbOffsets: null, /* object to check whether callback offsets always trigger */ 2447 /* 2448 object to check how scrolling events where last triggered
2449 "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) 2450 usage: object.data("mCS").trigger 2451 */ 2452 trigger: null 2453 }); 2454 2455 var d = $this.data(pluginPfx), o = d.opt, 2456 /* HTML data attributes */ 2457 htmlDataAxis = $this.data("mcs-axis"), htmlDataSbPos = $this.data("mcs-scrollbar-position"), htmlDataTheme = $this.data("mcs-theme"); 2458 2459 if (htmlDataAxis) { o.axis = htmlDataAxis; } /* usage example: data-mcs-axis="y" */ 2460 if (htmlDataSbPos) { o.scrollbarPosition = htmlDataSbPos; } /* usage example: data-mcs-scrollbar-position="outside" */ 2461 if (htmlDataTheme) { /* usage example: data-mcs-theme="minimal" */ 2462 o.theme = htmlDataTheme; 2463 _theme(o); /* theme-specific options */ 2464 } 2465 2466 _pluginMarkup.call(this); /* add plugin markup */ 2467 2468 $("#mCSB_" + d.idx + "_container img:not(." + classes[2] + ")").addClass(classes[2]); /* flag loaded images */ 2469 2470 methods.update.call(null, $this); /* call the update method */ 2471 2472 } 2473 2474 }); 2475 2476 }, 2477 /* ---------------------------------------- */ 2478 2479 2480 2481 /* 2482 plugin update method 2483 updates content and scrollbar(s) values, events and status 2484 ---------------------------------------- 2485 usage: $(selector).mCustomScrollbar("update"); 2486 */ 2487 2488 update: function (el, cb) { 2489 2490 var selector = el || _selector.call(this); /* validate selector */ 2491 2492 return $(selector).each(function () { 2493 2494 var $this = $(this); 2495 2496 if ($this.data(pluginPfx)) { /* check if plugin has initialized */ 2497 2498 var d = $this.data(pluginPfx), o = d.opt, 2499 mCSB_container = $("#mCSB_" + d.idx + "_container"), 2500 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")]; 2501 2502 if (!mCSB_container.length) { return; } 2503 2504 if (d.tweenRunning) { _stop($this); } /* stop any running tweens while updating */ 2505 2506 /* if element was disabled or destroyed, remove class(es) */
vendor: 13,829 bytes, lines 2507-2842
2507 if ($this.hasClass(classes[3])) { $this.removeClass(classes[3]); } 2508 if ($this.hasClass(classes[4])) { $this.removeClass(classes[4]); } 2509 2510 _maxHeight.call(this); /* detect/set css max-height value */ 2511 2512 _expandContentHorizontally.call(this); /* expand content horizontally */ 2513 2514 if (o.axis !== "y" && !o.advanced.autoExpandHorizontalScroll) { 2515 mCSB_container.css("width", _contentWidth(mCSB_container.children())); 2516 } 2517 2518 d.overflowed = _overflowed.call(this); /* determine if scrolling is required */ 2519 2520 _scrollbarVisibility.call(this); /* show/hide scrollbar(s) */ 2521 2522 /* auto-adjust scrollbar dragger length analogous to content */ 2523 if (o.autoDraggerLength) { _setDraggerLength.call(this); } 2524 2525 _scrollRatio.call(this); /* calculate and store scrollbar to content ratio */ 2526 2527 _bindEvents.call(this); /* bind scrollbar events */ 2528 2529 /* reset scrolling position and/or events */ 2530 var to = [Math.abs(mCSB_container[0].offsetTop), Math.abs(mCSB_container[0].offsetLeft)]; 2531 if (o.axis !== "x") { /* y/yx axis */ 2532 if (!d.overflowed[0]) { /* y scrolling is not required */ 2533 _resetContentPosition.call(this); /* reset content position */ 2534 if (o.axis === "y") { 2535 _unbindEvents.call(this); 2536 } else if (o.axis === "yx" && d.overflowed[1]) { 2537 _scrollTo($this, to[1].toString(), { dir: "x", dur: 0, overwrite: "none" }); 2538 } 2539 } else if (mCSB_dragger[0].height() > mCSB_dragger[0].parent().height()) { 2540 _resetContentPosition.call(this); /* reset content position */ 2541 } else { /* y scrolling is required */ 2542 _scrollTo($this, to[0].toString(), { dir: "y", dur: 0, overwrite: "none" }); 2543 d.contentReset.y = null; 2544 } 2545 } 2546 if (o.axis !== "y") { /* x/yx axis */ 2547 if (!d.overflowed[1]) { /* x scrolling is not required */ 2548 _resetContentPosition.call(this); /* reset content position */ 2549 if (o.axis === "x") { 2550 _unbindEvents.call(this); 2551 } else if (o.axis === "yx" && d.overflowed[0]) { 2552 _scrollTo($this, to[0].toString(), { dir: "y", dur: 0, overwrite: "none" }); 2553 } 2554 } else if (mCSB_dragger[1].width() > mCSB_dragger[1].parent().width()) { 2555 _resetContentPosition.call(this); /* reset content position */ 2556 } else { /* x scrolling is required */ 2557 _scrollTo($this, to[1].toString(), { dir: "x", dur: 0, overwrite: "none" }); 2558 d.contentReset.x = null; 2559 } 2560 } 2561 2562 /* callbacks: onImageLoad, onSelectorChange, onUpdate */ 2563 if (cb && d) { 2564 if (cb === 2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad === "function") { 2565 o.callbacks.onImageLoad.call(this); 2566 } else if (cb === 3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange === "function") { 2567 o.callbacks.onSelectorChange.call(this); 2568 } else if (o.callbacks.onUpdate && typeof o.callbacks.onUpdate === "function") { 2569 o.callbacks.onUpdate.call(this); 2570 } 2571 } 2572 2573 _autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */ 2574 2575 } 2576 2577 }); 2578 2579 }, 2580 /* ---------------------------------------- */ 2581 2582 2583 2584 /* 2585 plugin scrollTo method 2586 triggers a scrolling event to a specific value 2587 ---------------------------------------- 2588 usage: $(selector).mCustomScrollbar("scrollTo",value,options); 2589 */ 2590 2591 scrollTo: function (val, options) { 2592 2593 /* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */ 2594 if (typeof val == "undefined" || val == null) { return; } 2595 2596 var selector = _selector.call(this); /* validate selector */ 2597 2598 return $(selector).each(function () { 2599 2600 var $this = $(this); 2601 2602 if ($this.data(pluginPfx)) { /* check if plugin has initialized */ 2603 2604 var d = $this.data(pluginPfx), o = d.opt, 2605 /* method default options */ 2606 methodDefaults = { 2607 trigger: "external", /* method is by default triggered externally (e.g. from other scripts) */ 2608 scrollInertia: o.scrollInertia, /* scrolling inertia (animation duration) */ 2609 scrollEasing: "mcsEaseInOut", /* animation easing */ 2610 moveDragger: false, /* move dragger instead of content */ 2611 timeout: 60, /* scroll-to delay */ 2612 callbacks: true, /* enable/disable callbacks */ 2613 onStart: true, 2614 onUpdate: true, 2615 onComplete: true 2616 }, 2617 methodOptions = $.extend(true, {}, methodDefaults, options), 2618 to = _arr.call(this, val), dur = methodOptions.scrollInertia > 0 && methodOptions.scrollInertia < 17 ? 17 : methodOptions.scrollInertia; 2619 2620 /* translate yx values to actual scroll-to positions */ 2621 to[0] = _to.call(this, to[0], "y"); 2622 to[1] = _to.call(this, to[1], "x"); 2623 2624 /* 2625 check if scroll-to value moves the dragger instead of content. 2626 Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.) 2627 */ 2628 if (methodOptions.moveDragger) { 2629 to[0] *= d.scrollRatio.y; 2630 to[1] *= d.scrollRatio.x; 2631 } 2632 2633 methodOptions.dur = dur; 2634 2635 setTimeout(function () { 2636 /* do the scrolling */ 2637 if (to[0] !== null && typeof to[0] !== "undefined" && o.axis !== "x" && d.overflowed[0]) { /* scroll y */ 2638 methodOptions.dir = "y"; 2639 methodOptions.overwrite = "all"; 2640 _scrollTo($this, to[0].toString(), methodOptions); 2641 } 2642 if (to[1] !== null && typeof to[1] !== "undefined" && o.axis !== "y" && d.overflowed[1]) { /* scroll x */ 2643 methodOptions.dir = "x"; 2644 methodOptions.overwrite = "none"; 2645 _scrollTo($this, to[1].toString(), methodOptions); 2646 } 2647 }, methodOptions.timeout); 2648 2649 } 2650 2651 }); 2652 2653 }, 2654 /* ---------------------------------------- */ 2655 2656 2657 2658 /* 2659 plugin stop method 2660 stops scrolling animation 2661 ---------------------------------------- 2662 usage: $(selector).mCustomScrollbar("stop"); 2663 */ 2664 stop: function () { 2665 2666 var selector = _selector.call(this); /* validate selector */ 2667 2668 return $(selector).each(function () { 2669 2670 var $this = $(this); 2671 2672 if ($this.data(pluginPfx)) { /* check if plugin has initialized */ 2673 2674 _stop($this); 2675 2676 } 2677 2678 }); 2679 2680 }, 2681 /* ---------------------------------------- */ 2682 2683 2684 2685 /* 2686 plugin disable method 2687 temporarily disables the scrollbar(s) 2688 ---------------------------------------- 2689 usage: $(selector).mCustomScrollbar("disable",reset); 2690 reset (boolean): resets content position to 0 2691 */ 2692 disable: function (r) { 2693 2694 var selector = _selector.call(this); /* validate selector */ 2695 2696 return $(selector).each(function () { 2697 2698 var $this = $(this); 2699 2700 if ($this.data(pluginPfx)) { /* check if plugin has initialized */ 2701 2702 var d = $this.data(pluginPfx); 2703 2704 _autoUpdate.call(this, "remove"); /* remove automatic updating */ 2705 2706 _unbindEvents.call(this); /* unbind events */ 2707 2708 if (r) { _resetContentPosition.call(this); } /* reset content position */ 2709 2710 _scrollbarVisibility.call(this, true); /* show/hide scrollbar(s) */ 2711 2712 $this.addClass(classes[3]); /* add disable class */ 2713 2714 } 2715 2716 }); 2717 2718 }, 2719 /* ---------------------------------------- */ 2720 2721 2722 2723 /* 2724 plugin destroy method 2725 completely removes the scrollbar(s) and returns the element to its original state 2726 ---------------------------------------- 2727 usage: $(selector).mCustomScrollbar("destroy"); 2728 */ 2729 destroy: function () { 2730 2731 var selector = _selector.call(this); /* validate selector */ 2732 2733 return $(selector).each(function () { 2734 2735 var $this = $(this); 2736 2737 if ($this.data(pluginPfx)) { /* check if plugin has initialized */ 2738 2739 var d = $this.data(pluginPfx), o = d.opt, 2740 mCustomScrollBox = $("#mCSB_" + d.idx), 2741 mCSB_container = $("#mCSB_" + d.idx + "_container"), 2742 scrollbar = $(".mCSB_" + d.idx + "_scrollbar"); 2743 2744 if (o.live) { removeLiveTimers(o.liveSelector || $(selector).selector); } /* remove live timers */ 2745 2746 _autoUpdate.call(this, "remove"); /* remove automatic updating */ 2747 2748 _unbindEvents.call(this); /* unbind events */ 2749 2750 _resetContentPosition.call(this); /* reset content position */ 2751 2752 $this.removeData(pluginPfx); /* remove plugin data object */ 2753 2754 _delete(this, "mcs"); /* delete callbacks object */ 2755 2756 /* remove plugin markup */ 2757 scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */ 2758 mCSB_container.find("img." + classes[2]).removeClass(classes[2]); /* remove loaded images flag */ 2759 mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */ 2760 /* remove plugin classes from the element and add destroy class */ 2761 $this.removeClass(pluginNS + " _" + pluginPfx + "_" + d.idx + " " + classes[6] + " " + classes[7] + " " + classes[5] + " " + classes[3]).addClass(classes[4]); 2762 2763 } 2764 2765 }); 2766 2767 } 2768 /* ---------------------------------------- */ 2769 2770 }, 2771 2772 2773 2774 2775 2776 /* 2777 ---------------------------------------- 2778 FUNCTIONS 2779 ---------------------------------------- 2780 */ 2781 2782 /* validates selector (if selector is invalid or undefined uses the default one) */ 2783 _selector = function () { 2784 return (typeof $(this) !== "object" || $(this).length < 1) ? defaultSelector : this; 2785 }, 2786 /* -------------------- */ 2787 2788 2789 /* changes options according to theme */ 2790 _theme = function (obj) { 2791 var fixedSizeScrollbarThemes = ["rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark"], 2792 nonExpandedScrollbarThemes = ["rounded-dots", "rounded-dots-dark", "3d", "3d-dark", "3d-thick", "3d-thick-dark", "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark"], 2793 disabledScrollButtonsThemes = ["minimal", "minimal-dark"], 2794 enabledAutoHideScrollbarThemes = ["minimal", "minimal-dark"], 2795 scrollbarPositionOutsideThemes = ["minimal", "minimal-dark"]; 2796 obj.autoDraggerLength = $.inArray(obj.theme, fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength; 2797 obj.autoExpandScrollbar = $.inArray(obj.theme, nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar; 2798 obj.scrollButtons.enable = $.inArray(obj.theme, disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable; 2799 obj.autoHideScrollbar = $.inArray(obj.theme, enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar; 2800 obj.scrollbarPosition = $.inArray(obj.theme, scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition; 2801 }, 2802 /* -------------------- */ 2803 2804 2805 /* live option timers removal */ 2806 removeLiveTimers = function (selector) { 2807 if (liveTimers[selector]) { 2808 clearTimeout(liveTimers[selector]); 2809 _delete(liveTimers, selector); 2810 } 2811 }, 2812 /* -------------------- */ 2813 2814 2815 /* normalizes axis option to valid values: "y", "x", "yx" */ 2816 _findAxis = function (val) { 2817 return (val === "yx" || val === "xy" || val === "auto") ? "yx" : (val === "x" || val === "horizontal") ? "x" : "y"; 2818 }, 2819 /* -------------------- */ 2820 2821 2822 /* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */ 2823 _findScrollButtonsType = function (val) { 2824 return (val === "stepped" || val === "pixels" || val === "step" || val === "click") ? "stepped" : "stepless"; 2825 }, 2826 /* -------------------- */ 2827 2828 2829 /* generates plugin markup */ 2830 _pluginMarkup = function () { 2831 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 2832 expandClass = o.autoExpandScrollbar ? " " + classes[1] + "_expand" : "", 2833 scrollbar = ["<div id='mCSB_" + d.idx + "_scrollbar_vertical' class='mCSB_scrollTools mCSB_" + d.idx + "_scrollbar mCS-" + o.theme + " mCSB_scrollTools_vertical" + expandClass + "'><div class='" + classes[12] + "'><div id='mCSB_" + d.idx + "_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>", "<div id='mCSB_" + d.idx + "_scrollbar_horizontal' class='mCSB_scrollTools mCSB_" + d.idx + "_scrollbar mCS-" + o.theme + " mCSB_scrollTools_horizontal" + expandClass + "'><div class='" + classes[12] + "'><div id='mCSB_" + d.idx + "_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"], 2834 wrapperClass = o.axis === "yx" ? "mCSB_vertical_horizontal" : o.axis === "x" ? "mCSB_horizontal" : "mCSB_vertical", 2835 scrollbars = o.axis === "yx" ? scrollbar[0] + scrollbar[1] : o.axis === "x" ? scrollbar[1] : scrollbar[0], 2836 contentWrapper = o.axis === "yx" ? "<div id='mCSB_" + d.idx + "_container_wrapper' class='mCSB_container_wrapper' />" : "", 2837 autoHideClass = o.autoHideScrollbar ? " " + classes[6] : "", 2838 scrollbarDirClass = (o.axis !== "x" && d.langDir === "rtl") ? " " + classes[7] : ""; 2839 if (o.setWidth) { $this.css("width", o.setWidth); } /* set element width */ 2840 if (o.setHeight) { $this.css("height", o.setHeight); } /* set element height */ 2841 o.setLeft = (o.axis !== "y" && d.langDir === "rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */ 2842 $this.addClass(pluginNS + " _" + pluginPfx + "_" + d.idx + autoHideClass + scrollbarDirClass).wrapInner("<div id='m
2842CSB_" + d.idx + "' class='mCustomScrollBox mCS-" + o.theme + " " + wrapperClass + "'><div id='mCSB_" + d.idx + "_container' class='mCSB_container' style='position:relative; top:" + o.setTop + "; left:" + o.setLeft + ";' dir=" + d.langDir + " /></div>"); 2843 var mCustomScrollBox = $("#mCSB_" + d.idx), 2844 mCSB_container = $("#mCSB_" + d.idx + "_container"); 2845 if (o.axis !== "y" && !o.advanced.autoExpandHorizontalScroll) { 2846 mCSB_container.css("width", _contentWidth(mCSB_container.children())); 2847 } 2848 if (o.scrollbarPosition === "outside") { 2849 if ($this.css("position") === "static") { /* requires elements with non-static position */ 2850 $this.css("position", "relative"); 2851 } 2852 $this.css("overflow", "visible"); 2853 mCustomScrollBox.addClass("mCSB_outside").after(scrollbars); 2854 } else { 2855 mCustomScrollBox.addClass("mCSB_inside").append(scrollbars); 2856 mCSB_container.wrap(contentWrapper); 2857 } 2858 _scrollButtons.call(this); /* add scrollbar buttons */ 2859 /* minimum dragger length */ 2860 var mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")]; 2861 mCSB_dragger[0].css("min-height", mCSB_dragger[0].height()); 2862 mCSB_dragger[1].css("min-width", mCSB_dragger[1].width()); 2863 }, 2864 /* -------------------- */ 2865 2866 2867 /* calculates content width */ 2868 _contentWidth = function (el) { 2869 return Math.max.apply(Math, el.map(function () { return $(this).outerWidth(true); }).get()); 2870 }, 2871 /* -------------------- */ 2872 2873 2874 /* expands content horizontally */ 2875 _expandContentHorizontally = function () { 2876 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 2877 mCSB_container = $("#mCSB_" + d.idx + "_container"); 2878 if (o.advanced.autoExpandHorizontalScroll && o.axis !== "y") { 2879 /* 2880 wrap content with an infinite width div and set its position to absolute and width to auto. 2881 Setting width to auto before calculating the actual width is important! 2882 We must let the browser set the width as browser zoom values are impossible to calculate. 2883 */ 2884 mCSB_container.css({ "position": "absolute", "width": "auto" }) 2885 .wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />") 2886 .css({ /* set actual width, original position and un-wrap */ 2887 /* 2888 get the exact width (with decimals) and then round-up. 2889 Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width 2890 */ 2891 "width": (Math.ceil(mCSB_container[0].getBoundingClientRect().right + 0.4) - Math.floor(mCSB_container[0].getBoundingClientRect().left)), 2892 "position": "relative" 2893 }).unwrap(); 2894 } 2895 }, 2896 /* -------------------- */ 2897 2898 2899 /* adds scrollbar buttons */ 2900 _scrollButtons = function () { 2901 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 2902 mCSB_scrollTools = $(".mCSB_" + d.idx + "_scrollbar:first"), 2903 tabindex = !_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='" + o.scrollButtons.tabindex + "'", 2904 btnHTML = [ 2905 "<a href='#' class='" + classes[13] + "' oncontextmenu='return false;' " + tabindex + " />", 2906 "<a href='#' class='" + classes[14] + "' oncontextmenu='return false;' " + tabindex + " />", 2907 "<a href='#' class='" + classes[15] + "' oncontextmenu='return false;' " + tabindex + " />", 2908 "<a href='#' class='" + classes[16] + "' oncontextmenu='return false;' " + tabindex + " />" 2909 ], 2910 btn = [(o.axis === "x" ? btnHTML[2] : btnHTML[0]), (o.axis === "x" ? btnHTML[3] : btnHTML[1]), btnHTML[2], btnHTML[3]]; 2911 if (o.scrollButtons.enable) { 2912 mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]); 2913 } 2914 }, 2915 /* -------------------- */ 2916 2917 2918 /* detects/sets css max-height value */ 2919 _maxHeight = function () { 2920 var $this = $(this), d = $this.data(pluginPfx), 2921 mCustomScrollBox = $("#mCSB_" + d.idx), 2922 mh = $this.css("max-height") || "none", pct = mh.indexOf("%") !== -1, 2923 bs = $this.css("box-sizing"); 2924 if (mh !== "none") { 2925 var val = pct ? $this.parent().height() * parseInt(mh) / 100 : parseInt(mh); 2926 /* if element's css box-sizing is "border-box", subtract any paddings and/or borders from max-height value */ 2927 if (bs === "border-box") { val -= (($this.innerHeight() - $this.height()) + ($this.outerHeight() - $this.innerHeight())); } 2928 mCustomScrollBox.css("max-height", Math.round(val)); 2929 } 2930 }, 2931 /* -------------------- */ 2932 2933 2934 /* auto-adjusts scrollbar dragger length */ 2935 _setDraggerLength = function () { 2936 var $this = $(this), d = $this.data(pluginPfx), 2937 mCustomScrollBox = $("#mCSB_" + d.idx), 2938 mCSB_container = $("#mCSB_" + d.idx + "_container"), 2939 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")], 2940 ratio = [mCustomScrollBox.height() / mCSB_container.outerHeight(false), mCustomScrollBox.width() / mCSB_container.outerWidth(false)], 2941 l = [ 2942 parseInt(mCSB_dragger[0].css("min-height")), Math.round(ratio[0] * mCSB_dragger[0].parent().height()), 2943 parseInt(mCSB_dragger[1].css("min-width")), Math.round(ratio[1] * mCSB_dragger[1].parent().width()) 2944 ], 2945 h = oldIE && (l[1] < l[0]) ? l[0] : l[1], w = oldIE && (l[3] < l[2]) ? l[2] : l[3]; 2946 mCSB_dragger[0].css({ 2947 "height": h, "max-height": (mCSB_dragger[0].parent().height() - 10) 2948 }).find(".mCSB_dragger_bar").css({ "line-height": l[0] + "px" }); 2949 mCSB_dragger[1].css({ 2950 "width": w, "max-width": (mCSB_dragger[1].parent().width() - 10) 2951 }); 2952 }, 2953 /* -------------------- */ 2954 2955 2956 /* calculates scrollbar to content ratio */ 2957 _scrollRatio = function () { 2958 var $this = $(this), d = $this.data(pluginPfx), 2959 mCustomScrollBox = $("#mCSB_" + d.idx), 2960 mCSB_container = $("#mCSB_" + d.idx + "_container"), 2961 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")], 2962 scrollAmount = [mCSB_container.outerHeight(false) - mCustomScrollBox.height(), mCSB_container.outerWidth(false) - mCustomScrollBox.width()], 2963 ratio = [ 2964 scrollAmount[0] / (mCSB_dragger[0].parent().height() - mCSB_dragger[0].height()), 2965 scrollAmount[1] / (mCSB_dragger[1].parent().width() - mCSB_dragger[1].width()) 2966 ]; 2967 d.scrollRatio = { y: ratio[0], x: ratio[1] }; 2968 }, 2969 /* -------------------- */ 2970 2971 2972 /* toggles scrolling classes */ 2973 _onDragClasses = function (el, action, xpnd) {
vendor: 34,879 bytes, lines 2974-3754
2974 var expandClass = xpnd ? classes[0] + "_expanded" : "", 2975 scrollbar = el.closest(".mCSB_scrollTools"); 2976 if (action === "active") { 2977 el.toggleClass(classes[0] + " " + expandClass); scrollbar.toggleClass(classes[1]); 2978 el[0]._draggable = el[0]._draggable ? 0 : 1; 2979 } else { 2980 if (!el[0]._draggable) { 2981 if (action === "hide") { 2982 el.removeClass(classes[0]); scrollbar.removeClass(classes[1]); 2983 } else { 2984 el.addClass(classes[0]); scrollbar.addClass(classes[1]); 2985 } 2986 } 2987 } 2988 }, 2989 /* -------------------- */ 2990 2991 2992 /* checks if content overflows its container to determine if scrolling is required */ 2993 _overflowed = function () { 2994 var $this = $(this), d = $this.data(pluginPfx), 2995 mCustomScrollBox = $("#mCSB_" + d.idx), 2996 mCSB_container = $("#mCSB_" + d.idx + "_container"), 2997 contentHeight = d.overflowed == null ? mCSB_container.height() : mCSB_container.outerHeight(false), 2998 contentWidth = d.overflowed == null ? mCSB_container.width() : mCSB_container.outerWidth(false); 2999 return [contentHeight > mCustomScrollBox.height(), contentWidth > mCustomScrollBox.width()]; 3000 }, 3001 /* -------------------- */ 3002 3003 3004 /* resets content position to 0 */ 3005 _resetContentPosition = function () { 3006 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3007 mCustomScrollBox = $("#mCSB_" + d.idx), 3008 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3009 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")]; 3010 _stop($this); /* stop any current scrolling before resetting */ 3011 if ((o.axis !== "x" && !d.overflowed[0]) || (o.axis === "y" && d.overflowed[0])) { /* reset y */ 3012 mCSB_dragger[0].add(mCSB_container).css("top", 0); 3013 _scrollTo($this, "_resetY"); 3014 } 3015 if ((o.axis !== "y" && !d.overflowed[1]) || (o.axis === "x" && d.overflowed[1])) { /* reset x */ 3016 var cx = dx = 0; 3017 if (d.langDir === "rtl") { /* adjust left position for rtl direction */ 3018 cx = mCustomScrollBox.width() - mCSB_container.outerWidth(false); 3019 dx = Math.abs(cx / d.scrollRatio.x); 3020 } 3021 mCSB_container.css("left", cx); 3022 mCSB_dragger[1].css("left", dx); 3023 _scrollTo($this, "_resetX"); 3024 } 3025 }, 3026 /* -------------------- */ 3027 3028 3029 /* binds scrollbar events */ 3030 _bindEvents = function () { 3031 var $this = $(this), d = $this.data(pluginPfx), o = d.opt; 3032 if (!d.bindEvents) { /* check if events are already bound */ 3033 _draggable.call(this); 3034 if (o.contentTouchScroll) { _contentDraggable.call(this); } 3035 _selectable.call(this); 3036 if (o.mouseWheel.enable) { /* bind mousewheel fn when plugin is available */ 3037 function _mwt() { 3038 mousewheelTimeout = setTimeout(function () { 3039 if (!$.event.special.mousewheel) { 3040 _mwt(); 3041 } else { 3042 clearTimeout(mousewheelTimeout); 3043 _mousewheel.call($this[0]); 3044 } 3045 }, 100); 3046 } 3047 var mousewheelTimeout; 3048 _mwt(); 3049 } 3050 _draggerRail.call(this); 3051 _wrapperScroll.call(this); 3052 if (o.advanced.autoScrollOnFocus) { _focus.call(this); } 3053 if (o.scrollButtons.enable) { _buttons.call(this); } 3054 if (o.keyboard.enable) { _keyboard.call(this); } 3055 d.bindEvents = true; 3056 } 3057 }, 3058 /* -------------------- */ 3059 3060 3061 /* unbinds scrollbar events */ 3062 _unbindEvents = function () { 3063 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3064 namespace = pluginPfx + "_" + d.idx, 3065 sb = ".mCSB_" + d.idx + "_scrollbar", 3066 sel = $("#mCSB_" + d.idx + ",#mCSB_" + d.idx + "_container,#mCSB_" + d.idx + "_container_wrapper," + sb + " ." + classes[12] + ",#mCSB_" + d.idx + "_dragger_vertical,#mCSB_" + d.idx + "_dragger_horizontal," + sb + ">a"), 3067 mCSB_container = $("#mCSB_" + d.idx + "_container"); 3068 if (o.advanced.releaseDraggableSelectors) { sel.add($(o.advanced.releaseDraggableSelectors)); } 3069 if (d.bindEvents) { /* check if events are bound */ 3070 /* unbind namespaced events from document/selectors */ 3071 $(document).unbind("." + namespace); 3072 sel.each(function () { 3073 $(this).unbind("." + namespace); 3074 }); 3075 /* clear and delete timeouts/objects */ 3076 clearTimeout($this[0]._focusTimeout); _delete($this[0], "_focusTimeout"); 3077 clearTimeout(d.sequential.step); _delete(d.sequential, "step"); 3078 clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0], "onCompleteTimeout"); 3079 d.bindEvents = false; 3080 } 3081 }, 3082 /* -------------------- */ 3083 3084 3085 /* toggles scrollbar visibility */ 3086 _scrollbarVisibility = function (disabled) { 3087 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3088 contentWrapper = $("#mCSB_" + d.idx + "_container_wrapper"), 3089 content = contentWrapper.length ? contentWrapper : $("#mCSB_" + d.idx + "_container"), 3090 scrollbar = [$("#mCSB_" + d.idx + "_scrollbar_vertical"), $("#mCSB_" + d.idx + "_scrollbar_horizontal")], 3091 mCSB_dragger = [scrollbar[0].find(".mCSB_dragger"), scrollbar[1].find(".mCSB_dragger")]; 3092 if (o.axis !== "x") { 3093 if (d.overflowed[0] && !disabled) { 3094 scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display", "block"); 3095 content.removeClass(classes[8] + " " + classes[10]); 3096 } else { 3097 if (o.alwaysShowScrollbar) { 3098 if (o.alwaysShowScrollbar !== 2) { mCSB_dragger[0].css("display", "none"); } 3099 content.removeClass(classes[10]); 3100 } else { 3101 scrollbar[0].css("display", "none"); 3102 content.addClass(classes[10]); 3103 } 3104 content.addClass(classes[8]); 3105 } 3106 } 3107 if (o.axis !== "y") { 3108 if (d.overflowed[1] && !disabled) { 3109 scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display", "block"); 3110 content.removeClass(classes[9] + " " + classes[11]); 3111 } else { 3112 if (o.alwaysShowScrollbar) { 3113 if (o.alwaysShowScrollbar !== 2) { mCSB_dragger[1].css("display", "none"); } 3114 content.removeClass(classes[11]); 3115 } else { 3116 scrollbar[1].css("display", "none"); 3117 content.addClass(classes[11]); 3118 } 3119 content.addClass(classes[9]); 3120 } 3121 } 3122 if (!d.overflowed[0] && !d.overflowed[1]) { 3123 $this.addClass(classes[5]); 3124 } else { 3125 $this.removeClass(classes[5]); 3126 } 3127 }, 3128 /* -------------------- */ 3129 3130 3131 /* returns input coordinates of pointer, touch and mouse events (relative to document) */ 3132 _coordinates = function (e) { 3133 var t = e.type; 3134 switch (t) { 3135 case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": 3136 return e.target.ownerDocument !== document ? [e.originalEvent.screenY, e.originalEvent.screenX, false] : [e.originalEvent.pageY, e.originalEvent.pageX, false]; 3137 break; 3138 case "touchstart": case "touchmove": case "touchend": 3139 var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], 3140 touches = e.originalEvent.touches.length || e.originalEvent.changedTouches.length; 3141 return e.target.ownerDocument !== document ? [touch.screenY, touch.screenX, touches > 1] : [touch.pageY, touch.pageX, touches > 1]; 3142 break; 3143 default: 3144 return [e.pageY, e.pageX, false]; 3145 } 3146 }, 3147 /* -------------------- */ 3148 3149 3150 /* 3151 SCROLLBAR DRAG EVENTS 3152 scrolls content via scrollbar dragging 3153 */ 3154 _draggable = function () { 3155 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3156 namespace = pluginPfx + "_" + d.idx, 3157 draggerId = ["mCSB_" + d.idx + "_dragger_vertical", "mCSB_" + d.idx + "_dragger_horizontal"], 3158 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3159 mCSB_dragger = $("#" + draggerId[0] + ",#" + draggerId[1]), 3160 draggable, dragY, dragX, 3161 rds = o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger; 3162 mCSB_dragger.bind("mousedown." + namespace + " touchstart." + namespace + " pointerdown." + namespace + " MSPointerDown." + namespace, function (e) { 3163 e.stopImmediatePropagation(); 3164 e.preventDefault(); 3165 if (!_mouseBtnLeft(e)) { return; } /* left mouse button only */ 3166 touchActive = true; 3167 if (oldIE) { document.onselectstart = function () { return false; } } /* disable text selection for IE < 9 */ 3168 _iframe(false); /* enable scrollbar dragging over iframes by disabling their events */ 3169 _stop($this); 3170 draggable = $(this); 3171 var offset = draggable.offset(), y = _coordinates(e)[0] - offset.top, x = _coordinates(e)[1] - offset.left, 3172 h = draggable.height() + offset.top, w = draggable.width() + offset.left; 3173 if (y < h && y > 0 && x < w && x > 0) { 3174 dragY = y; 3175 dragX = x; 3176 } 3177 _onDragClasses(draggable, "active", o.autoExpandScrollbar); 3178 }).bind("touchmove." + namespace, function (e) { 3179 e.stopImmediatePropagation(); 3180 e.preventDefault(); 3181 var offset = draggable.offset(), y = _coordinates(e)[0] - offset.top, x = _coordinates(e)[1] - offset.left; 3182 _drag(dragY, dragX, y, x); 3183 }); 3184 $(document).bind("mousemove." + namespace + " pointermove." + namespace + " MSPointerMove." + namespace, function (e) { 3185 if (draggable) { 3186 var offset = draggable.offset(), y = _coordinates(e)[0] - offset.top, x = _coordinates(e)[1] - offset.left; 3187 if (dragY === y) { return; } /* has it really moved? */ 3188 _drag(dragY, dragX, y, x); 3189 } 3190 }).add(rds).bind("mouseup." + namespace + " touchend." + namespace + " pointerup." + namespace + " MSPointerUp." + namespace, function (e) { 3191 if (draggable) { 3192 _onDragClasses(draggable, "active", o.autoExpandScrollbar); 3193 draggable = null; 3194 } 3195 touchActive = false; 3196 if (oldIE) { document.onselectstart = null; } /* enable text selection for IE < 9 */ 3197 _iframe(true); /* enable iframes events */ 3198 }); 3199 function _iframe(evt) { 3200 var el = mCSB_container.find("iframe"); 3201 if (!el.length) { return; } /* check if content contains iframes */ 3202 var val = !evt ? "none" : "auto"; 3203 el.css("pointer-events", val); /* for IE11, iframe's display property should not be "block" */ 3204 } 3205 function _drag(dragY, dragX, y, x) { 3206 mCSB_container[0].idleTimer = o.scrollInertia < 233 ? 250 : 0; 3207 if (draggable.attr("id") === draggerId[1]) { 3208 var dir = "x", to = ((draggable[0].offsetLeft - dragX) + x) * d.scrollRatio.x; 3209 } else { 3210 var dir = "y", to = ((draggable[0].offsetTop - dragY) + y) * d.scrollRatio.y; 3211 } 3212 _scrollTo($this, to.toString(), { dir: dir, drag: true }); 3213 } 3214 }, 3215 /* -------------------- */ 3216 3217 3218 /* 3219 TOUCH SWIPE EVENTS 3220 scrolls content via touch swipe 3221 Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices 3222 */ 3223 _contentDraggable = function () { 3224 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3225 namespace = pluginPfx + "_" + d.idx, 3226 mCustomScrollBox = $("#mCSB_" + d.idx), 3227 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3228 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")], 3229 dragY, dragX, touchStartY, touchStartX, touchMoveY = [], touchMoveX = [], startTime, runningTime, endTime, distance, speed, amount, 3230 durA = 0, durB, overwrite = o.axis === "yx" ? "none" : "all", touchIntent = [], touchDrag, docDrag, 3231 iframe = mCSB_container.find("iframe"), 3232 events = [ 3233 "touchstart." + namespace + " pointerdown." + namespace + " MSPointerDown." + namespace, //start 3234 "touchmove." + namespace + " pointermove." + namespace + " MSPointerMove." + namespace, //move 3235 "touchend." + namespace + " pointerup." + namespace + " MSPointerUp." + namespace //end 3236 ]; 3237 mCSB_container.bind(events[0], function (e) { 3238 _onTouchstart(e); 3239 }).bind(events[1], function (e) { 3240 _onTouchmove(e); 3241 }); 3242 mCustomScrollBox.bind(events[0], function (e) { 3243 _onTouchstart2(e); 3244 }).bind(events[2], function (e) { 3245 _onTouchend(e); 3246 }); 3247 if (iframe.length) { 3248 iframe.each(function () { 3249 $(this).on('load', function () { 3250 /* bind events on accessible iframes */ 3251 if (_canAccessIFrame(this)) { 3252 $(this.contentDocument || this.contentWindow.document).bind(events[0], function (e) { 3253 _onTouchstart(e); 3254 _onTouchstart2(e); 3255 }).bind(events[1], function (e) { 3256 _onTouchmove(e); 3257 }).bind(events[2], function (e) { 3258 _onTouchend(e); 3259 }); 3260 } 3261 }); 3262 }); 3263 } 3264 function _onTouchstart(e) { 3265 if (!_pointerTouch(e) || touchActive || _coordinates(e)[2]) { touchable = 0; return; } 3266 touchable = 1; touchDrag = 0; docDrag = 0; 3267 var offset = mCSB_container.offset(); 3268 dragY = _coordinates(e)[0] - offset.top; 3269 dragX = _coordinates(e)[1] - offset.left; 3270 touchIntent = [_coordinates(e)[0], _coordinates(e)[1]]; 3271 } 3272 function _onTouchmove(e) { 3273 if (!_pointerTouch(e) || touchActive || _coordinates(e)[2]) { return; } 3274 e.stopImmediatePropagation(); 3275 if (docDrag && !touchDrag) { return; } 3276 runningTime = _getTime(); 3277 var offset = mCustomScrollBox.offset(), y = _coordinates(e)[0] - offset.top, x = _coordinates(e)[1] - offset.left, 3278 easing = "mcsLinearOut"; 3279 touchMoveY.push(y); 3280 touchMoveX.push(x); 3281 touchIntent[2] = Math.abs(_coordinates(e)[0] - touchIntent[0]); touchIntent[3] = Math.abs(_coordinates(e)[1] - touchIntent[1]); 3282 if (d.overflowed[0]) { 3283 var limit = mCSB_dragger[0].parent().height() - mCSB_dragger[0].height(), 3284 prevent = ((dragY - y) > 0 && (y - dragY) > -(limit * d.scrollRatio.y) && (touchIntent[3] * 2 < touchIntent[2] || o.axis === "yx")); 3285 } 3286 if (d.overflowed[1]) { 3287 var limitX = mCSB_dragger[1].parent().width() - mCSB_dragger[1].width(), 3288 preventX = ((dragX - x) > 0 && (x - dragX) > -(limitX * d.scrollRatio.x) && (touchIntent[2] * 2 < touchIntent[3] || o.axis === "yx")); 3289 } 3290 if (prevent || preventX) { e.preventDefault(); touchDrag = 1; } else { docDrag = 1; } /* prevent native document scrolling */ 3291 amount = o.axis === "yx" ? [(dragY - y), (dragX - x)] : o.axis === "x" ? [null, (dragX - x)] : [(dragY - y), null]; 3292 mCSB_container[0].idleTimer = 250; 3293 if (d.overflowed[0]) { _drag(amount[0], durA, easing, "y", "all", true); } 3294 if (d.overflowed[1]) { _drag(amount[1], durA, easing, "x", overwrite, true); } 3295 } 3296 function _onTouchstart2(e) { 3297 if (!_pointerTouch(e) || touchActive || _coordinates(e)[2]) { touchable = 0; return; } 3298 touchable = 1; 3299 e.stopImmediatePropagation(); 3300 _stop($this); 3301 startTime = _getTime(); 3302 var offset = mCustomScrollBox.offset(); 3303 touchStartY = _coordinates(e)[0] - offset.top; 3304 touchStartX = _coordinates(e)[1] - offset.left; 3305 touchMoveY = []; touchMoveX = []; 3306 } 3307 function _onTouchend(e) { 3308 if (!_pointerTouch(e) || touchActive || _coordinates(e)[2]) { return; } 3309 e.stopImmediatePropagation(); 3310 touchDrag = 0; docDrag = 0; 3311 endTime = _getTime(); 3312 var offset = mCustomScrollBox.offset(), y = _coordinates(e)[0] - offset.top, x = _coordinates(e)[1] - offset.left; 3313 if ((endTime - runningTime) > 30) { return; } 3314 speed = 1000 / (endTime - startTime); 3315 var easing = "mcsEaseOut", slow = speed < 2.5, 3316 diff = slow ? [touchMoveY[touchMoveY.length - 2], touchMoveX[touchMoveX.length - 2]] : [0, 0]; 3317 distance = slow ? [(y - diff[0]), (x - diff[1])] : [y - touchStartY, x - touchStartX]; 3318 var absDistance = [Math.abs(distance[0]), Math.abs(distance[1])]; 3319 speed = slow ? [Math.abs(distance[0] / 4), Math.abs(distance[1] / 4)] : [speed, speed]; 3320 var a = [ 3321 Math.abs(mCSB_container[0].offsetTop) - (distance[0] * _m((absDistance[0] / speed[0]), speed[0])), 3322 Math.abs(mCSB_container[0].offsetLeft) - (distance[1] * _m((absDistance[1] / speed[1]), speed[1])) 3323 ]; 3324 amount = o.axis === "yx" ? [a[0], a[1]] : o.axis === "x" ? [null, a[1]] : [a[0], null]; 3325 durB = [(absDistance[0] * 4) + o.scrollInertia, (absDistance[1] * 4) + o.scrollInertia]; 3326 var md = parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */ 3327 amount[0] = absDistance[0] > md ? amount[0] : 0; 3328 amount[1] = absDistance[1] > md ? amount[1] : 0; 3329 if (d.overflowed[0]) { _drag(amount[0], durB[0], easing, "y", overwrite, false); } 3330 if (d.overflowed[1]) { _drag(amount[1], durB[1], easing, "x", overwrite, false); } 3331 } 3332 function _m(ds, s) { 3333 var r = [s * 1.5, s * 2, s / 1.5, s / 2]; 3334 if (ds > 90) { 3335 return s > 4 ? r[0] : r[3]; 3336 } else if (ds > 60) { 3337 return s > 3 ? r[3] : r[2]; 3338 } else if (ds > 30) { 3339 return s > 8 ? r[1] : s > 6 ? r[0] : s > 4 ? s : r[2]; 3340 } else { 3341 return s > 8 ? s : r[3]; 3342 } 3343 } 3344 function _drag(amount, dur, easing, dir, overwrite, drag) { 3345 if (!amount) { return; } 3346 _scrollTo($this, amount.toString(), { dur: dur, scrollEasing: easing, dir: dir, overwrite: overwrite, drag: drag }); 3347 } 3348 }, 3349 /* -------------------- */ 3350 3351 3352 /* 3353 SELECT TEXT EVENTS 3354 scrolls content when text is selected 3355 */ 3356 _selectable = function () { 3357 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, seq = d.sequential, 3358 namespace = pluginPfx + "_" + d.idx, 3359 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3360 wrapper = mCSB_container.parent(), 3361 action; 3362 mCSB_container.bind("mousedown." + namespace, function (e) { 3363 if (touchable) { return; } 3364 if (!action) { action = 1; touchActive = true; } 3365 }).add(document).bind("mousemove." + namespace, function (e) { 3366 if (!touchable && action && _sel()) { 3367 var offset = mCSB_container.offset(), 3368 y = _coordinates(e)[0] - offset.top + mCSB_container[0].offsetTop, x = _coordinates(e)[1] - offset.left + mCSB_container[0].offsetLeft; 3369 if (y > 0 && y < wrapper.height() && x > 0 && x < wrapper.width()) { 3370 if (seq.step) { _seq("off", null, "stepped"); } 3371 } else { 3372 if (o.axis !== "x" && d.overflowed[0]) { 3373 if (y < 0) { 3374 _seq("on", 38); 3375 } else if (y > wrapper.height()) { 3376 _seq("on", 40); 3377 } 3378 } 3379 if (o.axis !== "y" && d.overflowed[1]) { 3380 if (x < 0) { 3381 _seq("on", 37); 3382 } else if (x > wrapper.width()) { 3383 _seq("on", 39); 3384 } 3385 } 3386 } 3387 } 3388 }).bind("mouseup." + namespace, function (e) { 3389 if (touchable) { return; } 3390 if (action) { action = 0; _seq("off", null); } 3391 touchActive = false; 3392 }); 3393 function _sel() { 3394 return window.getSelection ? window.getSelection().toString() : 3395 document.selection && document.selection.type != "Control" ? document.selection.createRange().text : 0; 3396 } 3397 function _seq(a, c, s) { 3398 seq.type = s && action ? "stepped" : "stepless"; 3399 seq.scrollAmount = 10; 3400 _sequentialScroll($this, a, c, "mcsLinearOut", s ? 60 : null); 3401 } 3402 }, 3403 /* -------------------- */ 3404 3405 3406 /* 3407 MOUSE WHEEL EVENT 3408 scrolls content via mouse-wheel 3409 via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel) 3410 */ 3411 _mousewheel = function () { 3412 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3413 namespace = pluginPfx + "_" + d.idx, 3414 mCustomScrollBox = $("#mCSB_" + d.idx), 3415 mCSB_dragger = [$("#mCSB_" + d.idx + "_dragger_vertical"), $("#mCSB_" + d.idx + "_dragger_horizontal")], 3416 iframe = $("#mCSB_" + d.idx + "_container").find("iframe"); 3417 if (d) { /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */ 3418 if (iframe.length) { 3419 iframe.each(function () { 3420 $(this).on('load', function () { 3421 /* bind events on accessible iframes */ 3422 if (_canAccessIFrame(this)) { 3423 $(this.contentDocument || this.contentWindow.document).bind("mousewheel." + namespace, function (e, delta) { 3424 _onMousewheel(e, delta); 3425 }); 3426 } 3427 }); 3428 }); 3429 } 3430 mCustomScrollBox.bind("mousewheel." + namespace, function (e, delta) { 3431 _onMousewheel(e, delta); 3432 }); 3433 } 3434 function _onMousewheel(e, delta) { 3435 _stop($this); 3436 if (_disableMousewheel($this, e.target)) { return; } /* disables mouse-wheel when hovering specific elements */ 3437 var deltaFactor = o.mouseWheel.deltaFactor !== "auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor < 100) ? 100 : e.deltaFactor || 100; 3438 if (o.axis === "x" || o.mouseWheel.axis === "x") { 3439 var dir = "x", 3440 px = [Math.round(deltaFactor * d.scrollRatio.x), parseInt(o.mouseWheel.scrollAmount)], 3441 amount = o.mouseWheel.scrollAmount !== "auto" ? px[1] : px[0] >= mCustomScrollBox.width() ? mCustomScrollBox.width() * 0.9 : px[0], 3442 contentPos = Math.abs($("#mCSB_" + d.idx + "_container")[0].offsetLeft), 3443 draggerPos = mCSB_dragger[1][0].offsetLeft, 3444 limit = mCSB_dragger[1].parent().width() - mCSB_dragger[1].width(), 3445 dlt = e.deltaX || e.deltaY || delta; 3446 } else { 3447 var dir = "y", 3448 px = [Math.round(deltaFactor * d.scrollRatio.y), parseInt(o.mouseWheel.scrollAmount)], 3449 amount = o.mouseWheel.scrollAmount !== "auto" ? px[1] : px[0] >= mCustomScrollBox.height() ? mCustomScrollBox.height() * 0.9 : px[0], 3450 contentPos = Math.abs($("#mCSB_" + d.idx + "_container")[0].offsetTop), 3451 draggerPos = mCSB_dragger[0][0].offsetTop, 3452 limit = mCSB_dragger[0].parent().height() - mCSB_dragger[0].height(), 3453 dlt = e.deltaY || delta; 3454 } 3455 if ((dir === "y" && !d.overflowed[0]) || (dir === "x" && !d.overflowed[1])) { return; } 3456 if (o.mouseWheel.invert) { dlt = -dlt; } 3457 if (o.mouseWheel.normalizeDelta) { dlt = dlt < 0 ? -1 : 1; } 3458 if ((dlt > 0 && draggerPos !== 0) || (dlt < 0 && draggerPos !== limit) || o.mouseWheel.preventDefault) { 3459 e.stopImmediatePropagation(); 3460 e.preventDefault(); 3461 } 3462 _scrollTo($this, (contentPos - (dlt * amount)).toString(), { dir: dir }); 3463 } 3464 }, 3465 /* -------------------- */ 3466 3467 3468 /* checks if iframe can be accessed */ 3469 _canAccessIFrame = function (iframe) { 3470 var html = null; 3471 try { 3472 var doc = iframe.contentDocument || iframe.contentWindow.document; 3473 html = doc.body.innerHTML; 3474 } catch (err) {/* do nothing */ } 3475 return (html !== null); 3476 }, 3477 /* -------------------- */ 3478 3479 3480 /* disables mouse-wheel when hovering specific elements like select, datalist etc. */ 3481 _disableMousewheel = function (el, target) { 3482 var tag = target.nodeName.toLowerCase(), 3483 tags = el.data(pluginPfx).opt.mouseWheel.disableOver, 3484 /* elements that require focus */ 3485 focusTags = ["select", "textarea"]; 3486 return $.inArray(tag, tags) > -1 && !($.inArray(tag, focusTags) > -1 && !$(target).is(":focus")); 3487 }, 3488 /* -------------------- */ 3489 3490 3491 /* 3492 DRAGGER RAIL CLICK EVENT 3493 scrolls content via dragger rail 3494 */ 3495 _draggerRail = function () { 3496 var $this = $(this), d = $this.data(pluginPfx), 3497 namespace = pluginPfx + "_" + d.idx, 3498 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3499 wrapper = mCSB_container.parent(), 3500 mCSB_draggerContainer = $(".mCSB_" + d.idx + "_scrollbar ." + classes[12]); 3501 mCSB_draggerContainer.bind("touchstart." + namespace + " pointerdown." + namespace + " MSPointerDown." + namespace, function (e) { 3502 touchActive = true; 3503 }).bind("touchend." + namespace + " pointerup." + namespace + " MSPointerUp." + namespace, function (e) { 3504 touchActive = false; 3505 }).bind("click." + namespace, function (e) { 3506 if ($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")) { 3507 _stop($this); 3508 var el = $(this), mCSB_dragger = el.find(".mCSB_dragger"); 3509 if (el.parent(".mCSB_scrollTools_horizontal").length > 0) { 3510 if (!d.overflowed[1]) { return; } 3511 var dir = "x", 3512 clickDir = e.pageX > mCSB_dragger.offset().left ? -1 : 1, 3513 to = Math.abs(mCSB_container[0].offsetLeft) - (clickDir * (wrapper.width() * 0.9)); 3514 } else { 3515 if (!d.overflowed[0]) { return; } 3516 var dir = "y", 3517 clickDir = e.pageY > mCSB_dragger.offset().top ? -1 : 1, 3518 to = Math.abs(mCSB_container[0].offsetTop) - (clickDir * (wrapper.height() * 0.9)); 3519 } 3520 _scrollTo($this, to.toString(), { dir: dir, scrollEasing: "mcsEaseInOut" }); 3521 } 3522 }); 3523 }, 3524 /* -------------------- */ 3525 3526 3527 /* 3528 FOCUS EVENT 3529 scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.) 3530 */ 3531 _focus = function () { 3532 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3533 namespace = pluginPfx + "_" + d.idx, 3534 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3535 wrapper = mCSB_container.parent(); 3536 mCSB_container.bind("focusin." + namespace, function (e) { 3537 var el = $(document.activeElement), 3538 nested = mCSB_container.find(".mCustomScrollBox").length, 3539 dur = 0; 3540 if (!el.is(o.advanced.autoScrollOnFocus)) { return; } 3541 _stop($this); 3542 clearTimeout($this[0]._focusTimeout); 3543 $this[0]._focusTimer = nested ? (dur + 17) * nested : 0; 3544 $this[0]._focusTimeout = setTimeout(function () { 3545 var to = [_childPos(el)[0], _childPos(el)[1]], 3546 contentPos = [mCSB_container[0].offsetTop, mCSB_container[0].offsetLeft], 3547 isVisible = [ 3548 (contentPos[0] + to[0] >= 0 && contentPos[0] + to[0] < wrapper.height() - el.outerHeight(false)), 3549 (contentPos[1] + to[1] >= 0 && contentPos[0] + to[1] < wrapper.width() - el.outerWidth(false)) 3550 ], 3551 overwrite = (o.axis === "yx" && !isVisible[0] && !isVisible[1]) ? "none" : "all"; 3552 if (o.axis !== "x" && !isVisible[0]) { 3553 _scrollTo($this, to[0].toString(), { dir: "y", scrollEasing: "mcsEaseInOut", overwrite: overwrite, dur: dur }); 3554 } 3555 if (o.axis !== "y" && !isVisible[1]) { 3556 _scrollTo($this, to[1].toString(), { dir: "x", scrollEasing: "mcsEaseInOut", overwrite: overwrite, dur: dur }); 3557 } 3558 }, $this[0]._focusTimer); 3559 }); 3560 }, 3561 /* -------------------- */ 3562 3563 3564 /* sets content wrapper scrollTop/scrollLeft always to 0 */ 3565 _wrapperScroll = function () { 3566 var $this = $(this), d = $this.data(pluginPfx), 3567 namespace = pluginPfx + "_" + d.idx, 3568 wrapper = $("#mCSB_" + d.idx + "_container").parent(); 3569 wrapper.bind("scroll." + namespace, function (e) { 3570 if (wrapper.scrollTop() !== 0 || wrapper.scrollLeft() !== 0) { 3571 $(".mCSB_" + d.idx + "_scrollbar").css("visibility", "hidden"); /* hide scrollbar(s) */ 3572 } 3573 }); 3574 }, 3575 /* -------------------- */ 3576 3577 3578 /* 3579 BUTTONS EVENTS 3580 scrolls content via up, down, left and right buttons 3581 */ 3582 _buttons = function () { 3583 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, seq = d.sequential, 3584 namespace = pluginPfx + "_" + d.idx, 3585 sel = ".mCSB_" + d.idx + "_scrollbar", 3586 btn = $(sel + ">a"); 3587 btn.bind("mousedown." + namespace + " touchstart." + namespace + " pointerdown." + namespace + " MSPointerDown." + namespace + " mouseup." + namespace + " touchend." + namespace + " pointerup." + namespace + " MSPointerUp." + namespace + " mouseout." + namespace + " pointerout." + namespace + " MSPointerOut." + namespace + " click." + namespace, function (e) { 3588 e.preventDefault(); 3589 if (!_mouseBtnLeft(e)) { return; } /* left mouse button only */ 3590 var btnClass = $(this).attr("class"); 3591 seq.type = o.scrollButtons.scrollType; 3592 switch (e.type) { 3593 case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": 3594 if (seq.type === "stepped") { return; } 3595 touchActive = true; 3596 d.tweenRunning = false; 3597 _seq("on", btnClass); 3598 break; 3599 case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": 3600 case "mouseout": case "pointerout": case "MSPointerOut": 3601 if (seq.type === "stepped") { return; } 3602 touchActive = false; 3603 if (seq.dir) { _seq("off", btnClass); } 3604 break; 3605 case "click": 3606 if (seq.type !== "stepped" || d.tweenRunning) { return; } 3607 _seq("on", btnClass); 3608 break; 3609 } 3610 function _seq(a, c) { 3611 seq.scrollAmount = o.snapAmount || o.scrollButtons.scrollAmount; 3612 _sequentialScroll($this, a, c); 3613 } 3614 }); 3615 }, 3616 /* -------------------- */ 3617 3618 3619 /* 3620 KEYBOARD EVENTS 3621 scrolls content via keyboard 3622 Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End 3623 */ 3624 _keyboard = function () { 3625 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, seq = d.sequential, 3626 namespace = pluginPfx + "_" + d.idx, 3627 mCustomScrollBox = $("#mCSB_" + d.idx), 3628 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3629 wrapper = mCSB_container.parent(), 3630 editables = "input,textarea,select,datalist,keygen,[contenteditable='true']", 3631 iframe = mCSB_container.find("iframe"), 3632 events = ["blur." + namespace + " keydown." + namespace + " keyup." + namespace]; 3633 if (iframe.length) { 3634 iframe.each(function () { 3635 $(this).on('load', function () { 3636 /* bind events on accessible iframes */ 3637 if (_canAccessIFrame(this)) { 3638 $(this.contentDocument || this.contentWindow.document).bind(events[0], function (e) { 3639 _onKeyboard(e); 3640 }); 3641 } 3642 }); 3643 }); 3644 } 3645 mCustomScrollBox.attr("tabindex", "0").bind(events[0], function (e) { 3646 _onKeyboard(e); 3647 }); 3648 function _onKeyboard(e) { 3649 switch (e.type) { 3650 case "blur": 3651 if (d.tweenRunning && seq.dir) { _seq("off", null); } 3652 break; 3653 case "keydown": case "keyup": 3654 var code = e.keyCode ? e.keyCode : e.which, action = "on"; 3655 if ((o.axis !== "x" && (code === 38 || code === 40)) || (o.axis !== "y" && (code === 37 || code === 39))) { 3656 /* up (38), down (40), left (37), right (39) arrows */ 3657 if (((code === 38 || code === 40) && !d.overflowed[0]) || ((code === 37 || code === 39) && !d.overflowed[1])) { return; } 3658 if (e.type === "keyup") { action = "off"; } 3659 if (!$(document.activeElement).is(editables)) { 3660 e.preventDefault(); 3661 e.stopImmediatePropagation(); 3662 _seq(action, code); 3663 } 3664 } else if (code === 33 || code === 34) { 3665 /* PgUp (33), PgDn (34) */ 3666 if (d.overflowed[0] || d.overflowed[1]) { 3667 e.preventDefault(); 3668 e.stopImmediatePropagation(); 3669 } 3670 if (e.type === "keyup") { 3671 _stop($this); 3672 var keyboardDir = code === 34 ? -1 : 1; 3673 if (o.axis === "x" || (o.axis === "yx" && d.overflowed[1] && !d.overflowed[0])) { 3674 var dir = "x", to = Math.abs(mCSB_container[0].offsetLeft) - (keyboardDir * (wrapper.width() * 0.9)); 3675 } else { 3676 var dir = "y", to = Math.abs(mCSB_container[0].offsetTop) - (keyboardDir * (wrapper.height() * 0.9)); 3677 } 3678 _scrollTo($this, to.toString(), { dir: dir, scrollEasing: "mcsEaseInOut" }); 3679 } 3680 } else if (code === 35 || code === 36) { 3681 /* End (35), Home (36) */ 3682 if (!$(document.activeElement).is(editables)) { 3683 if (d.overflowed[0] || d.overflowed[1]) { 3684 e.preventDefault(); 3685 e.stopImmediatePropagation(); 3686 } 3687 if (e.type === "keyup") { 3688 if (o.axis === "x" || (o.axis === "yx" && d.overflowed[1] && !d.overflowed[0])) { 3689 var dir = "x", to = code === 35 ? Math.abs(wrapper.width() - mCSB_container.outerWidth(false)) : 0; 3690 } else { 3691 var dir = "y", to = code === 35 ? Math.abs(wrapper.height() - mCSB_container.outerHeight(false)) : 0; 3692 } 3693 _scrollTo($this, to.toString(), { dir: dir, scrollEasing: "mcsEaseInOut" }); 3694 } 3695 } 3696 } 3697 break; 3698 } 3699 function _seq(a, c) { 3700 seq.type = o.keyboard.scrollType; 3701 seq.scrollAmount = o.snapAmount || o.keyboard.scrollAmount; 3702 if (seq.type === "stepped" && d.tweenRunning) { return; } 3703 _sequentialScroll($this, a, c); 3704 } 3705 } 3706 }, 3707 /* -------------------- */ 3708 3709 3710 /* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */ 3711 _sequentialScroll = function (el, action, trigger, e, s) { 3712 var d = el.data(pluginPfx), o = d.opt, seq = d.sequential, 3713 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3714 once = seq.type === "stepped" ? true : false, 3715 steplessSpeed = o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */ 3716 steppedSpeed = o.scrollInertia < 1 ? 17 : o.scrollInertia; 3717 switch (action) { 3718 case "on": 3719 seq.dir = [ 3720 (trigger === classes[16] || trigger === classes[15] || trigger === 39 || trigger === 37 ? "x" : "y"), 3721 (trigger === classes[13] || trigger === classes[15] || trigger === 38 || trigger === 37 ? -1 : 1) 3722 ]; 3723 _stop(el); 3724 if (_isNumeric(trigger) && seq.type === "stepped") { return; } 3725 _on(once); 3726 break; 3727 case "off": 3728 _off(); 3729 if (once || (d.tweenRunning && seq.dir)) { 3730 _on(true); 3731 } 3732 break; 3733 } 3734 /* starts sequence */ 3735 function _on(once) { 3736 var c = seq.type !== "stepped", /* continuous scrolling */ 3737 t = s ? s : !once ? 1000 / 60 : c ? steplessSpeed / 1.5 : steppedSpeed, /* timer */ 3738 m = !once ? 2.5 : c ? 7.5 : 40, /* multiplier */ 3739 contentPos = [Math.abs(mCSB_container[0].offsetTop), Math.abs(mCSB_container[0].offsetLeft)], 3740 ratio = [d.scrollRatio.y > 10 ? 10 : d.scrollRatio.y, d.scrollRatio.x > 10 ? 10 : d.scrollRatio.x], 3741 amount = seq.dir[0] === "x" ? contentPos[1] + (seq.dir[1] * (ratio[1] * m)) : contentPos[0] + (seq.dir[1] * (ratio[0] * m)), 3742 px = seq.dir[0] === "x" ? contentPos[1] + (seq.dir[1] * parseInt(seq.scrollAmount)) : contentPos[0] + (seq.dir[1] * parseInt(seq.scrollAmount)), 3743 to = seq.scrollAmount !== "auto" ? px : amount, 3744 easing = e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut", 3745 onComplete = !once ? false : true; 3746 if (once && t < 17) { 3747 to = seq.dir[0] === "x" ? contentPos[1] : contentPos[0]; 3748 } 3749 _scrollTo(el, to.toString(), { dir: seq.dir[0], scrollEasing: easing, dur: t, onComplete: onComplete }); 3750 if (once) { 3751 seq.dir = false; 3752 return; 3753 } 3754 clearTimeout(seq.step);
3755 seq.step = setTimeout(function () { 3756 _on(); 3757 }, t); 3758 } 3759 /* stops sequence */ 3760 function _off() { 3761 clearTimeout(seq.step); 3762 _delete(seq, "step"); 3763 _stop(el); 3764 } 3765 }, 3766 /* -------------------- */ 3767 3768 3769 /* returns a yx array from value */ 3770 _arr = function (val) { 3771 var o = $(this).data(pluginPfx).opt, vals = []; 3772 if (typeof val === "function") { val = val(); } /* check if the value is a single anonymous function */ 3773 /* check if value is object or array, its length and create an array with yx values */ 3774 if (!(val instanceof Array)) { /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */ 3775 vals[0] = val.y ? val.y : val.x || o.axis === "x" ? null : val; 3776 vals[1] = val.x ? val.x : val.y || o.axis === "y" ? null : val; 3777 } else { /* array value (e.g. [100,100]) */ 3778 vals = val.length > 1 ? [val[0], val[1]] : o.axis === "x" ? [null, val[0]] : [val[0], null]; 3779 } 3780 /* check if array values are anonymous functions */ 3781 if (typeof vals[0] === "function") { vals[0] = vals[0](); } 3782 if (typeof vals[1] === "function") { vals[1] = vals[1](); } 3783 return vals; 3784 }, 3785 /* -------------------- */ 3786 3787 3788 /* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */ 3789 _to = function (val, dir) { 3790 if (val == null || typeof val == "undefined") { return; } 3791 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3792 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3793 wrapper = mCSB_container.parent(), 3794 t = typeof val; 3795 if (!dir) { dir = o.axis === "x" ? "x" : "y"; } 3796 var contentLength = dir === "x" ? mCSB_container.outerWidth(false) : mCSB_container.outerHeight(false), 3797 contentPos = dir === "x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop, 3798 cssProp = dir === "x" ? "left" : "top"; 3799 switch (t) { 3800 case "function": /* this currently is not used. Consider removing it */ 3801 return val(); 3802 break; 3803 case "object": /* js/jquery object */ 3804 var obj = val.jquery ? val : $(val); 3805 if (!obj.length) { return; } 3806 return dir === "x" ? _childPos(obj)[1] : _childPos(obj)[0]; 3807 break; 3808 case "string": case "number": 3809 if (_isNumeric(val)) { /* numeric value */ 3810 return Math.abs(val); 3811 } else if (val.indexOf("%") !== -1) { /* percentage value */ 3812 return Math.abs(contentLength * parseInt(val) / 100); 3813 } else if (val.indexOf("-=") !== -1) { /* decrease value */ 3814 return Math.abs(contentPos - parseInt(val.split("-=")[1])); 3815 } else if (val.indexOf("+=") !== -1) { /* inrease value */ 3816 var p = (contentPos + parseInt(val.split("+=")[1])); 3817 return p >= 0 ? 0 : Math.abs(p); 3818 } else if (val.indexOf("px") !== -1 && _isNumeric(val.split("px")[0])) { /* pixels string value (e.g. "100px") */ 3819 return Math.abs(val.split("px")[0]); 3820 } else { 3821 if (val === "top" || val === "left") { /* special strings */ 3822 return 0; 3823 } else if (val === "bottom") { 3824 return Math.abs(wrapper.height() - mCSB_container.outerHeight(false)); 3825 } else if (val === "right") { 3826 return Math.abs(wrapper.width() - mCSB_container.outerWidth(false)); 3827 } else if (val === "first" || val === "last") { 3828 var obj = mCSB_container.find(":" + val); 3829 return dir === "x" ? _childPos(obj)[1] : _childPos(obj)[0]; 3830 } else { 3831 if ($(val).length) { /* jquery selector */ 3832 return dir === "x" ? _childPos($(val))[1] : _childPos($(val))[0]; 3833 } else { /* other values (e.g. "100em") */ 3834 mCSB_container.css(cssProp, val); 3835 methods.update.call(null, $this[0]); 3836 return; 3837 } 3838 } 3839 } 3840 break; 3841 } 3842 }, 3843 /* -------------------- */ 3844 3845 3846 /* calls the update method automatically */ 3847 _autoUpdate = function (rem) { 3848 var $this = $(this), d = $this.data(pluginPfx), o = d.opt, 3849 mCSB_container = $("#mCSB_" + d.idx + "_container"); 3850 if (rem) { 3851 /* 3852 removes autoUpdate timer 3853 usage: _autoUpdate.call(this,"remove"); 3854 */ 3855 clearTimeout(mCSB_container[0].autoUpdate); 3856 _delete(mCSB_container[0], "autoUpdate"); 3857 return; 3858 } 3859 var wrapper = mCSB_container.parent(), 3860 scrollbar = [$("#mCSB_" + d.idx + "_scrollbar_vertical"), $("#mCSB_" + d.idx + "_scrollbar_horizontal")], 3861 scrollbarSize = function () { 3862 return [ 3863 scrollbar[0].is(":visible") ? scrollbar[0].outerHeight(true) : 0, /* returns y-scrollbar height */ 3864 scrollbar[1].is(":visible") ? scrollbar[1].outerWidth(true) : 0 /* returns x-scrollbar width */ 3865 ] 3866 }, 3867 oldSelSize = sizesSum(), newSelSize, 3868 os = [mCSB_container.outerHeight(false), mCSB_container.outerWidth(false), wrapper.height(), wrapper.width(), scrollbarSize()[0], scrollbarSize()[1]], ns, 3869 oldImgsLen = imgSum(), newImgsLen; 3870 upd(); 3871 function upd() { 3872 clearTimeout(mCSB_container[0].autoUpdate); 3873 mCSB_container[0].autoUpdate = setTimeout(function () { 3874 /* update on specific selector(s) length and size change */ 3875 if (o.advanced.updateOnSelectorChange) { 3876 newSelSize = sizesSum(); 3877 if (newSelSize !== oldSelSize) { 3878 doUpd(3); 3879 oldSelSize = newSelSize; 3880 return; 3881 } 3882 } 3883 /* update on main element and scrollbar size changes */ 3884 if (o.advanced.updateOnContentResize) { 3885 ns = [mCSB_container.outerHeight(false), mCSB_container.outerWidth(false), wrapper.height(), wrapper.width(), scrollbarSize()[0], scrollbarSize()[1]]; 3886 if (ns[0] !== os[0] || ns[1] !== os[1] || ns[2] !== os[2] || ns[3] !== os[3] || ns[4] !== os[4] || ns[5] !== os[5]) { 3887 doUpd(ns[0] !== os[0] || ns[1] !== os[1]); 3888 os = ns; 3889 } 3890 } 3891 /* update on image load */ 3892 if (o.advanced.updateOnImageLoad) { 3893 newImgsLen = imgSum(); 3894 if (newImgsLen !== oldImgsLen) { 3895 mCSB_container.find("img").each(function () { 3896 imgLoader(this); 3897 });
vendor: 16,637 bytes, lines 3898-4334
3898 oldImgsLen = newImgsLen; 3899 } 3900 } 3901 if (o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad) { upd(); } 3902 }, 60); 3903 } 3904 /* returns images amount */ 3905 function imgSum() { 3906 var total = 0 3907 if (o.advanced.updateOnImageLoad) { total = mCSB_container.find("img").length; } 3908 return total; 3909 } 3910 /* a tiny image loader */ 3911 function imgLoader(el) { 3912 if ($(el).hasClass(classes[2])) { doUpd(); return; } 3913 var img = new Image(); 3914 function createDelegate(contextObject, delegateMethod) { 3915 return function () { return delegateMethod.apply(contextObject, arguments); } 3916 } 3917 function imgOnLoad() { 3918 this.onload = null; 3919 $(el).addClass(classes[2]); 3920 doUpd(2); 3921 } 3922 img.onload = createDelegate(img, imgOnLoad); 3923 img.src = el.src; 3924 } 3925 /* returns the total height and width sum of all elements matching the selector */ 3926 function sizesSum() { 3927 if (o.advanced.updateOnSelectorChange === true) { o.advanced.updateOnSelectorChange = "*"; } 3928 var total = 0, sel = mCSB_container.find(o.advanced.updateOnSelectorChange); 3929 if (o.advanced.updateOnSelectorChange && sel.length > 0) { sel.each(function () { total += $(this).height() + $(this).width(); }); } 3930 return total; 3931 } 3932 /* calls the update method */ 3933 function doUpd(cb) { 3934 clearTimeout(mCSB_container[0].autoUpdate); 3935 methods.update.call(null, $this[0], cb); 3936 } 3937 }, 3938 /* -------------------- */ 3939 3940 3941 /* snaps scrolling to a multiple of a pixels number */ 3942 _snapAmount = function (to, amount, offset) { 3943 return (Math.round(to / amount) * amount - offset); 3944 }, 3945 /* -------------------- */ 3946 3947 3948 /* stops content and scrollbar animations */ 3949 _stop = function (el) { 3950 var d = el.data(pluginPfx), 3951 sel = $("#mCSB_" + d.idx + "_container,#mCSB_" + d.idx + "_container_wrapper,#mCSB_" + d.idx + "_dragger_vertical,#mCSB_" + d.idx + "_dragger_horizontal"); 3952 sel.each(function () { 3953 _stopTween.call(this); 3954 }); 3955 }, 3956 /* -------------------- */ 3957 3958 3959 /* 3960 ANIMATES CONTENT 3961 This is where the actual scrolling happens 3962 */ 3963 _scrollTo = function (el, to, options) { 3964 var d = el.data(pluginPfx), o = d.opt, 3965 defaults = { 3966 trigger: "internal", 3967 dir: "y", 3968 scrollEasing: "mcsEaseOut", 3969 drag: false, 3970 dur: o.scrollInertia, 3971 overwrite: "all", 3972 callbacks: true, 3973 onStart: true, 3974 onUpdate: true, 3975 onComplete: true 3976 }, 3977 options = $.extend(defaults, options), 3978 dur = [options.dur, (options.drag ? 0 : options.dur)], 3979 mCustomScrollBox = $("#mCSB_" + d.idx), 3980 mCSB_container = $("#mCSB_" + d.idx + "_container"), 3981 wrapper = mCSB_container.parent(), 3982 totalScrollOffsets = o.callbacks.onTotalScrollOffset ? _arr.call(el, o.callbacks.onTotalScrollOffset) : [0, 0], 3983 totalScrollBackOffsets = o.callbacks.onTotalScrollBackOffset ? _arr.call(el, o.callbacks.onTotalScrollBackOffset) : [0, 0]; 3984 d.trigger = options.trigger; 3985 if (wrapper.scrollTop() !== 0 || wrapper.scrollLeft() !== 0) { /* always reset scrollTop/Left */ 3986 $(".mCSB_" + d.idx + "_scrollbar").css("visibility", "visible"); 3987 wrapper.scrollTop(0).scrollLeft(0); 3988 } 3989 if (to === "_resetY" && !d.contentReset.y) { 3990 /* callbacks: onOverflowYNone */ 3991 if (_cb("onOverflowYNone")) { o.callbacks.onOverflowYNone.call(el[0]); } 3992 d.contentReset.y = 1; 3993 } 3994 if (to === "_resetX" && !d.contentReset.x) { 3995 /* callbacks: onOverflowXNone */ 3996 if (_cb("onOverflowXNone")) { o.callbacks.onOverflowXNone.call(el[0]); } 3997 d.contentReset.x = 1; 3998 } 3999 if (to === "_resetY" || to === "_resetX") { return; } 4000 if ((d.contentReset.y || !el[0].mcs) && d.overflowed[0]) { 4001 /* callbacks: onOverflowY */ 4002 if (_cb("onOverflowY")) { o.callbacks.onOverflowY.call(el[0]); } 4003 d.contentReset.x = null; 4004 } 4005 if ((d.contentReset.x || !el[0].mcs) && d.overflowed[1]) { 4006 /* callbacks: onOverflowX */ 4007 if (_cb("onOverflowX")) { o.callbacks.onOverflowX.call(el[0]); } 4008 d.contentReset.x = null; 4009 } 4010 if (o.snapAmount) { to = _snapAmount(to, o.snapAmount, o.snapOffset); } /* scrolling snapping */ 4011 switch (options.dir) { 4012 case "x": 4013 var mCSB_dragger = $("#mCSB_" + d.idx + "_dragger_horizontal"), 4014 property = "left", 4015 contentPos = mCSB_container[0].offsetLeft, 4016 limit = [ 4017 mCustomScrollBox.width() - mCSB_container.outerWidth(false), 4018 mCSB_dragger.parent().width() - mCSB_dragger.width() 4019 ], 4020 scrollTo = [to, to === 0 ? 0 : (to / d.scrollRatio.x)], 4021 tso = totalScrollOffsets[1], 4022 tsbo = totalScrollBackOffsets[1], 4023 totalScrollOffset = tso > 0 ? tso / d.scrollRatio.x : 0, 4024 totalScrollBackOffset = tsbo > 0 ? tsbo / d.scrollRatio.x : 0; 4025 break; 4026 case "y": 4027 var mCSB_dragger = $("#mCSB_" + d.idx + "_dragger_vertical"), 4028 property = "top", 4029 contentPos = mCSB_container[0].offsetTop, 4030 limit = [ 4031 mCustomScrollBox.height() - mCSB_container.outerHeight(false), 4032 mCSB_dragger.parent().height() - mCSB_dragger.height() 4033 ], 4034 scrollTo = [to, to === 0 ? 0 : (to / d.scrollRatio.y)], 4035 tso = totalScrollOffsets[0], 4036 tsbo = totalScrollBackOffsets[0], 4037 totalScrollOffset = tso > 0 ? tso / d.scrollRatio.y : 0, 4038 totalScrollBackOffset = tsbo > 0 ? tsbo / d.scrollRatio.y : 0; 4039 break; 4040 } 4041 if (scrollTo[1] < 0 || (scrollTo[0] === 0 && scrollTo[1] === 0)) { 4042 scrollTo = [0, 0]; 4043 } else if (scrollTo[1] >= limit[1]) { 4044 scrollTo = [limit[0], limit[1]]; 4045 } else { 4046 scrollTo[0] = -scrollTo[0]; 4047 } 4048 if (!el[0].mcs) { 4049 _mcs(); /* init mcs object (once) to make it available before callbacks */ 4050 if (_cb("onInit")) { o.callbacks.onInit.call(el[0]); } /* callbacks: onInit */ 4051 } 4052 clearTimeout(mCSB_container[0].onCompleteTimeout); 4053 if (!d.tweenRunning && ((contentPos === 0 && scrollTo[0] >= 0) || (contentPos === limit[0] && scrollTo[0] <= limit[0]))) { return; } 4054 _tweenTo(mCSB_dragger[0], property, Math.round(scrollTo[1]), dur[1], options.scrollEasing); 4055 _tweenTo(mCSB_container[0], property, Math.round(scrollTo[0]), dur[0], options.scrollEasing, options.overwrite, { 4056 onStart: function () { 4057 if (options.callbacks && options.onStart && !d.tweenRunning) { 4058 /* callbacks: onScrollStart */ 4059 if (_cb("onScrollStart")) { _mcs(); o.callbacks.onScrollStart.call(el[0]); } 4060 d.tweenRunning = true; 4061 _onDragClasses(mCSB_dragger); 4062 d.cbOffsets = _cbOffsets(); 4063 } 4064 }, onUpdate: function () { 4065 if (options.callbacks && options.onUpdate) { 4066 /* callbacks: whileScrolling */ 4067 if (_cb("whileScrolling")) { _mcs(); o.callbacks.whileScrolling.call(el[0]); } 4068 } 4069 }, onComplete: function () { 4070 if (options.callbacks && options.onComplete) { 4071 if (o.axis === "yx") { clearTimeout(mCSB_container[0].onCompleteTimeout); } 4072 var t = mCSB_container[0].idleTimer || 0; 4073 mCSB_container[0].onCompleteTimeout = setTimeout(function () { 4074 /* callbacks: onScroll, onTotalScroll, onTotalScrollBack */ 4075 if (_cb("onScroll")) { _mcs(); o.callbacks.onScroll.call(el[0]); } 4076 if (_cb("onTotalScroll") && scrollTo[1] >= limit[1] - totalScrollOffset && d.cbOffsets[0]) { _mcs(); o.callbacks.onTotalScroll.call(el[0]); } 4077 if (_cb("onTotalScrollBack") && scrollTo[1] <= totalScrollBackOffset && d.cbOffsets[1]) { _mcs(); o.callbacks.onTotalScrollBack.call(el[0]); } 4078 d.tweenRunning = false; 4079 mCSB_container[0].idleTimer = 0; 4080 _onDragClasses(mCSB_dragger, "hide"); 4081 }, t); 4082 } 4083 } 4084 }); 4085 /* checks if callback function exists */ 4086 function _cb(cb) { 4087 return d && o.callbacks[cb] && typeof o.callbacks[cb] === "function"; 4088 } 4089 /* checks whether callback offsets always trigger */ 4090 function _cbOffsets() { 4091 return [o.callbacks.alwaysTriggerOffsets || contentPos >= limit[0] + tso, o.callbacks.alwaysTriggerOffsets || contentPos <= -tsbo]; 4092 } 4093 /* 4094 populates object with useful values for the user 4095 values: 4096 content: this.mcs.content 4097 content top position: this.mcs.top 4098 content left position: this.mcs.left 4099 dragger top position: this.mcs.draggerTop 4100 dragger left position: this.mcs.draggerLeft 4101 scrolling y percentage: this.mcs.topPct 4102 scrolling x percentage: this.mcs.leftPct 4103 scrolling direction: this.mcs.direction 4104 */ 4105 function _mcs() { 4106 var cp = [mCSB_container[0].offsetTop, mCSB_container[0].offsetLeft], /* content position */ 4107 dp = [mCSB_dragger[0].offsetTop, mCSB_dragger[0].offsetLeft], /* dragger position */ 4108 cl = [mCSB_container.outerHeight(false), mCSB_container.outerWidth(false)], /* content length */ 4109 pl = [mCustomScrollBox.height(), mCustomScrollBox.width()]; /* content parent length */ 4110 el[0].mcs = { 4111 content: mCSB_container, /* original content wrapper as jquery object */ 4112 top: cp[0], left: cp[1], draggerTop: dp[0], draggerLeft: dp[1], 4113 topPct: Math.round((100 * Math.abs(cp[0])) / (Math.abs(cl[0]) - pl[0])), leftPct: Math.round((100 * Math.abs(cp[1])) / (Math.abs(cl[1]) - pl[1])), 4114 direction: options.dir 4115 }; 4116 /* 4117 this refers to the original element containing the scrollbar(s) 4118 usage: this.mcs.top, this.mcs.leftPct etc. 4119 */ 4120 } 4121 }, 4122 /* -------------------- */ 4123 4124 4125 /* 4126 CUSTOM JAVASCRIPT ANIMATION TWEEN 4127 Lighter and faster than jquery animate() and css transitions 4128 Animates top/left properties and includes easings 4129 */ 4130 _tweenTo = function (el, prop, to, duration, easing, overwrite, callbacks) { 4131 if (!el._mTween) { el._mTween = { top: {}, left: {} }; } 4132 var callbacks = callbacks || {}, 4133 onStart = callbacks.onStart || function () { }, onUpdate = callbacks.onUpdate || function () { }, onComplete = callbacks.onComplete || function () { }, 4134 startTime = _getTime(), _delay, progress = 0, from = el.offsetTop, elStyle = el.style, _request, tobj = el._mTween[prop]; 4135 if (prop === "left") { from = el.offsetLeft; } 4136 var diff = to - from; 4137 tobj.stop = 0; 4138 if (overwrite !== "none") { _cancelTween(); } 4139 _startTween(); 4140 function _step() { 4141 if (tobj.stop) { return; } 4142 if (!progress) { onStart.call(); } 4143 progress = _getTime() - startTime; 4144 _tween(); 4145 if (progress >= tobj.time) { 4146 tobj.time = (progress > tobj.time) ? progress + _delay - (progress - tobj.time) : progress + _delay - 1; 4147 if (tobj.time < progress + 1) { tobj.time = progress + 1; } 4148 } 4149 if (tobj.time < duration) { tobj.id = _request(_step); } else { onComplete.call(); } 4150 } 4151 function _tween() { 4152 if (duration > 0) { 4153 tobj.currVal = _ease(tobj.time, from, diff, duration, easing); 4154 elStyle[prop] = Math.round(tobj.currVal) + "px"; 4155 } else { 4156 elStyle[prop] = to + "px"; 4157 } 4158 onUpdate.call(); 4159 } 4160 function _startTween() { 4161 _delay = 1000 / 60; 4162 tobj.time = progress + _delay; 4163 _request = (!window.requestAnimationFrame) ? function (f) { _tween(); return setTimeout(f, 0.01); } : window.requestAnimationFrame; 4164 tobj.id = _request(_step); 4165 } 4166 function _cancelTween() { 4167 if (tobj.id == null) { return; } 4168 if (!window.requestAnimationFrame) { 4169 clearTimeout(tobj.id); 4170 } else { window.cancelAnimationFrame(tobj.id); } 4171 tobj.id = null; 4172 } 4173 function _ease(t, b, c, d, type) { 4174 switch (type) { 4175 case "linear": case "mcsLinear": 4176 return c * t / d + b; 4177 break; 4178 case "mcsLinearOut": 4179 t /= d; t--; return c * Math.sqrt(1 - t * t) + b; 4180 break; 4181 case "easeInOutSmooth": 4182 t /= d / 2; 4183 if (t < 1) return c / 2 * t * t + b; 4184 t--; 4185 return -c / 2 * (t * (t - 2) - 1) + b; 4186 break; 4187 case "easeInOutStrong": 4188 t /= d / 2; 4189 if (t < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b; 4190 t--; 4191 return c / 2 * (-Math.pow(2, -10 * t) + 2) + b; 4192 break; 4193 case "easeInOut": case "mcsEaseInOut": 4194 t /= d / 2; 4195 if (t < 1) return c / 2 * t * t * t + b; 4196 t -= 2; 4197 return c / 2 * (t * t * t + 2) + b; 4198 break; 4199 case "easeOutSmooth": 4200 t /= d; t--; 4201 return -c * (t * t * t * t - 1) + b; 4202 break; 4203 case "easeOutStrong": 4204 return c * (-Math.pow(2, -10 * t / d) + 1) + b; 4205 break; 4206 case "easeOut": case "mcsEaseOut": default: 4207 var ts = (t /= d) * t, tc = ts * t; 4208 return b + c * (0.499999999999997 * tc * ts + -2.5 * ts * ts + 5.5 * tc + -6.5 * ts + 4 * t); 4209 } 4210 } 4211 }, 4212 /* -------------------- */ 4213 4214 4215 /* returns current time */ 4216 _getTime = function () { 4217 if (window.performance && window.performance.now) { 4218 return window.performance.now(); 4219 } else { 4220 if (window.performance && window.performance.webkitNow) { 4221 return window.performance.webkitNow(); 4222 } else { 4223 if (Date.now) { return Date.now(); } else { return new Date().getTime(); } 4224 } 4225 } 4226 }, 4227 /* -------------------- */ 4228 4229 4230 /* stops a tween */ 4231 _stopTween = function () { 4232 var el = this; 4233 if (!el._mTween) { el._mTween = { top: {}, left: {} }; } 4234 var props = ["top", "left"]; 4235 for (var i = 0; i < props.length; i++) { 4236 var prop = props[i]; 4237 if (el._mTween[prop].id) { 4238 if (!window.requestAnimationFrame) { 4239 clearTimeout(el._mTween[prop].id); 4240 } else { window.cancelAnimationFrame(el._mTween[prop].id); } 4241 el._mTween[prop].id = null; 4242 el._mTween[prop].stop = 1; 4243 } 4244 } 4245 }, 4246 /* -------------------- */ 4247 4248 4249 /* deletes a property (avoiding the exception thrown by IE) */ 4250 _delete = function (c, m) { 4251 try { delete c[m]; } catch (e) { c[m] = null; } 4252 }, 4253 /* -------------------- */ 4254 4255 4256 /* detects left mouse button */ 4257 _mouseBtnLeft = function (e) { 4258 return !(e.which && e.which !== 1); 4259 }, 4260 /* -------------------- */ 4261 4262 4263 /* detects if pointer type event is touch */ 4264 _pointerTouch = function (e) { 4265 var t = e.originalEvent.pointerType; 4266 return !(t && t !== "touch" && t !== 2); 4267 }, 4268 /* -------------------- */ 4269 4270 4271 /* checks if value is numeric */ 4272 _isNumeric = function (val) { 4273 return !isNaN(parseFloat(val)) && isFinite(val); 4274 }, 4275 /* -------------------- */ 4276 4277 4278 /* returns element position according to content */ 4279 _childPos = function (el) { 4280 var p = el.parents(".mCSB_container"); 4281 return [el.offset().top - p.offset().top, el.offset().left - p.offset().left]; 4282 }; 4283 /* -------------------- */ 4284 4285 4286 4287 4288 4289 /* 4290 ---------------------------------------- 4291 PLUGIN SETUP 4292 ---------------------------------------- 4293 */ 4294 4295 /* plugin constructor functions */ 4296 $.fn[pluginNS] = function (method) { /* usage: $(selector).mCustomScrollbar(); */ 4297 if (methods[method]) { 4298 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 4299 } else if (typeof method === "object" || !method) { 4300 return methods.init.apply(this, arguments); 4301 } else { 4302 $.error("Method " + method + " does not exist"); 4303 } 4304 }; 4305 $[pluginNS] = function (method) { /* usage: $.mCustomScrollbar(); */ 4306 if (methods[method]) { 4307 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 4308 } else if (typeof method === "object" || !method) { 4309 return methods.init.apply(this, arguments); 4310 } else { 4311 $.error("Method " + method + " does not exist"); 4312 } 4313 }; 4314 4315 /* 4316 allow setting plugin default options. 4317 usage: $.mCustomScrollbar.defaults.scrollInertia=500; 4318 to apply any changed default options on default selectors (below), use inside document ready fn 4319 e.g.: $(document).ready(function(){ $.mCustomScrollbar.defaults.scrollInertia=500; }); 4320 */ 4321 $[pluginNS].defaults = defaults; 4322 4323 /* 4324 add window object (window.mCustomScrollbar) 4325 usage: if(window.mCustomScrollbar){console.log("custom scrollbar plugin loaded");} 4326 */ 4327 window[pluginNS] = true; 4328 4329 $(window).on('load', function () { 4330 4331 $(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */ 4332 4333 /* extend jQuery expressions */ 4334 $.extend($.expr[":"], {
4335 /* checks if element is within scrollable viewport */ 4336 mcsInView: $.expr[":"].mcsInView || function (el) { 4337 var $el = $(el), content = $el.parents(".mCSB_container"), wrapper, cPos; 4338 if (!content.length) { return; } 4339 wrapper = content.parent(); 4340 cPos = [content[0].offsetTop, content[0].offsetLeft]; 4341 return cPos[0] + _childPos($el)[0] >= 0 && cPos[0] + _childPos($el)[0] < wrapper.height() - $el.outerHeight(false) && 4342 cPos[1] + _childPos($el)[1] >= 0 && cPos[1] + _childPos($el)[1] < wrapper.width() - $el.outerWidth(false); 4343 }, 4344 /* checks if element is overflowed having visible scrollbar(s) */ 4345 mcsOverflow: $.expr[":"].mcsOverflow || function (el) { 4346 var d = $(el).data(pluginPfx); 4347 if (!d) { return; } 4348 return d.overflowed[0] || d.overflowed[1]; 4349 } 4350 }); 4351 4352 }); 4353 4354 })) 4355})); 4356/** 4357 * Intro.js v2.4.0 4358 * https://github.com/usablica/intro.js 4359 * 4360 * Copyright (C) 2016 Afshin Mehrabani (@afshinmeh) 4361 */ 4362 4363(function (root, factory) { 4364 if (typeof exports === 'object') { 4365 // CommonJS 4366 factory(exports); 4367 } else if (typeof define === 'function' && define.amd) { 4368 // AMD. Register as an anonymous module. 4369 define(['exports'], factory); 4370 } else { 4371 // Browser globals 4372 factory(root); 4373 } 4374} (this, function (exports) { 4375 //Default config/variables 4376 var VERSION = '2.4.0'; 4377 4378 /** 4379 * IntroJs main class 4380 * 4381 * @class IntroJs 4382 */ 4383 function IntroJs(obj) { 4384 this._targetElement = obj; 4385 this._introItems = []; 4386 4387 this._options = { 4388 /* Next button label in tooltip box */ 4389 nextLabel: 'Next', 4390 /* Previous button label in tooltip box */ 4391 prevLabel: 'Back', 4392 /* Skip button label in tooltip box */ 4393 skipLabel: 'Skip', 4394 /* Done button label in tooltip box */ 4395 doneLabel: 'Done', 4396 /* Hide previous button in the first step? Otherwise, it will be disabled button. */ 4397 hidePrev: false, 4398 /* Hide next button in the last step? Otherwise, it will be disabled button. */ 4399 hideNext: false, 4400 /* Default tooltip box position */ 4401 tooltipPosition: 'bottom', 4402 /* Next CSS class for tooltip boxes */ 4403 tooltipClass: '', 4404 /* CSS class that is added to the helperLayer */ 4405 highlightClass: '', 4406 /* Close introduction when pressing Escape button? */ 4407 exitOnEsc: true, 4408 /* Close introduction when clicking on overlay layer? */ 4409 exitOnOverlayClick: true, 4410 /* Show step numbers in introduction? */ 4411 showStepNumbers: true, 4412 /* Let user use keyboard to navigate the tour? */ 4413 keyboardNavigation: true, 4414 /* Show tour control buttons? */ 4415 showButtons: true, 4416 /* Show tour bullets? */ 4417 showBullets: true, 4418 /* Show tour progress? */ 4419 showProgress: false, 4420 /* Scroll to highlighted element? */ 4421 scrollToElement: true, 4422 /* Set the overlay opacity */ 4423 overlayOpacity: 0.8, 4424 /* Padding to add after scrolling when element is not in the viewport (in pixels) */ 4425 scrollPadding: 30, 4426 /* Precedence of positions, when auto is enabled */ 4427 positionPrecedence: ["bottom", "top", "right", "left"], 4428 /* Disable an interaction with element? */ 4429 disableInteraction: false, 4430 /* Default hint position */ 4431 hintPosition: 'top-middle', 4432 /* Hint button label */ 4433 hintButtonLabel: 'Got it', 4434 /* Adding animation to hints? */ 4435 hintAnimation: true 4436 }; 4437 } 4438 4439 /** 4440 * Initiate a new introduction/guide from an element in the page 4441 * 4442 * @api private 4443 * @method _introForElement 4444 * @param {Object} targetElm 4445 * @returns {Boolean} Success or not? 4446 */ 4447 function _introForElement(targetElm) { 4448 var introItems = [], 4449 self = this; 4450 4451 if (this._options.steps) { 4452 //use steps passed programmatically 4453 for (var i = 0, stepsLength = this._options.steps.length; i < stepsLength; i++) { 4454 var currentItem = _cloneObject(this._options.steps[i]); 4455 //set the step
4456 currentItem.step = introItems.length + 1; 4457 //use querySelector function only when developer used CSS selector 4458 if (typeof(currentItem.element) === 'string') { 4459 //grab the element with given selector from the page 4460 currentItem.element = document.querySelector(currentItem.element); 4461 } 4462 4463 //intro without element 4464 if (typeof(currentItem.element) === 'undefined' || currentItem.element == null) { 4465 var floatingElementQuery = document.querySelector(".introjsFloatingElement"); 4466 4467 if (floatingElementQuery == null) { 4468 floatingElementQuery = document.createElement('div'); 4469 floatingElementQuery.className = 'introjsFloatingElement'; 4470 4471 document.body.appendChild(floatingElementQuery); 4472 } 4473 4474 currentItem.element = floatingElementQuery; 4475 currentItem.position = 'floating'; 4476 } 4477 4478 if (currentItem.element != null) { 4479 introItems.push(currentItem); 4480 } 4481 } 4482 4483 } else { 4484 //use steps from data-* annotations 4485 var allIntroSteps = targetElm.querySelectorAll('*[data-intro]'); 4486 //if there's no element to intro 4487 if (allIntroSteps.length < 1) { 4488 return false; 4489 } 4490 4491 //first add intro items with data-step 4492 for (var i = 0, elmsLength = allIntroSteps.length; i < elmsLength; i++) { 4493 var currentElement = allIntroSteps[i]; 4494 4495 // skip hidden elements 4496 if (currentElement.style.display == 'none') { 4497 continue; 4498 } 4499 4500 var step = parseInt(currentElement.getAttribute('data-step'), 10); 4501 4502 if (step > 0) { 4503 introItems[step - 1] = { 4504 element: currentElement, 4505 intro: currentElement.getAttribute('data-intro'), 4506 step: parseInt(currentElement.getAttribute('data-step'), 10), 4507 tooltipClass: currentElement.getAttribute('data-tooltipClass'), 4508 highlightClass: currentElement.getAttribute('data-highlightClass'), 4509 position: currentElement.getAttribute('data-position') || this._options.tooltipPosition 4510 }; 4511 } 4512 } 4513 4514 //next add intro items without data-step 4515 //todo: we need a cleanup here, two loops are redundant 4516 var nextStep = 0; 4517 for (var i = 0, elmsLength = allIntroSteps.length; i < elmsLength; i++) { 4518 var currentElement = allIntroSteps[i]; 4519 4520 if (currentElement.getAttribute('data-step') == null) { 4521 4522 while (true) { 4523 if (typeof introItems[nextStep] == 'undefined') { 4524 break; 4525 } else { 4526 nextStep++; 4527 } 4528 } 4529 4530 introItems[nextStep] = { 4531 element: currentElement, 4532 intro: currentElement.getAttribute('data-intro'), 4533 step: nextStep + 1, 4534 tooltipClass: currentElement.getAttribute('data-tooltipClass'), 4535 highlightClass: currentElement.getAttribute('data-highlightClass'), 4536 position: currentElement.getAttribute('data-position') || this._options.tooltipPosition 4537 }; 4538 } 4539 } 4540 } 4541 4542 //removing undefined/null elements 4543 var tempIntroItems = []; 4544 for (var z = 0; z < introItems.length; z++) { 4545 introItems[z] && tempIntroItems.push(introItems[z]); // copy non-empty values to the end of the array 4546 } 4547 4548 introItems = tempIntroItems; 4549 4550 //Ok, sort all items with given steps 4551 introItems.sort(function (a, b) { 4552 return a.step - b.step; 4553 }); 4554 4555 //set it to the introJs object 4556 self._introItems = introItems; 4557 4558 //add overlay layer to the page 4559 if(_addOverlayLayer.call(self, targetElm)) { 4560 //then, start the show 4561 _nextStep.call(self); 4562 4563 var skipButton = targetElm.querySelector('.introjs-skipbutton'), 4564 nextStepButton = targetElm.querySelector('.introjs-nextbutton'); 4565 4566 self._onKeyDown = function(e) { 4567 if (e.keyCode === 27 && self._options.exitOnEsc == true) { 4568 //escape key pressed, exit the intro 4569 //check if exit callback is defined 4570 if (self._introExitCallback != undefined) { 4571 self._introExitCallback.call(self); 4572 } 4573 _exitIntro.call(self, targetElm); 4574 } else if(e.keyCode === 37) { 4575 //left arrow 4576 _previousStep.call(self); 4577 } else if (e.keyCode === 39) { 4578 //right arrow 4579 _nextStep.call(self); 4580 } else if (e.keyCode === 13) { 4581 //srcElement === ie 4582 var target = e.target || e.srcElement; 4583 if (target && target.className.indexOf('introjs-prevbutton') > 0) { 4584 //user hit enter while focusing on previous button 4585 _previousStep.call(self); 4586 } else if (target && target.className.indexOf('introjs-skipbutton') > 0) { 4587 //user hit enter while focusing on skip button 4588 if (self._introItems.length - 1 == self._currentStep && typeof (self._introCompleteCallback) === 'function') { 4589 self._introCompleteCallback.call(self); 4590 } 4591 //check if any callback is defined 4592 if (self._introExitCallback != undefined) { 4593 self._introExitCallback.call(self); 4594 } 4595 _exitIntro.call(self, targetElm); 4596 } else { 4597 //default behavior for responding to enter 4598 _nextStep.call(self); 4599 } 4600 4601 //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers 4602 if(e.preventDefault) { 4603 e.preventDefault(); 4604 } else { 4605 e.returnValue = false; 4606 } 4607 } 4608 }; 4609 4610 self._onResize = function(e) { 4611 _setHelperLayerPosition.call(self, document.querySelector('.introjs-helperLayer')); 4612 _setHelperLayerPosition.call(self, document.querySelector('.introjs-tooltipReferenceLayer')); 4613 }; 4614 4615 if (window.addEventListener) { 4616 if (this._options.keyboardNavigation) { 4617 window.addEventListener('keydown', self._onKeyDown, true); 4618 } 4619 //for window resize 4620 window.addEventListener('resize', self._onResize, true); 4621 } else if (document.attachEvent) { //IE 4622 if (this._options.keyboardNavigation) { 4623 document.attachEvent('onkeydown', self._onKeyDown); 4624 } 4625 //for window resize 4626 document.attachEvent('onresize', self._onResize); 4627 } 4628 } 4629 return false; 4630 } 4631 4632 /* 4633 * makes a copy of the object 4634 * @api private
4635 * @method _cloneObject 4636 */ 4637 function _cloneObject(object) { 4638 if (object == null || typeof (object) != 'object' || typeof (object.nodeType) != 'undefined') { 4639 return object; 4640 } 4641 var temp = {}; 4642 for (var key in object) { 4643 if (typeof (jQuery) != 'undefined' && object[key] instanceof jQuery) { 4644 temp[key] = object[key]; 4645 } else { 4646 temp[key] = _cloneObject(object[key]); 4647 } 4648 } 4649 return temp; 4650 } 4651 /** 4652 * Go to specific step of introduction 4653 * 4654 * @api private 4655 * @method _goToStep 4656 */ 4657 function _goToStep(step) { 4658 //because steps starts with zero 4659 this._currentStep = step - 2; 4660 if (typeof (this._introItems) !== 'undefined') { 4661 _nextStep.call(this); 4662 } 4663 } 4664 4665 /** 4666 * Go to next step on intro 4667 * 4668 * @api private 4669 * @method _nextStep 4670 */ 4671 function _nextStep() { 4672 this._direction = 'forward'; 4673 4674 if (typeof (this._currentStep) === 'undefined') { 4675 this._currentStep = 0; 4676 } else { 4677 ++this._currentStep; 4678 } 4679 4680 if ((this._introItems.length) <= this._currentStep) { 4681 //end of the intro 4682 //check if any callback is defined 4683 if (typeof (this._introCompleteCallback) === 'function') { 4684 this._introCompleteCallback.call(this); 4685 } 4686 _exitIntro.call(this, this._targetElement); 4687 return; 4688 } 4689 4690 var nextStep = this._introItems[this._currentStep]; 4691 if (typeof (this._introBeforeChangeCallback) !== 'undefined') { 4692 this._introBeforeChangeCallback.call(this, nextStep.element); 4693 } 4694 4695 _showElement.call(this, nextStep); 4696 } 4697 4698 /** 4699 * Go to previous step on intro 4700 * 4701 * @api private 4702 * @method _nextStep 4703 */ 4704 function _previousStep() { 4705 this._direction = 'backward'; 4706 4707 if (this._currentStep === 0) { 4708 return false; 4709 } 4710 4711 var nextStep = this._introItems[--this._currentStep]; 4712 if (typeof (this._introBeforeChangeCallback) !== 'undefined') { 4713 this._introBeforeChangeCallback.call(this, nextStep.element); 4714 } 4715 4716 _showElement.call(this, nextStep); 4717 } 4718 4719 /** 4720 * Exit from intro 4721 * 4722 * @api private 4723 * @method _exitIntro 4724 * @param {Object} targetElement 4725 */ 4726 function _exitIntro(targetElement) { 4727 //remove overlay layers from the page 4728 var overlayLayers = targetElement.querySelectorAll('.introjs-overlay'); 4729 4730 if (overlayLayers && overlayLayers.length > 0) { 4731 for (var i = overlayLayers.length - 1; i >= 0; i--) { 4732 //for fade-out animation 4733 var overlayLayer = overlayLayers[i]; 4734 overlayLayer.style.opacity = 0; 4735 setTimeout(function () { 4736 if (this.parentNode) { 4737 this.parentNode.removeChild(this); 4738 } 4739 }.bind(overlayLayer), 500); 4740 }; 4741 } 4742 4743 //remove all helper layers 4744 var helperLayer = targetElement.querySelector('.introjs-helperLayer'); 4745 if (helperLayer) { 4746 helperLayer.parentNode.removeChild(helperLayer); 4747 } 4748 4749 var referenceLayer = targetElement.querySelector('.introjs-tooltipReferenceLayer'); 4750 if (referenceLayer) { 4751 referenceLayer.parentNode.removeChild(referenceLayer); 4752 } 4753 //remove disableInteractionLayer 4754 var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction'); 4755 if (disableInteractionLayer) { 4756 disableInteractionLayer.parentNode.removeChild(disableInteractionLayer); 4757 } 4758 4759 //remove intro floating element 4760 var floatingElement = document.querySelector('.introjsFloatingElement'); 4761 if (floatingElement) { 4762 floatingElement.parentNode.removeChild(floatingElement); 4763 } 4764 4765 //remove `introjs-showElement` class from the element 4766 var showElement = document.querySelector('.introjs-showElement'); 4767 if (showElement) { 4768 showElement.className = showElement.className.replace(/introjs-[a-zA-Z]+/g, '').replace(/^\s+|\s+$/g, ''); // This is a manual trim. 4769 } 4770 4771 //remove `introjs-fixParent` class from the elements 4772 var fixParents = document.querySelectorAll('.introjs-fixParent'); 4773 if (fixParents && fixParents.length > 0) { 4774 for (var i = fixParents.length - 1; i >= 0; i--) { 4775 fixParents[i].className = fixParents[i].className.replace(/introjs-fixParent/g, '').replace(/^\s+|\s+$/g, ''); 4776 } 4777 } 4778 4779 //clean listeners 4780 if (window.removeEventListener) { 4781 window.removeEventListener('keydown', this._onKeyDown, true); 4782 } else if (document.detachEvent) { //IE 4783 document.detachEvent('onkeydown', this._onKeyDown); 4784 } 4785 4786 //set the step to zero 4787 this._currentStep = undefined; 4788 } 4789 4790 /** 4791 * Render tooltip box in the page 4792 * 4793 * @api private 4794 * @method _placeTooltip 4795 * @param {HTMLElement} targetElement 4796 * @param {HTMLElement} tooltipLayer 4797 * @param {HTMLElement} arrowLayer 4798 * @param {HTMLElement} helperNumberLayer 4799 * @param {Boolean} hintMode 4800 */ 4801 function _placeTooltip(targetElement, tooltipLayer, arrowLayer, helperNumberLayer, hintMode) { 4802 var tooltipCssClass = '', 4803 currentStepObj, 4804 tooltipOffset, 4805 targetOffset, 4806 windowSize, 4807 currentTooltipPosition; 4808 4809 hintMode = hintMode || false; 4810 4811 //reset the old style 4812 tooltipLayer.style.top = null; 4813 tooltipLayer.style.right = null; 4814 tooltipLayer.style.bottom = null; 4815 tooltipLayer.style.left = null; 4816 tooltipLayer.style.marginLeft = null; 4817 tooltipLayer.style.marginTop = null; 4818 4819 arrowLayer.style.display = 'inherit'; 4820 4821 if (typeof(helperNumberLayer) != 'undefined' && helperNumberLayer != null) { 4822 helperNumberLayer.style.top = null; 4823 helperNumberLayer.style.left = null; 4824 } 4825 4826 //prevent error when `this._currentStep` is undefined 4827 if (!this._introItems[this._currentStep]) return; 4828 4829 //if we have a custom css class for each step 4830 currentStepObj = this._introItems[this._currentStep]; 4831 if (typeof (currentStepObj.tooltipClass) === 'string') { 4832 tooltipCssClass = currentStepObj.tooltipClass; 4833 } else { 4834 tooltipCssClass = this._options.tooltipClass; 4835 } 4836 4837 tooltipLayer.className = ('introjs-tooltip ' + tooltipCssClass).replace(/^\s+|\s+$/g, ''); 4838 4839 currentTooltipPosition = this._introItems[this._currentStep].position; 4840 if ((currentTooltipPosition == "auto" || this._options.tooltipPosition == "auto")) { 4841 if (currentTooltipPosition != "floating") { // Floating is always valid, no point in calculating 4842 currentTooltipPosition = _determineAutoPosition.call(this, targetElement, tooltipLayer, currentTooltipPosition); 4843 } 4844 } 4845 targetOffset = _getOffset(targetElement); 4846 tooltipOffset = _getOffset(tooltipLayer); 4847 windowSize = _getWinSize(); 4848 4849 switch (currentTooltipPosition) { 4850 case 'top': 4851 arrowLayer.className = 'introjs-arrow bottom'; 4852 4853 if (hintMode) { 4854 var tooltipLayerStyleLeft = 0; 4855 } else { 4856 var tooltipLayerStyleLeft = 15; 4857 } 4858 4859 _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer); 4860 tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px'; 4861 break; 4862 case 'right': 4863 tooltipLayer.style.left = (targetOffset.width + 20) + 'px'; 4864 if (targetOffset.top + tooltipOffset.height > windowSize.height) { 4865 // In this case, right would have fallen below the bottom of the screen. 4866 // Modify so that the bottom of the tooltip connects with the target 4867 arrowLayer.className = "introjs-arrow left-bottom"; 4868 tooltipLayer.style.top = "-" + (tooltipOffset.height - targetOffset.height - 20) + "px"; 4869 } else { 4870 arrowLayer.className = 'introjs-arrow left'; 4871 } 4872 break; 4873 case 'left': 4874 if (!hintMode && this._options.showStepNumbers == true) { 4875 tooltipLayer.style.top = '15px'; 4876 } 4877 4878 if (targetOffset.top + tooltipOffset.height > windowSize.height) { 4879 // In this case, left would have fallen below the bottom of the screen. 4880 // Modify so that the bottom of the tooltip connects with the target 4881 tooltipLayer.style.top = "-" + (tooltipOffset.height - targetOffset.height - 20) + "px"; 4882 arrowLayer.className = 'introjs-arrow right-bottom'; 4883 } else { 4884 arrowLayer.className = 'introjs-arrow right'; 4885 } 4886 tooltipLayer.style.right = (targetOffset.width + 20) + 'px'; 4887 4888 break; 4889 case 'floating': 4890 arrowLayer.style.display = 'none'; 4891 4892 //we have to adjust the top and left of layer manually for intro items without element 4893 tooltipLayer.style.left = '50%'; 4894 tooltipLayer.style.top = '50%'; 4895 tooltipLayer.style.marginLeft = '-' + (tooltipOffset.width / 2) + 'px'; 4896 tooltipLayer.style.marginTop = '-' + (tooltipOffset.height / 2) + 'px'; 4897 4898 if (typeof(helperNumberLayer) != 'undefined' && helperNumberLayer != null) { 4899 helperNumberLayer.style.left = '-' + ((tooltipOffset.width / 2) + 18) + 'px'; 4900 helperNumberLayer.style.top = '-' + ((tooltipOffset.height / 2) + 18) + 'px'; 4901 } 4902 4903 break; 4904 case 'bottom-right-aligned': 4905 arrowLayer.className = 'introjs-arrow top-right'; 4906 4907 var tooltipLayerStyleRight = 0; 4908 _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer); 4909 tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; 4910 break; 4911 4912 case 'bottom-middle-aligned': 4913 arrowLayer.className = 'introjs-arrow top-middle'; 4914 4915 var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; 4916 4917 // a fix for middle aligned hints 4918 if (hintMode) { 4919 tooltipLayerStyleLeftRight += 5; 4920 } 4921 4922 if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) { 4923 tooltipLayer.style.right = null; 4924 _checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer); 4925 } 4926 tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; 4927 break; 4928 4929 case 'bottom-left-aligned': 4930 // Bottom-left-aligned is the same as the default bottom 4931 case 'bottom': 4932 // Bottom going to follow the default behavior 4933 default: 4934 arrowLayer.className = 'introjs-arrow top'; 4935 4936 var tooltipLayerStyleLeft = 0; 4937 _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer); 4938 tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; 4939 break; 4940 } 4941 } 4942 4943 /** 4944 * Set tooltip left so it doesn't go off the right side of the window 4945 * 4946 * @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise. 4947 */ 4948 function _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) { 4949 if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) { 4950 // off the right side of the window 4951 tooltipLayer.style.left = (windowSize.width - tooltipOffset.width - targetOffset.left) + 'px'; 4952 return false; 4953 } 4954 tooltipLayer.style.left = tooltipLayerStyleLeft + 'px'; 4955 return true; 4956 } 4957 4958 /** 4959 * Set tooltip right so it doesn't go off the left side of the window 4960 * 4961 * @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise. 4962 */ 4963 function _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer) { 4964 if (targetOffset.left + targetOffset.width - tooltipLayerStyleRight - tooltipOffset.width < 0) { 4965 // off the left side of the window 4966 tooltipLayer.style.left = (-targetOffset.left) + 'px'; 4967 return false; 4968 } 4969 tooltipLayer.style.right = tooltipLayerStyleRight + 'px'; 4970 return true; 4971 } 4972 4973 /** 4974 * Determines the position of the tooltip based on the position precedence and availability 4975 * of screen space. 4976 * 4977 * @param {Object} targetElement 4978 * @param {Object} tooltipLayer 4979 * @param {Object} desiredTooltipPosition 4980 * 4981 */ 4982 function _determineAutoPosition(targetElement, tooltipLayer, desiredTooltipPosition) { 4983
4984 // Take a clone of position precedence. These will be the available 4985 var possiblePositions = this._options.positionPrecedence.slice(); 4986 4987 var windowSize = _getWinSize(); 4988 var tooltipHeight = _getOffset(tooltipLayer).height + 10; 4989 var tooltipWidth = _getOffset(tooltipLayer).width + 20; 4990 var targetOffset = _getOffset(targetElement); 4991 4992 // If we check all the possible areas, and there are no valid places for the tooltip, the element 4993 // must take up most of the screen real estate. Show the tooltip floating in the middle of the screen. 4994 var calculatedPosition = "floating"; 4995 4996 // Check if the width of the tooltip + the starting point would spill off the right side of the screen 4997 // If no, neither bottom or top are valid 4998 if (targetOffset.left + tooltipWidth > windowSize.width || ((targetOffset.left + (targetOffset.width / 2)) - tooltipWidth) < 0) { 4999 _removeEntry(possiblePositions, "bottom"); 5000 _removeEntry(possiblePositions, "top"); 5001 } else { 5002 // Check for space below 5003 if ((targetOffset.height + targetOffset.top + tooltipHeight) > windowSize.height) { 5004 _removeEntry(possiblePositions, "bottom"); 5005 } 5006 5007 // Check for space above 5008 if (targetOffset.top - tooltipHeight < 0) { 5009 _removeEntry(possiblePositions, "top"); 5010 } 5011 } 5012 5013 // Check for space to the right 5014 if (targetOffset.width + targetOffset.left + tooltipWidth > windowSize.width) { 5015 _removeEntry(possiblePositions, "right"); 5016 } 5017 5018 // Check for space to the left 5019 if (targetOffset.left - tooltipWidth < 0) { 5020 _removeEntry(possiblePositions, "left"); 5021 } 5022 5023 // At this point, our array only has positions that are valid. Pick the first one, as it remains in order 5024 if (possiblePositions.length > 0) { 5025 calculatedPosition = possiblePositions[0]; 5026 } 5027 5028 // If the requested position is in the list, replace our calculated choice with that 5029 if (desiredTooltipPosition && desiredTooltipPosition != "auto") { 5030 if (possiblePositions.indexOf(desiredTooltipPosition) > -1) { 5031 calculatedPosition = desiredTooltipPosition; 5032 } 5033 } 5034 5035 return calculatedPosition; 5036 } 5037 5038 /** 5039 * Remove an entry from a string array if it's there, does nothing if it isn't there. 5040 * 5041 * @param {Array} stringArray 5042 * @param {String} stringToRemove 5043 */ 5044 function _removeEntry(stringArray, stringToRemove) { 5045 if (stringArray.indexOf(stringToRemove) > -1) { 5046 stringArray.splice(stringArray.indexOf(stringToRemove), 1); 5047 } 5048 } 5049 5050 /** 5051 * Update the position of the helper layer on the screen 5052 * 5053 * @api private 5054 * @method _setHelperLayerPosition 5055 * @param {Object} helperLayer 5056 */ 5057 function _setHelperLayerPosition(helperLayer) { 5058 if (helperLayer) { 5059 //prevent error when `this._currentStep` in undefined 5060 if (!this._introItems[this._currentStep]) return; 5061 5062 var currentElement = this._introItems[this._currentStep], 5063 elementPosition = _getOffset(currentElement.element), 5064 widthHeightPadding = 10; 5065 5066 // If the target element is fixed, the tooltip should be fixed as well. 5067 // Otherwise, remove a fixed class that may be left over from the previous 5068 // step. 5069 if (_isFixed(currentElement.element)) { 5070 helperLayer.className += ' introjs-fixedTooltip'; 5071 } else { 5072 helperLayer.className = helperLayer.className.replace(' introjs-fixedTooltip', ''); 5073 } 5074 5075 if (currentElement.position == 'floating') { 5076 widthHeightPadding = 0; 5077 } 5078 5079 //set new position to helper layer 5080 helperLayer.setAttribute('style', 'width: ' + (elementPosition.width + widthHeightPadding) + 'px; ' + 5081 'height:' + (elementPosition.height + widthHeightPadding) + 'px; ' + 5082 'top:' + (elementPosition.top - 5) + 'px;' + 5083 'left: ' + (elementPosition.left - 5) + 'px;'); 5084 5085 } 5086 } 5087 5088 /** 5089 * Add disableinteraction layer and adjust the size and position of the layer 5090 * 5091 * @api private 5092 * @method _disableInteraction 5093 */ 5094 function _disableInteraction() { 5095 var disableInteractionLayer = document.querySelector('.introjs-disableInteraction'); 5096 if (disableInteractionLayer === null) { 5097 disableInteractionLayer = document.createElement('div'); 5098 disableInteractionLayer.className = 'introjs-disableInteraction'; 5099 this._targetElement.appendChild(disableInteractionLayer); 5100 } 5101 5102 _setHelperLayerPosition.call(this, disableInteractionLayer); 5103 } 5104 5105 /** 5106 * Setting anchors to behave like buttons 5107 * 5108 * @api private 5109 * @method _setAnchorAsButton 5110 */ 5111 function _setAnchorAsButton(anchor){ 5112 anchor.setAttribute('role', 'button'); 5113 anchor.tabIndex = 0; 5114 } 5115 5116 /** 5117 * Show an element on the page 5118 * 5119 * @api private 5120 * @method _showElement 5121 * @param {Object} targetElement 5122 */ 5123 function _showElement(targetElement) { 5124 if (typeof (this._introChangeCallback) !== 'undefined') { 5125 this._introChangeCallback.call(this, targetElement.element); 5126 } 5127 5128 var self = this, 5129 oldHelperLayer = document.querySelector('.introjs-helperLayer'), 5130 oldReferenceLayer = document.querySelector('.introjs-tooltipReferenceLayer'), 5131 highlightClass = 'introjs-helperLayer', 5132 elementPosition = _getOffset(targetElement.element); 5133 5134 //check for a current step highlight class 5135 if (typeof (targetElement.highlightClass) === 'string') { 5136 highlightClass += (' ' + targetElement.highlightClass); 5137 } 5138 //check for options highlight class 5139 if (typeof (this._options.highlightClass) === 'string') { 5140 highlightClass += (' ' + this._options.highlightClass); 5141 } 5142 5143 if (oldHelperLayer != null) {
5144 var oldHelperNumberLayer = oldReferenceLayer.querySelector('.introjs-helperNumberLayer'), 5145 oldtooltipLayer = oldReferenceLayer.querySelector('.introjs-tooltiptext'), 5146 oldArrowLayer = oldReferenceLayer.querySelector('.introjs-arrow'), 5147 oldtooltipContainer = oldReferenceLayer.querySelector('.introjs-tooltip'), 5148 skipTooltipButton = oldReferenceLayer.querySelector('.introjs-skipbutton'), 5149 prevTooltipButton = oldReferenceLayer.querySelector('.introjs-prevbutton'), 5150 nextTooltipButton = oldReferenceLayer.querySelector('.introjs-nextbutton'); 5151 5152 //update or reset the helper highlight class 5153 oldHelperLayer.className = highlightClass; 5154 //hide the tooltip 5155 oldtooltipContainer.style.opacity = 0; 5156 oldtooltipContainer.style.display = "none"; 5157 5158 if (oldHelperNumberLayer != null) { 5159 var lastIntroItem = this._introItems[(targetElement.step - 2 >= 0 ? targetElement.step - 2 : 0)]; 5160 5161 if (lastIntroItem != null && (this._direction == 'forward' && lastIntroItem.position == 'floating') || (this._direction == 'backward' && targetElement.position == 'floating')) { 5162 oldHelperNumberLayer.style.opacity = 0; 5163 } 5164 } 5165 5166 //set new position to helper layer 5167 _setHelperLayerPosition.call(self, oldHelperLayer); 5168 _setHelperLayerPosition.call(self, oldReferenceLayer); 5169 5170 //remove `introjs-fixParent` class from the elements 5171 var fixParents = document.querySelectorAll('.introjs-fixParent'); 5172 if (fixParents && fixParents.length > 0) { 5173 for (var i = fixParents.length - 1; i >= 0; i--) { 5174 fixParents[i].className = fixParents[i].className.replace(/introjs-fixParent/g, '').replace(/^\s+|\s+$/g, ''); 5175 }; 5176 } 5177 5178 //remove old classes if the element still exist 5179 var oldShowElement = document.querySelector('.introjs-showElement'); 5180 if(oldShowElement) { 5181 oldShowElement.className = oldShowElement.className.replace(/introjs-[a-zA-Z]+/g, '').replace(/^\s+|\s+$/g, ''); 5182 } 5183 5184 //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation 5185 if (self._lastShowElementTimer) { 5186 clearTimeout(self._lastShowElementTimer); 5187 } 5188 self._lastShowElementTimer = setTimeout(function() { 5189 //set current step to the label 5190 if (oldHelperNumberLayer != null) { 5191 oldHelperNumberLayer.innerHTML = targetElement.step; 5192 } 5193 //set current tooltip text 5194 oldtooltipLayer.innerHTML = targetElement.intro; 5195 //set the tooltip position 5196 oldtooltipContainer.style.display = "block"; 5197 _placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer); 5198 5199 //change active bullet 5200 if (self._options.showBullets) { 5201 oldReferenceLayer.querySelector('.introjs-bullets li > a.active').className = ''; 5202 oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber="' + targetElement.step + '"]').className = 'active'; 5203 } 5204 oldReferenceLayer.querySelector('.introjs-progress .introjs-progressbar').setAttribute('style', 'width:' + _getProgress.call(self) + '%;'); 5205 5206 //show the tooltip 5207 oldtooltipContainer.style.opacity = 1; 5208 if (oldHelperNumberLayer) oldHelperNumberLayer.style.opacity = 1; 5209 5210 //reset button focus 5211 if (nextTooltipButton.tabIndex === -1) { 5212 //tabindex of -1 means we are at the end of the tour - focus on skip / done 5213 skipTooltipButton.focus(); 5214 } else { 5215 //still in the tour, focus on next 5216 nextTooltipButton.focus(); 5217 } 5218 }, 350); 5219 5220 } else { 5221 var helperLayer = document.createElement('div'), 5222 referenceLayer = document.createElement('div'), 5223 arrowLayer = document.createElement('div'), 5224 tooltipLayer = document.createElement('div'), 5225 tooltipTextLayer = document.createElement('div'), 5226 bulletsLayer = document.createElement('div'), 5227 progressLayer = document.createElement('div'), 5228 buttonsLayer = document.createElement('div'); 5229 5230 helperLayer.className = highlightClass; 5231 referenceLayer.className = 'introjs-tooltipReferenceLayer'; 5232 5233 //set new position to helper layer 5234 _setHelperLayerPosition.call(self, helperLayer); 5235 _setHelperLayerPosition.call(self, referenceLayer); 5236 5237 //add helper layer to target element 5238 this._targetElement.appendChild(helperLayer); 5239 this._targetElement.appendChild(referenceLayer); 5240 5241 arrowLayer.className = 'introjs-arrow'; 5242 5243 tooltipTextLayer.className = 'introjs-tooltiptext'; 5244 tooltipTextLayer.innerHTML = targetElement.intro; 5245 5246 bulletsLayer.className = 'introjs-bullets'; 5247 5248 if (this._options.showBullets === false) { 5249 bulletsLayer.style.display = 'none'; 5250 } 5251 5252 var ulContainer = document.createElement('ul'); 5253 5254 for (var i = 0, stepsLength = this._introItems.length; i < stepsLength; i++) { 5255 var innerLi = document.createElement('li'); 5256 var anchorLink = document.createElement('a'); 5257 5258 anchorLink.onclick = function() { 5259 self.goToStep(this.getAttribute('data-stepnumber')); 5260 }; 5261 5262 if (i === (targetElement.step-1)) anchorLink.className = 'active'; 5263 5264 _setAnchorAsButton(anchorLink); 5265 anchorLink.innerHTML = " "; 5266 anchorLink.setAttribute('data-stepnumber', this._introItems[i].step); 5267 5268 innerLi.appendChild(anchorLink); 5269 ulContainer.appendChild(innerLi); 5270 } 5271 5272 bulletsLayer.appendChild(ulContainer); 5273 5274 progressLayer.className = 'introjs-progress'; 5275 5276 if (this._options.showProgress === false) { 5277 progressLayer.style.display = 'none'; 5278 } 5279 var progressBar = document.createElement('div'); 5280 progressBar.className = 'introjs-progressbar'; 5281 progressBar.setAttribute('style', 'width:' + _getProgress.call(this) + '%;'); 5282 5283 progressLayer.appendChild(progressBar); 5284 5285 buttonsLayer.className = 'introjs-tooltipbuttons'; 5286 if (this._options.showButtons === false) { 5287 buttonsLayer.style.display = 'none'; 5288 } 5289 5290 tooltipLayer.className = 'introjs-tooltip'; 5291 tooltipLayer.appendChild(tooltipTextLayer); 5292 tooltipLayer.appendChild(bulletsLayer); 5293 tooltipLayer.appendChild(progressLayer); 5294 5295 //add helper layer number 5296 if (this._options.showStepNumbers == true) { 5297 var helperNumberLayer = document.createElement('span');
5298 helperNumberLayer.className = 'introjs-helperNumberLayer'; 5299 helperNumberLayer.innerHTML = targetElement.step; 5300 referenceLayer.appendChild(helperNumberLayer); 5301 } 5302 5303 tooltipLayer.appendChild(arrowLayer); 5304 referenceLayer.appendChild(tooltipLayer); 5305 5306 //next button 5307 var nextTooltipButton = document.createElement('a'); 5308 5309 nextTooltipButton.onclick = function() { 5310 if (self._introItems.length - 1 != self._currentStep) { 5311 _nextStep.call(self); 5312 } 5313 }; 5314 5315 _setAnchorAsButton(nextTooltipButton); 5316 nextTooltipButton.innerHTML = this._options.nextLabel; 5317 5318 //previous button 5319 var prevTooltipButton = document.createElement('a'); 5320 5321 prevTooltipButton.onclick = function() { 5322 if (self._currentStep != 0) { 5323 _previousStep.call(self); 5324 } 5325 }; 5326 5327 _setAnchorAsButton(prevTooltipButton); 5328 prevTooltipButton.innerHTML = this._options.prevLabel; 5329 5330 //skip button 5331 var skipTooltipButton = document.createElement('a'); 5332 skipTooltipButton.className = 'introjs-button introjs-skipbutton'; 5333 _setAnchorAsButton(skipTooltipButton); 5334 skipTooltipButton.innerHTML = this._options.skipLabel; 5335 5336 skipTooltipButton.onclick = function() { 5337 if (self._introItems.length - 1 == self._currentStep && typeof (self._introCompleteCallback) === 'function') { 5338 self._introCompleteCallback.call(self); 5339 } 5340 5341 if (self._introItems.length - 1 != self._currentStep && typeof (self._introExitCallback) === 'function') { 5342 self._introExitCallback.call(self); 5343 } 5344 5345 _exitIntro.call(self, self._targetElement); 5346 }; 5347 5348 buttonsLayer.appendChild(skipTooltipButton); 5349 5350 //in order to prevent displaying next/previous button always 5351 if (this._introItems.length > 1) { 5352 buttonsLayer.appendChild(prevTooltipButton); 5353 buttonsLayer.appendChild(nextTooltipButton); 5354 } 5355 5356 tooltipLayer.appendChild(buttonsLayer); 5357 5358 //set proper position 5359 _placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer, helperNumberLayer); 5360 } 5361 5362 //disable interaction 5363 if (this._options.disableInteraction === true) { 5364 _disableInteraction.call(self); 5365 } 5366 5367 prevTooltipButton.removeAttribute('tabIndex'); 5368 nextTooltipButton.removeAttribute('tabIndex'); 5369 5370 if (this._currentStep == 0 && this._introItems.length > 1) { 5371 nextTooltipButton.className = 'introjs-button introjs-nextbutton'; 5372 5373 if (this._options.hidePrev == true) { 5374 prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-hidden'; 5375 nextTooltipButton.className += ' introjs-fullbutton'; 5376 } else { 5377 prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; 5378 } 5379 5380 prevTooltipButton.tabIndex = '-1'; 5381 skipTooltipButton.innerHTML = this._options.skipLabel; 5382 } else if (this._introItems.length - 1 == this._currentStep || this._introItems.length == 1) { 5383 skipTooltipButton.innerHTML = this._options.doneLabel; 5384 prevTooltipButton.className = 'introjs-button introjs-prevbutton'; 5385 5386 if (this._options.hideNext == true) { 5387 nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-hidden'; 5388 prevTooltipButton.className += ' introjs-fullbutton'; 5389 } else { 5390 nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; 5391 } 5392 5393 nextTooltipButton.tabIndex = '-1'; 5394 } else { 5395 prevTooltipButton.className = 'introjs-button introjs-prevbutton'; 5396 nextTooltipButton.className = 'introjs-button introjs-nextbutton'; 5397 skipTooltipButton.innerHTML = this._options.skipLabel; 5398 } 5399 5400 //Set focus on "next" button, so that hitting Enter always moves you onto the next step 5401 nextTooltipButton.focus(); 5402 5403 //add target element position style 5404 targetElement.element.className += ' introjs-showElement'; 5405 5406 var currentElementPosition = _getPropValue(targetElement.element, 'position'); 5407 if (currentElementPosition !== 'absolute' && 5408 currentElementPosition !== 'relative' && 5409 currentElementPosition !== 'fixed') { 5410 //change to new intro item 5411 targetElement.element.className += ' introjs-relativePosition'; 5412 } 5413 5414 var parentElm = targetElement.element.parentNode; 5415 while (parentElm != null) { 5416 if (!parentElm.tagName || parentElm.tagName.toLowerCase() === 'body') break; 5417 5418 //fix The Stacking Context problem. 5419 //More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context 5420 var zIndex = _getPropValue(parentElm, 'z-index'); 5421 var opacity = parseFloat(_getPropValue(parentElm, 'opacity')); 5422 var transform = _getPropValue(parentElm, 'transform') || _getPropValue(parentElm, '-webkit-transform') || _getPropValue(parentElm, '-moz-transform') || _getPropValue(parentElm, '-ms-transform') || _getPropValue(parentElm, '-o-transform'); 5423 if (/[0-9]+/.test(zIndex) || opacity < 1 || (transform !== 'none' && transform !== undefined)) { 5424 parentElm.className += ' introjs-fixParent'; 5425 } 5426 5427 parentElm = parentElm.parentNode; 5428 } 5429 5430 if (!_elementInViewport(targetElement.element) && this._options.scrollToElement === true) { 5431 var rect = targetElement.element.getBoundingClientRect(), 5432 winHeight = _getWinSize().height, 5433 top = rect.bottom - (rect.bottom - rect.top), 5434 bottom = rect.bottom - winHeight; 5435 5436 //Scroll up 5437 if (top < 0 || targetElement.element.clientHeight > winHeight) { 5438 window.scrollBy(0, top - this._options.scrollPadding); // 30px padding from edge to look nice 5439 5440 //Scroll down 5441 } else { 5442 window.scrollBy(0, bottom + 70 + this._options.scrollPadding); // 70px + 30px padding from edge to look nice 5443 } 5444 } 5445 5446 if (typeof (this._introAfterChangeCallback) !== 'undefined') { 5447 this._introAfterChangeCallback.call(this, targetElement.element); 5448 } 5449 } 5450 5451 /** 5452 * Get an element CSS property on the page 5453 * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml 5454 * 5455 * @api private 5456 * @method _getPropValue 5457 * @param {Object} element 5458 * @param {String} propName 5459 * @returns Element's property value 5460 */ 5461 function _getPropValue (element, propName) { 5462 var propValue = ''; 5463 if (element.currentStyle) { //IE 5464 propValue = element.currentStyle[propName]; 5465 } else if (document.defaultView && document.defaultView.getComputedStyle) { //Others 5466 propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName); 5467 } 5468 5469 //Prevent exception in IE 5470 if (propValue && propValue.toLowerCase) { 5471 return propValue.toLowerCase(); 5472 } else { 5473 return propValue; 5474 } 5475 }; 5476 5477 /** 5478 * Checks to see if target element (or parents) position is fixed or not 5479 * 5480 * @api private 5481 * @method _isFixed 5482 * @param {Object} element 5483 * @returns Boolean 5484 */ 5485 function _isFixed (element) { 5486 var p = element.parentNode; 5487 5488 if (!p || p.nodeName === 'HTML') { 5489 return false; 5490 } 5491 5492 if (_getPropValue(element, 'position') == 'fixed') { 5493 return true; 5494 } 5495 5496 return _isFixed(p); 5497 }; 5498 5499 /** 5500 * Provides a cross-browser way to get the screen dimensions 5501 * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight 5502 * 5503 * @api private 5504 * @method _getWinSize 5505 * @returns {Object} width and height attributes 5506 */ 5507 function _getWinSize() { 5508 if (window.innerWidth != undefined) { 5509 return { width: window.innerWidth, height: window.innerHeight }; 5510 } else { 5511 var D = document.documentElement; 5512 return { width: D.clientWidth, height: D.clientHeight }; 5513 } 5514 } 5515 5516 /** 5517 * Check to see if the element is in the viewport or not 5518 * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport 5519 * 5520 * @api private 5521 * @method _elementInViewport 5522 * @param {Object} el 5523 */ 5524 function _elementInViewport(el) { 5525 var rect = el.getBoundingClientRect(); 5526 5527 return ( 5528 rect.top >= 0 && 5529 rect.left >= 0 && 5530 (rect.bottom+80) <= window.innerHeight && // add 80 to get the text right 5531 rect.right <= window.innerWidth 5532 ); 5533 } 5534 5535 /** 5536 * Add overlay layer to the page 5537 * 5538 * @api private 5539 * @method _addOverlayLayer 5540 * @param {Object} targetElm 5541 */ 5542 function _addOverlayLayer(targetElm) { 5543 var overlayLayer = document.createElement('div'), 5544 styleText = '', 5545 self = this; 5546 5547 //set css class name 5548 overlayLayer.className = 'introjs-overlay'; 5549 5550 //check if the target element is body, we should calculate the size of overlay layer in a better way 5551 if (!targetElm.tagName || targetElm.tagName.toLowerCase() === 'body') { 5552 styleText += 'top: 0;bottom: 0; left: 0;right: 0;position: fixed;'; 5553 overlayLayer.setAttribute('style', styleText); 5554 } else { 5555 //set overlay layer position 5556 var elementPosition = _getOffset(targetElm); 5557 if (elementPosition) { 5558 styleText += 'width: ' + elementPosition.width + 'px; height:' + elementPosition.height + 'px;
5558 top:' + elementPosition.top + 'px;left: ' + elementPosition.left + 'px;'; 5559 overlayLayer.setAttribute('style', styleText); 5560 } 5561 } 5562 5563 targetElm.appendChild(overlayLayer); 5564 5565 overlayLayer.onclick = function() { 5566 if (self._options.exitOnOverlayClick == true) { 5567 5568 //check if any callback is defined 5569 if (self._introExitCallback != undefined) { 5570 self._introExitCallback.call(self); 5571 } 5572 _exitIntro.call(self, targetElm); 5573 } 5574 }; 5575 5576 setTimeout(function() { 5577 styleText += 'opacity: ' + self._options.overlayOpacity.toString() + ';'; 5578 overlayLayer.setAttribute('style', styleText); 5579 }, 10); 5580 5581 return true; 5582 }; 5583 5584 /** 5585 * Removes open hint (tooltip hint) 5586 * 5587 * @api private 5588 * @method _removeHintTooltip 5589 */ 5590 function _removeHintTooltip() { 5591 var tooltip = this._targetElement.querySelector('.introjs-hintReference'); 5592 5593 if (tooltip) { 5594 var step = tooltip.getAttribute('data-step'); 5595 tooltip.parentNode.removeChild(tooltip); 5596 return step; 5597 } 5598 }; 5599 5600 /** 5601 * Start parsing hint items 5602 * 5603 * @api private 5604 * @param {Object} targetElm 5605 * @method _startHint 5606 */ 5607 function _populateHints(targetElm) { 5608 var self = this; 5609 this._introItems = []; 5610 5611 if (this._options.hints) { 5612 for (var i = 0, l = this._options.hints.length; i < l; i++) { 5613 var currentItem = _cloneObject(this._options.hints[i]); 5614 5615 if (typeof(currentItem.element) === 'string') { 5616 //grab the element with given selector from the page 5617 currentItem.element = document.querySelector(currentItem.element); 5618 } 5619 5620 currentItem.hintPosition = currentItem.hintPosition || this._options.hintPosition; 5621 currentItem.hintAnimation = currentItem.hintAnimation || this._options.hintAnimation; 5622 5623 if (currentItem.element != null) { 5624 this._introItems.push(currentItem); 5625 } 5626 } 5627 } else { 5628 var hints = targetElm.querySelectorAll('*[data-hint]'); 5629 5630 if (hints.length < 1) { 5631 return false; 5632 } 5633 5634 //first add intro items with data-step 5635 for (var i = 0, l = hints.length; i < l; i++) { 5636 var currentElement = hints[i]; 5637 5638 // hint animation 5639 var hintAnimation = currentElement.getAttribute('data-hintAnimation'); 5640 5641 if (hintAnimation) { 5642 hintAnimation = (hintAnimation == 'true'); 5643 } else { 5644 hintAnimation = this._options.hintAnimation; 5645 } 5646 5647 this._introItems.push({ 5648 element: currentElement, 5649 hint: currentElement.getAttribute('data-hint'), 5650 hintPosition: currentElement.getAttribute('data-hintPosition') || this._options.hintPosition, 5651 hintAnimation: hintAnimation, 5652 tooltipClass: currentElement.getAttribute('data-tooltipClass'), 5653 position: currentElement.getAttribute('data-position') || this._options.tooltipPosition 5654 }); 5655 } 5656 } 5657 5658 _addHints.call(this); 5659 5660 if (document.addEventListener) { 5661 document.addEventListener('click', _removeHintTooltip.bind(this), false); 5662 //for window resize 5663 window.addEventListener('resize', _reAlignHints.bind(this), true); 5664 } else if (document.attachEvent) { //IE 5665 //for window resize 5666 document.attachEvent('onclick', _removeHintTooltip.bind(this)); 5667 document.attachEvent('onresize', _reAlignHints.bind(this)); 5668 } 5669 }; 5670 5671 /** 5672 * Re-aligns all hint elements 5673 * 5674 * @api private 5675 * @method _reAlignHints 5676 */ 5677 function _reAlignHints() { 5678 for (var i = 0, l = this._introItems.length; i < l; i++) { 5679 var item = this._introItems[i]; 5680 5681 if (typeof (item.targetElement) == 'undefined') continue; 5682 5683 _alignHintPosition.call(this, item.hintPosition, item.element, item.targetElement) 5684 } 5685 } 5686 5687 /** 5688 * Hide a hint 5689 * 5690 * @api private 5691 * @method _hideHint 5692 */ 5693 function _hideHint(stepId) { 5694 _removeHintTooltip.call(this); 5695 var hint = this._targetElement.querySelector('.introjs-hint[data-step="' + stepId + '"]'); 5696 5697 if (hint) { 5698 hint.className += ' introjs-hidehint'; 5699 } 5700 5701 // call the callback function (if any) 5702 if (typeof (this._hintCloseCallback) !== 'undefined') { 5703 this._hintCloseCallback.call(this, stepId); 5704 } 5705 }; 5706 5707 /** 5708 * Hide all hints 5709 * 5710 * @api private 5711 * @method _hideHints 5712 */ 5713 function _hideHints() { 5714 var hints = this._targetElement.querySelectorAll('.introjs-hint'); 5715 5716 if (hints && hints.length > 0) { 5717 for (var i = 0; i < hints.length; i++) { 5718 _hideHint.call(this, hints[i].getAttribute('data-step')); 5719 } 5720 } 5721 }; 5722 5723 /** 5724 * Show all hints 5725 * 5726 * @api private 5727 * @method _showHints 5728 */ 5729 function _showHints() { 5730 var hints = this._targetElement.querySelectorAll('.introjs-hint'); 5731 5732 if (hints && hints.length > 0) { 5733 for (var i = 0; i < hints.length; i++) { 5734 _showHint.call(this, hints[i].getAttribute('data-step')); 5735 } 5736 } else { 5737 _populateHints.call(this, this._targetElement); 5738 } 5739 }; 5740 5741 /** 5742 * Show a hint 5743 * 5744 * @api private 5745 * @method _showHint 5746 */ 5747 function _showHint(stepId) { 5748 var hint = this._targetElement.querySelector('.introjs-hint[data-step="' + stepId + '"]'); 5749 5750 if (hint) { 5751 hint.className = hint.className.replace(/introjs\-hidehint/g, ''); 5752 } 5753 }; 5754 5755 /** 5756 * Add all available hints to the page 5757 * 5758 * @api private 5759 * @method _addHints 5760 */ 5761 function _addHints() { 5762 var self = this; 5763 5764 var oldHintsWrapper = document.querySelector('.introjs-hints'); 5765 5766 if (oldHintsWrapper != null) { 5767 hintsWrapper = oldHintsWrapper; 5768 } else { 5769 var hintsWrapper = document.createElement('div'); 5770 hintsWrapper.className = 'introjs-hints'; 5771 } 5772 5773 for (var i = 0, l = this._introItems.length; i < l; i++) { 5774 var item = this._introItems[i]; 5775 5776 // avoid append a hint twice 5777 if (document.querySelector('.introjs-hint[data-step="' + i + '"]')) 5778 continue; 5779 5780 var hint = document.createElement('a'); 5781 _setAnchorAsButton(hint); 5782 5783 (function (hint, item, i) { 5784 // when user clicks on the hint element 5785 hint.onclick = function(e) { 5786 var evt = e ? e : window.event; 5787 if (evt.stopPropagation) evt.stopPropagation(); 5788 if (evt.cancelBubble != null) evt.cancelBubble = true; 5789 5790 _hintClick.call(self, hint, item, i); 5791 }; 5792 }(hint, item, i)); 5793 5794 hint.className = 'introjs-hint'; 5795 5796 if (!item.hintAnimation) { 5797 hint.className += ' introjs-hint-no-anim'; 5798 } 5799 5800 // hint's position should be fixed if the target element's position is fixed 5801 if (_isFixed(item.element)) { 5802 hint.className += ' introjs-fixedhint'; 5803 } 5804 5805 var hintDot = document.createElement('div'); 5806 hintDot.className = 'introjs-hint-dot'; 5807 var hintPulse = document.createElement('div'); 5808 hintPulse.className = 'introjs-hint-pulse'; 5809 5810 hint.appendChild(hintDot); 5811 hint.appendChild(hintPulse); 5812 hint.setAttribute('data-step', i); 5813 5814 // we swap the hint element with target element 5815 // because _setHelperLayerPosition uses `element` property 5816 item.targetElement = item.element; 5817 item.element = hint; 5818 5819 // align the hint position 5820 _alignHintPosition.call(this, item.hintPosition, hint, item.targetElement); 5821 5822 hintsWrapper.appendChild(hint); 5823 } 5824 5825 // adding the hints wrapper 5826 document.body.appendChild(hintsWrapper); 5827 5828 // call the callback function (if any) 5829 if (typeof (this._hintsAddedCallback) !== 'undefined') { 5830 this._hintsAddedCallback.call(this); 5831 } 5832 }; 5833 5834 /** 5835 * Aligns hint position 5836 * 5837 * @api private 5838 * @method _alignHintPosition 5839 * @param {String} position 5840 * @param {Object} hint 5841 * @param {Object} element 5842 */ 5843 function _alignHintPosition(position, hint, element) { 5844 // get/calculate offset of target element 5845 var offset = _getOffset.call(this, element); 5846 5847 // align the hint element 5848 switch (position) { 5849 default: 5850 case 'top-left': 5851 hint.style.left = offset.left + 'px'; 5852 hint.style.top = offset.top + 'px'; 5853 break; 5854 case 'top-right': 5855 hint.style.left = (offset.left + offset.width) + 'px'; 5856 hint.style.top = offset.top + 'px'; 5857 break; 5858 case 'bottom-left': 5859 hint.style.left = offset.left + 'px'; 5860 hint.style.top = (offset.top + offset.height) + 'px'; 5861 break; 5862 case 'bottom-right': 5863 hint.style.left = (offset.left + offset.width) + 'px'; 5864 hint.style.top = (offset.top + offset.height) + 'px'; 5865 break; 5866 case 'bottom-middle': 5867 hint.style.left = (offset.left + (offset.width / 2)) + 'px'; 5868 hint.style.top = (offset.top + offset.height) + 'px'; 5869 break; 5870 case 'top-middle': 5871 hint.style.left = (offset.left + (offset.width / 2)) + 'px'; 5872 hint.style.top = offset.top + 'px'; 5873 break; 5874 } 5875 }; 5876 5877 /** 5878 * Triggers when user clicks on the hint element 5879 * 5880 * @api private 5881 * @method _hintClick 5882 * @param {Object} hintElement 5883 * @param {Object} item 5884 * @param {Number} stepId 5885 */
5886 function _hintClick(hintElement, item, stepId) { 5887 // call the callback function (if any) 5888 if (typeof (this._hintClickCallback) !== 'undefined') { 5889 this._hintClickCallback.call(this, hintElement, item, stepId); 5890 } 5891 5892 // remove all open tooltips 5893 var removedStep = _removeHintTooltip.call(this); 5894 5895 // to toggle the tooltip 5896 if (parseInt(removedStep, 10) == stepId) { 5897 return; 5898 } 5899 5900 var tooltipLayer = document.createElement('div'); 5901 var tooltipTextLayer = document.createElement('div'); 5902 var arrowLayer = document.createElement('div'); 5903 var referenceLayer = document.createElement('div'); 5904 5905 tooltipLayer.className = 'introjs-tooltip'; 5906 5907 tooltipLayer.onclick = function (e) { 5908 //IE9 & Other Browsers 5909 if (e.stopPropagation) { 5910 e.stopPropagation(); 5911 } 5912 //IE8 and Lower 5913 else { 5914 e.cancelBubble = true; 5915 } 5916 }; 5917 5918 tooltipTextLayer.className = 'introjs-tooltiptext'; 5919 5920 var tooltipWrapper = document.createElement('p'); 5921 tooltipWrapper.innerHTML = item.hint; 5922 5923 var closeButton = document.createElement('a'); 5924 closeButton.className = 'introjs-button'; 5925 closeButton.innerHTML = this._options.hintButtonLabel; 5926 closeButton.onclick = _hideHint.bind(this, stepId); 5927 5928 tooltipTextLayer.appendChild(tooltipWrapper); 5929 tooltipTextLayer.appendChild(closeButton); 5930 5931 arrowLayer.className = 'introjs-arrow'; 5932 tooltipLayer.appendChild(arrowLayer); 5933 5934 tooltipLayer.appendChild(tooltipTextLayer); 5935 5936 // set current step for _placeTooltip function 5937 this._currentStep = hintElement.getAttribute('data-step'); 5938 5939 // align reference layer position 5940 referenceLayer.className = 'introjs-tooltipReferenceLayer introjs-hintReference'; 5941 referenceLayer.setAttribute('data-step', hintElement.getAttribute('data-step')); 5942 _setHelperLayerPosition.call(this, referenceLayer); 5943 5944 referenceLayer.appendChild(tooltipLayer); 5945 document.body.appendChild(referenceLayer); 5946 5947 //set proper position 5948 _placeTooltip.call(this, hintElement, tooltipLayer, arrowLayer, null, true); 5949 }; 5950 5951 /** 5952 * Get an element position on the page 5953 * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966 5954 * 5955 * @api private 5956 * @method _getOffset 5957 * @param {Object} element 5958 * @returns Element's position info 5959 */ 5960 function _getOffset(element) { 5961 var elementPosition = {}; 5962 5963 //set width 5964 elementPosition.width = element.offsetWidth; 5965 5966 //set height 5967 elementPosition.height = element.offsetHeight; 5968 5969 //calculate element top and left 5970 var _x = 0; 5971 var _y = 0; 5972 while (element && !isNaN(element.offsetLeft) && !isNaN(element.offsetTop)) { 5973 _x += element.offsetLeft; 5974 _y += element.offsetTop; 5975 element = element.offsetParent; 5976 } 5977 //set top 5978 elementPosition.top = _y; 5979 //set left 5980 elementPosition.left = _x; 5981 5982 return elementPosition; 5983 }; 5984 5985 /** 5986 * Gets the current progress percentage 5987 * 5988 * @api private 5989 * @method _getProgress 5990 * @returns current progress percentage 5991 */ 5992 function _getProgress() { 5993 // Steps are 0 indexed 5994 var currentStep = parseInt((this._currentStep + 1), 10); 5995 return ((currentStep / this._introItems.length) * 100); 5996 }; 5997 5998 /** 5999 * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1 6000 * via: http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically 6001 * 6002 * @param obj1 6003 * @param obj2 6004 * @returns obj3 a new object based on obj1 and obj2 6005 */ 6006 function _mergeOptions(obj1,obj2) { 6007 var obj3 = {}; 6008 for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; } 6009 for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; } 6010 return obj3; 6011 }; 6012 6013 var introJs = function (targetElm) { 6014 if (typeof (targetElm) === 'object') { 6015 //Ok, create a new instance 6016 return new IntroJs(targetElm); 6017 6018 } else if (typeof (targetElm) === 'string') { 6019 //select the target element with query selector 6020 var targetElement = document.querySelector(targetElm); 6021 6022 if (targetElement) { 6023 return new IntroJs(targetElement); 6024 } else { 6025 throw new Error('There is no element with given selector.'); 6026 } 6027 } else { 6028 return new IntroJs(document.body); 6029 } 6030 }; 6031 6032 /** 6033 * Current IntroJs version 6034 * 6035 * @property version
6036 * @type String 6037 */ 6038 introJs.version = VERSION; 6039 6040 //Prototype 6041 introJs.fn = IntroJs.prototype = { 6042 clone: function () { 6043 return new IntroJs(this); 6044 }, 6045 setOption: function(option, value) { 6046 this._options[option] = value; 6047 return this; 6048 }, 6049 setOptions: function(options) { 6050 this._options = _mergeOptions(this._options, options); 6051 return this; 6052 }, 6053 start: function () { 6054 _introForElement.call(this, this._targetElement); 6055 return this; 6056 }, 6057 goToStep: function(step) { 6058 _goToStep.call(this, step); 6059 return this; 6060 }, 6061 addStep: function(options) { 6062 if (!this._options.steps) { 6063 this._options.steps = []; 6064 } 6065 6066 this._options.steps.push(options); 6067 6068 return this; 6069 }, 6070 addSteps: function(steps) { 6071 if (!steps.length) return; 6072 6073 for(var index = 0; index < steps.length; index++) { 6074 this.addStep(steps[index]); 6075 } 6076 6077 return this; 6078 }, 6079 nextStep: function() { 6080 _nextStep.call(this); 6081 return this; 6082 }, 6083 previousStep: function() { 6084 _previousStep.call(this); 6085 return this; 6086 }, 6087 exit: function() { 6088 _exitIntro.call(this, this._targetElement); 6089 return this; 6090 }, 6091 refresh: function() { 6092 // re-align intros 6093 _setHelperLayerPosition.call(this, document.querySelector('.introjs-helperLayer')); 6094 _setHelperLayerPosition.call(this, document.querySelector('.introjs-tooltipReferenceLayer')); 6095 6096 //re-align hints 6097 _reAlignHints.call(this); 6098 return this; 6099 }, 6100 onbeforechange: function(providedCallback) { 6101 if (typeof (providedCallback) === 'function') { 6102 this._introBeforeChangeCallback = providedCallback; 6103 } else { 6104 throw new Error('Provided callback for onbeforechange was not a function'); 6105 } 6106 return this; 6107 }, 6108 onchange: function(providedCallback) { 6109 if (typeof (providedCallback) === 'function') { 6110 this._introChangeCallback = providedCallback; 6111 } else { 6112 throw new Error('Provided callback for onchange was not a function.'); 6113 } 6114 return this; 6115 }, 6116 onafterchange: function(providedCallback) { 6117 if (typeof (providedCallback) === 'function') { 6118 this._introAfterChangeCallback = providedCallback; 6119 } else { 6120 throw new Error('Provided callback for onafterchange was not a function'); 6121 } 6122 return this; 6123 }, 6124 oncomplete: function(providedCallback) { 6125 if (typeof (providedCallback) === 'function') { 6126 this._introCompleteCallback = providedCallback; 6127 } else { 6128 throw new Error('Provided callback for oncomplete was not a function.'); 6129 } 6130 return this; 6131 }, 6132 onhintsadded: function(providedCallback) { 6133 if (typeof (providedCallback) === 'function') { 6134 this._hintsAddedCallback = providedCallback; 6135 } else { 6136 throw new Error('Provided callback for onhintsadded was not a function.'); 6137 } 6138 return this; 6139 }, 6140 onhintclick: function(providedCallback) { 6141 if (typeof (providedCallback) === 'function') { 6142 this._hintClickCallback = providedCallback; 6143 } else { 6144 throw new Error('Provided callback for onhintclick was not a function.'); 6145 } 6146 return this; 6147 }, 6148 onhintclose: function(providedCallback) { 6149 if (typeof (providedCallback) === 'function') { 6150 this._hintCloseCallback = providedCallback; 6151 } else { 6152 throw new Error('Provided callback for onhintclose was not a function.'); 6153 } 6154 return this; 6155 }, 6156 onexit: function(providedCallback) { 6157 if (typeof (providedCallback) === 'function') { 6158 this._introExitCallback = providedCallback; 6159 } else { 6160 throw new Error('Provided callback for onexit was not a function.'); 6161 } 6162 return this; 6163 }, 6164 addHints: function() { 6165 _populateHints.call(this, this._targetElement); 6166 return this; 6167 }, 6168 hideHint: function (stepId) { 6169 _hideHint.call(this, stepId); 6170 return this; 6171 }, 6172 hideHints: function () { 6173 _hideHints.call(this); 6174 return this; 6175 }, 6176 showHint: function (stepId) { 6177 _showHint.call(this, stepId); 6178 return this; 6179 }, 6180 showHints: function () { 6181 _showHints.call(this); 6182 return this; 6183 } 6184 }; 6185 6186 exports.introJs = introJs; 6187 return introJs; 6188}));
6189//Title: Custom DropDown plugin by PC 6190//Documentation: http://designwithpc.com/Plugins/ddslick 6191//Author: PC 6192//Website: http://designwithpc.com 6193//Twitter: http://twitter.com/chaudharyp 6194 6195!function (e) { function d(e, d) { var t = e.data("ddslick"), o = e.find(".dd-selected"), s = o.siblings(".dd-selected-value"), l = (e.find(".dd-options"), o.siblings(".dd-pointer"), e.find(".dd-option").eq(d)), a = l.closest("li"), c = t.settings, r = t.settings.data[d]; e.find(".dd-option").removeClass("dd-option-selected"), l.addClass("dd-option-selected"), t.selectedIndex = d, t.selectedItem = a, t.selectedData = r, c.showSelectedHTML ? o.html((r.imageSrc ? '<img class="dd-selected-image' + ("right" == c.imagePosition ? " dd-image-right" : "") + '" src="' + r.imageSrc + '" />' : "") + (r.text ? '<label class="dd-selected-text">' + r.text + "</label>" : "") + (r.description ? '<small class="dd-selected-description dd-desc' + (c.truncateDescription ? " dd-selected-description-truncated" : "") + '" >' + r.description + "</small>" : "")) : o.html(r.text), s.val(r.value), t.original.val(r.value), e.data("ddslick", t), i(e), n(e), "function" == typeof c.onSelected && c.onSelected.call(this, t) } function t(d) { var t = d.find(".dd-select"), i = t.siblings(".dd-options"), n = t.find(".dd-pointer"), s = i.is(":visible"); e(".dd-click-off-close").not(i).slideUp(50), e(".dd-pointer").removeClass("dd-pointer-up"), s ? (i.slideUp("fast"), n.removeClass("dd-pointer-up")) : (i.slideDown("fast"), n.addClass("dd-pointer-up")), o(d) } function i(e) { e.find(".dd-options").slideUp(50), e.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up") } function n(e) { var d = e.find(".dd-select").css("height"), t = e.find(".dd-selected-description"), i = e.find(".dd-selected-image"); t.length <= 0 && i.length > 0 && e.find(".dd-selected-text").css("lineHeight", d) } function o(d) { d.find(".dd-option").each(function () { var t = e(this), i = t.css("height"), n = t.find(".dd-option-description"), o = d.find(".dd-option-image"); n.length <= 0 && o.length > 0 && t.find(".dd-option-text").css("lineHeight", i) }) } e.fn.ddslick = function (d) { return s[d] ? s[d].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof d && d ? void e.error("Method " + d + " does not exists.") : s.init.apply(this, arguments) }; var s = {}, l = { data: [], keepJSONItemsOnTop: !1, width: 260, height: null, background: "#eee", selectText: "", defaultSelectedIndex: null, truncateDescription: !0, imagePosition: "left", showSelectedHTML: !0, clickOffToClose: !0, onSelected: function () { } }, a = '<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>', c = '<ul class="dd-options"></ul>', r = '<style id="css-ddslick" type="text/css">.dd-select{ border-radius:2px; border:solid 1px #ccc; position:relative; cursor:pointer;}.dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }.dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}.dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}.dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }.dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}.dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}.dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }.dd-options > li:last-child > .dd-option{ border-bottom:none;}.dd-option:hover{ background:#f3f3f3; color:#000;}.dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }.dd-option-selected { background:#f6f6f6; }.dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}.dd-image-right { float:right; margin-right:15px; margin-left:5px;}.dd-container{ position:relative;}â .dd-selected-text { font-weight:bold}â</style>'; e("#css-ddslick").length <= 0 && e(r).appendTo("head"), s.init = function (i) { var i = e.extend({}, l, i); return this.each(function () { var n = e(this), o = n.data("ddslick"); if (!o) { var s = []; i.data; n.find("option").each(function () { var d = e(this), t = d.data(); s.push({ text: e.trim(d.text()), value: d.val(), selected: d.is(":selected"), description: t.description, imageSrc: t.imagesrc }) }), i.keepJSONItemsOnTop ? e.merge(i.data, s) : i.data = e.merge(s, i.data); var l = n, r = e('<div id="' + n.attr("id") + '"></div>'); n.replaceWith(r), n = r, n.addClass("dd-container").append(a).append(c), +n.find("input.dd-selected-value").attr("name", e(l).attr("name")); var s = n.find(".dd-select"), p = n.find(".dd-options"); p.css({ width: i.width }), s.css({ width: i.width, background: i.background }), n.css({ width: i.width }), null != i.height && p.css({ height: i.height, overflow: "auto" }), e.each(i.data, function (e, d) { d.selected && (i.defaultSelectedIndex = e), p.append('<li><a class="dd-option">' + (d.value ? ' <input class="dd-option-value" type="hidden" value="' + d.value + '" />' : "") + (d.imageSrc ? ' <img class="dd-option-image' + ("right" == i.imagePosition ? " dd-image-right" : "") + '" src="' + d.imageSrc + '" />' : "") + (d.text ? ' <label class="dd-option-text">' + d.text + "</label>
6195" : "") + (d.description ? ' <small class="dd-option-description dd-desc">' + d.description + "</small>" : "") + "</a></li>") }); var f = { settings: i, original: l, selectedIndex: -1, selectedItem: null, selectedData: null }; if (n.data("ddslick", f), i.selectText.length > 0 && null == i.defaultSelectedIndex) n.find(".dd-selected").html(i.selectText); else { var u = null != i.defaultSelectedIndex && i.defaultSelectedIndex >= 0 && i.defaultSelectedIndex < i.data.length ? i.defaultSelectedIndex : 0; d(n, u) } n.find(".dd-select").on("click.ddslick", function () { t(n) }), n.find(".dd-option").on("click.ddslick", function () { d(n, e(this).closest("li").index()) }), i.clickOffToClose && (p.addClass("dd-click-off-close"), n.on("click.ddslick", function (e) { e.stopPropagation() }), e("body").on("click", function () { e(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up") })) } }) }, s.select = function (t) { return this.each(function () { t.index && d(e(this), t.index) }) }, s.open = function () { return this.each(function () { var d = e(this), i = d.data("ddslick"); i && t(d) }) }, s.close = function () { return this.each(function () { var d = e(this), t = d.data("ddslick"); t && i(d) }) }, s.destroy = function () { return this.each(function () { var d = e(this), t = d.data("ddslick"); if (t) { var i = t.original; d.removeData("ddslick").unbind(".ddslick").replaceWith(i) } }) } }(jQuery); 6196/*! 6197 * A polyfill for object-fit 6198 * 6199 * @author: Toni Pinel 6200 * 6201 */ 6202 6203;(function (window, document) { 6204 'use strict'; 6205 6206 var supports = function (){ 6207 6208 var div = document.createElement('div'), 6209 vendors = 'Khtml Ms O Moz Webkit'.split(' '), 6210 len = vendors.length; 6211 6212 return function(prop) { 6213 if ( prop in div.style ) return true; 6214 6215 prop = prop.replace(/^[a-z]/, function(val) { 6216 return val.toUpperCase(); 6217 }); 6218 6219 while(len--) { 6220 if ( vendors[len] + prop in div.style ) { 6221 // browser supports box-shadow. Do what you need. 6222 // Or use a bang (!) to test if the browser doesn't. 6223 return true; 6224 } 6225 } 6226 return false; 6227 }; 6228 }(); 6229 6230 var copyComputedStyle = function(from,to){ 6231 var computed_style_object = false; 6232 //trying to figure out which style object we need to use depense on the browser support 6233 //so we try until we have one 6234 computed_style_object = from.currentStyle || document.defaultView.getComputedStyle(from,null); 6235 6236 //if the browser dose not support both methods we will return null 6237 if(!computed_style_object) return null; 6238 6239 var stylePropertyValid = function(name,value){ 6240 //checking that the value is not a undefined 6241 return typeof value !== 'undefined' && 6242 //checking that the value is not a object 6243 typeof value !== 'object' && 6244 //checking that the value is not a function 6245 typeof value !== 'function' && 6246 //checking that we dosent have empty string 6247 value.length > 0 && 6248 //checking that the property is not int index ( happens on some browser 6249 value != parseInt(value); 6250 6251 }; 6252 6253 //we iterating the computed style object and compy the style props and the values 6254 for(var property in computed_style_object) 6255 { 6256 //checking if the property and value we get are valid sinse browser have different implementations 6257 if(stylePropertyValid(property,computed_style_object[property])) 6258 { 6259 //applying the style property to the target element 6260 to.style[property] = computed_style_object[property]; 6261 6262 } 6263 } 6264 6265 }; 6266 6267 if ( supports('object-fit') === false ) { 6268 6269 var oImages = document.querySelectorAll('[data-object-fit]'), 6270 oDiv, sSource; 6271 6272 for ( var nKey = 0; nKey < oImages.length; nKey++ ) { 6273 6274 oDiv = document.createElement('div'); 6275 6276 if (oImages[nKey].getAttribute('data-src-retina')) { 6277 sSource = oImages[nKey].getAttribute('data-src-retina'); 6278 } else if ( oImages[nKey].getAttribute('data-src')) { 6279 sSource = oImages[nKey].getAttribute('data-src'); 6280 } else { 6281 sSource = oImages[nKey].src; 6282 } 6283 6284 copyComputedStyle( oImages[nKey], oDiv ); 6285 6286 oDiv.style.display = "block"; 6287 oDiv.style.backgroundImage = "url("+ sSource + ")"; 6288 oDiv.style.backgroundPosition = "center center"; 6289 oDiv.style.className = oImages[nKey].className; 6290 oDiv.style.backgroundRepeat = "no-repeat"; 6291 6292 switch (oImages[nKey].getAttribute('data-object-fit')) { 6293 case "cover": 6294 oDiv.style.backgroundSize = "cover"; 6295 break; 6296 case "contain": 6297 oDiv.style.backgroundSize = "contain"; 6298 break; 6299 case "fill": 6300 oDiv.style.backgroundSize = "100% 100%"; 6301 break; 6302 case "none": 6303 oDiv.style.backgroundSize = "auto"; 6304 break; 6305 } 6306 6307 oImages[nKey].parentNode.replaceChild( oDiv, oImages[nKey]); 6308 } 6309 6310 } 6311 6312})(window, document); 6313/* 6314 _ _ _ _ 6315 ___| (_) ___| | __ (_)___ 6316/ __| | |/ __| |/ / | / __| 6317\__ \ | | (__| < _ | \__ \ 6318|___/_|_|\___|_|\_(_)/ |___/ 6319 |__/ 6320 Version: 1.5.9 6321 Author: Ken Wheeler 6322 Website: http://kenwheeler.github.io 6323 Docs: http://kenwheeler.github.io/slick 6324 Repo: http://github.com/kenwheeler/slick 6325 Issues: http://github.com/kenwheeler/slick/issues 6326 */ 6327/* global window, document, define, jQuery, setInterval, clearInterval */ 6328 6329!function (i) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], i) : "undefined" != typeof exports ? module.exports = i(require("jquery")) : i(jQuery) }(function (i) { "use strict"; var e = window.Slick || {}; (e = function () { var e = 0; return function (t, o) { var s, n = this; n.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: i(t), appendDots: i(t), arrows: !0, asNavFor: null, prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>', nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: "50px", cssEase: "ease", customPaging: function (e, t) { return i('<button type="button" data-role="none" role="button" aria-required="false" tabindex="0" />').text(t + 1) }, dots: !1, dotsClass: "slick-dots", draggable: !0, easing: "linear", edgeFriction: .35, fade: !1, focusOnSelect: !1, infinite: !0, initialSlide: 0, lazyLoad: "ondemand", mobileFirst: !1, pauseOnHover: !0, pauseOnFocus: !0, pauseOnDotsHover: !1, respondTo: "window", responsive: null, rows: 1, rtl: !1, slide: "", slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: !0, swipeToSlide: !1, touchMove: !0, touchThreshold: 5, useCSS: !0, useTransform: !0, variableWidth: !1, vertical: !1, verticalSwiping: !1, waitForAnimate: !0, zIndex: 1e3 }, n.initials = { animating: !1, dragging: !1, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: !1, slideOffset: 0, swipeLeft: null, $list: null, touchObject: {}, transformsEnabled: !1, unslicked: !1 }, i.extend(n, n.initials), n.activeBreakpoint = null, n.animType = null, n.animProp = null, n.breakpoints = [], n.breakpointSettings = [], n.cssTransitions = !1, n.focussed = !1, n.interrupted = !1, n.hidden = "hidden", n.paused = !0, n.positionProp = null, n.respondTo = null, n.rowCount = 1, n.shouldClick = !0, n.$slider = i(t), n.$slidesCache = null, n.transformType = null, n.transitionType = null, n.visibilityChange = "visibilitychange", n.windowWidth = 0, n.windowTimer = null, s = i(t).data("slick") || {}, n.options = i.extend({}, n.defaults, o, s), n.currentSlide = n.options.initialSlide, n.originalSettings = n.options, void 0 !== document.mozHidden ? (n.hidden = "mozHidden", n.visibilityChange = "mozvisibilitychange") : void 0 !== document.webkitHidden && (n.hidden = "webkitHidden", n.visibilityChange = "webkitvisibilitychange"), n.autoPlay = i.proxy(n.autoPlay, n), n.autoPlayClear = i.proxy(n.autoPlayClear, n), n.autoPlayIterator = i.proxy(n.autoPlayIterator, n), n.changeSlide = i.proxy(n.changeSlide, n), n.clickHandler = i.proxy(n.clickHandler, n), n.selectHandler = i.proxy(n.selectHandler, n), n.setPosition = i.proxy(n.setPosition, n), n.swipeHandler = i.proxy(n.swipeHandler, n), n.dragHandler = i.proxy(n.dragHandler, n), n.keyHandler = i.proxy(n.keyHandler, n), n.instanceUid = e++ , n.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, n.registerBreakpoints(), n.init(!0) } }()).prototype.activateADA = function () { this.$slideTrack.find(".slick-active").attr({ "aria-hidden": "false" }).find("a, input, button, select").attr({ tabindex: "0" }) }, e.prototype.addSlide = e.prototype.slickAdd = function (e, t, o) { var s = this; if ("boolean" == typeof t) o = t, t = null; else if (t < 0 || t >= s.slideCount) return !1; s.unload(), "number" == typeof t ? 0 === t && 0 === s.$slides.length ? i(e).appendTo(s.$slideTrack) : o ? i(e).insertBefore(s.$slides.eq(t)) : i(e).insertAfter(s.$slides.eq(t)) : !0 === o ? i(e).prependTo(s.$slideTrack) : i(e).appendTo(s.$slideTrack), s.$slides = s.$slideTrack.children(this.options.slide), s.$slideTrack.children(this.options.slide).detach(), s.$slideTrack.append(s.$slides), s.$slides.each(function (e, t) { i(t).attr("data-slick-index", e) }), s.$slidesCache = s.$slides, s.reinit() }, e.prototype.animateHeight = function () { var i = this; if (1 === i.options.slidesToShow && !0 === i.options.adaptiveHeight && !1 === i.options.vertical) { var e = i.$slides.eq(i.currentSlide).outerHeight(!0); i.$list.animate({ height: e }, i.options.speed) } }, e.prototype.animateSlide = function (e, t) { var o = {}, s = this; s.animateHeight(), !0 === s.options.rtl && !1 === s.options.vertical && (e = -e), !1 === s.transformsEnabled ? !1 === s.options.vertical ? s.$slideTrack.animate({ left: e }, s.options.speed, s.options.easing, t) : s.$slideTrack.animate({ top: e }, s.options.speed, s.options.easing, t) : !1 === s.cssTransitions ? (!0 === s.options.rtl && (s.currentLeft = -s.currentLeft), i({ animStart: s.currentLeft }).animate({ animStart: e }, { duration: s.options.speed, easing: s.options.easing, step: function (i) { i = Math.ceil(i), !1 === s.options.vertical ? (o[s.animType] = "translate(" + i + "px, 0px)", s.$slideTrack.css(o)) : (o[s.animType] = "translate(0px," + i + "px)", s.$slideTrack.css(o)) }, complete: function () { t && t.call() } }
vendor: 7,707 bytes, line 6329
6329)) : (s.applyTransition(), e = Math.ceil(e), !1 === s.options.vertical ? o[s.animType] = "translate3d(" + e + "px, 0px, 0px)" : o[s.animType] = "translate3d(0px," + e + "px, 0px)", s.$slideTrack.css(o), t && setTimeout(function () { s.disableTransition(), t.call() }, s.options.speed)) }, e.prototype.getNavTarget = function () { var e = this, t = e.options.asNavFor; return t && null !== t && (t = i(t).not(e.$slider)), t }, e.prototype.asNavFor = function (e) { var t = this.getNavTarget(); null !== t && "object" == typeof t && t.each(function () { var t = i(this).slick("getSlick"); t.unslicked || t.slideHandler(e, !0) }) }, e.prototype.applyTransition = function (i) { var e = this, t = {}; !1 === e.options.fade ? t[e.transitionType] = e.transformType + " " + e.options.speed + "ms " + e.options.cssEase : t[e.transitionType] = "opacity " + e.options.speed + "ms " + e.options.cssEase, !1 === e.options.fade ? e.$slideTrack.css(t) : e.$slides.eq(i).css(t) }, e.prototype.autoPlay = function () { var i = this; i.autoPlayClear(), i.slideCount > i.options.slidesToShow && (i.autoPlayTimer = setInterval(i.autoPlayIterator, i.options.autoplaySpeed)) }, e.prototype.autoPlayClear = function () { var i = this; i.autoPlayTimer && clearInterval(i.autoPlayTimer) }, e.prototype.autoPlayIterator = function () { var i = this, e = i.currentSlide + i.options.slidesToScroll; i.paused || i.interrupted || i.focussed || (!1 === i.options.infinite && (1 === i.direction && i.currentSlide + 1 === i.slideCount - 1 ? i.direction = 0 : 0 === i.direction && (e = i.currentSlide - i.options.slidesToScroll, i.currentSlide - 1 == 0 && (i.direction = 1))), i.slideHandler(e)) }, e.prototype.buildArrows = function () { var e = this; !0 === e.options.arrows && (e.$prevArrow = i(e.options.prevArrow).addClass("slick-arrow"), e.$nextArrow = i(e.options.nextArrow).addClass("slick-arrow"), e.slideCount > e.options.slidesToShow ? (e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.prependTo(e.options.appendArrows), e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.appendTo(e.options.appendArrows), !0 !== e.options.infinite && e.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({ "aria-disabled": "true", tabindex: "-1" })) }, e.prototype.buildDots = function () { var e, t, o = this; if (!0 === o.options.dots && o.slideCount > o.options.slidesToShow) { for (o.$slider.addClass("slick-dotted"), t = i("<ul />").addClass(o.options.dotsClass), e = 0; e <= o.getDotCount(); e += 1) t.append(i("<li />").append(o.options.customPaging.call(this, o, e))); o.$dots = t.appendTo(o.options.appendDots), o.$dots.find("li").first().addClass("slick-active").attr("aria-hidden", "false") } }, e.prototype.buildOut = function () { var e = this; e.$slides = e.$slider.children(e.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), e.slideCount = e.$slides.length, e.$slides.each(function (e, t) { i(t).attr("data-slick-index", e).data("originalStyling", i(t).attr("style") || "") }), e.$slider.addClass("slick-slider"), e.$slideTrack = 0 === e.slideCount ? i('<div class="slick-track"/>').appendTo(e.$slider) : e.$slides.wrapAll('<div class="slick-track"/>').parent(), e.$list = e.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(), e.$slideTrack.css("opacity", 0), !0 !== e.options.centerMode && !0 !== e.options.swipeToSlide || (e.options.slidesToScroll = 1), i("img[data-lazy]", e.$slider).not("[src]").addClass("slick-loading"), e.setupInfinite(), e.buildArrows(), e.buildDots(), e.updateDots(), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), !0 === e.options.draggable && e.$list.addClass("draggable") }, e.prototype.buildRows = function () { var i, e, t, o, s, n, r, l = this; if (o = document.createDocumentFragment(), n = l.$slider.children(), l.options.rows > 1) { for (r = l.options.slidesPerRow * l.options.rows, s = Math.ceil(n.length / r), i = 0; i < s; i++) { var d = document.createElement("div"); for (e = 0; e < l.options.rows; e++) { var a = document.createElement("div"); for (t = 0; t < l.options.slidesPerRow; t++) { var c = i * r + (e * l.options.slidesPerRow + t); n.get(c) && a.appendChild(n.get(c)) } d.appendChild(a) } o.appendChild(d) } l.$slider.empty().append(o), l.$slider.children().children().children().css({ width: 100 / l.options.slidesPerRow + "%", display: "inline-block" }) } }, e.prototype.checkResponsive = function (e, t) { var o, s, n, r = this, l = !1, d = r.$slider.width(), a = window.innerWidth || i(window).width(); if ("window" === r.respondTo ? n = a : "slider" === r.respondTo ? n = d : "min" === r.respondTo && (n = Math.min(a, d)), r.options.responsive && r.options.responsive.length && null !== r.options.responsive) { s = null; for (o in r.breakpoints) r.breakpoints.hasOwnProperty(o) && (!1 === r.originalSettings.mobileFirst ? n < r.breakpoints[o] && (s = r.breakpoints[o]) : n > r.breakpoints[o] && (s = r.breakpoints[o])); null !== s ? null !== r.activeBreakpoint ? (s !== r.activeBreakpoint || t) && (r.activeBreakpoint = s, "unslick" === r.breakpointSettings[s] ? r.unslick(s) : (r.options = i.extend({}, r.originalSettings, r.breakpointSettings[s]), !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e)), l = s) : (r.activeBreakpoint = s, "unslick" === r.breakpointSettings[s] ? r.unslick(s) : (r.options = i.extend({}, r.originalSettings, r.breakpointSettings[s]), !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e)), l = s) : null !== r.activeBreakpoint && (r.activeBreakpoint = null, r.options = r.originalSettings, !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e), l = s), e || !1 === l || r.$slider.trigger("breakpoint", [r, l]) } }, e.prototype.changeSlide = function (e, t) { var o, s, n, r = this, l = i(e.currentTarget); switch (l.is("a") && e.preventDefault(), l.is("li") || (l = l.closest("li")), n = r.slideCount % r.options.slidesToScroll != 0, o = n ? 0 : (r.slideCount - r.currentSlide) % r.options.slidesToScroll, e.data.message) { case "previous": s = 0 === o ? r.options.slidesToScroll : r.options.slidesToShow - o, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide - s, !1, t); break; case "next": s = 0 === o ? r.options.slidesToScroll : o, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide + s, !1, t); break; case "index": var d = 0 === e.data.index ? 0 : e.data.index || l.index() * r.options.slidesToScroll; r.slideHandler(r.checkNavigable(d), !1, t), l.children().trigger("focus"); break; default: return } }, e.prototype.checkNavigable = function (i) { var e, t; if (e = this.getNavigableIndexes(), t = 0, i > e[e.length - 1]) i = e[e.length - 1]; else for (var o in e) { if (i < e[o]) { i = t; break } t = e[o] } return i }, e.prototype.cleanUpEvents = function () { var e = this; e.options.dots && null !== e.$dots && i("li", e.$dots).off("click.slick", e.changeSlide).off("mouseenter.slick", i.proxy(e.interrupt, e, !0)).off("mouseleave.slick", i.proxy(e.interrupt, e, !1)), e.$slider.off("focus.slick blur.slick"), !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && (e.$prevArrow && e.$prevArrow.off("click.slick", e.changeSlide), e.$nextArrow && e.$nextArrow.off("click.slick", e.changeSlide)), e.$list.off("touchstart.slick mousedown.slick", e.swipeHandler), e.$list.off("touchmove.slick mousemove.slick", e.swipeHandler), e.$list.off("touchend.slick mouseup.slick", e.swipeHandler), e.$list.off("touchcancel.slick mouseleave.
6329slick", e.swipeHandler), e.$list.off("click.slick", e.clickHandler), i(document).off(e.visibilityChange, e.visibility), e.cleanUpSlideEvents(), !0 === e.options.accessibility && e.$list.off("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && i(e.$slideTrack).children().off("click.slick", e.selectHandler), i(window).off("orientationchange.slick.slick-" + e.instanceUid, e.orientationChange), i(window).off("resize.slick.slick-" + e.instanceUid, e.resize), i("[draggable!=true]", e.$slideTrack).off("dragstart", e.preventDefault), i(window).off("load.slick.slick-" + e.instanceUid, e.setPosition), i(document).off("ready.slick.slick-" + e.instanceUid, e.setPosition) }, e.prototype.cleanUpSlideEvents = function () { var e = this; e.$list.off("mouseenter.slick", i.proxy(e.interrupt, e, !0)), e.$list.off("mouseleave.slick", i.proxy(e.interrupt, e, !1)) }, e.prototype.cleanUpRows = function () { var i, e = this; e.options.rows > 1 && ((i = e.$slides.children().children()).removeAttr("style"), e.$slider.empty().append(i)) }, e.prototype.clickHandler = function (i) { !1 === this.shouldClick && (i.stopImmediatePropagation(), i.stopPropagation(), i.preventDefault()) }, e.prototype.destroy = function (e) { var t = this; t.autoPlayClear(), t.touchObject = {}, t.cleanUpEvents(), i(".slick-cloned", t.$slider).detach(), t.$dots && t.$dots.remove(), t.$prevArrow && t.$prevArrow.length && (t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), t.htmlExpr.test(t.options.prevArrow) && t.$prevArrow.remove()), t.$nextArrow && t.$nextArrow.length && (t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), t.htmlExpr.test(t.options.nextArrow) && t.$nextArrow.remove()), t.$slides && (t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function () { i(this).attr("style", i(this).data("originalStyling")) }), t.$slideTrack.children(this.options.slide).detach(), t.$slideTrack.detach(), t.$list.detach(), t.$slider.append(t.$slides)), t.cleanUpRows(), t.$slider.removeClass("slick-slider"), t.$slider.removeClass("slick-initialized"), t.$slider.removeClass("slick-dotted"), t.unslicked = !0, e || t.$slider.trigger("destroy", [t]) }, e.prototype.disableTransition = function (i) { var e = this, t = {}; t[e.transitionType] = "", !1 === e.options.fade ? e.$slideTrack.css(t) : e.$slides.eq(i).css(t) }, e.prototype.fadeSlide = function (i, e) { var t = this; !1 === t.cssTransitions ? (t.$slides.eq(i).css({ zIndex: t.options.zIndex }), t.$slides.eq(i).animate({ opacity: 1 }, t.options.speed, t.options.easing, e)) : (t.applyTransition(i), t.$slides.eq(i).css({ opacity: 1, zIndex: t.options.zIndex }), e && setTimeout(function () { t.disableTransition(i), e.call() }, t.options.speed)) }, e.prototype.fadeSlideOut = function (i) { var e = this; !1 === e.cssTransitions ? e.$slides.eq(i).animate({ opacity: 0, zIndex: e.options.zIndex - 2 }, e.options.speed, e.options.easing) : (e.applyTransition(i), e.$slides.eq(i).css({ opacity: 0, zIndex: e.options.zIndex - 2 })) }, e.prototype.filterSlides = e.prototype.slickFilter = function (i) { var e = this; null !== i && (e.$slidesCache = e.$slides, e.unload(), e.$slideTrack.children(this.options.slide).detach(), e.$slidesCache.filter(i).appendTo(e.$slideTrack), e.reinit()) }, e.prototype.focusHandler = function () { var e = this; e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*:not(.slick-arrow)", function (t) { t.stopImmediatePropagation(); var o = i(this); setTimeout(function () { e.options.pauseOnFocus && (e.focussed = o.is(":focus"), e.autoPlay()) }, 0) }) }, e.prototype.getCurrent = e.prototype.slickCurrentSlide = function () { return this.currentSlide }, e.prototype.getDotCount = function () { var i = this, e = 0, t = 0, o = 0; if (!0 === i.options.infinite) for (; e < i.slideCount;)++o, e = t + i.options.slidesToScroll, t += i.options.slidesToScroll <= i.options.slidesToShow ? i.options.slidesToScroll : i.options.slidesToShow;
6329 else if (!0 === i.options.centerMode) o = i.slideCount; else for (; e < i.slideCount;)++o, e = t + i.options.slidesToScroll, t += i.options.slidesToScroll <= i.options.slidesToShow ? i.options.slidesToScroll : i.options.slidesToShow; return o - 1 }, e.prototype.getLeft = function (i) { var e, t, o, s = this, n = 0; return s.slideOffset = 0, t = s.$slides.first().outerHeight(!0), !0 === s.options.infinite ? (s.slideCount > s.options.slidesToShow && (s.slideOffset = s.slideWidth * s.options.slidesToShow * -1, n = t * s.options.slidesToShow * -1), s.slideCount % s.options.slidesToScroll != 0 && i + s.options.slidesToScroll > s.slideCount && s.slideCount > s.options.slidesToShow && (i > s.slideCount ? (s.slideOffset = (s.options.slidesToShow - (i - s.slideCount)) * s.slideWidth * -1, n = (s.options.slidesToShow - (i - s.slideCount)) * t * -1) : (s.slideOffset = s.slideCount % s.options.slidesToScroll * s.slideWidth * -1, n = s.slideCount % s.options.slidesToScroll * t * -1))) : i + s.options.slidesToShow > s.slideCount && (s.slideOffset = (i + s.options.slidesToShow - s.slideCount) * s.slideWidth, n = (i + s.options.slidesToShow - s.slideCount) * t), s.slideCount <= s.options.slidesToShow && (s.slideOffset = 0, n = 0), !0 === s.options.centerMode && !0 === s.options.infinite ? s.slideOffset += s.slideWidth * Math.floor(s.options.slidesToShow / 2) - s.slideWidth : !0 === s.options.centerMode && (s.slideOffset = 0, s.slideOffset += s.slideWidth * Math.floor(s.options.slidesToShow / 2)), e = !1 === s.options.vertical ? i * s.slideWidth * -1 + s.slideOffset : i * t * -1 + n, !0 === s.options.variableWidth && (o = s.slideCount <= s.options.slidesToShow || !1 === s.options.infinite ? s.$slideTrack.children(".slick-slide").eq(i) : s.$slideTrack.children(".slick-slide").eq(i + s.options.slidesToShow), e = !0 === s.options.rtl ? o[0] ? -1 * (s.$slideTrack.width() - o[0].offsetLeft - o.width()) : 0 : o[0] ? -1 * o[0].offsetLeft : 0, !0 === s.options.centerMode && (o = s.slideCount <= s.options.slidesToShow || !1 === s.options.infinite ? s.$slideTrack.children(".slick-slide").eq(i) : s.$slideTrack.children(".slick-slide").eq(i + s.options.slidesToShow + 1), e = !0 === s.options.rtl ? o[0] ? -1 * (s.$slideTrack.width() - o[0].offsetLeft - o.width()) : 0 : o[0] ? -1 * o[0].offsetLeft : 0, e += (s.$list.width() - o.outerWidth()) / 2)), e }, e.prototype.getOption = e.prototype.slickGetOption = function (i) { return this.options[i] }, e.prototype.getNavigableIndexes = function () { var i, e = this, t = 0, o = 0, s = []; for (!1 === e.options.infinite ? i = e.slideCount : (t = -1 * e.options.slidesToScroll, o = -1 * e.options.slidesToScroll, i = 2 * e.slideCount); t < i;) s.push(t), t = o + e.options.slidesToScroll, o += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow; return s }, e.prototype.getSlick = function () { return this }, e.prototype.getSlideCount = function () { var e, t, o = this; return t = !0 === o.options.centerMode ? o.slideWidth * Math.floor(o.options.slidesToShow / 2) : 0, !0 === o.options.swipeToSlide ? (o.$slideTrack.find(".slick-slide").each(function (s, n) { if (n.offsetLeft - t + i(n).outerWidth() / 2 > -1 * o.swipeLeft) return e = n, !1 }), Math.abs(i(e).attr("data-slick-index") - o.currentSlide) || 1) : o.options.slidesToScroll }, e.prototype.goTo = e.prototype.slickGoTo = function (i, e) { this.changeSlide({ data: { message: "index", index: parseInt(i) } }, e) }, e.prototype.init = function (e) { var t = this; i(t.$slider).hasClass("slick-initialized") || (i(t.$slider).addClass("slick-initialized"), t.buildRows(), t.buildOut(), t.setProps(), t.startLoad(), t.loadSlider(), t.initializeEvents(), t.updateArrows(), t.updateDots(), t.checkResponsive(!0), t.focusHandler()), e && t.$slider.trigger("init", [t]), !0 === t.options.accessibility && t.initADA(), t.options.autoplay && (t.paused = !1, t.autoPlay()) }, e.prototype.initADA = function () { var e = this; e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({ "aria-hidden": "true", tabindex: "-1" }).find("a, input, button, select").attr({ tabindex: "-1" }), e.$slideTrack.attr("role", "listbox"), e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function (t) { i(this).attr({ role: "option", "aria-describedby": "slick-slide" + e.instanceUid + t }) }), null !== e.$dots && e.$dots.attr("role", "tablist").find("li").each(function (t) { i(this).attr({ role: "presentation", "aria-selected": "false", "aria-controls": "navigation" + e.instanceUid + t, id: "slick-slide" + e.instanceUid + t }) }).first().attr("aria-selected", "true").end().find("button").attr("role", "button").end().closest("div").attr("role", "toolbar"), e.activateADA() }, e.prototype.initArrowEvents = function () { var i = this; !0 === i.options.arrows && i.slideCount > i.options.slidesToShow && (i.$prevArrow.off("click.slick").on("click.slick", { message: "previous" }, i.changeSlide), i.$nextArrow.off("click.slick").on("click.slick", { message: "next" }, i.changeSlide)) }, e.prototype.initDotEvents = function () { var e = this; !0 === e.options.dots && e.slideCount > e.options.slidesToShow && i("li", e.$dots).on("click.slick", { message: "index" }, e.changeSlide), !0 === e.options.dots && !0 === e.options.pauseOnDotsHover && i("li", e.$dots).on("mouseenter.slick", i.proxy(e.interrupt, e, !0)).on("mouseleave.
6329slick", i.proxy(e.interrupt, e, !1)) }, e.prototype.initSlideEvents = function () { var e = this; e.options.pauseOnHover && (e.$list.on("mouseenter.slick", i.proxy(e.interrupt, e, !0)), e.$list.on("mouseleave.slick", i.proxy(e.interrupt, e, !1))) }, e.prototype.initializeEvents = function () { var e = this; e.initArrowEvents(), e.initDotEvents(), e.initSlideEvents(), e.$list.on("touchstart.slick mousedown.slick", { action: "start" }, e.swipeHandler), e.$list.on("touchmove.slick mousemove.slick", { action: "move" }, e.swipeHandler), e.$list.on("touchend.slick mouseup.slick", { action: "end" }, e.swipeHandler), e.$list.on("touchcancel.slick mouseleave.slick", { action: "end" }, e.swipeHandler), e.$list.on("click.slick", e.clickHandler), i(document).on(e.visibilityChange, i.proxy(e.visibility, e)), !0 === e.options.accessibility && e.$list.on("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && i(e.$slideTrack).children().on("click.slick", e.selectHandler), i(window).on("orientationchange.slick.slick-" + e.instanceUid, i.proxy(e.orientationChange, e)), i(window).on("resize.slick.slick-" + e.instanceUid, i.proxy(e.resize, e)), i("[draggable!=true]", e.$slideTrack).on("dragstart", e.preventDefault), i(window).on("load.slick.slick-" + e.instanceUid, e.setPosition), i(document).on("ready.slick.slick-" + e.instanceUid, e.setPosition) }, e.prototype.initUI = function () { var i = this; !0 === i.options.arrows && i.slideCount > i.options.slidesToShow && (i.$prevArrow.show(), i.$nextArrow.show()), !0 === i.options.dots && i.slideCount > i.options.slidesToShow && i.$dots.show() }, e.prototype.keyHandler = function (i) { var e = this; i.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === i.keyCode && !0 === e.options.accessibility ? e.changeSlide({ data: { message: !0 === e.options.rtl ? "next" : "previous" } }) : 39 === i.keyCode && !0 === e.options.accessibility && e.changeSlide({ data: { message: !0 === e.options.rtl ? "previous" : "next" } })) }, e.prototype.lazyLoad = function () { function e(e) { i("img[data-lazy]", e).each(function () { var e = i(this), t = i(this).attr("data-lazy"), o = document.createElement("img"); o.onload = function () { e.animate({ opacity: 0 }, 100, function () { e.attr("src", t).animate({ opacity: 1 }, 200, function () { e.removeAttr("data-lazy").removeClass("slick-loading") }), s.$slider.trigger("lazyLoaded", [s, e]) }) }, o.src = t }) } var t, o, s = this; !0 === s.options.centerMode ? !0 === s.options.infinite ? o = (t = s.currentSlide + (s.options.slidesToShow / 2 + 1)) + s.options.slidesToShow + 2 : (t = Math.max(0, s.currentSlide - (s.options.slidesToShow / 2 + 1)), o = s.options.slidesToShow / 2 + 1 + 2 + s.currentSlide) : (t = s.options.infinite ? s.options.slidesToShow + s.currentSlide : s.currentSlide, o = Math.ceil(t + s.options.slidesToShow), !0 === s.options.fade && (t > 0 && t-- , o <= s.slideCount && o++)), e(s.$slider.find(".slick-slide").slice(t, o)), s.slideCount <= s.options.slidesToShow ? e(s.$slider.find(".slick-slide")) : s.currentSlide >= s.slideCount - s.options.slidesToShow ? e(s.$slider.find(".slick-cloned").slice(0, s.options.slidesToShow)) : 0 === s.currentSlide && e(s.$slider.find(".slick-cloned").slice(-1 * s.options.slidesToShow)) }, e.prototype.loadSlider = function () { var i = this; i.setPosition(), i.$slideTrack.css({ opacity: 1 }), i.$slider.removeClass("slick-loading"), i.initUI(), "progressive" === i.options.lazyLoad && i.progressiveLazyLoad() }, e.prototype.next = e.prototype.slickNext = function () { this.changeSlide({ data: { message: "next" } }) }, e.prototype.orientationChange = function () { var i = this; i.checkResponsive(), i.setPosition() }, e.prototype.pause = e.prototype.slickPause = function () { var i = this; i.autoPlayClear(), i.paused = !0 }, e.prototype.play = e.prototype.slickPlay = function () { var i = this; i.autoPlay(), i.options.autoplay = !0, i.paused = !1, i.focussed = !1, i.interrupted = !1 }, e.prototype.postSlide = function (i) { var e = this; e.unslicked || (e.$slider.trigger("afterChange", [e, i]), e.animating = !1, e.setPosition(), e.swipeLeft = null, e.options.autoplay && e.autoPlay(), !0 === e.options.accessibility && e.initADA()
vendor: 7,485 bytes, line 6329
6329) }, e.prototype.prev = e.prototype.slickPrev = function () { this.changeSlide({ data: { message: "previous" } }) }, e.prototype.preventDefault = function (i) { i.preventDefault() }, e.prototype.progressiveLazyLoad = function () { var e, t = this; i("img[data-lazy]", t.$slider).length > 0 && ((e = i("img[data-lazy]", t.$slider).first()).attr("src", null), e.attr("src", e.attr("data-lazy")).removeClass("slick-loading").load(function () { e.removeAttr("data-lazy"), t.progressiveLazyLoad(), !0 === t.options.adaptiveHeight && t.setPosition() }).error(function () { e.removeAttr("data-lazy"), t.progressiveLazyLoad() })) }, e.prototype.refresh = function (e) { var t, o, s = this; o = s.slideCount - s.options.slidesToShow, !s.options.infinite && s.currentSlide > o && (s.currentSlide = o), s.slideCount <= s.options.slidesToShow && (s.currentSlide = 0), t = s.currentSlide, s.destroy(!0), i.extend(s, s.initials, { currentSlide: t }), s.init(), e || s.changeSlide({ data: { message: "index", index: t } }, !1) }, e.prototype.registerBreakpoints = function () { var e, t, o, s = this, n = s.options.responsive || null; if ("array" === i.type(n) && n.length) { s.respondTo = s.options.respondTo || "window"; for (e in n) if (o = s.breakpoints.length - 1, t = n[e].breakpoint, n.hasOwnProperty(e)) { for (; o >= 0;) s.breakpoints[o] && s.breakpoints[o] === t && s.breakpoints.splice(o, 1), o--; s.breakpoints.push(t), s.breakpointSettings[t] = n[e].settings } s.breakpoints.sort(function (i, e) { return s.options.mobileFirst ? i - e : e - i }) } }, e.prototype.reinit = function () { var e = this; e.$slides = e.$slideTrack.children(e.options.slide).addClass("slick-slide"), e.slideCount = e.$slides.length, e.currentSlide >= e.slideCount && 0 !== e.currentSlide && (e.currentSlide = e.currentSlide - e.options.slidesToScroll), e.slideCount <= e.options.slidesToShow && (e.currentSlide = 0), e.registerBreakpoints(), e.setProps(), e.setupInfinite(), e.buildArrows(), e.updateArrows(), e.initArrowEvents(), e.buildDots(), e.updateDots(), e.initDotEvents(), e.cleanUpSlideEvents(), e.initSlideEvents(), e.checkResponsive(!1, !0), !0 === e.options.focusOnSelect && i(e.$slideTrack).children().on("click.slick", e.selectHandler), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), e.setPosition(), e.focusHandler(), e.paused = !e.options.autoplay, e.autoPlay(), e.$slider.trigger("reInit", [e]) }, e.prototype.resize = function () { var e = this; i(window).width() !== e.windowWidth && (clearTimeout(e.windowDelay), e.windowDelay = window.setTimeout(function () { e.windowWidth = i(window).width(), e.checkResponsive(), e.unslicked || e.setPosition() }, 50)) }, e.prototype.removeSlide = e.prototype.slickRemove = function (i, e, t) { var o = this; if (i = "boolean" == typeof i ? !0 === (e = i) ? 0 : o.slideCount - 1 : !0 === e ? --i : i, o.slideCount < 1 || i < 0 || i > o.slideCount - 1) return !1; o.unload(), !0 === t ? o.$slideTrack.children().remove() : o.$slideTrack.children(this.options.slide).eq(i).remove(), o.$slides = o.$slideTrack.children(this.options.slide), o.$slideTrack.children(this.options.slide).detach(), o.$slideTrack.append(o.$slides), o.$slidesCache = o.$slides, o.reinit() }, e.prototype.setCSS = function (i) { var e, t, o = this, s = {}; !0 === o.options.rtl && (i = -i), e = "left" == o.positionProp ? Math.ceil(i) + "px" : "0px", t = "top" == o.positionProp ? Math.ceil(i) + "px" : "0px", s[o.positionProp] = i, !1 === o.transformsEnabled ? o.$slideTrack.css(s) : (s = {}, !1 === o.cssTransitions ? (s[o.animType] = "translate(" + e + ", " + t + ")", o.$slideTrack.css(s)) : (s[o.animType] = "translate3d(" + e + ", " + t + ", 0px)", o.$slideTrack.css(s))) }, e.prototype.setDimensions = function () { var i = this; !1 === i.options.vertical ? !0 === i.options.centerMode && i.$list.css({ padding: "0px " + i.options.centerPadding }) : (i.$list.height(i.$slides.first().outerHeight(!0) * i.options.slidesToShow), !0 === i.options.centerMode && i.$list.css({ padding: i.options.centerPadding + " 0px" })), i.listWidth = i.$list.width(), i.listHeight = i.$list.height(), !1 === i.options.vertical && !1 === i.options.variableWidth ? (i.slideWidth = Math.ceil(i.listWidth / i.options.slidesToShow), i.$slideTrack.width(Math.ceil(i.slideWidth * i.$slideTrack.children(".slick-slide").length))) : !0 === i.options.variableWidth ? i.$slideTrack.width(5e3 * i.slideCount) : (i.slideWidth = Math.ceil(i.listWidth), i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0) * i.$slideTrack.children(".slick-slide").length))); var e = i.$slides.first().outerWidth(!0) - i.$slides.first().width(); !1 === i.options.variableWidth && i.$slideTrack.children(".slick-slide").width(i.slideWidth - e) }, e.prototype.setFade = function () { var e, t = this; t.$slides.each(function (o, s) { e = t.slideWidth * o * -1, !0 === t.options.rtl ? i(s).css({ position: "relative", right: e, top: 0, zIndex: t.options.zIndex - 2, opacity: 0 }) : i(s).css({ position: "relative", left: e, top: 0, zIndex: t.options.zIndex - 2, opacity: 0 }) }), t.$slides.eq(t.currentSlide).css({ zIndex: t.options.zIndex - 1, opacity: 1 }) }, e.prototype.setHeight = function () { var i = this; if (1 === i.options.slidesToShow && !0 === i.options.adaptiveHeight && !1 === i.options.vertical) { var e = i.$slides.eq(i.currentSlide).outerHeight(!0); i.$list.css("height", e) } }, e.prototype.setOption = e.prototype.slickSetOption = function () { var e, t, o, s, n, r = this, l = !1; if ("object" === i.type(arguments[0]) ? (o = arguments[0], l = arguments[1], n = "multiple") : "string" === i.type(arguments[0]) && (o = arguments[0], s = arguments[1], l = arguments[2], "responsive" === arguments[0] && "array" === i.type(arguments[1]) ? n = "responsive" : void 0 !== arguments[1] && (n = "single")), "single" === n) r.options[o] = s; else if ("multiple" === n) i.each(o, function (i, e) { r.options[i] = e }); else if ("responsive" === n) for (t in s) if ("array" !== i.type(r.options.responsive)) r.options.responsive = [s[t]]; else { for (e = r.options.responsive.length - 1; e >= 0;) r.options.responsive[e].breakpoint === s[t].breakpoint && r.options.responsive.splice(e, 1), e--; r.options.responsive.push(s[t]) } l && (r.unload(), r.reinit()) }, e.prototype.setPosition = function () { var i = this; i.setDimensions(), i.setHeight(), !1 === i.options.fade ? i.setCSS(i.getLeft(i.currentSlide)) : i.setFade(), i.$slider.trigger("setPosition", [i]) }, e.prototype.setProps = function () { var i = this, e = document.body.style; i.positionProp = !0 === i.options.vertical ? "top" : "left", "top" === i.positionProp ? i.$slider.addClass("slick-vertical") : i.$slider.removeClass("slick-vertical"), void 0 === e.WebkitTransition && void 0 === e.MozTransition && void 0 === e.msTransition || !0 === i.options.useCSS && (i.cssTransitions = !0), i.options.fade && ("number" == typeof i.options.zIndex ? i.options.zIndex < 3 && (i.options.zIndex = 3) : i.options.zIndex = i.defaults.zIndex), void 0 !== e.OTransform && (i.animType = "OTransform", i.transformType = "-o-transform", i.transitionType = "OTransition", void 0 === e.perspectiveProperty && void 0 === e.webkitPerspective && (i.animType = !1)), void 0 !== e.MozTransform && (i.animType = "MozTransform", i.transformType = "-moz-transform", i.transitionType = "MozTransition", void 0 === e.perspectiveProperty && void 0 === e.MozPerspective && (i.animType = !1)), void 0 !== e.webkitTransform && (i.animType = "
6329webkitTransform", i.transformType = "-webkit-transform", i.transitionType = "webkitTransition", void 0 === e.perspectiveProperty && void 0 === e.webkitPerspective && (i.animType = !1)), void 0 !== e.msTransform && (i.animType = "msTransform", i.transformType = "-ms-transform", i.transitionType = "msTransition", void 0 === e.msTransform && (i.animType = !1)), void 0 !== e.transform && !1 !== i.animType && (i.animType = "transform", i.transformType = "transform", i.transitionType = "transition"), i.transformsEnabled = i.options.useTransform && null !== i.animType && !1 !== i.animType }, e.prototype.setSlideClasses = function (i) { var e, t, o, s, n = this; t = n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), n.$slides.eq(i).addClass("slick-current"), !0 === n.options.centerMode ? (e = Math.floor(n.options.slidesToShow / 2), !0 === n.options.infinite && (i >= e && i <= n.slideCount - 1 - e ? n.$slides.slice(i - e, i + e + 1).addClass("slick-active").attr("aria-hidden", "false") : (o = n.options.slidesToShow + i, t.slice(o - e + 1, o + e + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === i ? t.eq(t.length - 1 - n.options.slidesToShow).addClass("slick-center") : i === n.slideCount - 1 && t.eq(n.options.slidesToShow).addClass("slick-center")), n.$slides.eq(i).addClass("slick-center")) : i >= 0 && i <= n.slideCount - n.options.slidesToShow ? n.$slides.slice(i, i + n.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : t.length <= n.options.slidesToShow ? t.addClass("slick-active").attr("aria-hidden", "false") : (s = n.slideCount % n.options.slidesToShow, o = !0 === n.options.infinite ? n.options.slidesToShow + i : i, n.options.slidesToShow == n.options.slidesToScroll && n.slideCount - i < n.options.slidesToShow ? t.slice(o - (n.options.slidesToShow - s), o + s).addClass("slick-active").attr("aria-hidden", "false") : t.slice(o, o + n.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")), "ondemand" === n.options.lazyLoad && n.lazyLoad() }, e.prototype.setupInfinite = function () { var e, t, o, s = this; if (!0 === s.options.fade && (s.options.centerMode = !1), !0 === s.options.infinite && !1 === s.options.fade && (t = null, s.slideCount > s.options.slidesToShow)) { for (o = !0 === s.options.centerMode ? s.options.slidesToShow + 1 : s.options.slidesToShow, e = s.slideCount; e > s.slideCount - o; e -= 1) t = e - 1, i(s.$slides[t]).clone(!0).attr("id", "").attr("data-slick-index", t - s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned"); for (e = 0; e < o; e += 1) t = e, i(s.$slides[t]).clone(!0).attr("id", "").attr("data-slick-index", t + s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned"); s.$slideTrack.find(".slick-cloned").find("[id]").each(function () { i(this).attr("id", "") }) } }, e.prototype.interrupt = function (i) { var e = this; i || e.autoPlay(), e.interrupted = i }, e.prototype.selectHandler = function (e) { var t = this, o = i(e.target).is(".slick-slide") ? i(e.target) : i(e.target).parents(".slick-slide"), s = parseInt(o.attr("data-slick-index")); if (s || (s = 0), t.slideCount <= t.options.slidesToShow) return t.setSlideClasses(s), void t.asNavFor(s); t.slideHandler(s) }, e.prototype.slideHandler = function (i, e, t) { var o, s, n, r, l, d = null, a = this; if (e = e || !1, (!0 !== a.animating || !0 !== a.options.waitForAnimate) && !(!0 === a.options.fade && a.currentSlide === i || a.slideCount <= a.options.slidesToShow)) if (o = i, d = a.getLeft(o), r = a.getLeft(a.currentSlide), a.currentLeft = null === a.swipeLeft ? r : a.swipeLeft, !1 === a.options.infinite && !1 === a.options.centerMode && (i < 0 || i > a.getDotCount() * a.options.slidesToScroll)) !1 === a.options.fade && (o = a.currentSlide, !0 !== t ? a.animateSlide(r, function () { a.postSlide(o) }) : a.postSlide(o)); else if (!1 === a.options.infinite && !0 === a.options.centerMode && (i < 0 || i > a.slideCount - a.options.slidesToScroll)) !1 === a.options.fade && (o = a.currentSlide, !0 !== t ? a.animateSlide(r, function () { a.postSlide(o) }) : a.postSlide(o)); else { a.options.autoplay && clearInterval(a.autoPlayTimer), s = o < 0 ? a.slideCount % a.options.slidesToScroll != 0 ? a.slideCount - a.slideCount % a.options.slidesToScroll : a.slideCount + o : o >= a.slideCount ? a.slideCount % a.options.slidesToScroll != 0 ? 0 : o - a.slideCount : o, a.animating = !0; var c = jQuery.Event("beforeChange"); if (a.$slider.trigger(c, [a, a.currentSlide, s]), c.isDefaultPrevented()) return a.animating = !1, void (!0 !== t ? a.animateSlide(r, function () { a.postSlide(a.currentSlide) }) : a.postSlide(a.currentSlide)); if (!1 === e && a.asNavFor(i), n = a.currentSlide, a.currentSlide = s, a.setSlideClasses(a.currentSlide), a.options.asNavFor && (l = (l = a.getNavTarget()).slick("getSlick")).slideCount <= l.options.slidesToShow && l.setSlideClasses(a.currentSlide), a.updateDots(), a.updateArrows(), !0 === a.options.fade) return !0 !== t ? (a.fadeSlideOut(n), a.fadeSlide(s, function () { a.postSlide(s) })) : a.postSlide(s), void a.animateHeight(); !0 !== t ? a.animateSlide(d, function () { a.postSlide(s) }) : a.postSlide(s) } }, e.prototype.startLoad = function () { var i = this; !0 === i.options.arrows && i.slideCount > i.options.slidesToShow && (i.$prevArrow.hide(), i.$nextArrow.hide()), !0 === i.options.dots && i.slideCount > i.options.slidesToShow && i.$dots.hide(), i.$slider.addClass("slick-loading") }, e.prototype.swipeDirection = function () { var i, e, t, o, s = this; return i = s.touchObject.startX - s.touchObject.curX, e = s.touchObject.startY - s.touchObject.curY, t = Math.atan2(e, i), (o = Math.round(180 * t / Math.PI)) < 0 && (o = 360 - Math.abs(o)), o <= 45 && o >= 0 ? !1 === s.options.rtl ? "left" : "right" : o <= 360 && o >= 315 ? !1 === s.options.rtl ? "left" : "right" : o >= 135 && o <= 225 ? !1 === s.options.rtl ? "right" : "left" : !0 === s.options.verticalSwiping ? o >= 35 && o <= 135 ? "left" : "right" : "vertical" }, e.prototype.swipeEnd = function (i) { var e, t = this; if (t.dragging = !1, t.interrupted = !1, t.shouldClick = !(t.touchObject.swipeLength > 10), void 0 === t.touchObject.curX) return !1; if (!0 === t.touchObject.edgeHit && t.$slider.trigger("edge", [t, t.swipeDirection()]), t.touchObject.swipeLength >= t.touchObject.minSwipe) switch (t.swipeDirection()) { case "left"
6329: e = t.options.swipeToSlide ? t.checkNavigable(t.currentSlide + t.getSlideCount()) : t.currentSlide + t.getSlideCount(), t.slideHandler(e), t.currentDirection = 0, t.touchObject = {}, t.$slider.trigger("swipe", [t, "left"]); break; case "right": e = t.options.swipeToSlide ? t.checkNavigable(t.currentSlide - t.getSlideCount()) : t.currentSlide - t.getSlideCount(), t.slideHandler(e), t.currentDirection = 1, t.touchObject = {}, t.$slider.trigger("swipe", [t, "right"]) } else t.touchObject.startX !== t.touchObject.curX && (t.slideHandler(t.currentSlide), t.touchObject = {}) }, e.prototype.swipeHandler = function (i) { var e = this; if (!(!1 === e.options.swipe || "ontouchend" in document && !1 === e.options.swipe || !1 === e.options.draggable && -1 !== i.type.indexOf("mouse"))) switch (e.touchObject.fingerCount = i.originalEvent && void 0 !== i.originalEvent.touches ? i.originalEvent.touches.length : 1, e.touchObject.minSwipe = e.listWidth / e.options.touchThreshold, !0 === e.options.verticalSwiping && (e.touchObject.minSwipe = e.listHeight / e.options.touchThreshold), i.data.action) { case "start": e.swipeStart(i); break; case "move": e.swipeMove(i); break; case "end": e.swipeEnd(i) } }, e.prototype.swipeMove = function (i) { var e, t, o, s, n, r = this; return n = void 0 !== i.originalEvent ? i.originalEvent.touches : null, !(!r.dragging || n && 1 !== n.length) && (e = r.getLeft(r.currentSlide), r.touchObject.curX = void 0 !== n ? n[0].pageX : i.clientX, r.touchObject.curY = void 0 !== n ? n[0].pageY : i.clientY, r.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(r.touchObject.curX - r.touchObject.startX, 2))), !0 === r.options.verticalSwiping && (r.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(r.touchObject.curY - r.touchObject.startY, 2)))), "vertical" !== (t = r.swipeDirection()) ? (void 0 !== i.originalEvent && r.touchObject.swipeLength > 4 && i.preventDefault(), s = (!1 === r.options.rtl ? 1 : -1) * (r.touchObject.curX > r.touchObject.startX ? 1 : -1), !0 === r.options.verticalSwiping && (s = r.touchObject.curY > r.touchObject.startY ? 1 : -1), o = r.touchObject.swipeLength, r.touchObject.edgeHit = !1, !1 === r.options.infinite && (0 === r.currentSlide && "right" === t || r.currentSlide >= r.getDotCount() && "left" === t) && (o = r.touchObject.swipeLength * r.options.edgeFriction, r.touchObject.edgeHit = !0), !1 === r.options.vertical ? r.swipeLeft = e + o * s : r.swipeLeft = e + o * (r.$list.height() / r.listWidth) * s, !0 === r.options.verticalSwiping && (r.swipeLeft = e + o * s), !0 !== r.options.fade && !1 !== r.options.touchMove && (!0 === r.animating ? (r.swipeLeft = null, !1) : void r.setCSS(r.swipeLeft))) : void 0) }, e.prototype.swipeStart = function (i) { var e, t = this; if (t.interrupted = !0, 1 !== t.touchObject.fingerCount || t.slideCount <= t.options.slidesToShow) return t.touchObject = {}, !1; void 0 !== i.originalEvent && void 0 !== i.originalEvent.touches && (e = i.originalEvent.touches[0]), t.touchObject.startX = t.touchObject.curX = void 0 !== e ? e.pageX : i.clientX, t.touchObject.startY = t.touchObject.curY = void 0 !== e ? e.pageY : i.clientY, t.dragging = !0 }, e.prototype.unfilterSlides = e.prototype.slickUnfilter = function () { var i = this; null !== i.$slidesCache && (i.unload(), i.$slideTrack.children(this.options.slide).detach(), i.$slidesCache.appendTo(i.$slideTrack), i.reinit()) }, e.prototype.unload = function () { var e = this; i(".slick-cloned", e.$slider).remove(), e.$dots && e.$dots.remove(), e.$prevArrow && e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.remove(), e.$nextArrow && e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.remove(), e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "") }, e.prototype.unslick = function (i) { var e = this; e.$slider.trigger("unslick", [e, i]), e.destroy() }, e.prototype.updateArrows = function () { var i = this; Math.floor(i.options.slidesToShow / 2), !0 === i.options.arrows && i.slideCount > i.options.slidesToShow && !i.options.infinite && (i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === i.currentSlide ? (i.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : i.currentSlide >= i.slideCount - i.options.slidesToShow && !1 === i.options.centerMode ? (i.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : i.currentSlide >= i.slideCount - 1 && !0 === i.options.centerMode && (i.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"))) }, e.prototype.updateDots = function () { var i = this; null !== i.$dots && (i.$dots.find("li").removeClass("slick-active").attr("aria-hidden", "true"), i.$dots.find("li").eq(Math.floor(i.currentSlide / i.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden", "false")) }, e.prototype.visibility = function () { var i = this; i.options.autoplay && (document[i.hidden] ? i.interrupted = !0 : i.interrupted = !1) }, i.fn.slick = function () { var i, t, o = this, s = arguments[0], n = Array.prototype.slice.call(arguments, 1), r = o.length; for (i = 0; i < r; i++) if ("object" == typeof s || void 0 === s ? o[i].slick = new e(o[i], s) : t = o[i].slick[s].apply(o[i].slick, n), void 0 !== t) return t; return o } }); 6330// SmoothScroll v1.2.1 6331// Licensed under the terms of the MIT license. 6332 6333// People involved 6334// - Balazs Galambosi (maintainer) 6335// - Patrick Brunner (original idea) 6336// - Michael Herf (Pulse Algorithm) 6337// - Justin Force (Resurect) 6338 6339// Scroll Variables (tweakable) 6340var framerate = 150; // [Hz] 6341var animtime = 800; // [px] 6342var stepsize = 80; // [px] 6343 6344// Pulse (less tweakable) 6345// ratio of "tail" to "acceleration" 6346var pulseAlgorithm = true; 6347var pulseScale = 8; 6348var pulseNormalize = 1; 6349 6350// Acceleration 6351var acceleration = true; 6352var accelDelta = 10; // 20 6353var accelMax = 1; // 1 6354 6355// Keyboard Settings 6356var keyboardsupport = true; // option 6357var disableKeyboard = false; // other reasons 6358var arrowscroll = 50; // [px] 6359 6360// Excluded pages 6361var exclude = ""; 6362var disabled = false; 6363 6364// Other Variables 6365var frame = false; 6366var direction = { x: 0, y: 0 }; 6367var initdone = false; 6368var fixedback = true; 6369var root = document.documentElement; 6370var activeElement; 6371
6372var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 }; 6373 6374/** 6375 * Sets up scrolls array, determines if frames are involved. 6376 */ 6377function init() { 6378 6379 if (!document.body) return; 6380 6381 var body = document.body; 6382 var html = document.documentElement; 6383 var windowHeight = window.innerHeight; 6384 var scrollHeight = body.scrollHeight; 6385 6386 // check compat mode for root element 6387 root = (document.compatMode.indexOf('CSS') >= 0) ? html : body; 6388 activeElement = body; 6389 6390 initdone = true; 6391 6392 // Checks if this script is running in a frame 6393 if (top != self) { 6394 frame = true; 6395 } 6396 6397 /** 6398 * This fixes a bug where the areas left and right to 6399 * the content does not trigger the onmousewheel event 6400 * on some pages. e.g.: html, body { height: 100% } 6401 */ 6402 else if (scrollHeight > windowHeight && 6403 (body.offsetHeight <= windowHeight || 6404 html.offsetHeight <= windowHeight)) { 6405 6406 // DOMChange (throttle): fix height 6407 var pending = false; 6408 var refresh = function() { 6409 if (!pending && html.scrollHeight != document.height) { 6410 pending = true; // add a new pending action 6411 setTimeout(function(){ 6412 html.style.height = document.height + 'px'; 6413 pending = false; 6414 }, 500); // act rarely to stay fast 6415 } 6416 }; 6417 html.style.height = ''; 6418 setTimeout(refresh, 10); 6419 addEvent("DOMNodeInserted", refresh); 6420 addEvent("DOMNodeRemoved", refresh); 6421 6422 // clearfix 6423 if (root.offsetHeight <= windowHeight) { 6424 var underlay = document.createElement("div"); 6425 underlay.style.clear = "both"; 6426 body.appendChild(underlay); 6427 } 6428 } 6429 6430 // gmail performance fix 6431 if (document.URL.indexOf("mail.google.com") > -1) { 6432 var s = document.createElement("style"); 6433 s.innerHTML = ".iu { visibility: hidden }"; 6434 (document.getElementsByTagName("head")[0] || html).appendChild(s); 6435 } 6436 // disable fixed background 6437 if (!fixedback && !disabled) { 6438 body.style.backgroundAttachment = "scroll"; 6439 html.style.backgroundAttachment = "scroll"; 6440 } 6441} 6442 6443 6444/************************************************ 6445 * SCROLLING 6446 ************************************************/ 6447 6448var que = []; 6449var pending = false; 6450var lastScroll = +new Date; 6451 6452/** 6453 * Pushes scroll actions to the scrolling queue. 6454 */ 6455function scrollArray(elem, left, top, delay) { 6456 6457 delay || (delay = 1000); 6458 directionCheck(left, top); 6459 6460 if (acceleration) { 6461 var now = +new Date; 6462 var elapsed = now - lastScroll; 6463 if (elapsed < accelDelta) { 6464 var factor = (1 + (30 / elapsed)) / 2; 6465 if (factor > 1) { 6466 factor = Math.min(factor, accelMax); 6467 left *= factor; 6468 top *= factor; 6469 } 6470 } 6471 lastScroll = +new Date; 6472 } 6473 6474 // push a scroll command 6475 que.push({ 6476 x: left, 6477 y: top, 6478 lastX: (left < 0) ? 0.99 : -0.99, 6479 lastY: (top < 0) ? 0.99 : -0.99, 6480 start: +new Date 6481 }); 6482 6483 // don't act if there's a pending queue 6484 if (pending) { 6485 return; 6486 } 6487 6488 var scrollWindow = (elem === document.body); 6489 6490 var step = function() { 6491 6492 var now = +new Date; 6493 var scrollX = 0; 6494 var scrollY = 0; 6495 6496 for (var i = 0; i < que.length; i++) { 6497 6498 var item = que[i]; 6499 var elapsed = now - item.start; 6500 var finished = (elapsed >= animtime); 6501 6502 // scroll position: [0, 1] 6503 var position = (finished) ? 1 : elapsed / animtime; 6504 6505 // easing [optional] 6506 if (pulseAlgorithm) { 6507 position = pulse(position); 6508 } 6509 6510 // only need the difference 6511 var x = (item.x * position - item.lastX) >> 0; 6512 var y = (item.y * position - item.lastY) >> 0; 6513 6514 // add this to the total scrolling 6515 scrollX += x; 6516 scrollY += y; 6517 6518 // update last values 6519 item.lastX += x; 6520 item.lastY += y; 6521 6522 // delete and step back if it's over 6523 if (finished) { 6524 que.splice(i, 1); i--; 6525 } 6526 } 6527 6528 // scroll left and top 6529 if (scrollWindow) { 6530 window.scrollBy(scrollX, scrollY) 6531 } 6532 else { 6533 if (scrollX) elem.scrollLeft += scrollX; 6534 if (scrollY) elem.scrollTop += scrollY; 6535 } 6536 6537 // clean up if there's nothing left to do 6538 if (!left && !top) { 6539 que = []; 6540 } 6541 6542 if (que.length) { 6543 requestFrame(step, elem, (delay / framerate + 1)); 6544 } else { 6545 pending = false; 6546 } 6547 } 6548 6549 // start a new queue of actions 6550 requestFrame(step, elem, 0); 6551 pending = true; 6552} 6553 6554 6555/*********************************************** 6556 * EVENTS 6557 ***********************************************/ 6558 6559/** 6560 * Mouse wheel handler. 6561 * @param {Object} event 6562 */ 6563function wheel(event) { 6564 6565 if (!initdone) { 6566 init(); 6567 } 6568 6569 var target = event.target; 6570 var overflowing = overflowingAncestor(target); 6571 6572 // use default if there's no overflowing 6573 // element or default action is prevented 6574 if (!overflowing || event.defaultPrevented || 6575 isNodeName(activeElement, "embed") || 6576 (isNodeName(target, "embed") && /\.pdf/i.test(target.src))) { 6577 return true; 6578 } 6579 6580 var deltaX = event.wheelDeltaX || 0; 6581 var deltaY = event.wheelDeltaY || 0; 6582 6583 // use wheelDelta if deltaX/Y is not available 6584 if (!deltaX && !deltaY) { 6585 deltaY = event.wheelDelta || 0; 6586 } 6587 6588 // scale by step size 6589 // delta is 120 most of the time
6590 // synaptics seems to send 1 sometimes 6591 if (Math.abs(deltaX) > 1.2) { 6592 deltaX *= stepsize / 120; 6593 } 6594 if (Math.abs(deltaY) > 1.2) { 6595 deltaY *= stepsize / 120; 6596 } 6597 6598 scrollArray(overflowing, -deltaX, -deltaY); 6599 event.preventDefault(); 6600} 6601 6602/** 6603 * Keydown event handler. 6604 * @param {Object} event 6605 */ 6606function keydown(event) { 6607 6608 var target = event.target; 6609 var modifier = event.ctrlKey || event.altKey || event.metaKey || 6610 (event.shiftKey && event.keyCode !== key.spacebar); 6611 6612 // do nothing if user is editing text 6613 // or using a modifier key (except shift) 6614 // or in a dropdown 6615 if ( /input|textarea|select|embed/i.test(target.nodeName) || 6616 target.isContentEditable || 6617 event.defaultPrevented || 6618 modifier ) { 6619 return true; 6620 } 6621 // spacebar should trigger button press 6622 if (isNodeName(target, "button") && 6623 event.keyCode === key.spacebar) { 6624 return true; 6625 } 6626 6627 var shift, x = 0, y = 0; 6628 var elem = overflowingAncestor(activeElement); 6629 var clientHeight = elem.clientHeight; 6630 6631 if (elem == document.body) { 6632 clientHeight = window.innerHeight; 6633 } 6634 6635 switch (event.keyCode) { 6636 case key.up: 6637 y = -arrowscroll; 6638 break; 6639 case key.down: 6640 y = arrowscroll; 6641 break; 6642 case key.spacebar: // (+ shift) 6643 shift = event.shiftKey ? 1 : -1; 6644 y = -shift * clientHeight * 0.9; 6645 break; 6646 case key.pageup: 6647 y = -clientHeight * 0.9; 6648 break; 6649 case key.pagedown: 6650 y = clientHeight * 0.9; 6651 break; 6652 case key.home: 6653 y = -elem.scrollTop; 6654 break; 6655 case key.end: 6656 var damt = elem.scrollHeight - elem.scrollTop - clientHeight; 6657 y = (damt > 0) ? damt+10 : 0; 6658 break; 6659 case key.left: 6660 x = -arrowscroll; 6661 break; 6662 case key.right: 6663 x = arrowscroll; 6664 break; 6665 default: 6666 return true; // a key we don't care about 6667 } 6668 6669 scrollArray(elem, x, y); 6670 event.preventDefault(); 6671} 6672 6673/** 6674 * Mousedown event only for updating activeElement 6675 */ 6676function mousedown(event) { 6677 activeElement = event.target; 6678} 6679 6680 6681/*********************************************** 6682 * OVERFLOW 6683 ***********************************************/ 6684 6685var cache = {}; // cleared out every once in while 6686setInterval(function(){ cache = {}; }, 10 * 1000); 6687 6688var uniqueID = (function() { 6689 var i = 0; 6690 return function (el) { 6691 return el.uniqueID || (el.uniqueID = i++); 6692 }; 6693})(); 6694 6695function setCache(elems, overflowing) { 6696 for (var i = elems.length; i--;) 6697 cache[uniqueID(elems[i])] = overflowing; 6698 return overflowing; 6699} 6700 6701function overflowingAncestor(el) { 6702 var elems = []; 6703 var rootScrollHeight = root.scrollHeight; 6704 do { 6705 var cached = cache[uniqueID(el)]; 6706 if (cached) { 6707 return setCache(elems, cached); 6708 } 6709 elems.push(el); 6710 if (rootScrollHeight === el.scrollHeight) { 6711 if (!frame || root.clientHeight + 10 < rootScrollHeight) { 6712 return setCache(elems, document.body); // scrolling root in WebKit 6713 } 6714 } else if (el.clientHeight + 10 < el.scrollHeight) { 6715 overflow = getComputedStyle(el, "").getPropertyValue("overflow-y"); 6716 if (overflow === "scroll" || overflow === "auto") { 6717 return setCache(elems, el); 6718 } 6719 } 6720 } while (el = el.parentNode); 6721} 6722 6723 6724/*********************************************** 6725 * HELPERS 6726 ***********************************************/ 6727 6728function addEvent(type, fn, bubble) { 6729 window.addEventListener(type, fn, (bubble||false)); 6730} 6731 6732function removeEvent(type, fn, bubble) { 6733 window.removeEventListener(type, fn, (bubble||false)); 6734} 6735 6736function isNodeName(el, tag) { 6737 return (el.nodeName||"").toLowerCase() === tag.toLowerCase(); 6738} 6739 6740function directionCheck(x, y) { 6741 x = (x > 0) ? 1 : -1; 6742 y = (y > 0) ? 1 : -1; 6743 if (direction.x !== x || direction.y !== y) { 6744 direction.x = x; 6745 direction.y = y; 6746 que = []; 6747 lastScroll = 0; 6748 } 6749} 6750 6751var requestFrame = (function(){ 6752 return window.requestAnimationFrame || 6753 window.webkitRequestAnimationFrame || 6754 function(callback, element, delay){ 6755 window.setTimeout(callback, delay || (1000/60)); 6756 }; 6757})(); 6758 6759/*********************************************** 6760 * PULSE 6761 ***********************************************/ 6762 6763/** 6764 * Viscous fluid with a pulse for part and decay for the rest. 6765 * - Applies a fixed force over an interval (a damped acceleration), and 6766 * - Lets the exponential bleed away the velocity over a longer interval 6767 * - Michael Herf, http://stereopsis.com/stopping/ 6768 */ 6769function pulse_(x) { 6770 var val, start, expx; 6771 // test 6772 x = x * pulseScale; 6773 if (x < 1) { // acceleartion 6774 val = x - (1 - Math.exp(-x)); 6775 } else { // tail 6776 // the previous animation ended here: 6777 start = Math.exp(-1); 6778 // simple viscous drag 6779 x -= 1; 6780 expx = 1 - Math.exp(-x); 6781 val = start + (expx * (1 - start)); 6782 } 6783 return val * pulseNormalize; 6784} 6785 6786function pulse(x) { 6787 if (x >= 1) return 1; 6788 if (x <= 0) return 0; 6789 6790 if (pulseNormalize == 1) { 6791 pulseNormalize /= pulse_(1); 6792 } 6793 return pulse_(x); 6794} 6795 6796addEvent("mousedown", mousedown);
6797addEvent("mousewheel", wheel); 6798addEvent("load", init); 6799/** 6800 * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill 6801 * v1.3.5 6802 * 6803 * Copyright 2013, Moxiecode Systems AB 6804 * Released under GPL License. 6805 * 6806 * License: http://www.plupload.com/license 6807 * Contributing: http://www.plupload.com/contributing 6808 * 6809 * Date: 2016-05-15 6810 */ 6811!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=s[e[r]]||o(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){s[e]=r.apply(null,arguments)})}function r(e){return!!s[e]}function o(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}function a(n){for(var i=0;i<n.length;i++){for(var r=e,o=n[i],a=o.split(/[.\/]/),u=0;u<a.length-1;++u)r[a[u]]===t&&(r[a[u]]={}),r=r[a[u]];r[a[a.length-1]]=s[o]}}var s={},u="moxie/core/utils/Basic",c="moxie/core/utils/Env",l="moxie/core/I18n",d="moxie/core/utils/Mime",h="moxie/core/utils/Dom",f="moxie/core/Exceptions",p="moxie/core/EventTarget",m="moxie/runtime/Runtime",g="moxie/runtime/RuntimeClient",v="moxie/file/FileInput",w="moxie/core/utils/Encode",y="moxie/file/Blob",E="moxie/file/File",_="moxie/file/FileDrop",b="moxie/file/FileReader",x="moxie/core/utils/Url",R="moxie/runtime/RuntimeTarget",A="moxie/file/FileReaderSync",I="moxie/xhr/FormData",T="moxie/xhr/XMLHttpRequest",S="moxie/runtime/Transporter",O="moxie/image/Image",D="moxie/runtime/html5/Runtime",N="moxie/core/utils/Events",L="moxie/runtime/html5/file/FileInput",C="moxie/runtime/html5/file/Blob",M="moxie/runtime/html5/file/FileDrop",F="moxie/runtime/html5/file/FileReader",P="moxie/runtime/html5/xhr/XMLHttpRequest",H="moxie/runtime/html5/utils/BinaryReader",B="moxie/runtime/html5/image/JPEGHeaders",k="moxie/runtime/html5/image/ExifParser",U="moxie/runtime/html5/image/JPEG",G="moxie/runtime/html5/image/PNG",z="moxie/runtime/html5/image/ImageInfo",q="moxie/runtime/html5/image/MegaPixel",j="moxie/runtime/html5/image/Image",X="moxie/runtime/flash/Runtime",V="moxie/runtime/flash/file/FileInput",W="moxie/runtime/flash/file/Blob",Y="moxie/runtime/flash/file/FileReader",$="moxie/runtime/flash/file/FileReaderSync",J="moxie/runtime/flash/xhr/XMLHttpRequest",Z="moxie/runtime/flash/runtime/Transporter",K="moxie/runtime/flash/image/Image",Q="moxie/runtime/silverlight/Runtime",ee="moxie/runtime/silverlight/file/FileInput",te="moxie/runtime/silverlight/file/Blob",ne="moxie/runtime/silverlight/file/FileDrop",ie="moxie/runtime/silverlight/file/FileReader",re="moxie/runtime/silverlight/file/FileReaderSync",oe="moxie/runtime/silverlight/xhr/XMLHttpRequest",ae="moxie/runtime/silverlight/runtime/Transporter",se="moxie/runtime/silverlight/image/Image",ue="moxie/runtime/html4/Runtime",ce="moxie/runtime/html4/file/FileInput",le="moxie/runtime/html4/file/FileReader",de="moxie/runtime/html4/xhr/XMLHttpRequest",he="moxie/runtime/html4/image/Image";i(u,[],function(){var e=function(e){var t;return e===t?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},t=function(i){var r;return n(arguments,function(o,s){s>0&&n(o,function(n,o){n!==r&&(e(i[o])===e(n)&&~a(e(n),["array","object"])?t(i[o],n):i[o]=n)})}),i},n=function(t,n){var i,r,o,a;if(t)if("number"===e(t.length)){for(o=0,i=t.length;i>o;o++)if(n(t[o],o)===!1)return}else if("object"===e(t))for(r in t)if(t.hasOwnProperty(r)&&n(t[r],r)===!1)return},i=function(t){var n;if(!t||"object"!==e(t))return!0;for(n in t)return!1;return!0},r=function(t,n){function i(r){"function"===e(t[r])&&t[r](function(e){++r<o&&!e?i(r):n(e)})}var r=0,o=t.length;"function"!==e(n)&&(n=function(){}),t&&t.length||n(),i(r)},o=function(e,t){var i=0,r=e.length,o=new Array(r);n(e,function(e,n){e(function(e){if(e)return t(e);var a=[].slice.call(arguments);a.shift(),o[n]=a,i++,i===r&&(o.unshift(null),t.apply(this,o))})})},a=function(e,t){if(t){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1},s=function(t,n){var i=[];"array"!==e(t)&&(t=[t]),"array"!==e(n)&&(n=[n]);for(var r in t)-1===a(t[r],n)&&i.push(t[r]);return i.length?i:!1},u=function(e,t){var i=[];return n(e,function(e){-1!==a(e,t)&&i.push(e)}),i.length?i:null},c=function(e){var t,n=[];for(t=0;t<e.length;t++)n[t]=e[t];return n},l=function(){var e=0;return function(t){var n=(new Date).getTime().toString(32),i;for(i=0;5>i;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+n+(e++).toString(32)}}(),d=function(e){return e?String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""):e},h=function(e){if("string"!=typeof e)return e;var t={t:1099511627776,g:1073741824,m:1048576,k:1024},n;return e=/^([0-9\.]+)([tmgk]?)$/.exec(e.toLowerCase().replace(/[^0-9\.tmkg]/g,"")),n=e[2],e=+e[1],t.hasOwnProperty(n)&&(e*=t[n]),Math.floor(e)}
vendor: 8,266 bytes, line 6811
6811,f=function(t){var n=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=n.shift();return"undefined"!==e(t)?t:""})};return{guid:l,typeOf:e,extend:t,each:n,isEmptyObj:i,inSeries:r,inParallel:o,inArray:a,arrayDiff:s,arrayIntersect:u,toArray:c,trim:d,sprintf:f,parseSizeStr:h}}),i(c,[u],function(e){function t(e,t,n){var i=0,r=0,o=0,a={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return e=(""+e).replace(/[_\-+]/g,"."),e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),e.length?e.split("."):[-8]},u=function(e){return e?isNaN(e)?a[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),r=Math.max(e.length,t.length),i=0;r>i;i++)if(e[i]!=t[i]){if(e[i]=u(e[i]),t[i]=u(t[i]),e[i]<t[i]){o=-1;break}if(e[i]>t[i]){o=1;break}}if(!n)return o;switch(n){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return 0>=o;case"==":case"=":case"eq":return 0===o;case"<>":case"!=":case"ne":return 0!==o;case"":case"<":case"lt":return 0>o;default:return null}}var n=function(e){var t="",n="?",i="function",r="undefined",o="object",a="major",s="model",u="name",c="type",l="vendor",d="version",h="architecture",f="console",p="mobile",m="tablet",g={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},v={rgx:function(){for(var t,n=0,a,s,u,c,l,d,h=arguments;n<h.length;n+=2){var f=h[n],p=h[n+1];if(typeof t===r){t={};for(u in p)c=p[u],typeof c===o?t[c[0]]=e:t[c]=e}for(a=s=0;a<f.length;a++)if(l=f[a].exec(this.getUA())){for(u=0;u<p.length;u++)d=l[++s],c=p[u],typeof c===o&&c.length>0?2==c.length?typeof c[1]==i?t[c[0]]=c[1].call(this,d):t[c[0]]=c[1]:3==c.length?typeof c[1]!==i||c[1].exec&&c[1].test?t[c[0]]=d?d.replace(c[1],c[2]):e:t[c[0]]=d?c[1].call(this,d,c[2]):e:4==c.length&&(t[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):e):t[c]=d?d:e;break}if(l)break}return t},str:function(t,i){for(var r in i)if(typeof i[r]===o&&i[r].length>0){for(var a=0;a<i[r].length;a++)if(g.has(i[r][a],t))return r===n?e:r}else if(g.has(i[r],t))return r===n?e:r;return t}},w={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}},y={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[u,d],[/\s(opr)\/([\w\.]+)/i],[[u,"Opera"],d],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i],[u,d],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[u,"IE"],d],[/(edge)\/((\d+)?[\w\.]+)/i],[u,d],[/(yabrowser)\/([\w\.]+)/i],[[u,"Yandex"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],d],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i],[u,d],[/(dolfin)\/([\w\.]+)/i],[[u,"Dolphin"],d],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[u,"Chrome"],d],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[d,[u,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[d,[u,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[d,[u,"Facebook"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[d,[u,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[d,u],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[u,[d,v.str,w.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[u,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[u,"Netscape"],d],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[u,d]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[u,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[u,d],[/rv\:([\w\.]+).*(gecko)/i],[d,u]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[u,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[u,[d,v.str,w.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[d,v.str,w.os.windows.version]],[/\((bb)(10);/i],[[u,"BlackBerry"],d],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[u,d],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[u,"Symbian"],d],[/\((series40);/i],[u],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"Firefox OS"],d],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[u,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],d],[/(sunos)\s?([\w\.]+\d)*/i],[[u,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[u,d],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[u,"iOS"],[d,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[u,"Mac OS"],[d,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[u,d]]},E=function(e){var n=e||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:t);this.getBrowser=function(){return v.rgx.apply(this,y.browser)},this.getEngine=function(){return v.rgx.apply(this,y.engine)},this.getOS=function(){return v.rgx.apply(this,y.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this.setUA(n)};return E}(),i=function(){var t={define_property:function(){return!1}(),create_canvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),return_response_type:function(t){try{if(-1!==e.inArray(t,["","text","document"]))return!0;if(window.XMLHttpRequest){var n=new XMLHttpRequest;if(n.open("get","/"),"responseType"in n)return n.responseType=t,n.responseType===t}}catch(i){}return!1},use_data_uri:function(){var e=new Image;return e.onload=function(){t.use_data_uri=1===e.width&&1===e.height},setTimeout(function(){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return t.use_data_uri&&("IE"!==o.browser||o.version>=9)},use_data_uri_of:function(e){return t.use_data_uri&&33e3>e||t.use_data_uri_over32kb()},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/))return!1;var e=document.createElement("input");return e.setAttribute("type","file"),!e.disabled}};return function(n){var i=[].slice.call(arguments);return i.shift(),"function"===e.typeOf(t[n])?t[n].apply(this,i):!!t[n]}}(),r=(new n).getResult(),o={can:i,uaParser:n,browser:r.browser.name,version:r.browser.version,os:r.os.name,osVersion:r.os.version,verComp:t,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return o.OS=o.os,o}),i(l,[u],function(e){var t={};return{addI18n:function(n){return e.extend(t,n)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)}
6811,sprintf:function(t){var n=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=n.shift();return"undefined"!==e.typeOf(t)?t:""})}}}),i(d,[u,l],function(e,t){var n="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",i={mimes:{},extensions:{},addMimeType:function(e){var t=e.split(/,/),n,i,r;for(n=0;n<t.length;n+=2){for(r=t[n+1].split(/ /),i=0;i<r.length;i++)this.mimes[r[i]]=t[n];this.extensions[t[n]]=r}},extList2mimes:function(t,n){var i=this,r,o,a,s,u=[];for(o=0;o<t.length;o++)for(r=t[o].extensions.split(/\s*,\s*/),a=0;a<r.length;a++){if("*"===r[a])return[];if(s=i.mimes[r[a]],s&&-1===e.inArray(s,u)&&u.push(s),n&&/^\w+$/.test(r[a]))u.push("."+r[a]);else if(!s)return[]}return u},mimes2exts:function(t){var n=this,i=[];return e.each(t,function(t){if("*"===t)return i=[],!1;var r=t.match(/^(\w+)\/(\*|\w+)$/);r&&("*"===r[2]?e.each(n.extensions,function(e,t){new RegExp("^"+r[1]+"/").test(t)&&[].push.apply(i,n.extensions[t])}):n.extensions[t]&&[].push.apply(i,n.extensions[t]))}),i},mimes2extList:function(n){var i=[],r=[];return"string"===e.typeOf(n)&&(n=e.trim(n).split(/\s*,\s*/)),r=this.mimes2exts(n),i.push({title:t.translate("Files"),extensions:r.length?r.join(","):"*"}),i.mimes=n,i},getFileExtension:function(e){var t=e&&e.match(/\.([^.]+)$/);return t?t[1].toLowerCase():""},getFileMime:function(e){return this.mimes[this.getFileExtension(e)]||""}};return i.addMimeType(n),i}),i(h,[c],function(e){var t=function(e){return"string"!=typeof e?e:document.getElementById(e)},n=function(e,t){if(!e.className)return!1;var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return n.test(e.className)},i=function(e,t){n(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},r=function(e,t){if(e.className){var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(n,function(e,t,n){return" "===t&&" "===n?" ":""})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},a=function(t,n){function i(e){var t,n,i=0,r=0;return e&&(n=e.getBoundingClientRect(),t="CSS1Compat"===s.compatMode?s.documentElement:s.body,i=n.left+t.scrollLeft,r=n.top+t.scrollTop),{x:i,y:r}}var r=0,o=0,a,s=document,u,c;if(t=t,n=n||s.body,t&&t.getBoundingClientRect&&"IE"===e.browser&&(!s.documentMode||s.documentMode<8))return u=i(t),c=i(n),{x:u.x-c.x,y:u.y-c.y};for(a=t;a&&a!=n&&a.nodeType;)r+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=t.parentNode;a&&a!=n&&a.nodeType;)r-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode;return{x:r,y:o}},s=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:n,addClass:i,removeClass:r,getStyle:o,getPos:a,getSize:s}}),i(f,[u],function(e){function t(e,t){var n;for(n in e)if(e[n]===t)return n;return null}
6811return{RuntimeError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": RuntimeError "+this.code}var i={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(n,i),n.prototype=Error.prototype,n}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name="OperationNotAllowedException"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": ImageError "+this.code}var i={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3};return e.extend(n,i),n.prototype=Error.prototype,n}(),FileException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": FileException "+this.code}var i={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(n,i),n.prototype=Error.prototype,n}(),DOMException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": DOMException "+this.code}var i={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ER
vendor: 5,558 bytes, line 6811
6811R:24,DATA_CLONE_ERR:25};return e.extend(n,i),n.prototype=Error.prototype,n}(),EventException:function(){function t(e){this.code=e,this.name="EventException"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),i(p,[c,f,u],function(e,t,n){function i(){var e={};n.extend(this,{uid:null,init:function(){this.uid||(this.uid=n.guid("uid_"))},addEventListener:function(t,i,r,o){var a=this,s;return this.hasOwnProperty("uid")||(this.uid=n.guid("uid_")),t=n.trim(t),/\s/.test(t)?void n.each(t.split(/\s+/),function(e){a.addEventListener(e,i,r,o)}):(t=t.toLowerCase(),r=parseInt(r,10)||0,s=e[this.uid]&&e[this.uid][t]||[],s.push({fn:i,priority:r,scope:o||this}),e[this.uid]||(e[this.uid]={}),void(e[this.uid][t]=s))},hasEventListener:function(t){var n=t?e[this.uid]&&e[this.uid][t]:e[this.uid];return n?n:!1},removeEventListener:function(t,i){t=t.toLowerCase();var r=e[this.uid]&&e[this.uid][t],o;if(r){if(i){for(o=r.length-1;o>=0;o--)if(r[o].fn===i){r.splice(o,1);break}}else r=[];r.length||(delete e[this.uid][t],n.isEmptyObj(e[this.uid])&&delete e[this.uid])}},removeAllEventListeners:function(){e[this.uid]&&delete e[this.uid]},dispatchEvent:function(i){var r,o,a,s,u={},c=!0,l;if("string"!==n.typeOf(i)){if(s=i,"string"!==n.typeOf(s.type))throw new t.EventException(t.EventException.UNSPECIFIED_EVENT_TYPE_ERR);i=s.type,s.total!==l&&s.loaded!==l&&(u.total=s.total,u.loaded=s.loaded),u.async=s.async||!1}if(-1!==i.indexOf("::")?!function(e){r=e[0],i=e[1]}(i.split("::")):r=this.uid,i=i.toLowerCase(),o=e[r]&&e[r][i]){o.sort(function(e,t){return t.priority-e.priority}),a=[].slice.call(arguments),a.shift(),u.type=i,a.unshift(u);var d=[];n.each(o,function(e){a[0].target=e.scope,u.async?d.push(function(t){setTimeout(function(){t(e.fn.apply(e.scope,a)===!1)},1)}):d.push(function(t){t(e.fn.apply(e.scope,a)===!1)})}),d.length&&n.inSeries(d,function(e){c=!e})}return c},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(e){var t=this;this.bind(e.join(" "),function(e){var t="on"+e.type.toLowerCase();"function"===n.typeOf(this[t])&&this[t].apply(this,arguments)}),n.each(e,function(e){e="on"+e.toLowerCase(e),"undefined"===n.typeOf(t[e])&&(t[e]=null)})}})}return i.instance=new i,i}),i(m,[c,u,h,p],function(e,t,n,i){function r(e,i,o,s,u){var c=this,l,d=t.guid(i+"_"),h=u||"browser";e=e||{},a[d]=this,o=t.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},o),e.preferred_caps&&(h=r.getMode(s,e.preferred_caps,h)),l=function(){var e={};return{exec:function(t,n,i,r){return l[n]&&(e[t]||(e[t]={context:this,instance:new l[n]}),e[t].instance[i])?e[t].instance[i].apply(this,r):void 0},removeInstance:function(t){delete e[t]},removeAllInstances:function(){var n=this;t.each(e,function(e,i){"function"===t.typeOf(e.instance.destroy)&&e.instance.destroy.call(e.context),n.removeInstance(i)})}}}(),t.extend(this,{initialized:!1,uid:d,type:i,mode:r.getMode(s,e.required_caps,h),shimid:d+"_container",clients:0,options:e,can:function(e,n){var i=arguments[2]||o;if("string"===t.typeOf(e)&&"undefined"===t.typeOf(n)&&(e=r.parseCaps(e)),"object"===t.typeOf(e)){for(var a in e)if(!this.can(a,e[a],i))return!1;return!0}return"function"===t.typeOf(i[e])?i[e].call(this,n):n===i[e]},getShimContainer:function(){var e,i=n.get(this.shimid);return i||(e=this.options.container?n.get(this.options.container):document.body,i=document.createElement("div"),i.id=this.shimid,i.className="moxie-shim moxie-shim-"+this.type,t.extend(i.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),e.appendChild(i),e=null),i},getShim:function(){return l},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec.call(this,this.uid,e,t,n)},exec:function(e,t){var n=[].slice.call(arguments,2);return c[e]&&c[e][t]?c[e][t].apply(this,n):c.shimExec.apply(this,arguments)},destroy:function(){if(c){var e=n.get(this.shimid);e&&e.parentNode.removeChild(e),l&&l.removeAllInstances(),this.unbindAll(),delete a[this.uid],this.uid=null,d=c=l=e=null}}}),this.mode&&e.required_caps&&!this.can(e.required_caps)&&(this.mode=!1)}var o={},a={};return r.order="html5,flash,silverlight,html4",r.getRuntime=function(e){return a[e]?a[e]:!1},r.addConstructor=function(e,t){t.prototype=i.instance,o[e]=t},r.getConstructor=function(e){return o[e]||null},r.getInfo=function(e){var t=r.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},r.parseCaps=function(e){var n={};return"string"!==t.typeOf(e)?e||{}:(t.each(e.split(","),function(e){n[e]=!0}),n)},r.can=function(e,t){var n,i=r.getConstructor(e),o;return i?(n=new i({required_caps:t}),o=n.mode,n.destroy(),!!o):!1},r.thatCan=function(e,t){var n=(t||r.order).split(/\s*,\s*/);for(var i in n)if(r.can(n[i],e))return n[i];return null},r.getMode=function(e,n,i){var r=null;if("undefined"===t.typeOf(i)&&(i="browser"),n&&!t.isEmptyObj(e)){if(t.each(n,function(n,i){if
6811(e.hasOwnProperty(i)){var o=e[i](n);if("string"==typeof o&&(o=[o]),r){if(!(r=t.arrayIntersect(r,o)))return r=!1}else r=o}}),r)return-1!==t.inArray(i,r)?i:r[0];if(r===!1)return!1}return i},r.capTrue=function(){return!0},r.capFalse=function(){return!1},r.capTest=function(e){return function(){return!!e}},r}),i(g,[c,f,u,m],function(e,t,n,i){return function r(){var e;n.extend(this,{connectRuntime:function(r){function o(n){var s,u;return n.length?(s=n.shift().toLowerCase(),(u=i.getConstructor(s))?(e=new u(r),e.bind("Init",function(){e.initialized=!0,setTimeout(function(){e.clients++,a.trigger("RuntimeInit",e)},1)}),e.bind("Error",function(){e.destroy(),o(n)}),e.mode?void e.init():void e.trigger("Error")):void o(n)):(a.trigger("RuntimeError",new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)),void(e=null))}var a=this,s;if("string"===n.typeOf(r)?s=r:"string"===n.typeOf(r.ruid)&&(s=r.ruid),s){if(e=i.getRuntime(s))return e.clients++,e;throw new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)}o((r.runtime_order||i.order).split(/\s*,\s*/))},disconnectRuntime:function(){e&&--e.clients<=0&&e.destroy(),e=null},getRuntime:function(){return e&&e.uid?e:e=null},exec:function(){return e?e.exec.apply(this,arguments):null}})}}),i(v,[u,c,d,h,f,p,l,m,g],function(e,t,n,i,r,o,a,s,u){function c(t){var o=this,c,d,h;if(-1!==e.inArray(e.typeOf(t),["string","node"])&&(t={browse_button:t}),d=i.get(t.browse_button),!d)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR);h={accept:[{title:a.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:d.parentNode||document.body},t=e.extend({},h,t),"string"==typeof t.required_caps&&(t.required_caps=s.parseCaps(t.required_caps)),"string"==typeof t.accept&&(t.accept=n.mimes2extList(t.accept)),c=i.get(t.container),c||(c=document.body),"static"===i.getStyle(c,"position")&&(c.style.position="relative"),c=d=null,u.call(o),e.extend(o,{uid:e.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){o.bind("RuntimeInit",function(n,r){o.ruid=r.uid,o.shimid=r.shimid,o.bind("Ready",function(){o.trigger("Refresh")},999),o.bind("Refresh",function(){var n,o,a,s;a=i.get(t.browse_button),s=i.get(r.shimid),a&&(n=i.getPos(a,i.get(t.container)),o=i.getSize(a),s&&e.extend(s.style,{top:n.y+"px",left:n.x+"px",width:o.w+"px",height:o.h+"px"})),s=a=null}),r.exec.call(o,"FileInput","init",t)}),o.connectRuntime(e.extend({},t,{required_caps:{select_file:!0}}))},disable:function(t){var n=this.getRuntime();n&&n.exec.call(this,"FileInput","disable","undefined"===e.typeOf(t)?!0:t)},refresh:function(){o.trigger("Refresh")},destroy:function(){var t=this.getRuntime();t&&(t.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===e.typeOf(this.files)&&e.each(this.files,function(e){e.destroy()}),this.files=null,this.unbindAll()}}),this.handleEventProps(l)}var l=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];return c.prototype=o.instance,c}),i(w,[],function(){var e=function(e){return unescape(encodeURIComponent(e))},t=function(e){return decodeURIComponent(escape(e))},n=function(e,n){if("function"==typeof window.atob)return n?t(window.atob(e)):window.atob(e);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,h=0,f=0,p="",m=[];if(!e)return e;e+="";do s=i.indexOf(e.charAt(h++)),u=i.indexOf(e.charAt(h++)),c=i.indexOf(e.charAt(h++)),l=i.indexOf(e.charAt(h++)),d=s<<18|u<<12|c<<6|l,r=d>>16&255,o=d>>8&255,a=255&d,64==c?m[f++]=String.fromCharCode(r):64==l?m[f++]=String.fromCharCode(r,o):m[f++]=String.fromCharCode(r,o,a);while(h<e.length);return p=m.join(""),n?t(p):p},i=function(t,n){if(n&&(t=e(t)),"function"==typeof window.btoa)return window.btoa(t);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,h=0,f=0,p="",m=[];if(!t)return t;do r=t.charCodeAt(h++),o=t.charCodeAt(h++),a=t.charCodeAt(h++),d=r<<16|o<<8|a,s=d>>18&63,u=d>>12&63,c=d>>6&63,l=63&d,m[f++]=i.charAt(s)+i.charAt(u)+i.charAt(c)+i.charAt(l);while(h<t.length);p=m.join("");var g=t.length%3;return(g?p.slice(0,g-3):p)+"===".slice(g||3)};return{utf8_encode:e,utf8_decode:t,atob:n,btoa:i}}),i(y,[u,w,g],function(e,t,n){function i(o,a){function s(t,n,o){var a,s=r[this.uid];return"string"===e.typeOf(s)&&s.length?(a=new i(null,{type:o,size:n-t}),a.detach(s.substr(t,a.size)),a):null}n.call(this),o&&this.connectRuntime(o),a?"string"===e.typeOf(a)&&(a={data:a}):a={},e.extend(this,{uid:a.uid||e.guid("uid_"),ruid:o,size:a.size||0,type:a.type||"",slice:function(e,t,n){return this.isDetached()?s.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.get
vendor: 14,198 bytes, lines 6811-6812
6811Source(),e,t,n)},getSource:function(){return r[this.uid]?r[this.uid]:null},detach:function(e){if(this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),e=e||"","data:"==e.substr(0,5)){var n=e.indexOf(";base64,");this.type=e.substring(5,n),e=t.atob(e.substring(n+8))}this.size=e.length,r[this.uid]=e},isDetached:function(){return!this.ruid&&"string"===e.typeOf(r[this.uid])},destroy:function(){this.detach(),delete r[this.uid]}}),a.data?this.detach(a.data):r[this.uid]=a}var r={};return i}),i(E,[u,d,y],function(e,t,n){function i(i,r){r||(r={}),n.apply(this,arguments),this.type||(this.type=t.getFileMime(r.name));var o;if(r.name)o=r.name.replace(/\\/g,"/"),o=o.substr(o.lastIndexOf("/")+1);else if(this.type){var a=this.type.split("/")[0];o=e.guid((""!==a?a:"file")+"_"),t.extensions[this.type]&&(o+="."+t.extensions[this.type][0])}e.extend(this,{name:o||e.guid("file_"),relativePath:"",lastModifiedDate:r.lastModifiedDate||(new Date).toLocaleString()})}return i.prototype=n.prototype,i}),i(_,[l,h,f,u,c,E,g,p,d],function(e,t,n,i,r,o,a,s,u){function c(n){var r=this,o;"string"==typeof n&&(n={drop_zone:n}),o={accept:[{title:e.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},n="object"==typeof n?i.extend({},o,n):o,n.container=t.get(n.drop_zone)||document.body,"static"===t.getStyle(n.container,"position")&&(n.container.style.position="relative"),"string"==typeof n.accept&&(n.accept=u.mimes2extList(n.accept)),a.call(r),i.extend(r,{uid:i.guid("uid_"),ruid:null,files:null,init:function(){r.bind("RuntimeInit",function(e,t){r.ruid=t.uid,t.exec.call(r,"FileDrop","init",n),r.dispatchEvent("ready")}),r.connectRuntime(n)},destroy:function(){var e=this.getRuntime();e&&(e.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null,this.unbindAll()}}),this.handleEventProps(l)}var l=["ready","dragenter","dragleave","drop","error"];return c.prototype=s.instance,c}),i(b,[u,w,f,p,y,g],function(e,t,n,i,r,o){function a(){function i(e,i){var o=this;if(this.trigger("loadstart"),this.readyState===a.LOADING)return this.trigger("error",new n.DOMException(n.DOMException.INVALID_STATE_ERR)),void this.trigger("loadend");if(!(i instanceof r))return this.trigger("error",new n.DOMException(n.DOMException.NOT_FOUND_ERR)),void this.trigger("loadend");if(this.result=null,this.readyState=a.LOADING,i.isDetached()){var s=i.getSource();switch(e){case"readAsText":case"readAsBinaryString":this.result=s;break;case"readAsDataURL":this.result="data:"+i.type+";base64,"+t.btoa(s)}this.readyState=a.DONE,this.trigger("load"),this.trigger("loadend")}else this.connectRuntime(i.ruid),this.exec("FileReader","read",e,i)}o.call(this),e.extend(this,{uid:e.guid("uid_"),readyState:a.EMPTY,result:null,error:null,readAsBinaryString:function(e){i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){i.call(this,"readAsDataURL",e)},readAsText:function(e){i.call(this,"readAsText",e); 6812},abort:function(){this.result=null,-1===e.inArray(this.readyState,[a.EMPTY,a.DONE])&&(this.readyState===a.LOADING&&(this.readyState=a.DONE),this.exec("FileReader","abort"),this.trigger("abort"),this.trigger("loadend"))},destroy:function(){this.abort(),this.exec("FileReader","destroy"),this.disconnectRuntime(),this.unbindAll()}}),this.handleEventProps(s),this.bind("Error",function(e,t){this.readyState=a.DONE,this.error=t},999),this.bind("Load",function(e){this.readyState=a.DONE},999)}var s=["loadstart","progress","load","abort","error","loadend"];return a.EMPTY=0,a.LOADING=1,a.DONE=2,a.prototype=i.instance,a}),i(x,[],function(){var e=function(t,n){for(var i=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],r=i.length,o={http:80,https:443},a={},s=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,u=s.exec(t||"");r--;)u[r]&&(a[i[r]]=u[r]);if(!a.scheme){n&&"string"!=typeof n||(n=e(n||document.location.href)),a.scheme=n.scheme,a.host=n.host,a.port=n.port;var c="";/^[^\/]/.test(a.path)&&(c=n.path,c=/\/[^\/]*\.[^\/]*$/.test(c)?c.replace(/\/[^\/]+$/,"/"):c.replace(/\/?$/,"/")),a.path=c+(a.path||"")}return a.port||(a.port=o[a.scheme]||80),a.port=parseInt(a.port,10),a.path||(a.path="/"),delete a.source,a},t=function(t){var n={http:80,https:443},i="object"==typeof t?t:e(t);return i.scheme+"://"+i.host+(i.port!==n[i.scheme]?":"+i.port:"")+i.path+(i.query?i.query:"")},n=function(t){function n(e){return[e.scheme,e.host,e.port].join("/")}return"string"==typeof t&&(t=e(t)),n(e())===n(t)};return{parseUrl:e,resolveUrl:t,hasSameOrigin:n}}),i(R,[u,g,p],function(e,t,n){function i(){this.uid=e.guid("uid_"),t.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return i.prototype=n.instance,i}),i(A,[u,g,w],function(e,t,n){return function(){function i(e,t){if(!t.isDetached()){var i=this.connectRuntime(t.ruid).exec.call(this,"FileReaderSync","read",e,t);return this.disconnectRuntime(),i}var r=t.getSource();switch(e){case"readAsBinaryString":return r;case"readAsDataURL":return"data:"+t.type+";base64,"+n.btoa(r);case"readAsText":for(var o="",a=0,s=r.length;s>a;a++)o+=String.fromCharCode(r[a]);return o}}t.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return i.call(this,"readAsDataURL",e)},readAsText:function(e){return i.call(this,"readAsText",e)}})}}),i(I,[f,u,y],function(e,t,n){function i(){var e,i=[];t.extend(this,{append:function(r,o){var a=this,s=t.typeOf(o);o instanceof n?e={name:r,value:o}:"array"===s?(r+="[]",t.each(o,function(e){a.append(r,e)})):"object"===s?t.each(o,function(e,t){a.append(r+"["+t+"]",e)}):"null"===s||"undefined"===s||"number"===s&&isNaN(o)?a.append(r,"false"):i.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(n){t.each(i,function(e){n(e.value,e.name)}),e&&n(e.value,e.name)},destroy:function(){e=null,i=[]}})}return i}),i(T,[u,f,p,w,x,m,R,y,A,I,c,d],function(e,t,n,i,r,o,a,s,u,c,l,d){function h(){this.uid=e.guid("uid_")}function f(){function n(e,t){return w.hasOwnProperty(e)?1===arguments.length?l.can("define_property")?w[e]:v[e]:void(l.can("define_property")?w[e]=t:v[e]=t):void 0}function u(t){function i(){B&&(B.destroy(),B=null),s.dispatchEvent("loadend"),s=null}function r(r){B.bind("LoadStart",function(e){n("readyState",f.LOADING),s.dispatchEvent("readystatechange"),s.dispatchEvent(e),O&&s.upload.dispatchEvent(e)}),B.bind("Progress",function(e){n("readyState")!==f.LOADING&&(n("readyState",f.LOADING),s.dispatchEvent("readystatechange")),s.dispatchEvent(e)}),B.bind("UploadProgress",function(e){O&&s.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),B.bind("Load",function(t){n("readyState",f.DONE),n("status",Number(r.exec.call(B,"XMLHttpRequest","getStatus")||0)),n("statusText",p[n("status")]||""),n("response",r.exec.call(B,"XMLHttpRequest","getResponse",n("responseType"))),~e.inArray(n("responseType"),["text",""])?n("responseText",n("response")):"document"===n("responseType")&&n("responseXML",n("response")),k=r.exec.call(B,"XMLHttpRequest","getAllResponseHeaders"),s.dispatchEvent("readystatechange"),n("status")>0?(O&&s.upload.dispatchEvent(t),s.dispatchEvent(t)):(N=!0,s.dispatchEvent("error")),i()}),B.bind("Abort",function(e){s.dispatchEvent(e),i()}),B.bind("Error",function(e){N=!0,n("readyState",f.DONE),s.dispatchEvent("readystatechange"),D=!0,s.dispatchEvent(e),i()}),r.exec.call(B,"XMLHttpRequest","send",{url:E,method:_,async:y,user:x,password:R,headers:b,mimeType:I,encoding:A,responseType:s.responseType,withCredentials:s.withCredentials,options:H},t)}var s=this;C=(new Date).getTime(),B=new a,"string"==typeof H.required_caps&&(H.required_caps=o.parseCaps(H.required_caps)),H.required_caps=e.extend({},H.required_caps,{return_response_type:s.responseType}),t instanceof c&&(H.required_caps.send_multipart=!0),e.isEmptyObj(b)||(H.required_caps.send_custom_headers=!0),L||(H.required_caps.do_cors=!0),H.ruid?r(B.connectRuntime(H)):(B.bind("RuntimeInit",function(e,t){r(t)}),B.bind("RuntimeError",function(e,t){s.dispatchEvent("RuntimeError",t)}),B.connectRuntime(H))}function g(){n("responseText",""),n("responseXML",null),n("response",null),n("status",0),n("statusText",""),C=M=null}var v=this,w={timeout:0,readyState:f.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},y=!0,E,_,b={},x,R,A=null,I=null,T=!1,S=!1,O=!1,D=!1,N=!1,L=!1,C,M,F=null,P=null,H={},B,k="",U;e.extend(this,w,{uid:e.guid("uid_"),upload:new h,open:function(o,a,s,u,c){var l;if(!o||!a)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(o)||i.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(_=o.toUpperCase()),~e.inArray(_,["CONNECT","TRACE","TRACK"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(a=i.utf8_encode(a),l=r.parseUrl(a),L=r.hasSameOrigin(l),E=r.resolveUrl(a),(u||c)&&!L)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(x=u||l.user,R=c||l.pass,y=s||!0,y===!1&&(n("timeout")||n("withCredentials")||""!==n("responseType")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);T=!y,S=!1,b={},g.call(this),n("readyState",f.OPENED),this.dispatchEvent("readystatechange")},setRequestHeader:function(r,o){var a=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(n("readyState")!==f.OPENED||S)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(r)||i.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,a)||/^(proxy\-|sec\-)/.test(r)?!1:(b[r]?b[r]+=", "+o:b[r]=o,!0)},getAllResponseHeaders:function(){return k||""},getResponseHeader:function(t){return t=t.toLowerCase(),N||~e.inArray(t,["set-cookie","set-cookie2"])?null:k&&""!==k&&(U||(U={},e.each(k.split(/\r\n/),function(t){var n=t.split(/:\s+/);2===n.length&&(n[0]=e.trim(n[0]),U[n[0].toLowerCase()]={header:n[0],value:e.trim(n[1])})})),U.hasOwnProperty(t))?U[t].header+": "+U[t].value:null},overrideMimeType:function(i){var r,o;if(~e.inArray(n("readyState"),[f.LOADING,f.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i=e.trim(i.toLowerCase()),/;/.test(i)&&(r=i.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(i=r[1],r[2]&&(o=r[2])),!d.mimes[i])throw new t.DOMException(t.DOMException.SYNTAX_ERR);F=i,P=o},send:function(n,r){if(H="string"===e.typeOf(r)?{ruid:r}:r?r:{},this.readyState!==f.OPENED||S)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n instanceof s)H.ruid=n.ruid,I=n.type||"application/octet-stream";else if(n instanceof c){if(n.hasBlob()){var o=n.getBlob();H.ruid=o.ruid,I=o.type||"application/octet-stream"}}else"string"==typeof n&&(A="UTF-8",I="text/plain;charset=UTF-8",n=i.utf8_encode(n));this.withCredentials||(this.withCredentials=H.required_caps&&H.required_caps.send_browser_cookies&&!L),O=!T&&this.upload.hasEventListener(),N=!1,D=!n,T||(S=!0),u.call(this,n)},abort:function(){if(N=!0,T=!1,~e.inArray(n("readyState"),[f.UNSENT,f.OPENED,f.DONE]))n("readyState",f.UNSENT);else{if(n("readyState",f.DONE),S=!1,!B)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);B.getRuntime().exec.call(B,"XMLHttpRequest","abort",D),D=!0}},destroy:function(){B&&("function"===e.typeOf(B.destroy)&&B.destroy(),B=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}}),this.handleEventProps(m.concat(["readystatechange"])),this.upload.handleEventProps(m)}var p={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};h.prototype=n.instance;var m=["loadstart","progress","abort","error","load","timeout","loadend"],g=1,v=2;return f.UNSENT=0,f.OPENED=1,f.HEADERS_RECEIVED=2,f.LOADING=3,f.DONE=4,f.prototype=n.instance,f}),i(S,[u,w,g,p],function(e,t,n,i){function r(){function i(){l=d=0,c=this.result=null}function o(t,n){var i=this;u=n,i.bind("TransportingProgress",function(t){d=t.loaded,l>d&&-1===e.inArray(i.state,[r.IDLE,r.DONE])&&a.call(i)},999),i.bind("TransportingComplete",function(){d=l,i.state=r.DONE,c=null,i.result=u.exec.call(i,"Transporter","getAsBlob",t||"")},999),i.state=r.BUSY,i.trigger("TransportingStarted"),a.call(i)}function a(){var e=this,n,i=l-d;h>i&&(h=i),n=t.btoa(c.substr(d,h)),u.exec.call(e,"Transporter","receive",n,l)}var s,u,c,l,d,h;n.call(this),e.extend(this,{uid:e.guid("uid_"),state:r.IDLE,result:null,transport:function(t,n,r){var a=this;if(r=e.extend({chunk_size:204798},r),(s=r.chunk_size%3)&&(r.chunk_size+=3-s),h=r.chunk_size,i.call(this),c=t,l=t.length,"string"===e.typeOf(r)||r.ruid)o.c
vendor: 4,524 bytes, line 6812
6812all(a,n,this.connectRuntime(r));else{var u=function(e,t){a.unbind("RuntimeInit",u),o.call(a,n,t)};this.bind("RuntimeInit",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,"Transporter","clear"),e.trigger("TransportingAborted")),i.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),i.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=i.instance,r}),i(O,[u,h,f,A,T,m,g,S,c,p,y,E,w],function(e,t,n,i,r,o,a,s,u,c,l,d,h){function f(){function i(e){e||(e=this.exec("Image","getInfo")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name)}function c(t){var i=e.typeOf(t);try{if(t instanceof f){if(!t.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);m.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,["image/jpeg","image/png"]))throw new n.ImageError(n.ImageError.WRONG_FORMAT);g.apply(this,arguments)}else if(-1!==e.inArray(i,["blob","file"]))c.call(this,new d(null,t),arguments[1]);else if("string"===i)"data:"===t.substr(0,5)?c.call(this,new l(null,{data:t}),arguments[1]):v.apply(this,arguments);else{if("node"!==i||"img"!==t.nodeName.toLowerCase())throw new n.DOMException(n.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger("error",r.code)}}function m(t,n){var i=this.connectRuntime(t.ruid);this.ruid=i.uid,i.exec.call(this,"Image","loadFromImage",t,"undefined"===e.typeOf(n)?!0:n)}function g(t,n){function i(e){r.ruid=e.uid,e.exec.call(r,"Image","loadFromBlob",t)}var r=this;r.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){i(t)}),n&&"string"==typeof n.required_caps&&(n.required_caps=o.parseCaps(n.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},n))):i(this.connectRuntime(t.ruid))}function v(e,t){var n=this,i;i=new r,i.open("get",e),i.responseType="blob",i.onprogress=function(e){n.trigger(e)},i.onload=function(){g.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind("RuntimeError",function(e,t){n.trigger("RuntimeError",t)}),i.send(null,t)}a.call(this),e.extend(this,{uid:e.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){c.apply(this,arguments)},downsize:function(t){var i={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:!1,preserveHeaders:!0,resample:!1};t="object"==typeof t?e.extend(i,t):e.extend(i,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>f.MAX_RESIZE_WIDTH||this.height>f.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);this.exec("Image","downsize",t.width,t.height,t.crop,t.preserveHeaders)}catch(r){this.trigger("error",r.code)}},crop:function(e,t,n){this.downsize(e,t,!0,n)},getAsCanvas:function(){if(!u.can("create_canvas"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);var e=this.connectRuntime(this.ruid);return e.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsBlob",e||"image/jpeg",t||90)},getAsDataURL:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsDataURL",e||"image/jpeg",t||90)},getAsBinaryString:function(e,t){var n=this.getAsDataURL(e,t);return h.atob(n.substring(n.indexOf("base64,")+7))},embed:function(i,r){function o(t,r){var o=this;if(u.can("create_canvas")){var l=o.getAsCanvas();if(l)return i.appendChild(l),l=null,o.destroy(),void a.trigger("embedded")}var d=o.getAsDataURL(t,r);if(!d)throw new n.ImageError(n.ImageError.WRONG_FORMAT);if(u.can("use_data_uri_of",d.length))i.innerHTML='<img src="'+d+'" width="'+o.width+'" height="'+o.height+'" />',o.destroy(),a.trigger("embedded");else{var f=new s;f.bind("TransportingComplete",function(){c=a.connectRuntime(this.result.ruid),a.bind("Embedded",function(){e.extend(c.getShimContainer().style,{top:"0px",left:"0px",width:o.width+"px",height:o.height+"px"}),c=null},999),c.exec.call(a,"ImageView","display",this.result.uid,width,height),o.destroy()}),f.transport(h.atob(d.substring(d.indexOf("base64,")+7)),t,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:i})}}var a=this,c;
vendor: 17,976 bytes, lines 6812-6813
6812r=e.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90},r||{});try{if(!(i=t.get(i)))throw new n.DOMException(n.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);this.width>f.MAX_RESIZE_WIDTH||this.height>f.MAX_RESIZE_HEIGHT;var l=new f;return l.bind("Resize",function(){o.call(this,r.type,r.quality)}),l.bind("Load",function(){l.downsize(r)}),this.meta.thumb&&this.meta.thumb.width>=r.width&&this.meta.thumb.height>=r.height?l.load(this.meta.thumb.data):l.clone(this,!1),l}catch(d){this.trigger("error",d.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}}),this.handleEventProps(p),this.bind("Load Resize",function(){i.call(this)},999)}var p=["progress","load","error","resize","embedded"];return f.MAX_RESIZE_WIDTH=8192,f.MAX_RESIZE_HEIGHT=8192,f.prototype=c.instance,f}),i(D,[u,f,m,c],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue,c=e.extend({access_binary:s(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return r.can("access_binary")&&!!a.Image},display_media:s(i.can("create_canvas")||i.can("use_data_uri_over32kb")),do_cors:s(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:s(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&("IE"!==i.browser||i.verComp(i.version,9,">"))}()),filter_by_extension:s(function(){return"Chrome"===i.browser&&i.verComp(i.version,28,">=")||"IE"===i.browser&&i.verComp(i.version,10,">=")||"Safari"===i.browser&&i.verComp(i.version,7,">=")}()),return_response_headers:u,return_response_type:function(e){return"json"===e&&window.JSON?!0:i.can("return_response_type",e)},return_status_code:u,report_upload_progress:s(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return r.can("access_binary")&&i.can("create_canvas")},select_file:function(){return i.can("use_fileinput")&&window.File},select_folder:function(){return r.can("select_file")&&"Chrome"===i.browser&&i.verComp(i.version,21,">=")},select_multiple:function(){return r.can("select_file")&&!("Safari"===i.browser&&"Windows"===i.os)&&!("iOS"===i.os&&i.verComp(i.osVersion,"7.0.0",">")&&i.verComp(i.osVersion,"8.0.0","<"))},send_binary_string:s(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:s(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||r.can("send_binary_string")},slice_blob:s(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return r.can("slice_blob")&&r.can("send_multipart")},summon_file_dialog:function(){return r.can("select_file")&&("Firefox"===i.browser&&i.verComp(i.version,4,">=")||"Opera"===i.browser&&i.verComp(i.version,12,">=")||"IE"===i.browser&&i.verComp(i.version,10,">=")||!!~e.inArray(i.browser,["Chrome","Safari"]))},upload_filesize:u},arguments[2]);n.call(this,t,arguments[1]||o,c),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html5",a={};return n.addConstructor(o,r),a}),i(N,[u],function(e){function t(){this.returnValue=!1}function n(){this.cancelBubble=!0}var i={},r="moxie_"+e.guid(),o=function(o,a,s,u){var c,l;a=a.toLowerCase(),o.addEventListener?(c=s,o.addEventListener(a,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=n,s(e)},o.attachEvent("on"+a,c)),o[r]||(o[r]=e.guid()),i.hasOwnProperty(o[r])||(i[o[r]]={}),l=i[o[r]],l.hasOwnProperty(a)||(l[a]=[]),l[a].push({func:c,orig:s,key:u})},a=function(t,n,o){var a,s;if(n=n.toLowerCase(),t[r]&&i[t[r]]&&i[t[r]][n]){a=i[t[r]][n];for(var u=a.length-1;u>=0&&(a[u].orig!==o&&a[u].key!==o||(t.removeEventListener?t.removeEventListener(n,a[u].func,!1):t.detachEvent&&t.detachEvent("on"+n,a[u].func),a[u].orig=null,a[u].func=null,a.splice(u,1),o===s));u--);if(a.length||delete i[t[r]][n],e.isEmptyObj(i[t[r]])){delete i[t[r]];try{delete t[r]}catch(c){t[r]=s}}}},s=function(t,n){t&&t[r]&&e.each(i[t[r]],function(e,i){a(t,i,n)})};return{addEvent:o,removeEvent:a,removeAllEvents:s}}),i(L,[D,E,u,h,N,d,c],function(e,t,n,i,r,o,a){function s(){var e;n.extend(this,{init:function(s){var u=this,c=u.getRuntime(),l,d,h,f,p,m;e=s,h=e.accept.mimes||o.extList2mimes(e.accept,c.can("filter_by_extension")),d=c.getShimContainer(),d.innerHTML='<input id="'+c.uid+'" type="file" style="font-size:999px;opacity:0;"'+(e.multiple&&c.can("select_multiple")?"multiple":"")+(e.directory&&c.can("select_folder")?"webkitdirectory directory":"")+(h?' accept="'+h.join(",")+'"':"")+" />",l=i.get(c.uid),n.extend(l.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),f=i.get(e.browse_button),c.can("summon_file_dialog")&&("static"===i.getStyle(f,"position")&&(f.style.position="relative"),p=parseInt(i.getStyle(f,"z-index"),10)||1,f.style.zIndex=p,d.style.zIndex=p-1,r.addEvent(f,"click",function(e){var t=i.get(c.uid);t&&!t.disabled&&t.click(),e.preventDefault()},u.uid)),m=c.can("summon_file_dialog")?f:d,r.addEvent(m,"mouseover",function(){u.trigger("mouseenter")},u.uid),r.addEvent(m,"mouseout",function(){u.trigger("mouseleave")},u.uid),r.addEvent(m,"mousedown",function(){u.trigger("mousedown")},u.uid),r.addEvent(i.get(e.container),"mouseup",function(){u.trigger("mouseup")},u.uid),l.onchange=function g(i){if(u.files=[],n.each(this.files,function(n){var i="";return e.directory&&"."==n.name?!0:(n.webkitRelativePath&&(i="/"+n.webkitRelativePath.replace(/^\//,"")),n=new t(c.uid,n),n.relativePath=i,void u.files.push(n))}),"IE"!==a.browser&&"IEMobile"!==a.browser)this.value="";else{var r=this.cloneNode(!0);this.parentNode.replaceChild(r,this),r.onchange=g}u.files.length&&u.trigger("change")},u.trigger({type:"ready",async:!0}),d=null},disable:function(e){var t=this.getRuntime(),n;(n=i.get(t.uid))&&(n.disabled=!!e)},destroy:function(){var t=this.getRuntime(),n=t.getShim(),o=t.getShimContainer();r.removeAllEvents(o,this.uid),r.removeAllEvents(e&&i.get(e.container),this.uid),r.removeAllEvents(e&&i.get(e.browse_button),this.uid),o&&(o.innerHTML=""),n.removeInstance(this.uid),e=o=n=null}})}return e.FileInput=s}),i(C,[D,y],function(e,t){function n(){function e(e,t,n){var i;if(!window.File.prototype.slice)return(i=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?i.call(e,t,n):null;try{return e.slice(),e.slice(t,n)}catch(r){return e.slice(t,n-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))}}return e.Blob=n}),i(M,[D,E,u,h,N,d],function(e,t,n,i,r,o){function a(){function e(e){if(!e.dataTransfer||!e.dataTransfer.types)return!1;var t=n.toArray(e.dataTransfer.types||[]);return-1!==n.inArray("Files",t)||-1!==n.inArray("public.file-url",t)||-1!==n.inArray("application/x-moz-file",t)}function a(e,n){if(u(e)){var i=new t(g,e);i.relativePath=n||"",f.push(i)}}function s(e){for(var t=[],i=0;i<e.length;i++)[].push.apply(t,e[i].extensions.split(/\s*,\s*/));return-1===n.inArray("*",t)?t:[]}function u(e){if(!p.length)return!0;var t=o.getFileExtension(e.name);return!t||-1!==n.inArray(t,p)}function c(e,t){var i=[];n.each(e,function(e){var t=e.webkitGetAsEntry();t&&(t.isFile?a(e.getAsFile(),t.fullPath):i.push(t))}),i.length?l(i,t):t()}function l(e,t){var i=[];n.each(e,function(e){i.push(function(t){d(e,t)})}),n.inSeries(i,function(){t()})}function d(e,t){e.isFile?e.file(function(n){a(n,e.fullPath),t()},function(){t()}):e.isDirectory?h(e,t):t()}function h(e,t){function n(e){r.readEntries(function(t){t.length?([].push.apply(i,t),n(e)):e()},e)}var i=[],r=e.createReader();n(function(){l(i,t)})}var f=[],p=[],m,g;n.extend(this,{init:function(t){var i=this,o;m=t,g=i.ruid,p=s(m.accept),o=m.container,r.addEvent(o,"dragover",function(t){e(t)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")},i.uid),r.addEvent(o,"drop",function(t){e(t)&&(t.preventDefault(),f=[],t.dataTransfer.items&&t.dataTransfer.items[0].webkitGetAsEntry?c(t.dataTransfer.items,function(){i.files=f,i.trigger("drop")}):(n.each(t.dataTransfer.files,function(e){a(e)}),i.files=f,i.trigger("drop")))},i.uid),r.addEvent(o,"dragenter",function(e){i.trigger("dragenter")},i.uid),r.addEvent(o,"dragleave",function(e){i.trigger("dragleave")},i.uid)},destroy:function(){r.removeAllEvents(m&&i.get(m.container),this.uid),g=f=p=m=null}})}return e.FileDrop=a}),i(F,[D,w,u],function(e,t,n){function i(){function e(e){return t.atob(e.substring(e.indexOf("base64,")+7))}var i,r=!1;n.extend(this,{read:function(t,o){var a=this;a.result="",i=new window.FileReader,i.addEventListener("progress",function(e){a.trigger(e)}),i.addEventListener("load",function(t){a.result=r?e(i.result):i.result,a.trigger(t)}),i.addEventListener("error",function(e){a.trigger(e,i.error)}),i.addEventListener("loadend",function(e){i=null,a.trigger(e)}),"function"===n.typeOf(i[t])?(r=!1,i[t](o.getSource())):"readAsBinaryString"===t&&(r=!0,i.readAsDataURL(o.getSource()))},abort:function(){i&&i.abort()},destroy:function(){i=null}})}return e.FileReader=i}),i(P,[D,u,d,x,E,y,I,f,c],function(e,t,n,i,r,o,a,s,u){function c(){function e(e,t){var n=this,i,r;i=t.getBlob().getSource(),r=new window.FileReader,r.onload=function(){t.append(t.getBlobName(),new o(null,{type:i.type,data:r.result})),h.send.call(n,e,t)},r.readAsBinaryString(i)}function c(){return!window.XMLHttpRequest||"IE"===u.browser&&u.verComp(u.version,8,"<")?function(){for(var e=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(n){}}():new window.XMLHttpRequest}function l(e){var t=e.responseXML,n=e.responseText;return"IE"===u.browser&&n&&t&&!t.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(e.getResponseHeader("Content-Type"))&&(t=new window.ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.validateOnParse=!1,t.loadXML(n)),t&&("IE"===u.browser&&0!==t.parseError||!t.documentElement||"parsererror"===t.documentElement.tagName)?null:t}function d(e){var t="----moxieboundary"+(new Date).getTime(),n="--",i="\r\n",r="",a=this.getRuntime();if(!a.can("send_binary_string"))throw new s.RuntimeError(s.RuntimeError.NOT_SUPPORTED_ERR);return f.setRequestHeader("Content-Type","multipart/form-data; boundary="+t),e.each(function(e,a){r+=e instanceof o?n+t+i+'Content-Disposition: form-data; name="'+a+'"; filename="'+unescape(encodeURIComponent(e.name||"blob"))+'"'+i+"Content-Type: "+(e.type||"application/octet-stream")+i+i+e.getSource()+i:n+t+i+'Content-Disposition: form-data; name="'+a+'"'+i+i+unescape(encodeURIComponent(e))+i}),r+=n+t+n+i}var h=this,f,p;t.extend(this,{send:function(n,r){var s=this,l="Mozilla"===u.browser&&u.verComp(u.version,4,">=")&&u.verComp(u.version,7,"<"),h="Android Browser"===u.browser,m=!1;if(p=n.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),f=c(),f.open(n.method,n.url,n.async,n.user,n.password),r instanceof o)r.isDetached()&&(m=!0),r=r.getSource();else if(r instanceof a){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(s,r),m=!0;else if((l||h)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return void e.call(s,n,r);if(r instanceof a){var g=new window.FormData;r.each(function(e,t){e instanceof o?g.append(t,e.getSource()):g.append(t,e)}),r=g}}f.upload?(n.withCredentials&&(f.withCredentials=!0),f.addEventListener("load",function(e){s.trigger(e)}),f.addEventListener("error",function(e){s.trigger(e)}),f.addEventListener("progress",function(e){s.trigger(e)}),f.upload.addEventListener("progress",function(e){s.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):f.onreadystatechange=function v(){switch(f.readyState){case 1:break;case 2:break;case 3:var e,t;try{i.hasSameOrigin(n.url)&&(e=f.getResponseHeader("Content-Length")||0),f.responseText&&(t=f.responseText.length)}catch(r){e=t=0}s.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:f.onreadystatechange=function(){},0===f.status?s.trigger("error"):s.trigger("load")}},t.isEmptyObj(n.headers)||t.each(n.headers,function(e,t){f.setRequestHeader(t,e)}),""!==n.responseType&&"responseType"in f&&("json"!==n.responseType||u.can("return_response_type","json")?f.responseType=n.responseType:f.responseType="text"),m?f.sendAsBinary?f.sendAsBinary(r):!function(){for(var e=new Uint8Array(r.length),t=0;t<r.length;t++)e[t]=255&r.charCodeAt(t);f.send(e.buffer)}():f.send(r),s.trigger("loadstart")},getStatus:function(){try{if(f)return f.status}catch(e){}return 0},getResponse:function(e){var t=this.getRuntime();try{switch(e){case"blob":var i=new r(t.uid,f.response),o=f.getResponseHeader("Content-Disposition");if(o){var a=o.match(/filename=([\'\"'])([^\1]+)\1/);a&&(p=a[2])}return i.name=p,i.type||(i.type=n.getFileMime(p)),i;case"json":return u.can("return_response_type","json")?f.response:200===f.status&&window.JSON?JSON.parse(f.responseText):null;case"document":return l(f);default:return""!==f.responseText?f.responseText:null}}catch(s){return null}},getAllResponseHeaders:function(){try{return f.getAllResponseHeaders()}catch(e){}return""},abort:function(){f&&f.abort()},destroy:function(){h=p=null}})}return e.XMLHttpRequest=c}),i(H,[u],function(e){function t(e){e instanceof ArrayBuffer?n.apply(this,arguments):i.apply(this,arguments)}function n(t){var n=new DataView(t);e.extend(this,{readByteAt:function(e){return n.getUint8(e)},writeByteAt:function(e,t){n.setUint8(e,t)},SEGMENT:function(e,i,r){switch(arguments.length){case 2:return t.slice(e,e+i);case 1:return t.slice(e);case 3:if(null===r&&(r=new ArrayBuffer),r instanceof ArrayBuffer){var o=new Uint8Array(this.length()-i+r.byteLength);e>0&&o.set(new Uint8Array(t.slice(0,e)),0),o.set(new Uint8Array(r),e),o.set(new Uint8Array(t.slice(e+i)),e+r.byteLength),this.clear(),t=o.buffer,n=new DataView(t);break}default:return t}},length:function(){return t?t.byteLength:0},clear:function(){n=t=null}})}function i(t){function n(e,n,i){i=3===arguments.length?i:t.length-n-1,t=t.substr(0,n)+e+t.substr(i+n)}e.extend(this,{readByteAt:function(e){return t.charCodeAt(e)},writeByteAt:function(e,t){n(String.fromCharCode(t),e,1)},SEGMENT:function(e,i,r){switch(arguments.length){case 1:return t.substr(e);case 2:return t.substr(e,i);case 3:n(null!==r?r:"",e,i);break;default:return t}},length:function(){return t?t.length:0},clear:function(){t=null}})}return e.extend(t.prototype,{littleEndian:!1,read:function(e,t){var n,i,r;if(e+t>this.length())throw new Error("You are trying to read outside the source boundaries.");for(i=this.littleEndian?0:-8*(t-1),r=0,n=0;t>r;r++)n|=this.readByteAt(e+r)<<Math.abs(i+8*r);return n},write:function(e,t,n){var i,r,o="";if(e>this.length())throw new Error("You are trying to write outside the source boundaries.");for(i=this.littleEndian?0:-8*(n-1),r=0;n>r;r++)this.writeByteAt(e+r,t>>Math.abs(i+8*r)&255)},BYTE:function(e){return this.read(e,1)},SHORT:function(e){return this.read(e,2)},LONG:function(e){return this.read(e,4)},SLONG:function(e){var t=this.read(e,4);return t>2147483647?t-4294967296:t},CHAR:function(e){return String.fromCharCode(this.read(e,1))},STRING:function(e,t){return this.asArray("CHAR",e,t).join("")},asArray:function(e,t,n){for(var i=[],r=0;n>r;r++)i[r]=this[e](t+r);return i}}),t}),i(B,[H,f],function(e,t){return function n(i){var r=[],o,a,s,u=0;if(o=new e(i),65496!==o.SHORT(0))throw o.clear(),new t.ImageError(t.ImageError.WRONG_FORMAT);for(a=2;a<=o.length();)if(s=o.SHORT(a),s>=65488&&65495>=s)a+=2;else{if(65498===s||65497===s)break;u=o.SHORT(a+2)+2,s>=65505&&65519>=s&&r.push({hex:s,name:"APP"+(15&s),start:a,length:u,segment:o.SEGMENT(a,u)}),a+=u}return o.clear(),{headers:r,restore:function(t){var n,i,o;for(o=new e(t),a=65504==o.SHORT(2)?4+o.SHORT(4):2,i=0,n=r.length;n>i;i++)o.SEGMENT(a,0,r[i].segment),a+=r[i].length;return t=o.SEGMENT(),o.clear(),t},strip:function(t){var i,r,o,a;for(o=new n(t),r=o.headers,o.purge(),i=new e(t),a=r.length;a--;)i.SEGMENT(r[a].start,r[a].length,"");return t=i.SEGMENT(),i.clear(),t},get:function(e){for(var t=[],n=0,i=r.length;i>n;n++)r[n].name===e.toUpperCase()&&t.push(r[n].segment); 6813return t},set:function(e,t){var n=[],i,o,a;for("string"==typeof t?n.push(t):n=t,i=o=0,a=r.length;a>i&&(r[i].name===e.toUpperCase()&&(r[i].segment=n[o],r[i].length=n[o].length,o++),!(o>=n.length));i++);},purge:function(){this.headers=r=[]}}}}),i(k,[u,H,f],function(e,n,i){function r(o){function a(n,r){var o=this,a,s,u,c,h,f,p,m,g=[],v={},w={1:"BYTE",7:"UNDEFINED",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",9:"SLONG",10:"SRATIONAL"},y={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8};for(a=o.SHORT(n),s=0;a>s;s++)if(g=[],p=n+2+12*s,u=r[o.SHORT(p)],u!==t){if(c=w[o.SHORT(p+=2)],h=o.LONG(p+=2),f=y[c],!f)throw new i.ImageError(i.ImageError.INVALID_META_ERR);if(p+=4,f*h>4&&(p=o.LONG(p)+d.tiffHeader),p+f*h>=this.length())throw new i.ImageError(i.ImageError.INVALID_META_ERR);"ASCII"!==c?(g=o.asArray(c,p,h),m=1==h?g[0]:g,l.hasOwnProperty(u)&&"object"!=typeof m?v[u]=l[u][m]:v[u]=m):v[u]=e.trim(o.STRING(p,h).replace(/\0$/,""))}return v}function s(e,t,n){var i,r,o,a=0;if("string"==typeof t){var s=c[e.toLowerCase()];for(var u in s)if(s[u]===t){t=u;break}}i=d[e.toLowerCase()+"IFD"],r=this.SHORT(i);for(var l=0;r>l;l++)if(o=i+12*l+2,this.SHORT(o)==t){a=o+8;break}if(!a)return!1;try{this.write(a,n,4)}catch(h){return!1}return!0}var u,c,l,d,h,f;if(n.call(this,o),c={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"E
6813xposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}},l={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},d={tiffHeader:10},h=d.tiffHeader,u={clear:this.clear},e.extend(this,{read:function(){try{return r.prototype.read.apply(this,arguments)}catch(e){throw new i.ImageError(i.ImageError.INVALID_META_ERR)}},write:function(){try{return r.prototype.write.apply(this,arguments)}catch(e){throw new i.ImageError(i.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(e){return this.LONG(e)/this.LONG(e+4)},SRATIONAL:function(e){return this.SLONG(e)/this.SLONG(e+4)},ASCII:function(e){return this.CHAR(e)},TIFF:function(){return f||null},EXIF:function(){var t=null;if(d.exifIFD){try{t=a.call(this,d.exifIFD,c.exif)}catch(n){return null}if(t.ExifVersion&&"array"===e.typeOf(t.ExifVersion)){for(var i=0,r="";i<t.ExifVersion.length;i++)r+=String.fromCharCode(t.ExifVersion[i]);t.ExifVersion=r}}return t},GPS:function(){var t=null;if(d.gpsIFD){try{t=a.call(this,d.gpsIFD,c.gps)}catch(n){return null}t.GPSVersionID&&"array"===e.typeOf(t.GPSVersionID)&&(t.GPSVersionID=t.GPSVersionID.join("."))}return t},thumb:function(){if(d.IFD1)try{var e=a.call(this,d.IFD1,c.thumb);if("JPEGInterchangeFormat"in e)return this.SEGMENT(d.tiffHeader+e.JPEGInterchangeFormat,e.JPEGInterchangeFormatLength)}catch(t){}return null},setExif:function(e,t){return"PixelXDimension"!==e&&"PixelYDimension"!==e?!1:s.call(this,"exif",e,t)},clear:function(){u.clear(),o=c=l=f=d=u=null}}),65505!==this.SHORT(0)||"EXIF\x00"!==this.STRING(4,5).toUpperCase())throw new i.ImageError(i.ImageError.INVALID_META_ERR);if(this.littleEndian=18761==this.SHORT(h),42!==this.SHORT(h+=2))throw new i.ImageError(i.ImageError.INVALID_META_ERR);d.IFD0=d.tiffHeader+this.LONG(h+=2),f=a.call(this,d.IFD0,c.tiff),"ExifIFDPointer"in f&&(d.exifIFD=d.tiffHeader+f.ExifIFDPointer,delete f.ExifIFDPointer),"GPSInfoIFDPointer"in f&&(d.gpsIFD=d.tiffHeader+f.GPSInfoIFDPointer,delete f.GPSInfoIFDPointer),e.isEmptyObj(f)&&(f=null);var p=this.LONG(d.IFD0+12*this.SHORT(d.IFD0)+2);p&&(d.IFD1=d.tiffHeader+p)}return r.prototype=n.prototype,r}),i(U,[u,f,B,H,k],function(e,t,n,i,r){function o(o){function a(e){var t=0,n,i;for(e||(e=c);t<=e.length();){if(n=e.SHORT(t+=2),n>=65472&&65475>=n)return t+=5,{height:e.SHORT(t),width:e.SHORT(t+=2)};i=e.SHORT(t+=2),t+=i-2}return null}function s(){var e=d.thumb(),t,n;return e&&(t=new i(e),n=a(t),t.clear(),n)?(n.data=e,n):null}function u(){d&&l&&c&&(d.clear(),l.purge(),c.clear(),h=l=d=c=null)}var c,l,d,h;if(c=new i(o),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);
6813l=new n(o);try{d=new r(l.get("app1")[0])}catch(f){}h=a.call(this),e.extend(this,{type:"image/jpeg",size:c.length(),width:h&&h.width||0,height:h&&h.height||0,setExif:function(t,n){return d?("object"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,n),void l.set("app1",d.SEGMENT())):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):l.restore(o)},stripHeaders:function(e){return l.strip(e)},purge:function(){u.call(this)}}),d&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS(),thumb:s()})}return o}),i(G,[f,u,H],function(e,t,n){function i(i){function r(){var e,t;return e=a.call(this,8),"IHDR"==e.type?(t=e.start,{width:s.LONG(t),height:s.LONG(t+=4)}):null}function o(){s&&(s.clear(),i=l=u=c=s=null)}function a(e){var t,n,i,r;return t=s.LONG(e),n=s.STRING(e+=4,4),i=e+=4,r=s.LONG(e+t),{length:t,type:n,start:i,CRC:r}}var s,u,c,l;s=new n(i),function(){var t=0,n=0,i=[35152,20039,3338,6666];for(n=0;n<i.length;n++,t+=2)if(i[n]!=s.SHORT(t))throw new e.ImageError(e.ImageError.WRONG_FORMAT)}(),l=r.call(this),t.extend(this,{type:"image/png",size:s.length(),width:l.width,height:l.height,purge:function(){o.call(this)}}),o.call(this)}return i}),i(z,[u,f,U,G],function(e,t,n,i){return function(r){var o=[n,i],a;a=function(){for(var e=0;e<o.length;e++)try{return new o[e](r)}catch(n){}throw new t.ImageError(t.ImageError.WRONG_FORMAT)}(),e.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(e){return e},stripHeaders:function(e){return e},purge:function(){r=null}}),e.extend(this,a),this.purge=function(){a.purge(),a=null}}}),i(q,[],function(){function e(e,i,r){var o=e.naturalWidth,a=e.naturalHeight,s=r.width,u=r.height,c=r.x||0,l=r.y||0,d=i.getContext("2d");t(e)&&(o/=2,a/=2);var h=1024,f=document.createElement("canvas");f.width=f.height=h;for(var p=f.getContext("2d"),m=n(e,o,a),g=0;a>g;){for(var v=g+h>a?a-g:h,w=0;o>w;){var y=w+h>o?o-w:h;p.clearRect(0,0,h,h),p.drawImage(e,-w,-g);var E=w*s/o+c<<0,_=Math.ceil(y*s/o),b=g*u/a/m+l<<0,x=Math.ceil(v*u/a/m);d.drawImage(f,0,0,y,v,E,b,_,x),w+=h}g+=h}f=p=null}function t(e){var t=e.naturalWidth,n=e.naturalHeight;if(t*n>1048576){var i=document.createElement("canvas");i.width=i.height=1;var r=i.getContext("2d");return r.drawImage(e,-t+1,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function n(e,t,n){var i=document.createElement("canvas");i.width=1,i.height=n;var r=i.getContext("2d");r.drawImage(e,0,0);for(var o=r.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){var c=o[4*(u-1)+3];0===c?s=u:a=u,u=s+a>>1}i=null;var l=u/n;return 0===l?1:l}return{isSubsampled:t,renderTo:e}}),i(j,[D,u,f,w,y,E,z,q,d,c],function(e,t,n,i,r,o,a,s,u,c){function l(){function e(){if(!_&&!y)throw new n.ImageError(n.DOMException.INVALID_STATE_ERR);return _||y}function l(e){return i.atob(e.substring(e.indexOf("base64,")+7))}function d(e,t){return"data:"+(t||"")+";base64,"+i.btoa(e)}function h(e){var t=this;y=new Image,y.onerror=function(){v.call(this),t.trigger("error",n.ImageError.WRONG_FORMAT)},y.onload=function(){t.trigger("load")},y.src="data:"==e.substr(0,5)?e:d(e,x.type)}function f(e,t){var i=this,r;return window.FileReader?(r=new FileReader,r.onload=function(){t(this.result)},r.onerror=function(){i.trigger("error",n.ImageError.WRONG_FORMAT)},r.readAsDataURL(e),void 0):t(e.getAsDataURL())}function p(n,i,r,o){var a=this,s,u,c=0,l=0,d,h,f,p;if(A=o,p=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==t.inArray(p,[5,6,7,8])){var v=n;n=i,i=v}return d=e(),r?(n=Math.min(n,d.width),i=Math.min(i,d.height),s=Math.max(n/d.width,i/d.height)):s=Math.min(n/d.width,i/d.height),s>1&&!r&&o?void this.trigger("Resize"):(_||(_=document.createElement("canvas")),h=Math.round(d.width*s),f=Math.round(d.height*s),r?(_.width=n,_.height=i,h>n&&(c=Math.round((h-n)/2)),f>i&&(l=Math.round((f-i)/2))):(_.width=h,_.height=f),A||g(_.width,_.height,p),m.call(this,d,_,-c,-l,h,f),this.width=_.width,this.height=_.height,R=!0,void a.trigger("Resize"))}function m(e,t,n,i,r,o){if("iOS"===c.OS)s.renderTo(e,t,{width:r,height:o,x:n,y:i});else{var a=t.getContext("2d");a.drawImage(e,n,i,r,o)}}
vendor: 6,821 bytes, line 6813
6813function g(e,t,n){switch(n){case 5:case 6:case 7:case 8:_.width=t,_.height=e;break;default:_.width=e,_.height=t}var i=_.getContext("2d");switch(n){case 2:i.translate(e,0),i.scale(-1,1);break;case 3:i.translate(e,t),i.rotate(Math.PI);break;case 4:i.translate(0,t),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-t);break;case 7:i.rotate(.5*Math.PI),i.translate(e,-t),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-e,0)}}function v(){E&&(E.purge(),E=null),b=y=_=x=null,R=!1}var w=this,y,E,_,b,x,R=!1,A=!0;t.extend(this,{loadFromBlob:function(e){var t=this,i=t.getRuntime(),r=arguments.length>1?arguments[1]:!0;if(!i.can("access_binary"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);return x=e,e.isDetached()?(b=e.getSource(),void h.call(this,b)):void f.call(this,e.getSource(),function(e){r&&(b=l(e)),h.call(t,e)})},loadFromImage:function(e,t){this.meta=e.meta,x=new o(null,{name:e.name,size:e.size,type:e.type}),h.call(this,t?b=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t=this.getRuntime(),n;return!E&&b&&t.can("access_image_binary")&&(E=new a(b)),n={width:e().width||0,height:e().height||0,type:x.type||u.getFileMime(x.name),size:b&&b.length||x.size||0,name:x.name||"",meta:E&&E.meta||this.meta||{}},!n.meta||!n.meta.thumb||n.meta.thumb.data instanceof r||(n.meta.thumb.data=new r(null,{type:"image/jpeg",data:n.meta.thumb.data})),n},downsize:function(){p.apply(this,arguments)},getAsCanvas:function(){return _&&(_.id=this.uid+"_canvas"),_},getAsBlob:function(e,t){return e!==this.type&&p.call(this,this.width,this.height,!1),new o(null,{name:x.name||"",type:e,data:w.getAsBinaryString.call(this,e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!R)return y.src;if("image/jpeg"!==e)return _.toDataURL("image/png");try{return _.toDataURL("image/jpeg",t/100)}catch(n){return _.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!R)return b||(b=l(w.getAsDataURL(e,t))),b;if("image/jpeg"!==e)b=l(w.getAsDataURL(e,t));else{var n;t||(t=90);try{n=_.toDataURL("image/jpeg",t/100)}catch(i){n=_.toDataURL("image/jpeg")}b=l(n),E&&(b=E.stripHeaders(b),A&&(E.meta&&E.meta.exif&&E.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),b=E.writeHeaders(b)),E.purge(),E=null)}return R=!1,b},destroy:function(){w=null,v.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=l}),i(X,[u,c,h,f,m],function(e,t,n,i,r){function o(){var e;try{e=navigator.plugins["Shockwave Flash"],e=e.description}catch(t){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(n){e="0.0"}}return e=e.match(/\d+/g),parseFloat(e[0]+"."+e[1])}function a(e){var i=n.get(e);i&&"OBJECT"==i.nodeName&&("IE"===t.browser?(i.style.display="none",function r(){4==i.readyState?s(e):setTimeout(r,10)}()):i.parentNode.removeChild(i))}function s(e){var t=n.get(e);if(t){for(var i in t)"function"==typeof t[i]&&(t[i]=null);t.parentNode.removeChild(t)}}function u(s){var u=this,d;s=e.extend({swf_url:t.swf_url},s),r.call(this,s,c,{access_binary:function(e){return e&&"browser"===u.mode},access_image_binary:function(e){return e&&"browser"===u.mode},display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===u.mode},resize_image:r.capTrue,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!e.arrayDiff(t,["","text","document"])||"browser"===u.mode},return_status_code:function(t){return"browser"===u.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:function(e){return e&&"browser"===u.mode},send_browser_cookies:function(e){return e&&"browser"===u.mode},send_custom_headers:function(e){return e&&"browser"===u.mode},send_multipart:r.capTrue,slice_blob:function(e){return e&&"browser"===u.mode},stream_upload:function(e){return e&&"browser"===u.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||"client"===u.mode},use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(t){return e.arrayDiff(t,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?"client":"browser"}},"client"),o()<10&&(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid)},shimExec:function(e,t){var n=[].slice.call(arguments,2);return u.getShim().exec(this.uid,e,t,n)},init:function(){var n,r,o;o=this.getShimContainer(),e.extend(o.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),n='<object id="'+this.uid+'" type="application/x-shockwave-flash" data="'+s.swf_url+'" ',"IE"===t.browser&&(n+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),n+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+s.swf_url+'" /><param name="flashvars" value="uid='+escape(this.uid)+"&target="+t.global_event_dispatcher+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>',"IE"===t.browser?(r=document.createElement("div"),o.appendChild(r),r.outerHTML=n,r=o=null):o.innerHTML=n,d=setTimeout(function(){u&&!u.initialized&&u.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){a(u.uid),e.call(u),clearTimeout(d),s=d=e=u=null}}(this.destroy)},l)}var c="flash",l={};return r.addConstructor(c,u),l}),i(V,[X,E,u],function(e,t,n){var i={init:function(e){var i=this,r=this.getRuntime();this.bind("Change",function(){var e=r.shimExec.call(i,"FileInput","getFiles");i.files=[],n.each(e,function(e){i.files.push(new t(r.uid,e))})},999),this.getRuntime().shimExec.call(this,"FileInput","init",{name:e.name,accept:e.accept,multiple:e.multiple}),this.trigger("ready")}};return e.FileInput=i}),i(W,[X,y],function(e,t){var n={slice:function(e,n,i,r){var o=this.getRuntime();return 0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),e=o.shimExec.call(this,"Blob","slice",n,i,r||""),e&&(e=new t(o.uid,e)),e}};return e.Blob=n}),i(Y,[X,w],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);
vendor: 5,411 bytes, line 6813
6813case"readAsDataURL":return e}return null}var i={read:function(e,t){var i=this;return i.result="","readAsDataURL"===e&&(i.result="data:"+(t.type||"")+";base64,"),i.bind("Progress",function(t,r){r&&(i.result+=n(r,e))},999),i.getRuntime().shimExec.call(this,"FileReader","readAsBase64",t.uid)}};return e.FileReader=i}),i($,[X,w],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i={read:function(e,t){var i,r=this.getRuntime();return(i=r.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid))?("readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"+i),n(i,e,t.type)):null}};return e.FileReaderSync=i}),i(J,[X,u,y,E,A,I,S],function(e,t,n,i,r,o,a){var s={send:function(e,i){function r(){e.transport=l.mode,l.shimExec.call(c,"XMLHttpRequest","send",e,i)}function s(e,t){l.shimExec.call(c,"XMLHttpRequest","appendBlob",e,t.uid),i=null,r()}function u(e,t){var n=new a;n.bind("TransportingComplete",function(){t(this.result)}),n.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,"XMLHttpRequest","setRequestHeader",t,e.toString())}),i instanceof o){var d;if(i.each(function(e,t){e instanceof n?d=t:l.shimExec.call(c,"XMLHttpRequest","append",t,e)}),i.hasBlob()){var h=i.getBlob();h.isDetached()?u(h,function(e){h.destroy(),s(d,e)}):s(d,h)}else i=null,r()}else i instanceof n?i.isDetached()?u(i,function(e){i.destroy(),i=e.uid,r()}):(i=i.uid,r()):r()},getResponse:function(e){var n,o,a=this.getRuntime();if(o=a.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(o=new i(a.uid,o),"blob"===e)return o;try{if(n=new r,~t.inArray(e,["","text"]))return n.readAsText(o);if("json"===e&&window.JSON)return JSON.parse(n.readAsText(o))}finally{o.destroy()}}return null},abort:function(e){var t=this.getRuntime();t.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return e.XMLHttpRequest=s}),i(Z,[X,y],function(e,t){var n={getAsBlob:function(e){var n=this.getRuntime(),i=n.shimExec.call(this,"Transporter","getAsBlob",e);return i?new t(n.uid,i):null}};return e.Transporter=n}),i(K,[X,u,S,y,A],function(e,t,n,i,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(i,"Image","loadFromBlob",e.uid),i=r=null}var i=this,r=i.getRuntime();if(e.isDetached()){var o=new n;o.bind("TransportingComplete",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getInfo:function(){var e=this.getRuntime(),t=e.shimExec.call(this,"Image","getInfo");return!t.meta||!t.meta.thumb||t.meta.thumb.data instanceof i||(t.meta.thumb.data=new i(e.uid,t.meta.thumb.data)),t},getAsBlob:function(e,t){var n=this.getRuntime(),r=n.shimExec.call(this,"Image","getAsBlob",e,t);return r?new i(n.uid,r):null},getAsDataURL:function(){var e=this.getRuntime(),t=e.Image.getAsBlob.apply(this,arguments),n;return t?(n=new r,n.readAsDataURL(t)):null}};return e.Image=o}),i(Q,[u,c,h,f,m],function(e,t,n,i,r){function o(e){var t=!1,n=null,i,r,o,a,s,u=0;try{try{n=new ActiveXObject("AgControl.AgControl"),n.IsVersionSupported(e)&&(t=!0),n=null}catch(c){var l=navigator.plugins["Silverlight Plug-In"];if(l){for(i=l.description,"1.0.30226.2"===i&&(i="2.0.30226.2"),r=i.split(".");r.length>3;)r.pop();for(;r.length<4;)r.push(0);for(o=e.split(".");o.length>4;)o.pop();do a=parseInt(o[u],10),s=parseInt(r[u],10),u++;while(u<o.length&&a===s);s>=a&&!isNaN(a)&&(t=!0)}}}catch(d){t=!1}return t}function a(a){var c=this,l;a=e.extend({xap_url:t.xap_url},a),r.call(this,a,s,{access_binary:r.capTrue,access_image_binary:r.capTrue,display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:r.capTrue,resize_image:r.capTrue,return_response_headers:function(e){return e&&"client"===c.mode},return_response_type:function(e){return"json"!==e?!0:!!window.JSON},return_status_code:function(t){return"client"===c.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:r.capTrue,send_browser_cookies:function(e){return e&&"browser"===c.mode},send_custom_headers:function(e){return e&&"client"===c.mode},send_multipart:r.capTrue,slice_blob:r.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:r.capTrue,use_http_method:function(t){return"client"===c.mode||!e.arrayDiff(t,["GET","POST"])}},{return_response_headers:function(e){return e?"client":"browser"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"client":["client","browser"]},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"client":"browser"},use_http_method:function(t){return e.arrayDiff(t,["GET","POST"])?"client":["client","browser"]}}),o("2.0.31005.0")&&"Opera"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid).content.Moxie},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec(this.uid,e,t,n)},init:function(){var e;e=this.getShimContainer(),e.innerHTML='<object id="'+this.uid+'" data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%" style="outline:none;"><param name="source" value="'+a.xap_url+'"/>
6813<param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="uid='+this.uid+",target="+t.global_event_dispatcher+'"/></object>',l=setTimeout(function(){c&&!c.initialized&&c.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},"Windows"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(c),clearTimeout(l),a=l=e=c=null}}(this.destroy)},u)}var s="silverlight",u={};return r.addConstructor(s,a),u}),i(ee,[Q,E,u],function(e,t,n){var i={init:function(e){function i(e){for(var t="",n=0;n<e.length;n++)t+=(""!==t?"|":"")+e[n].title+" | *."+e[n].extensions.replace(/,/g,";*.");return t}var r=this,o=this.getRuntime();this.bind("Change",function(){var e=o.shimExec.call(r,"FileInput","getFiles");r.files=[],n.each(e,function(e){r.files.push(new t(o.uid,e))})},999),this.getRuntime().shimExec.call(this,"FileInput","init",i(e.accept),e.name,e.multiple),this.trigger("ready")}};return e.FileInput=i}),i(te,[Q,u,W],function(e,t,n){return e.Blob=t.extend({},n)}),i(ne,[Q,h,N],function(e,t,n){var i={init:function(){var e=this,i=e.getRuntime(),r;return r=i.getShimContainer(),n.addEvent(r,"dragover",function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy"},e.uid),n.addEvent(r,"dragenter",function(e){e.preventDefault();var n=t.get(i.uid).dragEnter(e);n&&e.stopPropagation()},e.uid),n.addEvent(r,"drop",function(e){e.preventDefault();var n=t.get(i.uid).dragDrop(e);n&&e.stopPropagation()},e.uid),i.shimExec.call(this,"FileDrop","init")}};return e.FileDrop=i}),i(ie,[Q,u,Y],function(e,t,n){return e.FileReader=t.extend({},n)}),i(re,[Q,u,$],function(e,t,n){return e.FileReaderSync=t.extend({},n)}),i(oe,[Q,u,J],function(e,t,n){return e.XMLHttpRequest=t.extend({},n)}),i(ae,[Q,u,Z],function(e,t,n){return e.Transporter=t.extend({},n)}),i(se,[Q,u,y,K],function(e,t,n,i){return e.Image=t.extend({},i,{getInfo:function(){var e=this.getRuntime(),i=["tiff","exif","gps","thumb"],r={meta:{}},o=e.shimExec.call(this,"Image","getInfo");return o.meta&&(t.each(i,function(e){var t=o.meta[e],n,i,a,s;if(t&&t.keys)for(r.meta[e]={},i=0,a=t.keys.length;a>i;i++)n=t.keys[i],s=t[n],s&&(/^(\d|[1-9]\d+)$/.test(s)?s=parseInt(s,10):/^\d*\.\d+$/.test(s)&&(s=parseFloat(s)),r.meta[e][n]=s)}),!r.meta||!r.meta.thumb||r.meta.thumb.data instanceof n||(r.meta.thumb.data=new n(e.uid,r.meta.thumb.data))),r.width=parseInt(o.width,10),r.height=parseInt(o.height,10),r.size=parseInt(o.size,10),r.type=o.type,r.name=o.name,r}})}),i(ue,[u,f,m,c],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue;n.call(this,t,o,{access_binary:s(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:s(a.Image&&(i.can("create_canvas")||i.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:s(function(){return"Chrome"===i.browser&&i.verComp(i.version,28,">=")||"IE"===i.browser&&i.verComp(i.version,10,">=")||"Safari"===i.browser&&i.verComp(i.version,7,">=")}()),resize_image:function(){return a.Image&&r.can("access_binary")&&i.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return i.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return r.can("select_file")},summon_file_dialog:function(){return r.can("select_file")&&("Firefox"===i.browser&&i.verComp(i.version,4,">=")||"Opera"===i.browser&&i.verComp(i.version,12,">=")||"IE"===i.browser&&i.verComp(i.version,10,">=")||!!~e.inArray(i.browser,["Chrome","Safari"]))},upload_filesize:u,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html4",a={};return n.addConstructor(o,r),a}),i(ce,[ue,E,u,h,N,d,c],function(e,t,n,i,r,o,a){function s(){function e(){var o=this,l=o.getRuntime(),d,h,f,p,m,g;g=n.guid("uid_"),d=l.getShimContainer(),s&&(f=i.get(s+"_form"),f&&n.extend(f.style,{top:"100%"})),p=document.createElement("form"),p.setAttribute("id",g+"_form"),p.setAttribute("method","post"),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),n.extend(p.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),m=document.createElement("input"),m.setAttribute("id",g),m.setAttribute("type","file"),m.setAttribute("name",c.name||"Filedata"),m.setAttribute("accept",u.join(",")),n.extend(m.style,{fontSize:"999px",opacity:0}
6813),p.appendChild(m),d.appendChild(p),n.extend(m.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===a.browser&&a.verComp(a.version,10,"<")&&n.extend(m.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),m.onchange=function(){var n;if(this.value){if(this.files){if(n=this.files[0],0===n.size)return void p.parentNode.removeChild(p)}else n={name:this.value};n=new t(l.uid,n),this.onchange=function(){},e.call(o),o.files=[n],m.setAttribute("id",n.uid),p.setAttribute("id",n.uid+"_form"),o.trigger("change"),m=p=null}},l.can("summon_file_dialog")&&(h=i.get(c.browse_button),r.removeEvent(h,"click",o.uid),r.addEvent(h,"click",function(e){m&&!m.disabled&&m.click(),e.preventDefault()},o.uid)),s=g,d=f=h=null}var s,u=[],c;n.extend(this,{init:function(t){var n=this,a=n.getRuntime(),s;c=t,u=t.accept.mimes||o.extList2mimes(t.accept,a.can("filter_by_extension")),s=a.getShimContainer(),function(){var e,o,u;e=i.get(t.browse_button),a.can("summon_file_dialog")&&("static"===i.getStyle(e,"position")&&(e.style.position="relative"),o=parseInt(i.getStyle(e,"z-index"),10)||1,e.style.zIndex=o,s.style.zIndex=o-1),u=a.can("summon_file_dialog")?e:s,r.addEvent(u,"mouseover",function(){n.trigger("mouseenter")},n.uid),r.addEvent(u,"mouseout",function(){n.trigger("mouseleave")},n.uid),r.addEvent(u,"mousedown",function(){n.trigger("mousedown")},n.uid),r.addEvent(i.get(t.container),"mouseup",function(){n.trigger("mouseup")},n.uid),e=null}(),e.call(this),s=null,n.trigger({type:"ready",async:!0})},disable:function(e){var t;(t=i.get(s))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),n=e.getShimContainer();r.removeAllEvents(n,this.uid),r.removeAllEvents(c&&i.get(c.container),this.uid),r.removeAllEvents(c&&i.get(c.browse_button),this.uid),n&&(n.innerHTML=""),t.removeInstance(this.uid),s=u=c=n=t=null}})}return e.FileInput=s}),i(le,[ue,F],function(e,t){return e.FileReader=t}),i(de,[ue,u,h,x,f,N,y,I],function(e,t,n,i,r,o,a,s){function u(){function e(e){var t=this,i,r,a,s,u=!1;if(l){if(i=l.id.replace(/_iframe$/,""),r=n.get(i+"_form")){for(a=r.getElementsByTagName("input"),s=a.length;s--;)switch(a[s].getAttribute("type")){case"hidden":a[s].parentNode.removeChild(a[s]);break;case"file":u=!0}a=[],u||r.parentNode.removeChild(r),r=null}setTimeout(function(){o.removeEvent(l,"load",t.uid),l.parentNode&&l.parentNode.removeChild(l);var n=t.getRuntime().getShimContainer();n.children.length||n.parentNode.removeChild(n),n=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,h){function f(){var n=m.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='<iframe id="'+g+'_iframe" name="'+g+'_iframe" src="javascript:""" style="display:none"></iframe>',l=r.firstChild,n.appendChild(l),o.addEvent(l,"load",function(){var n;try{n=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(n.title)?u=n.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(n.body.innerHTML),p.trigger({type:"progress",loaded:c.length,total:c.length}),y&&p.trigger({type:"uploadprogress",loaded:y.size||1025,total:y.size||1025}))}catch(r){if(!i.hasSameOrigin(d.url))return void e.call(p,function(){p.trigger("error")});u=404}e.call(p,function(){p.trigger("load")})},p.uid)}var p=this,m=p.getRuntime(),g,v,w,y;if(u=c=null,h instanceof s&&h.hasBlob()){if(y=h.getBlob(),g=y.uid,w=n.get(g),v=n.get(g+"_form"),!v)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else g=t.guid("uid_"),v=document.createElement("form"),v.setAttribute("id",g+"_form"),v.setAttribute("method",d.method),v.setAttribute("enctype","multipart/form-data"),v.setAttribute("encoding","multipart/form-data"),m.getShimContainer().appendChild(v);v.setAttribute("target",g+"_iframe"),h instanceof s&&h.each(function(e,n){if(e instanceof a)w&&w.setAttribute("name",n);else{var i=document.createElement("input");t.extend(i,{type:"hidden",name:n,value:e}),w?v.insertBefore(i,w):v.appendChild(i)}}),v.setAttribute("action",d.url),f(),v.submit(),p.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{ 6814return JSON.parse(c.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(n){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})}})}return e.XMLHttpRequest=u}),i(he,[ue,j],function(e,t){return e.Image=t}
6814),a([u,c,l,d,h,f,p,m,g,v,w,y,E,_,b,x,R,A,I,T,S,O,N])}(this);;(function(e){"use strict";var t={},n=e.moxie.core.utils.Basic.inArray;return function r(e){var i,s;for(i in e)s=typeof e[i],s==="object"&&!~n(i,["Exceptions","Env","Mime"])?r(e[i]):s==="function"&&(t[i]=e[i])}(e.moxie),t.Env=e.moxie.core.utils.Env,t.Mime=e.moxie.core.utils.Mime,t.Exceptions=e.moxie.core.Exceptions,e.mOxie=t,e.o||(e.o=t),t})(this); 6815// Generated by CoffeeScript 1.4.0 6816(function() { 6817 var $; 6818 6819 $ = window.jQuery || window.Zepto || window.$; 6820 6821 $.fn.fancySelect = function(opts) { 6822 var isiOS, settings; 6823 if (opts == null) { 6824 opts = {}; 6825 } 6826 settings = $.extend({ 6827 forceiOS: false, 6828 includeBlank: false, 6829 optionTemplate: function(optionEl) { 6830 return optionEl.text(); 6831 }, 6832 triggerTemplate: function(optionEl) { 6833 return optionEl.text(); 6834 } 6835 }, opts); 6836 isiOS = !!navigator.userAgent.match(/iP(hone|od|ad)/i); 6837 return this.each(function() { 6838 var copyOptionsToList, disabled, options, sel, trigger, updateTriggerText, wrapper; 6839 sel = $(this); 6840 if (sel.hasClass('fancified') || sel[0].tagName !== 'SELECT') { 6841 return; 6842 } 6843 sel.addClass('fancified'); 6844 sel.css({ 6845 width: 1, 6846 height: 1, 6847 display: 'block', 6848 position: 'absolute', 6849 top: 0, 6850 left: 0, 6851 opacity: 0 6852 }); 6853 sel.wrap('<div class="fancy-select">'); 6854 wrapper = sel.parent(); 6855 if (sel.data('class')) { 6856 wrapper.addClass(sel.data('class')); 6857 } 6858 wrapper.append('<div class="trigger">'); 6859 if (!(isiOS && !settings.forceiOS)) { 6860 wrapper.append('<ul class="options">'); 6861 } 6862 trigger = wrapper.find('.trigger'); 6863 options = wrapper.find('.options'); 6864 disabled = sel.prop('disabled'); 6865 if (disabled) { 6866 wrapper.addClass('disabled'); 6867 } 6868 updateTriggerText = function() { 6869 var triggerHtml; 6870 triggerHtml = settings.triggerTemplate(sel.find(':selected')); 6871 return trigger.html(triggerHtml); 6872 }; 6873 sel.on('blur.fs', function() { 6874 if (trigger.hasClass('open')) { 6875 return setTimeout(function() { 6876 return trigger.trigger('close.fs'); 6877 }, 120); 6878 } 6879 }); 6880 trigger.on('close.fs', function() { 6881 trigger.removeClass('open'); 6882 return options.removeClass('open'); 6883 }); 6884 trigger.on('click.fs', function() { 6885 var offParent, parent; 6886 if (!disabled) { 6887 trigger.toggleClass('open'); 6888 if (isiOS && !settings.forceiOS) { 6889 if (trigger.hasClass('open')) { 6890 return sel.focus(); 6891 } 6892 } else { 6893 if (trigger.hasClass('open')) { 6894 parent = trigger.parent(); 6895 offParent = parent.offsetParent(); 6896 if ((parent.offset().top + parent.outerHeight() + options.outerHeight() + 20) > $(window).height() + $(window).scrollTop()) { 6897 options.addClass('overflowing'); 6898 } else { 6899 options.removeClass('overflowing'); 6900 } 6901 } 6902 options.toggleClass('open'); 6903 if (!isiOS) { 6904 return sel.focus(); 6905 } 6906 } 6907 } 6908 }); 6909 sel.on('enable', function() { 6910 sel.prop('disabled', false); 6911 wrapper.removeClass('disabled'); 6912 disabled = false; 6913 return copyOptionsToList(); 6914 }); 6915 sel.on('disable', function() { 6916 sel.prop('disabled', true); 6917 wrapper.addClass('disabled'); 6918 return disabled = true; 6919 }); 6920 sel.on('change.fs', function(e) { 6921 if (e.originalEvent && e.originalEvent.isTrusted) { 6922 return e.stopPropagation(); 6923 } else { 6924 return updateTriggerText(); 6925 } 6926 }); 6927 sel.on('keydown', function(e) { 6928 var hovered, newHovered, w; 6929 w = e.which; 6930 hovered = options.find('.hover'); 6931 hovered.removeClass('hover'); 6932 if (!options.hasClass('open')) { 6933 if (w === 13 || w === 32 || w === 38 || w === 40) { 6934 e.preventDefault(); 6935 return trigger.trigger('click.fs'); 6936 } 6937 } else { 6938 if (w === 38) { 6939 e.preventDefault(); 6940 if (hovered.length && hovered.index() > 0) { 6941 hovered.prev().addClass('hover'); 6942 } else { 6943 options.find('li:last-child').addClass('hover'); 6944 } 6945 } else if (w === 40) { 6946 e.preventDefault(); 6947 if (hovered.length && hovered.index() < options.find('li').length - 1) { 6948 hovered.next().addClass('hover'); 6949 } else { 6950 options.find('li:first-child').addClass('hover'); 6951 } 6952 } else if (w === 27) { 6953 e.preventDefault(); 6954 trigger.trigger('click.fs'); 6955 } else if (w === 13 || w === 32) { 6956 e.preventDefault(); 6957 hovered.trigger('mousedown.fs'); 6958 } else if (w === 9) { 6959 if (trigger.hasClass('open')) { 6960 trigger.trigger('close.fs'); 6961 } 6962 } 6963 newHovered = options.find('.hover'); 6964 if (newHovered.length) { 6965 options.scrollTop(0); 6966 return options.scrollTop(newHovered.position().top - 12); 6967 } 6968 } 6969 }); 6970 options.on('mousedown.fs', 'li', function(e) { 6971 var clicked; 6972 clicked = $(this); 6973 sel.val(clicked.data('raw-value')); 6974 if (!isiOS) { 6975 sel.trigger('blur.fs').trigger('focus.fs'); 6976 } 6977 options.find('.selected').removeClass('selected'); 6978 clicked.addClass('selected'); 6979 trigger.addClass('selected'); 6980 return sel.val(clicked.data('raw-value')).trigger('change.fs').trigger('blur.fs').trigger('focus.fs'); 6981 }); 6982 options.on('mouseenter.fs', 'li', function() { 6983 var hovered, nowHovered; 6984 nowHovered = $(this); 6985 hovered = options.find('.hover'); 6986 hovered.removeClass('hover'); 6987 return nowHovered.addClass('hover'); 6988 }); 6989 options.on('mouseleave.fs', 'li', function() { 6990 return options.find('.hover').removeClass('hover'); 6991 }); 6992 copyOptionsToList = function() { 6993 var selOpts;
6994 updateTriggerText(); 6995 if (isiOS && !settings.forceiOS) { 6996 return; 6997 } 6998 selOpts = sel.find('option'); 6999 return sel.find('option').each(function(i, opt) { 7000 var optHtml; 7001 opt = $(opt); 7002 if (!opt.prop('disabled') && (opt.val() || settings.includeBlank)) { 7003 optHtml = settings.optionTemplate(opt); 7004 if (opt.prop('selected')) { 7005 return options.append("<li data-raw-value=\"" + (opt.val()) + "\" class=\"selected\">" + optHtml + "</li>"); 7006 } else { 7007 return options.append("<li data-raw-value=\"" + (opt.val()) + "\">" + optHtml + "</li>"); 7008 } 7009 } 7010 }); 7011 }; 7012 sel.on('update.fs', function() { 7013 wrapper.find('.options').empty(); 7014 return copyOptionsToList(); 7015 }); 7016 return copyOptionsToList(); 7017 }); 7018 }; 7019 7020}).call(this); 7021/** 7022 * autoNumeric.js 7023 * @author: Bob Knothe 7024 * @author: Sokolov Yura 7025 * @version: 1.9.39 - 2015-07-17 GMT 5:00 PM / 19:00 7026 * 7027 * Created by Robert J. Knothe on 2010-10-25. Please report any bugs to https://github.com/BobKnothe/autoNumeric 7028 * Contributor by Sokolov Yura on 2010-11-07 7029 * 7030 * Copyright (c) 2011 Robert J. Knothe http://www.decorplanit.com/plugin/ 7031 * 7032 * The MIT License (http://www.opensource.org/licenses/mit-license.php) 7033 * 7034 * Permission is hereby granted, free of charge, to any person 7035 * obtaining a copy of this software and associated documentation 7036 * files (the "Software"), to deal in the Software without 7037 * restriction, including without limitation the rights to use, 7038 * copy, modify, merge, publish, distribute, sublicense, and/or sell 7039 * copies of the Software, and to permit persons to whom the 7040 * Software is furnished to do so, subject to the following 7041 * conditions: 7042 * 7043 * The above copyright notice and this permission notice shall be 7044 * included in all copies or substantial portions of the Software. 7045 * 7046 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 7047 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 7048 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 7049 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 7050 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 7051 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 7052 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7053 * OTHER DEALINGS IN THE SOFTWARE. 7054 */ 7055(function ($) { 7056 "use strict"; 7057 /*jslint browser: true*/ 7058 /*global jQuery: false*/ 7059 /*Cross browser routine for getting selected range/cursor position 7060 */ 7061 7062 /** 7063 * Cross browser routine for getting selected range/cursor position 7064 */ 7065 function getElementSelection(that) { 7066 var position = {}; 7067 if (that.selectionStart === undefined) { 7068 that.focus(); 7069 var select = document.selection.createRange(); 7070 position.length = select.text.length; 7071 select.moveStart('character', -that.value.length); 7072 position.end = select.text.length; 7073 position.start = position.end - position.length; 7074 } else { 7075 position.start = that.selectionStart; 7076 position.end = that.selectionEnd; 7077 position.length = position.end - position.start; 7078 } 7079 return position; 7080 } 7081 7082 /** 7083 * Cross browser routine for setting selected range/cursor position 7084 */ 7085 function setElementSelection(that, start, end) { 7086 if (that.selectionStart === undefined) { 7087 that.focus(); 7088 var r = that.createTextRange(); 7089 r.collapse(true); 7090 r.moveEnd('character', end); 7091 r.moveStart('character', start); 7092 r.select(); 7093 } else { 7094 that.selectionStart = start; 7095 that.selectionEnd = end; 7096 } 7097 } 7098 7099 /** 7100 * run callbacks in parameters if any 7101 * any parameter could be a callback: 7102 * - a function, which invoked with jQuery element, parameters and this parameter name and returns parameter value 7103 * - a name of function, attached to $(selector).autoNumeric.functionName(){} - which was called previously 7104 */ 7105 function runCallbacks($this, settings) { 7106 /** 7107 * loops through the settings object (option array) to find the following 7108 * k = option name example k=aNum 7109 * val = option value example val=0123456789 7110 */ 7111 $.each(settings, function (k, val) { 7112 if (typeof val === 'function') { 7113 settings[k] = val($this, settings, k); 7114 } else if (typeof $this.autoNumeric[val] === 'function') { 7115 /** 7116 * calls the attached function from the html5 data example: data-a-sign="functionName" 7117 */ 7118 settings[k] = $this.autoNumeric[val]($this, settings, k); 7119 } 7120 }); 7121 } 7122 7123 /** 7124 * Converts the vMin, vMax & mDec string to numeric value 7125 */ 7126 function convertKeyToNumber(settings, key) {
7127 if (typeof (settings[key]) === 'string') { 7128 settings[key] *= 1; 7129 } 7130 } 7131 7132 /** 7133 * Preparing user defined options for further usage 7134 * merge them with defaults appropriately 7135 */ 7136 function autoCode($this, settings) { 7137 runCallbacks($this, settings); 7138 settings.tagList = ['b', 'caption', 'cite', 'code', 'dd', 'del', 'div', 'dfn', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ins', 'kdb', 'label', 'li', 'output', 'p', 'q', 's', 'sample', 'span', 'strong', 'td', 'th', 'u', 'var']; 7139 var vmax = settings.vMax.toString().split('.'), 7140 vmin = (!settings.vMin && settings.vMin !== 0) ? [] : settings.vMin.toString().split('.'); 7141 convertKeyToNumber(settings, 'vMax'); 7142 convertKeyToNumber(settings, 'vMin'); 7143 convertKeyToNumber(settings, 'mDec'); /** set mDec if not defined by user */ 7144 settings.mDec = (settings.mRound === 'CHF') ? '2' : settings.mDec; 7145 settings.allowLeading = true; 7146 settings.aNeg = settings.vMin < 0 ? '-' : ''; 7147 vmax[0] = vmax[0].replace('-', ''); 7148 vmin[0] = vmin[0].replace('-', ''); 7149 settings.mInt = Math.max(vmax[0].length, vmin[0].length, 1); 7150 if (settings.mDec === null) { 7151 var vmaxLength = 0, 7152 vminLength = 0; 7153 if (vmax[1]) { 7154 vmaxLength = vmax[1].length; 7155 } 7156 if (vmin[1]) { 7157 vminLength = vmin[1].length; 7158 } 7159 settings.mDec = Math.max(vmaxLength, vminLength); 7160 } /** set alternative decimal separator key */ 7161 if (settings.altDec === null && settings.mDec > 0) { 7162 if (settings.aDec === '.' && settings.aSep !== ',') { 7163 settings.altDec = ','; 7164 } else if (settings.aDec === ',' && settings.aSep !== '.') { 7165 settings.altDec = '.'; 7166 } 7167 } 7168 /** cache regexps for autoStrip */ 7169 var aNegReg = settings.aNeg ? '([-\\' + settings.aNeg + ']?)' : '(-?)'; 7170 settings.aNegRegAutoStrip = aNegReg; 7171 settings.skipFirstAutoStrip = new RegExp(aNegReg + '[^-' + (settings.aNeg ? '\\' + settings.aNeg : '') + '\\' + settings.aDec + '\\d]' + '.*?(\\d|\\' + settings.aDec + '\\d)'); 7172 settings.skipLastAutoStrip = new RegExp('(\\d\\' + settings.aDec + '?)[^\\' + settings.aDec + '\\d]\\D*$'); 7173 var allowed = '-' + settings.aNum + '\\' + settings.aDec; 7174 settings.allowedAutoStrip = new RegExp('[^' + allowed + ']', 'gi'); 7175 settings.numRegAutoStrip = new RegExp(aNegReg + '(?:\\' + settings.aDec + '?(\\d+\\' + settings.aDec + '\\d+)|(\\d*(?:\\' + settings.aDec + '\\d*)?))'); 7176 return settings; 7177 } 7178 7179 /** 7180 * strips all unwanted characters and leave only a number alert 7181 */ 7182 function autoStrip(s, settings, strip_zero) { 7183 if (settings.aSign) { /** remove currency sign */ 7184 while (s.indexOf(settings.aSign) > -1) { 7185 s = s.replace(settings.aSign, ''); 7186 } 7187 } 7188 s = s.replace(settings.skipFirstAutoStrip, '$1$2'); /** first replace anything before digits */ 7189 s = s.replace(settings.skipLastAutoStrip, '$1'); /** then replace anything after digits */ 7190 s = s.replace(settings.allowedAutoStrip, ''); /** then remove any uninterested characters */ 7191 if (settings.altDec) { 7192 s = s.replace(settings.altDec, settings.aDec); 7193 } /** get only number string */ 7194 var m = s.match(settings.numRegAutoStrip); 7195 s = m ? [m[1], m[2], m[3]].join('') : ''; 7196 if ((settings.lZero === 'allow' || settings.lZero === 'keep') && strip_zero !== 'strip') { 7197 var parts = [], 7198 nSign = ''; 7199 parts = s.split(settings.aDec); 7200 if (parts[0].indexOf('-') !== -1) { 7201 nSign = '-'; 7202 parts[0] = parts[0].replace('-', ''); 7203 } 7204 if (parts[0].length > settings.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */ 7205 parts[0] = parts[0].slice(1); 7206 } 7207 s = nSign + parts.join(settings.aDec); 7208 } 7209 if ((strip_zero && settings.lZero === 'deny') || (strip_zero && settings.lZero === 'allow' && settings.allowLeading === false)) { 7210 var strip_reg = '^' + settings.aNegRegAutoStrip + '0*(\\d' + (strip_zero === 'leading' ? ')' : '|$)');
7211 strip_reg = new RegExp(strip_reg); 7212 s = s.replace(strip_reg, '$1$2'); 7213 } 7214 return s; 7215 } 7216 7217 /** 7218 * places or removes brackets on negative values 7219 * works only when with pSign: 'p' 7220 */ 7221 function negativeBracket(s, settings) { 7222 if (settings.pSign === 'p') { 7223 var brackets = settings.nBracket.split(','); 7224 if (!settings.hasFocus && !settings.removeBrackets) { 7225 s = s.replace(settings.aNeg, ''); 7226 s = brackets[0] + s + brackets[1]; 7227 } else if ((settings.hasFocus && s.charAt(0) === brackets[0]) || (settings.removeBrackets && s.charAt(0) === brackets[0])) { 7228 s = s.replace(brackets[0], settings.aNeg); 7229 s = s.replace(brackets[1], ''); 7230 } 7231 } 7232 return s; 7233 } 7234 7235 /** 7236 * function to handle numbers less than 0 that are stored in Exponential notation ex: .0000001 stored as 1e-7 7237 */ 7238 function checkValue(value, settings) { 7239 if (value) { 7240 var checkSmall = +value; 7241 if (checkSmall < 0.000001 && checkSmall > -1) { 7242 value = +value; 7243 if (value < 0.000001 && value > 0) { 7244 value = (value + 10).toString(); 7245 value = value.substring(1); 7246 } 7247 if (value < 0 && value > -1) { 7248 value = (value - 10).toString(); 7249 value = '-' + value.substring(2); 7250 } 7251 value = value.toString(); 7252 } else { 7253 var parts = value.split('.'); 7254 if (parts[1] !== undefined) { 7255 if (+parts[1] === 0) { 7256 value = parts[0]; 7257 } else { 7258 parts[1] = parts[1].replace(/0*$/, ''); 7259 value = parts.join('.'); 7260 } 7261 } 7262 } 7263 } 7264 return (settings.lZero === 'keep') ? value : value.replace(/^0*(\d)/, '$1'); 7265 } 7266 7267 /** 7268 * prepare number string to be converted to real number 7269 */ 7270 function fixNumber(s, aDec, aNeg) { 7271 if (aDec && aDec !== '.') { 7272 s = s.replace(aDec, '.'); 7273 } 7274 if (aNeg && aNeg !== '-') { 7275 s = s.replace(aNeg, '-'); 7276 } 7277 if (!s.match(/\d/)) { 7278 s += '0'; 7279 } 7280 return s; 7281 } 7282 7283 /** 7284 * prepare real number to be converted to our format 7285 */ 7286 function presentNumber(s, aDec, aNeg) { 7287 if (aNeg && aNeg !== '-') { 7288 s = s.replace('-', aNeg); 7289 } 7290 if (aDec && aDec !== '.') { 7291 s = s.replace('.', aDec); 7292 } 7293 return s; 7294 } 7295 7296 /** 7297 * private function to check for empty value 7298 */ 7299 function checkEmpty(iv, settings, signOnEmpty) { 7300 if (iv === '' || iv === settings.aNeg) { 7301 if (settings.wEmpty === 'zero') { 7302 return iv + '0'; 7303 } 7304 if (settings.wEmpty === 'sign' || signOnEmpty) { 7305 return iv + settings.aSign; 7306 } 7307 return iv; 7308 } 7309 return null; 7310 } 7311 7312 /** 7313 * private function that formats our number 7314 */ 7315 function autoGroup(iv, settings) { 7316 iv = autoStrip(iv, settings); 7317 var testNeg = iv.replace(',', '.'), 7318 empty = checkEmpty(iv, settings, true); 7319 if (empty !== null) { 7320 return empty; 7321 } 7322 var digitalGroup = ''; 7323 if (settings.dGroup === 2) { 7324 digitalGroup = /(\d)((\d)(\d{2}?)+)$/; 7325 } else if (settings.dGroup === 4) { 7326 digitalGroup = /(\d)((\d{4}?)+)$/; 7327 } else { 7328 digitalGroup = /(\d)((\d{3}?)+)$/; 7329 } /** splits the string at the decimal string */ 7330 var ivSplit = iv.split(settings.aDec); 7331 if (settings.altDec && ivSplit.length === 1) { 7332 ivSplit = iv.split(settings.altDec); 7333 } /** assigns the whole number to the a variable (s) */ 7334 var s = ivSplit[0];
7335 if (settings.aSep) { 7336 while (digitalGroup.test(s)) { /** re-inserts the thousand separator via a regular expression */ 7337 s = s.replace(digitalGroup, '$1' + settings.aSep + '$2'); 7338 } 7339 } 7340 if (settings.mDec !== 0 && ivSplit.length > 1) { 7341 if (ivSplit[1].length > settings.mDec) { 7342 ivSplit[1] = ivSplit[1].substring(0, settings.mDec); 7343 } /** joins the whole number with the decimal value */ 7344 iv = s + settings.aDec + ivSplit[1]; 7345 } else { /** if whole numbers only */ 7346 iv = s; 7347 } 7348 if (settings.aSign) { 7349 var has_aNeg = iv.indexOf(settings.aNeg) !== -1; 7350 iv = iv.replace(settings.aNeg, ''); 7351 iv = settings.pSign === 'p' ? settings.aSign + iv : iv + settings.aSign; 7352 if (has_aNeg) { 7353 iv = settings.aNeg + iv; 7354 } 7355 } 7356 if (testNeg < 0 && settings.nBracket !== null) { /** removes the negative sign and places brackets */ 7357 iv = negativeBracket(iv, settings); 7358 } 7359 return iv; 7360 } 7361 7362 /** 7363 * round number after setting by pasting or $().autoNumericSet() 7364 * private function for round the number 7365 * please note this handled as text - JavaScript math function can return inaccurate values 7366 * also this offers multiple rounding methods that are not easily accomplished in JavaScript 7367 */ 7368 function autoRound(iv, settings) { /** value to string */ 7369 iv = (iv === '') ? '0' : iv.toString(); 7370 convertKeyToNumber(settings, 'mDec'); /** set mDec to number needed when mDec set by 'update method */ 7371 if (settings.mRound === 'CHF') { 7372 iv = (Math.round(iv * 20) / 20).toString(); 7373 } 7374 var ivRounded = '', 7375 i = 0, 7376 nSign = '', 7377 rDec = (typeof (settings.aPad) === 'boolean' || settings.aPad === null) ? (settings.aPad ? settings.mDec : 0) : +settings.aPad; 7378 var truncateZeros = function (ivRounded) { /** truncate not needed zeros */ 7379 var regex = (rDec === 0) ? (/(\.(?:\d*[1-9])?)0*$/) : rDec === 1 ? (/(\.\d(?:\d*[1-9])?)0*$/) : new RegExp('(\\.\\d{' + rDec + '}(?:\\d*[1-9])?)0*$'); 7380 ivRounded = ivRounded.replace(regex, '$1'); /** If there are no decimal places, we don't need a decimal point at the end */ 7381 if (rDec === 0) { 7382 ivRounded = ivRounded.replace(/\.$/, ''); 7383 } 7384 return ivRounded; 7385 }; 7386 if (iv.charAt(0) === '-') { /** Checks if the iv (input Value)is a negative value */ 7387 nSign = '-'; 7388 iv = iv.replace('-', ''); /** removes the negative sign will be added back later if required */ 7389 } 7390 if (!iv.match(/^\d/)) { /** append a zero if first character is not a digit (then it is likely to be a dot)*/ 7391 iv = '0' + iv; 7392 } 7393 if (nSign === '-' && +iv === 0) { /** determines if the value is zero - if zero no negative sign */ 7394 nSign = ''; 7395 } 7396 if ((+iv > 0 && settings.lZero !== 'keep') || (iv.length > 0 && settings.lZero === 'allow')) { /** trims leading zero's if needed */ 7397 iv = iv.replace(/^0*(\d)/, '$1'); 7398 } 7399 var dPos = iv.lastIndexOf('.'), 7400 /** virtual decimal position */ 7401 vdPos = (dPos === -1) ? iv.length - 1 : dPos, 7402 /** checks decimal places to determine if rounding is required */ 7403 cDec = (iv.length - 1) - vdPos; /** check if no rounding is required */ 7404 if (cDec <= settings.mDec) { 7405 ivRounded = iv; /** check if we need to pad with zeros */ 7406 if (cDec < rDec) { 7407 if (dPos === -1) { 7408 ivRounded += '.'; 7409 } 7410 var zeros = '000000'; 7411 while (cDec < rDec) { 7412 zeros = zeros.substring(0, rDec - cDec); 7413 ivRounded += zeros; 7414 cDec += zeros.length; 7415 } 7416 } else if (cDec > rDec) { 7417 ivRounded = truncateZeros(ivRounded); 7418 } else if (cDec === 0 && rDec === 0) { 7419 ivRounded = ivRounded.replace(/\.$/, ''); 7420 } 7421 if (settings.mRound !== 'CHF') { 7422 return (+ivRounded === 0) ? ivRounded : nSign + ivRounded; 7423 } 7424 if (settings.mRound === 'CHF') { 7425 dPos = ivRounded.lastIndexOf('.'); 7426 iv = ivRounded; 7427 } 7428 7429 } /** rounded length of the string after rounding */ 7430 var rLength = dPos + settings.mDec, 7431 tRound = +iv.charAt(rLength + 1), 7432 ivArray = iv.substring(0, rLength + 1).split(''), 7433 odd = (iv.charAt(rLength) === '.') ? (iv.charAt(rLength - 1) % 2)
7433: (iv.charAt(rLength) % 2), 7434 onePass = true; 7435 if (odd !== 1) { 7436 odd = (odd === 0 && (iv.substring(rLength + 2, iv.length) > 0)) ? 1 : 0; 7437 } 7438 /*jslint white: true*/ 7439 if ((tRound > 4 && settings.mRound === 'S') || /** Round half up symmetric */ 7440 (tRound > 4 && settings.mRound === 'A' && nSign === '') || /** Round half up asymmetric positive values */ 7441 (tRound > 5 && settings.mRound === 'A' && nSign === '-') || /** Round half up asymmetric negative values */ 7442 (tRound > 5 && settings.mRound === 's') || /** Round half down symmetric */ 7443 (tRound > 5 && settings.mRound === 'a' && nSign === '') || /** Round half down asymmetric positive values */ 7444 (tRound > 4 && settings.mRound === 'a' && nSign === '-') || /** Round half down asymmetric negative values */ 7445 (tRound > 5 && settings.mRound === 'B') || /** Round half even "Banker's Rounding" */ 7446 (tRound === 5 && settings.mRound === 'B' && odd === 1) || /** Round half even "Banker's Rounding" */ 7447 (tRound > 0 && settings.mRound === 'C' && nSign === '') || /** Round to ceiling toward positive infinite */ 7448 (tRound > 0 && settings.mRound === 'F' && nSign === '-') || /** Round to floor toward negative infinite */ 7449 (tRound > 0 && settings.mRound === 'U') || /** round up away from zero */ 7450 (settings.mRound === 'CHF')) { /** Round Swiss FRanc */ 7451 /*jslint white: false*/ 7452 for (i = (ivArray.length - 1) ; i >= 0; i -= 1) { /** Round up the last digit if required, and continue until no more 9's are found */ 7453 if (ivArray[i] !== '.') { 7454 if (settings.mRound === 'CHF' && ivArray[i] <= 2 && onePass) { 7455 ivArray[i] = 0; 7456 onePass = false; 7457 break; 7458 } 7459 if (settings.mRound === 'CHF' && ivArray[i] <= 7 && onePass) { 7460 ivArray[i] = 5; 7461 onePass = false; 7462 break; 7463 } 7464 if (settings.mRound === 'CHF' && onePass) { 7465 ivArray[i] = 10; 7466 onePass = false; 7467 } else { 7468 ivArray[i] = +ivArray[i] + 1; 7469 } 7470 if (ivArray[i] < 10) { 7471 break; 7472 } 7473 if (i > 0) { 7474 ivArray[i] = '0'; 7475 } 7476 } 7477 } 7478 } 7479 ivArray = ivArray.slice(0, rLength + 1); /** Reconstruct the string, converting any 10's to 0's */ 7480 ivRounded = truncateZeros(ivArray.join('')); /** return rounded value */ 7481 return (+ivRounded === 0) ? ivRounded : nSign + ivRounded; 7482 } 7483 7484 /** 7485 * truncate decimal part of a number 7486 */ 7487 function truncateDecimal(s, settings, paste) { 7488 var aDec = settings.aDec, 7489 mDec = settings.mDec; 7490 s = (paste === 'paste') ? autoRound(s, settings) : s; 7491 if (aDec && mDec) { 7492 var parts = s.split(aDec); 7493 /** truncate decimal part to satisfying length 7494 * cause we would round it anyway */ 7495 if (parts[1] && parts[1].length > mDec) { 7496 if (mDec > 0) { 7497 parts[1] = parts[1].substring(0, mDec); 7498 s = parts.join(aDec); 7499 } else { 7500 s = parts[0]; 7501 } 7502 } 7503 } 7504 return s; 7505 } 7506 7507 /** 7508 * checking that number satisfy format conditions 7509 * and lays between settings.vMin and settings.vMax 7510 * and the string length does not exceed the digits in settings.vMin and settings.vMax 7511 */ 7512 function autoCheck(s, settings) { 7513 s = autoStrip(s, settings); 7514 s = truncateDecimal(s, settings); 7515 s = fixNumber(s, settings.aDec, settings.aNeg); 7516 var value = +s; 7517 return value >= settings.vMin && value <= settings.vMax; 7518 } 7519 7520 /** 7521 * Holder object for field properties 7522 */ 7523 function AutoNumericHolder(that, settings) { 7524 this.settings = settings; 7525 this.that = that; 7526 this.$that = $(that); 7527 this.formatted = false; 7528 this.settingsClone = autoCode(this.$that, this.settings); 7529 this.value = that.value; 7530 } 7531 AutoNumericHolder.prototype = { 7532 init: function (e) { 7533 this.value = this.that.value; 7534 this.settingsClone = autoCode(this.$that, this.settings); 7535 this.ctrlKey = e.ctrlKey; 7536 this.cmdKey = e.metaKey; 7537 this.shiftKey = e.shiftKey; 7538 this.selection = getElementSelection(this.that);
7538 /** keypress event overwrites meaningful value of e.keyCode */ 7539 if (e.type === 'keydown' || e.type === 'keyup') { 7540 this.kdCode = e.keyCode; 7541 } 7542 this.which = e.which; 7543 this.processed = false; 7544 this.formatted = false; 7545 }, 7546 setSelection: function (start, end, setReal) { 7547 start = Math.max(start, 0); 7548 end = Math.min(end, this.that.value.length); 7549 this.selection = { 7550 start: start, 7551 end: end, 7552 length: end - start 7553 }; 7554 if (setReal === undefined || setReal) { 7555 setElementSelection(this.that, start, end); 7556 } 7557 }, 7558 setPosition: function (pos, setReal) { 7559 this.setSelection(pos, pos, setReal); 7560 }, 7561 getBeforeAfter: function () { 7562 var value = this.value, 7563 left = value.substring(0, this.selection.start), 7564 right = value.substring(this.selection.end, value.length); 7565 return [left, right]; 7566 }, 7567 getBeforeAfterStriped: function () { 7568 var parts = this.getBeforeAfter(); 7569 parts[0] = autoStrip(parts[0], this.settingsClone); 7570 parts[1] = autoStrip(parts[1], this.settingsClone); 7571 return parts; 7572 }, 7573 7574 /** 7575 * strip parts from excess characters and leading zeroes 7576 */ 7577 normalizeParts: function (left, right) { 7578 var settingsClone = this.settingsClone; 7579 right = autoStrip(right, settingsClone); /** if right is not empty and first character is not aDec, */ 7580 /** we could strip all zeros, otherwise only leading */ 7581 var strip = right.match(/^\d/) ? true : 'leading'; 7582 left = autoStrip(left, settingsClone, strip); /** prevents multiple leading zeros from being entered */ 7583 if ((left === '' || left === settingsClone.aNeg) && settingsClone.lZero === 'deny') { 7584 if (right > '') { 7585 right = right.replace(/^0*(\d)/, '$1'); 7586 } 7587 } 7588 var new_value = left + right; /** insert zero if has leading dot */ 7589 if (settingsClone.aDec) { 7590 var m = new_value.match(new RegExp('^' + settingsClone.aNegRegAutoStrip + '\\' + settingsClone.aDec)); 7591 if (m) { 7592 left = left.replace(m[1], m[1] + '0'); 7593 new_value = left + right; 7594 } 7595 } /** insert zero if number is empty and io.wEmpty == 'zero' */ 7596 if (settingsClone.wEmpty === 'zero' && (new_value === settingsClone.aNeg || new_value === '')) { 7597 left += '0'; 7598 } 7599 return [left, right]; 7600 }, 7601 7602 /** 7603 * set part of number to value keeping position of cursor 7604 */ 7605 setValueParts: function (left, right, paste) { 7606 var settingsClone = this.settingsClone, 7607 parts = this.normalizeParts(left, right), 7608 new_value = parts.join(''), 7609 position = parts[0].length; 7610 if (autoCheck(new_value, settingsClone)) { 7611 new_value = truncateDecimal(new_value, settingsClone, paste); 7612 if (position > new_value.length) { 7613 position = new_value.length; 7614 } 7615 this.value = new_value; 7616 this.setPosition(position, false); 7617 return true; 7618 } 7619 return false; 7620 }, 7621 7622 /** 7623 * helper function for expandSelectionOnSign 7624 * returns sign position of a formatted value 7625 */ 7626 signPosition: function () { 7627 var settingsClone = this.settingsClone, 7628 aSign = settingsClone.aSign, 7629 that = this.that; 7630 if (aSign) { 7631 var aSignLen = aSign.length; 7632 if (settingsClone.pSign === 'p') { 7633 var hasNeg = settingsClone.aNeg && that.value && that.value.charAt(0) === settingsClone.aNeg; 7634 return hasNeg ? [1, aSignLen + 1] : [0, aSignLen]; 7635 } 7636 var valueLen = that.value.length; 7637 return [valueLen - aSignLen, valueLen]; 7638 } 7639 return [1000, -1]; 7640 }, 7641 7642 /** 7643 * expands selection to cover whole sign 7644 * prevents partial deletion/copying/overwriting of a sign 7645 */ 7646 expandSelectionOnSign: function (setReal) { 7647 var sign_position = this.signPosition(), 7648 selection = this.selection; 7649 if (selection.start < sign_position[1] && selection.end > sign_position[0]) { /** if selection catches something except sign and catches only space from sign */ 7650 if ((selection.start < sign_position[0] || selection.end > sign_position[1]) && this.value.substring(Math.max(selection.start, sign_position[0]), Math.min(selection.end, sign_position[1])).match(/^\s*$/)) { /** then select without empty space */ 7651 if (selection.start < sign_position[0]) { 7652 this.setSelection(selection.start, sign_position[0], setReal); 7653 } else { 7654 this.setSelection(sign_position[1], selection.end, setReal); 7655 } 7656 } else { /** else select with whole sign */ 7657 this.setSelection(Math.min(selection.start, sign_position[0]), Math.max(selection.end, sign_position[1]), setReal); 7658 } 7659 } 7660 }, 7661 7662 /**
7663 * try to strip pasted value to digits 7664 */ 7665 checkPaste: function () { 7666 if (this.valuePartsBeforePaste !== undefined) { 7667 var parts = this.getBeforeAfter(), 7668 7669 oldParts = this.valuePartsBeforePaste; 7670 delete this.valuePartsBeforePaste; /** try to strip pasted value first */ 7671 parts[0] = parts[0].substr(0, oldParts[0].length) + autoStrip(parts[0].substr(oldParts[0].length), this.settingsClone); 7672 if (!this.setValueParts(parts[0], parts[1], 'paste')) { 7673 this.value = oldParts.join(''); 7674 this.setPosition(oldParts[0].length, false); 7675 } 7676 } 7677 }, 7678 7679 /** 7680 * process pasting, cursor moving and skipping of not interesting keys 7681 * if returns true, further processing is not performed 7682 */ 7683 skipAllways: function (e) { 7684 var kdCode = this.kdCode, 7685 which = this.which, 7686 ctrlKey = this.ctrlKey, 7687 cmdKey = this.cmdKey, 7688 shiftKey = this.shiftKey; /** catch the ctrl up on ctrl-v */ 7689 if (((ctrlKey || cmdKey) && e.type === 'keyup' && this.valuePartsBeforePaste !== undefined) || (shiftKey && kdCode === 45)) { 7690 this.checkPaste(); 7691 return false; 7692 } 7693 /** codes are taken from http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx 7694 * skip Fx keys, windows keys, other special keys 7695 * Thanks Ney Estrabelli for the FF for Mac meta key support "keycode 224" 7696 */ 7697 if ((kdCode >= 112 && kdCode <= 123) || (kdCode >= 91 && kdCode <= 93) || (kdCode >= 9 && kdCode <= 31) || (kdCode < 8 && (which === 0 || which === kdCode)) || kdCode === 144 || kdCode === 145 || kdCode === 45 || kdCode === 224) { 7698 return true; 7699 } 7700 if ((ctrlKey || cmdKey) && kdCode === 65) { /** if select all (a=65)*/ 7701 return true; 7702 } 7703 if ((ctrlKey || cmdKey) && (kdCode === 67 || kdCode === 86 || kdCode === 88)) { /** if copy (c=67) paste (v=86) or cut (x=88) */ 7704 if (e.type === 'keydown') { 7705 this.expandSelectionOnSign(); 7706 } 7707 if (kdCode === 86 || kdCode === 45) { /** try to prevent wrong paste */ 7708 if (e.type === 'keydown' || e.type === 'keypress') { 7709 if (this.valuePartsBeforePaste === undefined) { 7710 this.valuePartsBeforePaste = this.getBeforeAfter(); 7711 } 7712 } else { 7713 this.checkPaste(); 7714 } 7715 } 7716 return e.type === 'keydown' || e.type === 'keypress' || kdCode === 67; 7717 } 7718 if (ctrlKey || cmdKey) { 7719 return true; 7720 } 7721 if (kdCode === 37 || kdCode === 39) { /** jump over thousand separator */ 7722 var aSep = this.settingsClone.aSep, 7723 start = this.selection.start, 7724 value = this.that.value; 7725 if (e.type === 'keydown' && aSep && !this.shiftKey) { 7726 if (kdCode === 37 && value.charAt(start - 2) === aSep) { 7727 this.setPosition(start - 1); 7728 } else if (kdCode === 39 && value.charAt(start + 1) === aSep) { 7729 this.setPosition(start + 1); 7730 } 7731 } 7732 return true; 7733 } 7734 if (kdCode >= 34 && kdCode <= 40) { 7735 return true; 7736 } 7737 return false; 7738 }, 7739 7740 /** 7741 * process deletion of characters 7742 * returns true if processing performed 7743 */ 7744 processAllways: function () { 7745 var parts; /** process backspace or delete */ 7746 if (this.kdCode === 8 || this.kdCode === 46) { 7747 if (!this.selection.length) { 7748 parts = this.getBeforeAfterStriped(); 7749 if (this.kdCode === 8) { 7750 parts[0] = parts[0].substring(0, parts[0].length - 1); 7751 } else { 7752 parts[1] = parts[1].substring(1, parts[1].length); 7753 } 7754 this.setValueParts(parts[0], parts[1]); 7755 } else { 7756 this.expandSelectionOnSign(false); 7757 parts = this.getBeforeAfterStriped(); 7758 this.setValueParts(parts[0], parts[1]); 7759 } 7760 return true; 7761 } 7762 return false; 7763 }, 7764 7765 /** 7766 * process insertion of characters 7767 * returns true if processing performed 7768 */ 7769 processKeypress: function () { 7770 var settingsClone = this.settingsClone, 7771 cCode = String.fromCharCode(this.which), 7772 parts = this.getBeforeAfterStriped(), 7773 left = parts[0], 7774 right = parts[1]; /** start rules when the decimal character key is pressed */ 7775 /** always use numeric pad dot to insert decimal separator */
7776 if (cCode === settingsClone.aDec || (settingsClone.altDec && cCode === settingsClone.altDec) || ((cCode === '.' || cCode === ',') && this.kdCode === 110)) { /** do not allow decimal character if no decimal part allowed */ 7777 if (!settingsClone.mDec || !settingsClone.aDec) { 7778 return true; 7779 } /** do not allow decimal character before aNeg character */ 7780 if (settingsClone.aNeg && right.indexOf(settingsClone.aNeg) > -1) { 7781 return true; 7782 } /** do not allow decimal character if other decimal character present */ 7783 if (left.indexOf(settingsClone.aDec) > -1) { 7784 return true; 7785 } 7786 if (right.indexOf(settingsClone.aDec) > 0) { 7787 return true; 7788 } 7789 if (right.indexOf(settingsClone.aDec) === 0) { 7790 right = right.substr(1); 7791 } 7792 this.setValueParts(left + settingsClone.aDec, right); 7793 return true; 7794 } 7795 /** 7796 * start rule on negative sign & prevent minus if not allowed 7797 */ 7798 if (cCode === '-' || cCode === '+') { 7799 if (!settingsClone.aNeg) { 7800 return true; 7801 } /** caret is always after minus */ 7802 if (left === '' && right.indexOf(settingsClone.aNeg) > -1) { 7803 left = settingsClone.aNeg; 7804 right = right.substring(1, right.length); 7805 } /** change sign of number, remove part if should */ 7806 if (left.charAt(0) === settingsClone.aNeg) { 7807 left = left.substring(1, left.length); 7808 } else { 7809 left = (cCode === '-') ? settingsClone.aNeg + left : left; 7810 } 7811 this.setValueParts(left, right); 7812 return true; 7813 } /** digits */ 7814 if (cCode >= '0' && cCode <= '9') { /** if try to insert digit before minus */ 7815 if (settingsClone.aNeg && left === '' && right.indexOf(settingsClone.aNeg) > -1) { 7816 left = settingsClone.aNeg; 7817 right = right.substring(1, right.length); 7818 } 7819 if (settingsClone.vMax <= 0 && settingsClone.vMin < settingsClone.vMax && this.value.indexOf(settingsClone.aNeg) === -1 && cCode !== '0') { 7820 left = settingsClone.aNeg + left; 7821 } 7822 this.setValueParts(left + cCode, right); 7823 return true; 7824 } /** prevent any other character */ 7825 return true; 7826 }, 7827 7828 /** 7829 * formatting of just processed value with keeping of cursor position 7830 */ 7831 formatQuick: function () { 7832 var settingsClone = this.settingsClone, 7833 parts = this.getBeforeAfterStriped(), 7834 leftLength = this.value;
7835 if ((settingsClone.aSep === '' || (settingsClone.aSep !== '' && leftLength.indexOf(settingsClone.aSep) === -1)) && (settingsClone.aSign === '' || (settingsClone.aSign !== '' && leftLength.indexOf(settingsClone.aSign) === -1))) { 7836 var subParts = [], 7837 nSign = ''; 7838 subParts = leftLength.split(settingsClone.aDec); 7839 if (subParts[0].indexOf('-') > -1) { 7840 nSign = '-'; 7841 subParts[0] = subParts[0].replace('-', ''); 7842 parts[0] = parts[0].replace('-', ''); 7843 } 7844 if (subParts[0].length > settingsClone.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */ 7845 parts[0] = parts[0].slice(1); 7846 } 7847 parts[0] = nSign + parts[0]; 7848 } 7849 var value = autoGroup(this.value, this.settingsClone), 7850 position = value.length; 7851 if (value) { 7852 /** prepare regexp which searches for cursor position from unformatted left part */ 7853 var left_ar = parts[0].split(''), 7854 i = 0; 7855 for (i; i < left_ar.length; i += 1) { /** thanks Peter Kovari */ 7856 if (!left_ar[i].match('\\d')) { 7857 left_ar[i] = '\\' + left_ar[i]; 7858 } 7859 } 7860 var leftReg = new RegExp('^.*?' + left_ar.join('.*?')); 7861 /** search cursor position in formatted value */ 7862 var newLeft = value.match(leftReg); 7863 if (newLeft) { 7864 position = newLeft[0].length; 7865 /** if we are just before sign which is in prefix position */ 7866 if (((position === 0 && value.charAt(0) !== settingsClone.aNeg) || (position === 1 && value.charAt(0) === settingsClone.aNeg)) && settingsClone.aSign && settingsClone.pSign === 'p') { 7867 /** place caret after prefix sign */ 7868 position = this.settingsClone.aSign.length + (value.charAt(0) === '-' ? 1 : 0); 7869 } 7870 } else if (settingsClone.aSign && settingsClone.pSign === 's') { 7871 /** if we could not find a place for cursor and have a sign as a suffix */ 7872 /** place carret before suffix currency sign */ 7873 position -= settingsClone.aSign.length; 7874 } 7875 } 7876 this.that.value = value; 7877 this.setPosition(position); 7878 this.formatted = true; 7879 } 7880 }; 7881 7882 /** 7883 * thanks to Anthony & Evan C 7884 */ 7885 function autoGet(obj) { 7886 if (typeof obj === 'string') { 7887 obj = obj.replace(/\[/g, "\\[").replace(/\]/g, "\\]"); 7888 obj = '#' + obj.replace(/(:|\.)/g, '\\$1'); 7889 /** obj = '#' + obj.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1'); */ 7890 /** possible modification to replace the above 2 lines */ 7891 } 7892 return $(obj); 7893 } 7894 7895 /** 7896 * function to attach data to the element 7897 * and imitate the holder 7898 */ 7899 function getHolder($that, settings, update) { 7900 var data = $that.data('autoNumeric'); 7901 if (!data) { 7902 data = {}; 7903 $that.data('autoNumeric', data); 7904 } 7905 var holder = data.holder; 7906 if ((holder === undefined && settings) || update) { 7907 holder = new AutoNumericHolder($that.get(0), settings); 7908 data.holder = holder; 7909 } 7910 return holder; 7911 } 7912 7913 var methods = { 7914 7915 /** 7916 * Method to initiate autoNumeric and attached the settings (default and options passed as a parameter 7917 * $(someSelector).autoNumeric('init'); // initiate autoNumeric with defaults 7918 * $(someSelector).autoNumeric('init', {option}); // initiate autoNumeric with options 7919 * $(someSelector).autoNumeric(); // initiate autoNumeric with defaults 7920 * $(someSelector).autoNumeric({option}); // initiate autoNumeric with options 7921 * options passes as a parameter example '{aSep: '.', aDec: ',', aSign: '� '} 7922 */ 7923 init: function (options) { 7924 return this.each(function () { 7925 var $this = $(this), 7926 settings = $this.data('autoNumeric'), /** attempt to grab 'autoNumeric' settings, if they don't exist returns "undefined". */ 7927 tagData = $this.data(), /** attempt to grab HTML5 data, if they don't exist we'll get "undefined".*/ 7928 $input = $this.is('input[type=text], input[type=hidden], input[type=tel], input
7928:not([type])'); 7929 if (typeof settings !== 'object') { /** If we couldn't grab settings, create them from defaults and passed options. */ 7930 settings = $.extend({}, $.fn.autoNumeric.defaults, tagData, options, { 7931 aNum: '0123456789', 7932 hasFocus: false, 7933 removeBrackets: false, 7934 runOnce: false, 7935 tagList: ['b', 'caption', 'cite', 'code', 'dd', 'del', 'div', 'dfn', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ins', 'kdb', 'label', 'li', 'output', 'p', 'q', 's', 'sample', 'span', 'strong', 'td', 'th', 'u', 'var'] 7936 }); /** Merge defaults, tagData and options */ 7937 if (settings.aDec === settings.aSep) { 7938 $.error("autoNumeric will not function properly when the decimal character aDec: '" + settings.aDec + "' and thousand separator aSep: '" + settings.aSep + "' are the same character"); 7939 } 7940 $this.data('autoNumeric', settings); /** Save our new settings */ 7941 } else { 7942 return this; 7943 } 7944 var holder = getHolder($this, settings); 7945 if (!$input && $this.prop('tagName').toLowerCase() === 'input') { /** checks for non-supported input types */ 7946 $.error('The input type "' + $this.prop('type') + '" is not supported by autoNumeric()'); 7947 7948 } 7949 if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) === -1 && $this.prop('tagName').toLowerCase() !== 'input') { 7950 $.error("The <" + $this.prop('tagName').toLowerCase() + "> is not supported by autoNumeric()"); 7951 7952 } 7953 if (settings.runOnce === false && settings.aForm) { /** routine to format default value on page load */ 7954 if ($input) { 7955 var setValue = true; 7956 if ($this[0].value === '' && settings.wEmpty === 'empty') { 7957 $this[0].value = ''; 7958 setValue = false; 7959 } 7960 if ($this[0].value === '' && settings.wEmpty === 'sign') { 7961 $this[0].value = settings.aSign; 7962 setValue = false; 7963 } 7964 /** checks for page reload from back button 7965 * also checks for ASP.net form post back 7966 * the following HTML data attribute is REQUIRED (data-an-default="same value as the value attribute") 7967 * example: <asp:TextBox runat="server" id="someID" value="1234.56" data-an-default="1234.56"> 7968 */ 7969 if (setValue && $this.val() !== '' && ((settings.anDefault === null && $this[0].value === $this.prop('defaultValue')) || (settings.anDefault !== null && settings.anDefault.toString() === $this.val()))) { 7970 $this.autoNumeric('set', $this.val()); 7971 } 7972 } 7973 if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1 && $this.text() !== '') { 7974 $this.autoNumeric('set', $this.text()); 7975 } 7976 } 7977 settings.runOnce = true; 7978 if ($this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])')) { /**added hidden type */ 7979 $this.on('keydown.autoNumeric', function (e) { 7980 holder = getHolder($this); 7981 if (holder.settings.aDec === holder.settings.aSep) { 7982 $.error("autoNumeric will not function properly when the decimal character aDec: '" + holder.settings.aDec + "' and thousand separator aSep: '" + holder.settings.aSep + "' are the same character"); 7983 } 7984 if (holder.that.readOnly) { 7985 holder.processed = true; 7986 return true; 7987 } 7988 /** The below streamed code / comment allows the "enter" keydown to throw a change() event */ 7989 /** if (e.keyCode === 13 && holder.inVal !== $this.val()){ 7990 $this.change(); 7991 holder.inVal = $this.val(); 7992 }*/ 7993 holder.init(e); 7994 if (holder.skipAllways(e)) { 7995 holder.processed = true; 7996 return true; 7997 } 7998 if (holder.processAllways()) { 7999 holder.processed = true; 8000 holder.formatQuick(); 8001 e.preventDefault(); 8002 return false; 8003 } 8004 holder.formatted = false; 8005 return true; 8006 }); 8007 $this.on('keypress.autoNumeric', function (e) { 8008 holder = getHolder($this); 8009 var processed = holder.processed; 8010 holder.init(e); 8011 if (holder.skipAllways(e)) { 8012 return true; 8013 } 8014 if (processed) { 8015 e.preventDefault(); 8016 return false; 8017 } 8018 if (holder.processAllways() || holder.processKeypress()) { 8019 holder.formatQuick(); 8020 e.preventDefault(); 8021 return false; 8022 } 8023 holder.formatted = false; 8024 }); 8025 $this.on('keyup.autoNumeric', function (e) { 8026 holder = getHolder($this); 8027 holder.init(e); 8028 var skip = holder.skipAllways(e); 8029 holder.kdCode = 0; 8030 delete holder.valuePartsBeforePaste; 8031 if ($this[0].value === holder.settings.aSign) { /** added to properly place the caret when only the currency is present */ 8032 if (holder.settings.pSign === 's') { 8033 setElementSelection(this, 0, 0); 8034 } else { 8035 setElementSelection(this, holder.settings.aSign.length, holder.settings.aSign.length); 8036 } 8037 } 8038 if (skip) { 8039 return true; 8040 } 8041 if (this.value === '') { 8042 return true; 8043 } 8044 if (!holder.formatted) { 8045 holder.formatQuick(); 8046 } 8047 }); 8048 $this.on('focusin.autoNumeric', function () { 8049 holder = getHolder($this); 8050 var $settings = holder.settingsClone; 8051 $settings.hasFocus = true; 8052 if ($settings.nBracket !== null) { 8053 var checkVal = $this.val(); 8054 $this.val(negativeBracket(checkVal, $settings)); 8055 } 8056 holder.inVal = $this.val(); 8057 var onEmpty = checkEmpty(holder.inVal, $settings, true); 8058 if (onEmpty !== null && onEmpty !== '') { 8059 $this.val(onEmpty); 8060 } 8061 }); 8062 $this.on('focusout.autoNumeric', function () { 8063 holder = getHolder($this); 8064 var $settings = holder.settingsClone, 8065 value = $this.val(), 8066 origValue = value; 8067 $settings.hasFocus = false; 8068 var strip_zero = ''; /** added to control leading zero */ 8069 if ($settings.lZero === 'allow') { /** added to control leading zero */ 8070 $settings.allowLeading = false;
8071 strip_zero = 'leading'; 8072 } 8073 if (value !== '') { 8074 value = autoStrip(value, $settings, strip_zero); 8075 if (checkEmpty(value, $settings) === null && autoCheck(value, $settings, $this[0])) { 8076 value = fixNumber(value, $settings.aDec, $settings.aNeg); 8077 value = autoRound(value, $settings); 8078 value = presentNumber(value, $settings.aDec, $settings.aNeg); 8079 } else { 8080 value = ''; 8081 } 8082 } 8083 var groupedValue = checkEmpty(value, $settings, false); 8084 if (groupedValue === null) { 8085 groupedValue = autoGroup(value, $settings); 8086 } 8087 if (groupedValue !== holder.inVal || groupedValue !== origValue) { 8088 $this.val(groupedValue); 8089 $this.change(); 8090 delete holder.inVal; 8091 } 8092 }); 8093 } 8094 }); 8095 }, 8096 8097 /** 8098 * method to remove settings and stop autoNumeric() - does not remove the formatting 8099 * $(someSelector).autoNumeric('destroy'); // destroy autoNumeric 8100 * no parameters accepted 8101 */ 8102 destroy: function () { 8103 return $(this).each(function () { 8104 var $this = $(this); 8105 $this.off('.autoNumeric'); 8106 $this.removeData('autoNumeric'); 8107 }); 8108 }, 8109 8110 /** 8111 * method to update settings - can be call as many times 8112 * $(someSelector).autoNumeric('update', {options}); // updates the settings 8113 * options passes as a parameter example '{aSep: '.', aDec: ',', aSign: '� '} 8114 */ 8115 update: function (options) { 8116 return $(this).each(function () { 8117 var $this = autoGet($(this)), 8118 settings = $this.data('autoNumeric'); 8119 if (typeof settings !== 'object') { 8120 $.error("You must initialize autoNumeric('init', {options}) prior to calling the 'update' method"); 8121 } 8122 var strip = $this.autoNumeric('get'); 8123 settings = $.extend(settings, options); 8124 getHolder($this, settings, true); 8125 if (settings.aDec === settings.aSep) { 8126 $.error("autoNumeric will not function properly when the decimal character aDec: '" + settings.aDec + "' and thousand separator aSep: '" + settings.aSep + "' are the same character"); 8127 } 8128 $this.data('autoNumeric', settings); 8129 if ($this.val() !== '' || $this.text() !== '') { 8130 return $this.autoNumeric('set', strip); 8131 } 8132 return; 8133 }); 8134 }, 8135 8136 /** 8137 * method to format value sent as a parameter "" 8138 * $(someSelector).autoNumeric('set', 'value'}); // formats the value being passed 8139 * value passed as a string - can be a integer '1234' or double '1234.56789' 8140 * must contain only numbers and one decimal (period) character 8141 */ 8142 set: function (valueIn) { 8143 if (valueIn === null) { 8144 return; 8145 } 8146 return $(this).each(function () { 8147 var $this = autoGet($(this)), 8148 settings = $this.data('autoNumeric'), 8149 value = valueIn.toString(), 8150 testValue = valueIn.toString(), 8151 $input = $this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])'); 8152 if (typeof settings !== 'object') { 8153 $.error("You must initialize autoNumeric('init', {options}) prior to calling the 'set' method"); 8154 } 8155 /** allows locale decimal separator to be a comma */ 8156 if ((testValue === $this.attr('value') || testValue === $this.text()) && settings.runOnce === false) { 8157 value = value.replace(',', '.'); 8158 } 8159 if (!$.isNumeric(+value)) { 8160 $.error("The value (" + value + ") being 'set' is not numeric and has caused a error to be thrown"); 8161 } 8162 value = checkValue(value, settings); 8163 settings.setEvent = true; 8164 value.toString(); 8165 if (value !== '') { 8166 value = autoRound(value, settings); 8167 } 8168 value = presentNumber(value, settings.aDec, settings.aNeg); 8169 if (!autoCheck(value, settings)) { 8170 value = autoRound('', settings); 8171 } 8172 value = autoGroup(value, settings); 8173 if ($input) { 8174 return $this.val(value); 8175 } 8176 if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1) { 8177 return $this.text(value); 8178 } 8179 return false; 8180 }); 8181 }, 8182 8183 /** 8184 * method to get the unformatted that accepts up to one parameter 8185 * $(someSelector).autoNumeric('get'); no parameters accepted 8186 * values returned as ISO numeric string "1234.56" where the decimal character is a period 8187 * only the first element in the selector is returned 8188 */ 8189 get: function () { 8190 var $this = autoGet($(this)), 8191 settings = $this.data('autoNumeric'); 8192 if (typeof settings !== 'object') { 8193 $.error("You must initialize autoNumeric('init', {options}) prior to calling the 'get' method"); 8194 } 8195 var getValue = ''; 8196 /** determine the element type then use .eq(0) selector to grab the value of the first element in selector */ 8197 if ($this.is('input[type=text], input[type=hidden], input[type=tel], input
8197:not([type])')) { /**added hidden type */ 8198 getValue = $this.eq(0).val(); 8199 } else if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1) { 8200 getValue = $this.eq(0).text(); 8201 } else { 8202 $.error("The <" + $this.prop('tagName').toLowerCase() + "> is not supported by autoNumeric()"); 8203 } 8204 if ((getValue === '' && settings.wEmpty === 'empty') || (getValue === settings.aSign && (settings.wEmpty === 'sign' || settings.wEmpty === 'empty'))) { 8205 return ''; 8206 } 8207 if (getValue !== '' && settings.nBracket !== null) { 8208 settings.removeBrackets = true; 8209 getValue = negativeBracket(getValue, settings); 8210 settings.removeBrackets = false; 8211 } 8212 if (settings.runOnce || settings.aForm === false) { 8213 getValue = autoStrip(getValue, settings); 8214 } 8215 getValue = fixNumber(getValue, settings.aDec, settings.aNeg); 8216 if (+getValue === 0 && settings.lZero !== 'keep') { 8217 getValue = '0'; 8218 } 8219 if (settings.lZero === 'keep') { 8220 return getValue; 8221 } 8222 getValue = checkValue(getValue, settings); 8223 return getValue; /** returned Numeric String */ 8224 }, 8225 8226 /** 8227 * The 'getString' method used jQuerys .serialize() method that creates a text string in standard URL-encoded notation 8228 * it then loops through the string and un-formats the inputs with autoNumeric 8229 * $(someSelector).autoNumeric('getString'); no parameter accepted 8230 * values returned as ISO numeric string "1234.56" where the decimal character is a period 8231 */ 8232 getString: function () { 8233 var isAutoNumeric = false, 8234 $this = autoGet($(this)), 8235 formFields = $this.serialize(), 8236 formParts = formFields.split('&'), 8237 formIndex = $('form').index($this), 8238 allFormElements = $('form:eq(' + formIndex + ')'), 8239 aiIndex = [], /* all input index */ 8240 scIndex = [], /* successful control index */ 8241 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, /* from jQuery serialize method */ 8242 rsubmittable = /^(?:input|select|textarea|keygen)/i, /* from jQuery serialize method */ 8243 rcheckableType = /^(?:checkbox|radio)$/i, 8244 rnonAutoNumericTypes = /^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i, 8245 count = 0; 8246 /*jslint unparam: true*/ 8247 /* index of successful elements */ 8248 $.each(allFormElements[0], function (i, field) { 8249 if (field.name !== '' && rsubmittable.test(field.localName) && !rsubmitterTypes.test(field.type) && !field.disabled && (field.checked || !rcheckableType.test(field.type))) { 8250 scIndex.push(count); 8251 count = count + 1; 8252 } else { 8253 scIndex.push(-1); 8254 } 8255 }); 8256 /* index of all inputs tags except checkbox */ 8257 count = 0; 8258 $.each(allFormElements[0], function (i, field) { 8259 if (field.localName === 'input' && (field.type === '' || field.type === 'text' || field.type === 'hidden' || field.type === 'tel')) { 8260 aiIndex.push(count); 8261 count = count + 1; 8262 } else { 8263 aiIndex.push(-1); 8264 if (field.localName === 'input' && rnonAutoNumericTypes.test(field.type)) { 8265 count = count + 1; 8266 } 8267 } 8268 }); 8269 $.each(formParts, function (i, miniParts) { 8270 miniParts = formParts[i].split('='); 8271 var scElement = $.inArray(i, scIndex); 8272 if (scElement > -1 && aiIndex[scElement] > -1) { 8273 var testInput = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')'), 8274 settings = testInput.data('autoNumeric'); 8275 if (typeof settings === 'object') { 8276 if (miniParts[1] !== null) { 8277 miniParts[1] = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')').autoNumeric('get').toString(); 8278 formParts[i] = miniParts.join('='); 8279 isAutoNumeric = true; 8280 } 8281 } 8282 } 8283 }); 8284 /*jslint unparam: false*/ 8285 if (!isAutoNumeric) { 8286 $.error("You must initialize autoNumeric('init', {options}) prior to calling the 'getString' method"); 8287 } 8288 return formParts.join('&'); 8289 }, 8290 8291 /** 8292 * The 'getString' method used jQuerys .serializeArray() method that creates array or objects that can be encoded as a JSON string 8293 * it then loops through the string and un-formats the inputs with autoNumeric 8294 * $(someSelector).autoNumeric('getArray'); no parameter accepted 8295 * values returned as ISO numeric string "1234.56" where the decimal character is a period 8296 */ 8297 getArray: function () { 8298 var isAutoNumeric = false, 8299 $this = autoGet($(this)), 8300 formFields = $this.serializeArray(), 8301 formIndex = $('form').index($this), 8302 allFormElements = $('form:eq(' + formIndex + ')'), 8303 aiIndex = [], /* all input index */ 8304 scIndex = [], /* successful control index */ 8305 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, /* from jQuery serialize method */ 8306 rsubmittable = /^(?:input|select|textarea|keygen)/i, /* from jQuery serialize method */ 8307 rcheckableType = /^(?:checkbox|radio)$/i, 8308 rnonAutoNumericTypes = /^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i, 8309 count = 0; 8310 /*jslint unparam: true*/ 8311 /* index of successful elements */ 8312 $.each(allFormElements[0], function (i, field) { 8313 if (field.name !== '' && rsubmittable.test(field.localName) && !rsubmitterTypes.test(field.type) && !field.disabled && (field.checked || !rcheckableType.test(field.type))) { 8314 scIndex.push(count); 8315 count = count + 1; 8316 } else { 8317 scIndex.push(-1); 8318 } 8319 }); 8320 /* index of all inputs tags */ 8321 count = 0; 8322 $.each(allFormElements[0], function (i, field) { 8323 if (field.localName === 'input' && (field.type === '' || field.type === 'text' || field.type === 'hidden' || field.type === 'tel')) { 8324 aiIndex.push(count); 8325 count = count + 1; 8326 } else { 8327 aiIndex.push(-1); 8328 if (field.localName === 'input' && rnonAutoNumericTypes.test(field.type)) { 8329 count = count + 1; 8330 } 8331 } 8332 }); 8333 $.each(formFields, function (i, field) { 8334 var scElement = $.inArray(i, scIndex); 8335 if (scElement > -1 && aiIndex[scElement] > -1) { 8336 var testInput = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')'), 8337 settings = testInput.data('autoNumeric'); 8338 if (typeof settings === 'object') { 8339 field.value = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')').autoNumeric('get').toString(); 8340 isAutoNumeric = true; 8341 } 8342 } 8343 }); 8344 /*jslint unparam: false*/ 8345 if (!isAutoNumeric) { 8346 $.error("None of the successful form inputs are initialized by autoNumeric."); 8347 } 8348 return formFields; 8349 }, 8350 8351 /** 8352 * The 'getSteetings returns the object with autoNumeric settings for those who need to look under the hood 8353 * $(someSelector).autoNumeric('getSettings'); // no parameters accepted 8354 * $(someSelector).autoNumeric('getSettings').aDec; // return the aDec setting as a string - ant valid setting can be used 8355 */ 8356 getSettings: function () { 8357 var $this = autoGet($(this)); 8358 return $this.eq(0).data('autoNumeric'); 8359 } 8360 }; 8361 8362 /** 8363 * autoNumeric function 8364 */ 8365 $.fn.autoNumeric = function (method) { 8366 if (methods[method]) { 8367 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 8368 } 8369 if (typeof method === 'object' || !method) { 8370 return methods.init.apply(this, arguments); 8371 } 8372 $.error('Method "' + method + '" is not supported by autoNumeric()'); 8373 }; 8374 8375 /** 8376 * Defaults are public - these can be overridden by the following: 8377 * HTML5 data attributes 8378 * Options passed by the 'init' or 'update' methods 8379 * Use jQuery's $.extend method - great way to pass ASP.NET current culture settings 8380 */ 8381 $.fn.autoNumeric.defaults = { 8382 /** allowed thousand separator characters 8383 * comma = ',' 8384 * period "full stop" = '.' 8385 * apostrophe is escaped = '\'' 8386 * space = ' ' 8387 * none = '' 8388 * NOTE: do not use numeric characters 8389 */ 8390 aSep: ',', 8391 /** digital grouping for the thousand separator used in Format 8392 * dGroup: '2', results in 99,99,99,999 common in India for values less than 1 billion and greater than -1 billion 8393 * dGroup: '3', results in 999,999,999 default 8394 * dGroup: '4', results in 9999,9999,9999 used in some Asian countries 8395 */ 8396 dGroup: '3', 8397 /** allowed decimal separator characters 8398 * period "full stop" = '.' 8399 * comma = ',' 8400 */ 8401 aDec: '.', 8402 /** allow to declare alternative decimal separator which is automatically replaced by aDec
8403 * developed for countries the use a comma ',' as the decimal character 8404 * and have keyboards\numeric pads that have a period 'full stop' as the decimal characters (Spain is an example) 8405 */ 8406 altDec: null, 8407 /** allowed currency symbol 8408 * Must be in quotes aSign: '$', a space is allowed aSign: '$ ' 8409 */ 8410 aSign: '', 8411 /** placement of currency sign 8412 * for prefix pSign: 'p', 8413 * for suffix pSign: 's', 8414 */ 8415 pSign: 'p', 8416 /** maximum possible value 8417 * value must be enclosed in quotes and use the period for the decimal point 8418 * value must be larger than vMin 8419 */ 8420 vMax: '9999999999999.99', 8421 /** minimum possible value 8422 * value must be enclosed in quotes and use the period for the decimal point 8423 * value must be smaller than vMax 8424 */ 8425 vMin: '-9999999999999.99', 8426 /** max number of decimal places = used to override decimal places set by the vMin & vMax values 8427 * value must be enclosed in quotes example mDec: '3', 8428 * This can also set the value via a call back function mDec: 'css:# 8429 */ 8430 mDec: null, 8431 /** method used for rounding 8432 * mRound: 'S', Round-Half-Up Symmetric (default) 8433 * mRound: 'A', Round-Half-Up Asymmetric 8434 * mRound: 's', Round-Half-Down Symmetric (lower case s) 8435 * mRound: 'a', Round-Half-Down Asymmetric (lower case a) 8436 * mRound: 'B', Round-Half-Even "Bankers Rounding" 8437 * mRound: 'U', Round Up "Round-Away-From-Zero" 8438 * mRound: 'D', Round Down "Round-Toward-Zero" - same as truncate 8439 * mRound: 'C', Round to Ceiling "Toward Positive Infinity" 8440 * mRound: 'F', Round to Floor "Toward Negative Infinity" 8441 */ 8442 mRound: 'S', 8443 /** controls decimal padding 8444 * aPad: true - always Pad decimals with zeros 8445 * aPad: false - does not pad with zeros. 8446 * aPad: `some number` - pad decimals with zero to number different from mDec 8447 * thanks to Jonas Johansson for the suggestion 8448 */ 8449 aPad: true, 8450 /** places brackets on negative value -$ 999.99 to (999.99) 8451 * visible only when the field does NOT have focus the left and right symbols should be enclosed in quotes and seperated by a comma 8452 * nBracket: null, nBracket: '(,)', nBracket: '[,]', nBracket: '<,>' or nBracket: '{,}' 8453 */ 8454 nBracket: null, 8455 /** Displayed on empty string 8456 * wEmpty: 'empty', - input can be blank 8457 * wEmpty: 'zero', - displays zero 8458 * wEmpty: 'sign', - displays the currency sign 8459 */ 8460 wEmpty: 'empty', 8461 /** controls leading zero behavior 8462 * lZero: 'allow', - allows leading zeros to be entered. Zeros will be truncated when entering additional digits. On focusout zeros will be deleted. 8463 * lZero: 'deny', - allows only one leading zero on values less than one 8464 * lZero: 'keep', - allows leading zeros to be entered. on fousout zeros will be retained. 8465 */ 8466 lZero: 'allow', 8467 /** determine if the select all keyboard command will select 8468 * the complete input text or only the input numeric value 8469 * if the currency symbol is between the numeric value and the negative sign only the numeric value will sellected 8470 */ 8471 sNumber: true, 8472 /** determine if the default value will be formatted on page ready. 8473 * true = automatically formats the default value on page ready 8474 * false = will not format the default value 8475 */ 8476 aForm: true, 8477 /** helper option for ASP.NET postback 8478 * should be the value of the unformatted default value 8479 * examples: 8480 * no default value='' {anDefault: ''} 8481 * value=1234.56 {anDefault: '1234.56'} 8482 */ 8483 anDefault: null 8484 }; 8485}(jQuery)); 8486!function(){if(!window.CustomEvent&&document.createEventObject)return void(window.CustomEvent=function(e,t){if(!arguments.length)throw new Error("Not enough arguments");var s={type:e,bubbles:!1,cancelable:!1,detail:null},i=document.createEventObject();for(var n in s)i[n]=s[n];for(var n in t)i[n]=t[n];return i});try{new CustomEvent("test")}catch(e){var t=function(e,t){if(!arguments.length)throw new Error("Not enough arguments");var s={bubbles:!1,cancelable:!1,detail:null};for(var i in t)s[i]=t[i];var n=document.createEvent("CustomEvent");
8486return n.initCustomEvent(e,s.bubbles,s.cancelable,s.detail),n};t.prototype=(window.CustomEvent||window.Event).prototype,window.CustomEvent=t}}(),function(){if(!document.addEventListener&&window.Element&&window.Event){var e="__events",t="__immediateStopped";Event.prototype.NONE=Event.NONE=0,Event.prototype.CAPTURING_PHASE=Event.CAPTURING_PHASE=1,Event.prototype.AT_TARGET=Event.AT_TARGET=2,Event.prototype.BUBBLING_PHASE=Event.BUBBLING_PHASE=3,Event.prototype.preventDefault=function(){this.cancelable!==!1&&(this.returnValue=!1)},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},Event.prototype.stopImmediatePropagation=function(){this[t]=this.cancelBubble=!0};for(var s=function(e,t){return e.timeStamp=+new Date,e.target||(e.target=e.srcElement||t),e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop,"mouseover"==e.type?e.relatedTarget=e.fromElement:"mouseout"==e.type?e.relatedTarget=e.toElement:e.relatedTarget=null,e},i=function(e,t,s){for(var i=0;i<e.length;i++){var n=e[i];if(n.useCapture==s&&n.listener==t)return i}return-1},n=function(e,t,s){e.currentTarget=s,"function"==typeof t?t.call(s,e):t.handleEvent(e)},a=function(e){for(var t=[];e.parentNode;)t.unshift(e.parentNode),e=e.parentNode;return t},o=function(s,i,a){s.eventPhase=a;for(var o=0;o<i.length;o++){for(var r=i[o],l=[],d=(r[e]||{})[s.type]||[],h=0;h<d.length;h++){var c=d[h];c.useCapture&&a==Event.BUBBLING_PHASE||(c.useCapture||a!=Event.CAPTURING_PHASE)&&l.push(c.listener)}for(h=0;h<l.length;)try{for(;h<l.length;){var u=l[h++];if(n(s,u,r),s[t])return!0}}catch(p){setTimeout(function(){throw p},0)}if(s.cancelBubble)return!0}return!1},r=function(e){s(e,this);var t=a(e.target);return t.length&&o(e,t,Event.CAPTURING_PHASE)?e.returnValue:o(e,[e.target],Event.AT_TARGET)?e.returnValue:t.length&&e.bubbles!==!1&&(t.reverse(),o(e,t,Event.BUBBLING_PHASE))?e.returnValue:(e.stopPropagation(),e.returnValue)},l=({addEventListener:function(t,s,n){var a=this,o=(this[e]||{})[t]||[],l=o.length;if(!(i(o,s,n)>-1)){if(e in this)var d=this[e];else{var d={_handler:function(){r.apply(a,arguments)}};this[e]=d}t in d||(d[t]=[]),d[t].push({listener:s,useCapture:n}),l||this.attachEvent("on"+t,d._handler)}},removeEventListener:function(t,s,n){var a=(this[e]||{})[t]||[],o=i(a,s,n);-1!=o&&(a.splice(o,1),a.length||this.detachEvent("on"+t,this[e]._handler))},dispatchEvent:function(e){return e.returnValue=!0,r.call(this,e)}}),d=[Element,window.constructor,document.constructor];d.length;){var h=d.pop();for(var c in l)h.prototype[c]=l[c]}}}(),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var s,i;if(null==this)throw new TypeError(" this is null or not defined");var n=Object(this),a=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(s=t),i=0;a>i;){var o;i in n&&(o=n[i],e.call(s,o,i,n)),i++}}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var s;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return-1;var a=+t||0;if(Math.abs(a)===1/0&&(a=0),a>=n)return-1;for(s=Math.max(a>=0?a:n-Math.abs(a),0);n>s;){if(s in i&&i[s]===e)return s;s++}return-1}),function(e){var t;if("object"==typeof exports){try{t=require("jquery")}catch(s){}module.exports=e(window,document,t)}else"function"==typeof define&&define.amd?define([],function(){return e(window,document,window.jQuery)}):window.Dropkick=e(window,document,window.jQuery)}(function(e,t,s,i){var n,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),o=e.parent!==e.self,r=-1!==navigator.appVersion.indexOf("MSIE"),l=function(s,i){var n,a;if(this===e)return new l(s,i);for("string"==typeof s&&"#"===s[0]&&(s=t.getElementById(s.substr(1))),n=0;n<l.uid;n++)if(a=l.cache[n],a instanceof l&&a.data.select===s)return c.extend(a.data.settings,i),a;return s?s.length<1?(console.error("You must have options inside your <select>: ",s),!1):"SELECT"===s.nodeName?this.init(s,i):void 0:(console.error("You must pass a select to DropKick"),!1)},d=function(){},h={initialize:d,mobile:!1,change:d,open:d,close:d,search:"strict",bubble:!0},c={hasClass:function(e,t){var s=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return e&&s.test(e.className)},addClass:function(e,t){e&&!c.hasClass(e,t)&&(e.className+=" "+t)},removeClass:function(e,t){var s=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e&&(e.className=e.className.replace(s," "))},toggleClass:function(e,t){var s=c.hasClass(e,t)?"remove":"add";c[s+"Class"](e,t)},extend:function(e){return Array.prototype.slice.call(arguments,1
8486).forEach(function(t){if(t)for(var s in t)e[s]=t[s]}),e},offset:function(s){var i=s.getBoundingClientRect()||{top:0,left:0},n=t.documentElement,a=r?n.scrollTop:e.pageYOffset,o=r?n.scrollLeft:e.pageXOffset;return{top:i.top+a-n.clientTop,left:i.left+o-n.clientLeft}},position:function(e,t){for(var s={top:0,left:0};e&&e!==t;)s.top+=e.offsetTop,s.left+=e.offsetLeft,e=e.parentNode;return s},closest:function(e,t){for(;e;){if(e===t)return e;e=e.parentNode}return!1},create:function(e,s){var i,n=t.createElement(e);s||(s={});for(i in s)s.hasOwnProperty(i)&&("innerHTML"===i?n.innerHTML=s[i]:n.setAttribute(i,s[i]));return n},deferred:function(t){return function(){var s=arguments,i=this;e.setTimeout(function(){t.apply(i,s)},1)}}};return l.cache={},l.uid=0,l.prototype={add:function(e,s){var i,n,a;"string"==typeof e&&(i=e,e=t.createElement("option"),e.text=i),"OPTION"===e.nodeName&&(n=c.create("li",{"class":"dk-option","data-value":e.value,text:e.text,innerHTML:e.innerHTML,role:"option","aria-selected":"false",id:"dk"+this.data.cacheID+"-"+(e.id||e.value.replace(" ","-"))}),c.addClass(n,e.className),this.length+=1,e.disabled&&(c.addClass(n,"dk-option-disabled"),n.setAttribute("aria-disabled","true")),e.hidden&&(c.addClass(n,"dk-option-hidden"),n.setAttribute("aria-hidden","true")),this.data.select.add(e,s),"number"==typeof s&&(s=this.item(s)),a=this.options.indexOf(s),a>-1?(s.parentNode.insertBefore(n,s),this.options.splice(a,0,n)):(this.data.elem.lastChild.appendChild(n),this.options.push(n)),n.addEventListener("mouseover",this),e.selected&&this.select(a))},item:function(e){return e=0>e?this.options.length+e:e,this.options[e]||null},remove:function(e){var t=this.item(e);t.parentNode.removeChild(t),this.options.splice(e,1),this.data.select.remove(e),this.select(this.data.select.selectedIndex),this.length-=1},init:function(e,s){var i,r=l.build(e,"dk"+l.uid);if(this.data={},this.data.select=e,this.data.elem=r.elem,this.data.settings=c.extend({},h,s),this.disabled=e.disabled,this.form=e.form,this.length=e.length,this.multiple=e.multiple,this.options=r.options.slice(0),this.selectedIndex=e.selectedIndex,this.selectedOptions=r.selected.slice(0),this.value=e.value,this.data.cacheID=l.uid,l.cache[this.data.cacheID]=this,this.data.settings.initialize.call(this),l.uid+=1,this._changeListener||(e.addEventListener("change",this),this._changeListener=!0),!a||this.data.settings.mobile){if(e.parentNode.insertBefore(this.data.elem,e),e.setAttribute("data-dkCacheId",this.data.cacheID),this.data.elem.addEventListener("click",this),this.data.elem.addEventListener("keydown",this),this.data.elem.addEventListener("keypress",this),this.form&&this.form.addEventListener("reset",this),!this.multiple)for(i=0;i<this.options.length;i++)this.options[i].addEventListener("mouseover",this);n||(t.addEventListener("click",l.onDocClick),o&&parent.document.addEventListener("click",l.onDocClick),n=!0)}return this},close:function(){var e,t=this.data.elem;if(!this.isOpen||this.multiple)return!1;for(e=0;e<this.options.length;e++)c.removeClass(this.options[e],"dk-option-highlight");t.lastChild.setAttribute("aria-expanded","false"),c.removeClass(t.lastChild,"dk-select-options-highlight"),c.removeClass(t,"dk-select-open-(up|down)"),this.isOpen=!1,this.data.settings.close.call(this)},open:c.deferred(function(){var s,n,a,o,r,l,d=this.data.elem,h=d.lastChild,u=e.pageXOffset!==i,p="CSS1Compat"===(t.compatMode||""),f=u?e.pageYOffset:p?t.documentElement.scrollTop:t.body.scrollTop;return r=c.offset(d).top-f,l=e.innerHeight-(r+d.offsetHeight),this.isOpen||this.multiple?!1:(h.style.display="block",s=h.offsetHeight,h.style.display="",n=r>s,a=l>s,o=n&&!a?"-up":"-down",this.isOpen=!0,c.addClass(d,"dk-select-open"+o),h.setAttribute("aria-expanded","true"),this._scrollTo(this.options.length-1),this._scrollTo(this.selectedIndex),void this.data.settings.open.call(this))}),disable:function(e,t){var s="dk-option-disabled";0!==arguments.length&&"boolean"!=typeof e||(t=e===i,e=this.data.elem,s="dk-select-disabled",this.disabled=t),t===i&&(t=!0),"number"==typeof e&&(e=this.item(e)),t?(e.setAttribute("aria-disabled",!0),c.addClass(e,s)):(e.setAttribute("aria-disabled",!1),c.removeClass(e,s))},hide:function(e,t){var s="dk-option-hidden";t===i&&(t=!0),e=this.item(e),t?(e.setAttribute("aria-hidden",!0),c.addClass(e,s)):(e.setAttribute("aria-hidden",!1),c.removeClass(e,s))},select:function(e,t){var s,i,n,a,o=this.data.select;if("number"==typeof e&&(e=this.item(e)),"string"==typeof e)for(s=0;s<this.length;s++)this.options[s].getAttribute("data-value")===e&&(e=this.options[s]);return!e||"string"==typeof e||!t&&c.hasClass(e,"dk-option-disabled")?!1:c.hasClass(e,"dk-option")?(i=this.options.indexOf(e),n=o.options[i],this.multiple?(c.toggleClass(e,"dk-option-selected"),n.selected=!n.selected,c.hasClass(e,"dk-option-selected")?(e.setAttribute("aria-selected","true"),this.selectedOptions.push(e)):(e.setAttribute("aria-selected","false"),i=this.selectedOptions.indexOf(e),this.selectedOptions.splice(i,1))):(a=this.data.elem.firstChild,this.selectedOptions.length&&(c.removeClass(this.selectedOptions[0],"dk-option-selected"),this.selectedOptions[0].setAttribute("aria-selected","false")),c.addClass(e,"dk-option-selected"),e.setAttribute("aria-selected","true"),a.setAttribute("aria-activedescendant",e.id),a.className="dk-selected "+n.className,a.innerHTML=n.innerHTML,this.selectedOptions[0]=e,n.selected=!0),this.selectedIndex=o.selectedIndex,this.value=o.value,t||this.data.select.dispatchEvent(new CustomEvent("change",{bubbles:this.data.settings.bubble})),e):void 0},selectOne:function(e,t){return this.reset(!0),this._scrollTo(e),this.select(e,t)},search:function(e,t){var s,i,n,a,o,r,l,d,h=this.data.select.options,c=[];if(!e)return this.options;for(t=t?t.toLowerCase():"strict",t="fuzzy"===t?2:"partial"===t?1:0,d=new RegExp((t?"":"^")+e,"i"),s=0;s<h.length;s++)if(n=h[s].text.toLowerCase(),2==t){for(i=e.toLowerCase().split(""),a=o=r=l=0;o<n.length;)n[o]===i[a]?(r+=1+r,a++):r=0,l+=r,o++;a===i.length&&c.push({e:this.options[s],s:l,i:s})}else d.test(n)&&c.push(this.options[s]);return 2===t&&(c=c.sort(function(e,t){return t.s-e.s||e.i-t.i}).reduce(function(e,t){return e[e.length]=t.e,e},[])),c},focus:function(){this.disabled||(this.multiple?this.data.elem:this.data.elem.children[0]).focus()},reset:function(e){var t,s=this.data.select;for(this.selectedOptions.length=0,t=0;t<s.options.length;t++)s.options[t].selected=!1,c.removeClass(this.options[t],"dk-option-selected"),this.options[t].setAttribute("aria-selected","false"),!e&&s.options[t].defaultSelected&&this.select(t,!0);this.selectedOptions.length||this.multiple||this.select(0,!0)},refresh:function(){Object.keys(this).length>0&&(!a||this.data.settings.mobile)&&this.dispose().init(this.data.select,this.data.settings)},dispose:function(){return Object.keys(this).length>0&&(!a||this.data.settings.mobile)&&(delete l.cache[this.data.cacheID],this.data.elem.parentNode.removeChild(this.data.elem),this.data.select.removeAttribute("data-dkCacheId")),this},handleEvent:function(e){if(!this.disabled)switch(e.type){case"click":this._delegate(e);break;case"keydown":this._keyHandler(e);break;case"keypress":this._searchOptions(e);break;case"mouseover":this._highlight(e);break;case"reset":this.reset();break;case"change":this.data.settings.change.call(this)}},_delegate:function(t){var s,i,n,a,o=t.target;if(c.hasClass(o,"dk-option-disabled"))return!1;if(this.multiple){if(c.hasClass(o,"dk-option"))if(s=e.getSelection(),"Range"===s.type&&s.collapseToStart(),t.shiftKey)if(n=this.options.indexOf(this.selectedOptions[0]),a=this.options.indexOf(this.selectedOptions[this.selectedOptions.length-1]),i=this.options.indexOf(o),i>n&&a>i&&(i=n),i>a&&a>n&&(a=n),this.reset(!0),a>i)for(;a+1>i;)this.select(i++);else for(;i>a-1;)this.select(i--);else t.ctrlKey||t.metaKey?this.select(o):(this.reset(!0),this.select(o))}
8486else this[this.isOpen?"close":"open"](),c.hasClass(o,"dk-option")&&this.select(o)},_highlight:function(e){var t,s=e.target;if(!this.multiple){for(t=0;t<this.options.length;t++)c.removeClass(this.options[t],"dk-option-highlight");c.addClass(this.data.elem.lastChild,"dk-select-options-highlight"),c.addClass(s,"dk-option-highlight")}},_keyHandler:function(e){var t,s,i=this.selectedOptions,n=this.options,a=1,o={tab:9,enter:13,esc:27,space:32,up:38,down:40};switch(e.keyCode){case o.up:a=-1;case o.down:if(e.preventDefault(),t=i[i.length-1],c.hasClass(this.data.elem.lastChild,"dk-select-options-highlight"))for(c.removeClass(this.data.elem.lastChild,"dk-select-options-highlight"),s=0;s<n.length;s++)c.hasClass(n[s],"dk-option-highlight")&&(c.removeClass(n[s],"dk-option-highlight"),t=n[s]);a=n.indexOf(t)+a,a>n.length-1?a=n.length-1:0>a&&(a=0),this.data.select.options[a].disabled||(this.reset(!0),this.select(a),this._scrollTo(a));break;case o.space:if(!this.isOpen){e.preventDefault(),this.open();break}case o.tab:case o.enter:for(a=0;a<n.length;a++)c.hasClass(n[a],"dk-option-highlight")&&this.select(a);case o.esc:this.isOpen&&(e.preventDefault(),this.close())}},_searchOptions:function(e){var t,s=this,n=String.fromCharCode(e.keyCode||e.which),a=function(){s.data.searchTimeout&&clearTimeout(s.data.searchTimeout),s.data.searchTimeout=setTimeout(function(){s.data.searchString=""},1e3)};this.data.searchString===i&&(this.data.searchString=""),a(),this.data.searchString+=n,t=this.search(this.data.searchString,this.data.settings.search),t.length&&(c.hasClass(t[0],"dk-option-disabled")||this.selectOne(t[0]))},_scrollTo:function(e){var t,s,i,n=this.data.elem.lastChild;return-1===e||"number"!=typeof e&&!e||!this.isOpen&&!this.multiple?!1:("number"==typeof e&&(e=this.item(e)),t=c.position(e,n).top,s=t-n.scrollTop,i=s+e.offsetHeight,void(i>n.offsetHeight?(t+=e.offsetHeight,n.scrollTop=t-n.offsetHeight):0>s&&(n.scrollTop=t)))}},l.build=function(e,t){var s,i,n,a=[],o={elem:null,options:[],selected:[]},r=function(e){var s,i,n,a,l=[];switch(e.nodeName){case"OPTION":s=c.create("li",{"class":"dk-option ","data-value":e.value,text:e.text,innerHTML:e.innerHTML,role:"option","aria-selected":"false",id:t+"-"+(e.id||e.value.replace(" ","-"))}),c.addClass(s,e.className),e.disabled&&(c.addClass(s,"dk-option-disabled"),s.setAttribute("aria-disabled","true")),e.hidden&&(c.addClass(s,"dk-option-hidden"),s.setAttribute("aria-hidden","true")),e.selected&&(c.addClass(s,"dk-option-selected"),s.setAttribute("aria-selected","true"),o.selected.push(s)),o.options.push(this.appendChild(s));break;case"OPTGROUP":for(i=c.create("li",{"class":"dk-optgroup"}),e.label&&i.appendChild(c.create("div",{"class":"dk-optgroup-label",innerHTML:e.label})),n=c.create("ul",{"class":"dk-optgroup-options"}),a=e.children.length;a--;l.unshift(e.children[a]));l.forEach(r,n),this.appendChild(i).appendChild(n)}};for(o.elem=c.create("div",{"class":"dk-select"+(e.multiple?"-multi":"")}),i=c.create("ul",{"class":"dk-select-options",id:t+"-listbox",role:"listbox"}),e.disabled&&(c.addClass(o.elem,"dk-select-disabled"),o.elem.setAttribute("aria-disabled",!0)),o.elem.id=t+(e.id?"-"+e.id:""),c.addClass(o.elem,e.className),e.multiple?(o.elem.setAttribute("tabindex",e.getAttribute("tabindex")||"0"),i.setAttribute("aria-multiselectable","true")):(s=e.options[e.selectedIndex],o.elem.appendChild(c.create("div",{"class":"dk-selected "+s.className,tabindex:e.tabindex||0,innerHTML:s?s.text:" ",id:t+"-combobox","aria-live":"assertive","aria-owns":i.id,role:"combobox"})),i.setAttribute("aria-expanded","false")),n=e.children.length;n--;a.unshift(e.children[n]));return a.forEach(r,o.elem.appendChild(i)),o},l.onDocClick=function(e){var t,s;if(1!==e.target.nodeType)return!1;null!==(t=e.target.getAttribute("data-dkcacheid"))&&l.cache[t].focus();for(s in l.cache)c.closest(e.target,l.cache[s].data.elem)||s===t||l.cache[s].disabled||l.cache[s].close()},s!==i&&(s.fn.dropkick=function(){var e=Array.prototype.slice.call(arguments);return s(this).each(function(){e[0]&&"object"!=typeof e[0]?"string"==typeof e[0]&&l.prototype[e[0]].apply(new l(this),e.slice(1)):new l(this,e[0]||{})})}),l});
vendor: 24,175 bytes, lines 8487-9303
8487/** 8488 * @name InfoBox 8489 * @version 1.1.13 [March 19, 2014] 8490 * @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google) 8491 * @copyright Copyright 2010 Gary Little [gary at luxcentral.com] 8492 * @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class. 8493 * <p> 8494 * An InfoBox behaves like a <tt>google.maps.InfoWindow</tt>, but it supports several 8495 * additional properties for advanced styling. An InfoBox can also be used as a map label. 8496 * <p> 8497 * An InfoBox also fires the same events as a <tt>google.maps.InfoWindow</tt>. 8498 */ 8499 8500/*! 8501 * 8502 * Licensed under the Apache License, Version 2.0 (the "License"); 8503 * you may not use this file except in compliance with the License. 8504 * You may obtain a copy of the License at 8505 * 8506 * http://www.apache.org/licenses/LICENSE-2.0 8507 * 8508 * Unless required by applicable law or agreed to in writing, software 8509 * distributed under the License is distributed on an "AS IS" BASIS, 8510 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8511 * See the License for the specific language governing permissions and 8512 * limitations under the License. 8513 */ 8514 8515/*jslint browser:true */ 8516/*global google */ 8517 8518/** 8519 * @name InfoBoxOptions 8520 * @class This class represents the optional parameter passed to the {@link InfoBox} constructor. 8521 * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node). 8522 * @property {boolean} [disableAutoPan=false] Disable auto-pan on <tt>open</tt>. 8523 * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. 8524 * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox 8525 * (or the bottom left corner if the <code>alignBottom</code> property is <code>true</code>) 8526 * to the map pixel corresponding to <tt>position</tt>. 8527 * @property {LatLng} position The geographic location at which to display the InfoBox. 8528 * @property {number} zIndex The CSS z-index style value for the InfoBox. 8529 * Note: This value overrides a zIndex setting specified in the <tt>boxStyle</tt> property. 8530 * @property {string} [boxClass="infoBox"] The name of the CSS class defining the styles for the InfoBox container. 8531 * @property {Object} [boxStyle] An object literal whose properties define specific CSS 8532 * style values to be applied to the InfoBox. Style values defined here override those that may 8533 * be defined in the <code>boxClass</code> style sheet. If this property is changed after the 8534 * InfoBox has been created, all previously set styles (except those defined in the style sheet) 8535 * are removed from the InfoBox before the new style values are applied. 8536 * @property {string} closeBoxMargin The CSS margin style value for the close box. 8537 * The default is "2px" (a 2-pixel margin on all sides). 8538 * @property {string} closeBoxURL The URL of the image representing the close box. 8539 * Note: The default is the URL for Google's standard close box. 8540 * Set this property to "" if no close box is required. 8541 * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the 8542 * map edge after an auto-pan. 8543 * @property {boolean} [isHidden=false] Hide the InfoBox on <tt>open</tt>. 8544 * [Deprecated in favor of the <tt>visible</tt> property.] 8545 * @property {boolean} [visible=true] Show the InfoBox on <tt>open</tt>. 8546 * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the <code>position</code> 8547 * location (default is <tt>false</tt> which means that the top left corner of the InfoBox is aligned). 8548 * @property {string} pane The pane where the InfoBox is to appear (default is "floatPane"). 8549 * Set the pane to "mapPane" if the InfoBox is being used as a map label. 8550 * Valid pane names are the property names for the <tt>google.maps.MapPanes</tt> object. 8551 * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout, 8552 * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox 8553 * (default is <tt>false</tt> to mimic the behavior of a <tt>google.maps.InfoWindow</tt>). Set 8554 * this property to <tt>true</tt> if the InfoBox is being used as a map label. 8555 */ 8556 8557/** 8558 * Creates an InfoBox with the options specified in {@link InfoBoxOptions}. 8559 * Call <tt>InfoBox.open</tt> to add the box to the map. 8560 * @constructor 8561 * @param {InfoBoxOptions} [opt_opts] 8562 */ 8563function InfoBox(opt_opts) { 8564 8565 opt_opts = opt_opts || {}; 8566 8567 google.maps.OverlayView.apply(this, arguments); 8568 8569 // Standard options (in common with google.maps.InfoWindow): 8570 // 8571 this.content_ = opt_opts.content || ""; 8572 this.disableAutoPan_ = opt_opts.disableAutoPan || false; 8573 this.maxWidth_ = opt_opts.maxWidth || 0; 8574 this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0); 8575 this.position_ = opt_opts.position || new google.maps.LatLng(0, 0); 8576 this.zIndex_ = opt_opts.zIndex || null; 8577 8578 // Additional options (unique to InfoBox): 8579 // 8580 this.boxClass_ = opt_opts.boxClass || "infoBox"; 8581 this.boxStyle_ = opt_opts.boxStyle || {}; 8582 this.closeBoxMargin_ = opt_opts.closeBoxMargin || "2px"; 8583 this.closeBoxURL_ = opt_opts.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif"; 8584 if (opt_opts.closeBoxURL === "") { 8585 this.closeBoxURL_ = ""; 8586 } 8587 this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1); 8588 8589 if (typeof opt_opts.visible === "undefined") { 8590 if (typeof opt_opts.isHidden === "undefined") { 8591 opt_opts.visible = true; 8592 } else { 8593 opt_opts.visible = !opt_opts.isHidden; 8594 } 8595 } 8596 this.isHidden_ = !opt_opts.visible; 8597 8598 this.alignBottom_ = opt_opts.alignBottom || false; 8599 this.pane_ = opt_opts.pane || "floatPane"; 8600 this.enableEventPropagation_ = opt_opts.enableEventPropagation || false; 8601 8602 this.div_ = null; 8603 this.closeListener_ = null; 8604 this.moveListener_ = null; 8605 this.contextListener_ = null; 8606 this.eventListeners_ = null; 8607 this.fixedWidthSet_ = null; 8608} 8609 8610/* InfoBox extends OverlayView in the Google Maps API v3. 8611 */ 8612InfoBox.prototype = new google.maps.OverlayView(); 8613 8614/** 8615 * Creates the DIV representing the InfoBox. 8616 * @private 8617 */ 8618InfoBox.prototype.createInfoBoxDiv_ = function () { 8619 8620 var i; 8621 var events; 8622 var bw; 8623 var me = this; 8624 8625 // This handler prevents an event in the InfoBox from being passed on to the map. 8626 // 8627 var cancelHandler = function (e) { 8628 e.cancelBubble = true; 8629 if (e.stopPropagation) { 8630 e.stopPropagation(); 8631 } 8632 }; 8633 8634 // This handler ignores the current event in the InfoBox and conditionally prevents 8635 // the event from being passed on to the map. It is used for the contextmenu event. 8636 // 8637 var ignoreHandler = function (e) { 8638 8639 e.returnValue = false; 8640 8641 if (e.preventDefault) { 8642 8643 e.preventDefault(); 8644 } 8645 8646 if (!me.enableEventPropagation_) { 8647 8648 cancelHandler(e); 8649 } 8650 }; 8651 8652 if (!this.div_) { 8653 8654 this.div_ = document.createElement("div"); 8655 8656 this.setBoxStyle_(); 8657 8658 if (typeof this.content_.nodeType === "undefined") { 8659 this.div_.innerHTML = this.getCloseBoxImg_() + this.content_; 8660 } else { 8661 this.div_.innerHTML = this.getCloseBoxImg_(); 8662 this.div_.appendChild(this.content_); 8663 } 8664 8665 // Add the InfoBox DIV to the DOM 8666 this.getPanes()[this.pane_].appendChild(this.div_); 8667 8668 this.addClickHandler_(); 8669 8670 if (this.div_.style.width) { 8671 8672 this.fixedWidthSet_ = true; 8673 8674 } else { 8675 8676 if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) { 8677 8678 this.div_.style.width = this.maxWidth_; 8679 this.div_.style.overflow = "auto"; 8680 this.fixedWidthSet_ = true; 8681 8682 } else { // The following code is needed to overcome problems with MSIE 8683 8684 bw = this.getBoxWidths_(); 8685 8686 this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + "px"; 8687 this.fixedWidthSet_ = false; 8688 } 8689 } 8690 8691 this.panBox_(this.disableAutoPan_); 8692 8693 if (!this.enableEventPropagation_) { 8694 8695 this.eventListeners_ = []; 8696 8697 // Cancel event propagation. 8698 // 8699 // Note: mousemove not included (to resolve Issue 152) 8700 events = ["mousedown", "mouseover", "mouseout", "mouseup", 8701 "click", "dblclick", "touchstart", "touchend", "touchmove"]; 8702 8703 for (i = 0; i < events.length; i++) { 8704 8705 this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); 8706 } 8707 8708 // Workaround for Google bug that causes the cursor to change to a pointer 8709 // when the mouse moves over a marker underneath InfoBox. 8710 this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e) { 8711 this.style.cursor = "default"; 8712 })); 8713 } 8714 8715 this.contextListener_ = google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); 8716 8717 /** 8718 * This event is fired when the DIV containing the InfoBox's content is attached to the DOM. 8719 * @name InfoBox#domready 8720 * @event 8721 */ 8722 google.maps.event.trigger(this, "domready"); 8723 } 8724}; 8725 8726/** 8727 * Returns the HTML <IMG> tag for the close box. 8728 * @private 8729 */ 8730InfoBox.prototype.getCloseBoxImg_ = function () { 8731 8732 var img = ""; 8733 8734 if (this.closeBoxURL_ !== "") { 8735 8736 img = "<img"; 8737 img += " src='" + this.closeBoxURL_ + "'"; 8738 img += " align=right"; // Do this because Opera chokes on style='float: right;' 8739 img += " style='"; 8740 img += " position: relative;"; // Required by MSIE 8741 img += " cursor: pointer;"; 8742 img += " margin: " + this.closeBoxMargin_ + ";"; 8743 img += "'>"; 8744 } 8745 8746 return img; 8747}; 8748 8749/** 8750 * Adds the click handler to the InfoBox close box. 8751 * @private 8752 */ 8753InfoBox.prototype.addClickHandler_ = function () { 8754 8755 var closeBox; 8756 8757 if (this.closeBoxURL_ !== "") { 8758 8759 closeBox = this.div_.firstChild; 8760 this.closeListener_ = google.maps.event.addDomListener(closeBox, "click", this.getCloseClickHandler_()); 8761 8762 } else { 8763 8764 this.closeListener_ = null; 8765 } 8766}; 8767 8768/** 8769 * Returns the function to call when the user clicks the close box of an InfoBox. 8770 * @private 8771 */ 8772InfoBox.prototype.getCloseClickHandler_ = function () { 8773 8774 var me = this; 8775 8776 return function (e) { 8777 8778 // 1.0.3 fix: Always prevent propagation of a close box click to the map: 8779 e.cancelBubble = true; 8780 8781 if (e.stopPropagation) { 8782 8783 e.stopPropagation(); 8784 } 8785 8786 /** 8787 * This event is fired when the InfoBox's close box is clicked. 8788 * @name InfoBox#closeclick 8789 * @event 8790 */ 8791 google.maps.event.trigger(me, "closeclick"); 8792 8793 me.close(); 8794 }; 8795}; 8796 8797/** 8798 * Pans the map so that the InfoBox appears entirely within the map's visible area. 8799 * @private 8800 */ 8801InfoBox.prototype.panBox_ = function (disablePan) { 8802 8803 var map; 8804 var bounds; 8805 var xOffset = 0, yOffset = 0; 8806 8807 if (!disablePan) { 8808 8809 map = this.getMap(); 8810 8811 if (map instanceof google.maps.Map) { // Only pan if attached to map, not panorama 8812 8813 if (!map.getBounds().contains(this.position_)) { 8814 // Marker not in visible area of map, so set center 8815 // of map to the marker position first. 8816 map.setCenter(this.position_); 8817 } 8818 8819 bounds = map.getBounds(); 8820 8821 var mapDiv = map.getDiv(); 8822 var mapWidth = mapDiv.offsetWidth; 8823 var mapHeight = mapDiv.offsetHeight; 8824 var iwOffsetX = this.pixelOffset_.width; 8825 var iwOffsetY = this.pixelOffset_.height; 8826 var iwWidth = this.div_.offsetWidth; 8827 var iwHeight = this.div_.offsetHeight; 8828 var padX = this.infoBoxClearance_.width; 8829 var padY = this.infoBoxClearance_.height; 8830 var pixPosition = this.getProjection().fromLatLngToContainerPixel(this.position_); 8831 8832 if (pixPosition.x < (-iwOffsetX + padX)) { 8833 xOffset = pixPosition.x + iwOffsetX - padX; 8834 } else if ((pixPosition.x + iwWidth + iwOffsetX + padX) > mapWidth) { 8835 xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; 8836 } 8837 if (this.alignBottom_) { 8838 if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) { 8839 yOffset = pixPosition.y + iwOffsetY - padY - iwHeight; 8840 } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) { 8841 yOffset = pixPosition.y + iwOffsetY + padY - mapHeight; 8842 } 8843 } else { 8844 if (pixPosition.y < (-iwOffsetY + padY)) { 8845 yOffset = pixPosition.y + iwOffsetY - padY; 8846 } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) { 8847 yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; 8848 } 8849 } 8850 8851 if (!(xOffset === 0 && yOffset === 0)) { 8852 8853 // Move the map to the shifted center. 8854 // 8855 var c = map.getCenter(); 8856 map.panBy(xOffset, yOffset); 8857 } 8858 } 8859 } 8860}; 8861 8862/** 8863 * Sets the style of the InfoBox by setting the style sheet and applying 8864 * other specific styles requested. 8865 * @private 8866 */ 8867InfoBox.prototype.setBoxStyle_ = function () { 8868 8869 var i, boxStyle; 8870 8871 if (this.div_) { 8872 8873 // Apply style values from the style sheet defined in the boxClass parameter: 8874 this.div_.className = this.boxClass_; 8875 8876 // Clear existing inline style values: 8877 this.div_.style.cssText = ""; 8878 8879 // Apply style values defined in the boxStyle parameter: 8880 boxStyle = this.boxStyle_; 8881 for (i in boxStyle) { 8882 8883 if (boxStyle.hasOwnProperty(i)) { 8884 8885 this.div_.style[i] = boxStyle[i]; 8886 } 8887 } 8888 8889 // Fix for iOS disappearing InfoBox problem. 8890 // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad 8891 this.div_.style.WebkitTransform = "translateZ(0)"; 8892 8893 // Fix up opacity style for benefit of MSIE: 8894 // 8895 if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") { 8896 // See http://www.quirksmode.org/css/opacity.html 8897 this.div_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(Opacity=" + (this.div_.style.opacity * 100) + ")\""; 8898 this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; 8899 } 8900 8901 // Apply required styles: 8902 // 8903 this.div_.style.position = "absolute"; 8904 this.div_.style.visibility = 'hidden'; 8905 if (this.zIndex_ !== null) { 8906 8907 this.div_.style.zIndex = this.zIndex_; 8908 } 8909 } 8910}; 8911 8912/** 8913 * Get the widths of the borders of the InfoBox. 8914 * @private 8915 * @return {Object} widths object (top, bottom left, right) 8916 */ 8917InfoBox.prototype.getBoxWidths_ = function () { 8918 8919 var computedStyle; 8920 var bw = {top: 0, bottom: 0, left: 0, right: 0}; 8921 var box = this.div_; 8922 8923 if (document.defaultView && document.defaultView.getComputedStyle) { 8924 8925 computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, ""); 8926 8927 if (computedStyle) { 8928 8929 // The computed styles are always in pixel units (good!) 8930 bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; 8931 bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; 8932 bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; 8933 bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; 8934 } 8935 8936 } else if (document.documentElement.currentStyle) { // MSIE 8937 8938 if (box.currentStyle) { 8939 8940 // The current styles may not be in pixel units, but assume they are (bad!) 8941 bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0; 8942 bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0; 8943 bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0; 8944 bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0; 8945 } 8946 } 8947 8948 return bw; 8949}; 8950 8951/** 8952 * Invoked when <tt>close</tt> is called. Do not call it directly. 8953 */ 8954InfoBox.prototype.onRemove = function () { 8955 8956 if (this.div_) { 8957 8958 this.div_.parentNode.removeChild(this.div_); 8959 this.div_ = null; 8960 } 8961}; 8962 8963/** 8964 * Draws the InfoBox based on the current map projection and zoom level. 8965 */ 8966InfoBox.prototype.draw = function () { 8967 8968 this.createInfoBoxDiv_(); 8969 8970 var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_); 8971 8972 this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + "px"; 8973 8974 if (this.alignBottom_) { 8975 this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + "px"; 8976 } else { 8977 this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + "px"; 8978 } 8979 8980 if (this.isHidden_) { 8981 8982 this.div_.style.visibility = "hidden"; 8983 8984 } else { 8985 8986 this.div_.style.visibility = "visible"; 8987 } 8988}; 8989 8990/** 8991 * Sets the options for the InfoBox. Note that changes to the <tt>maxWidth</tt>, 8992 * <tt>closeBoxMargin</tt>, <tt>closeBoxURL</tt>, and <tt>enableEventPropagation</tt> 8993 * properties have no affect until the current InfoBox is <tt>close</tt>d and a new one 8994 * is <tt>open</tt>ed. 8995 * @param {InfoBoxOptions} opt_opts 8996 */ 8997InfoBox.prototype.setOptions = function (opt_opts) { 8998 if (typeof opt_opts.boxClass !== "undefined") { // Must be first 8999 9000 this.boxClass_ = opt_opts.boxClass; 9001 this.setBoxStyle_(); 9002 } 9003 if (typeof opt_opts.boxStyle !== "undefined") { // Must be second 9004 9005 this.boxStyle_ = opt_opts.boxStyle; 9006 this.setBoxStyle_(); 9007 } 9008 if (typeof opt_opts.content !== "undefined") { 9009 9010 this.setContent(opt_opts.content); 9011 } 9012 if (typeof opt_opts.disableAutoPan !== "undefined") { 9013 9014 this.disableAutoPan_ = opt_opts.disableAutoPan; 9015 } 9016 if (typeof opt_opts.maxWidth !== "undefined") { 9017 9018 this.maxWidth_ = opt_opts.maxWidth; 9019 } 9020 if (typeof opt_opts.pixelOffset !== "undefined") { 9021 9022 this.pixelOffset_ = opt_opts.pixelOffset; 9023 } 9024 if (typeof opt_opts.alignBottom !== "undefined") { 9025 9026 this.alignBottom_ = opt_opts.alignBottom; 9027 } 9028 if (typeof opt_opts.position !== "undefined") { 9029 9030 this.setPosition(opt_opts.position); 9031 } 9032 if (typeof opt_opts.zIndex !== "undefined") { 9033 9034 this.setZIndex(opt_opts.zIndex); 9035 } 9036 if (typeof opt_opts.closeBoxMargin !== "undefined") { 9037 9038 this.closeBoxMargin_ = opt_opts.closeBoxMargin; 9039 } 9040 if (typeof opt_opts.closeBoxURL !== "undefined") { 9041 9042 this.closeBoxURL_ = opt_opts.closeBoxURL; 9043 } 9044 if (typeof opt_opts.infoBoxClearance !== "undefined") { 9045 9046 this.infoBoxClearance_ = opt_opts.infoBoxClearance; 9047 } 9048 if (typeof opt_opts.isHidden !== "undefined") { 9049 9050 this.isHidden_ = opt_opts.isHidden; 9051 } 9052 if (typeof opt_opts.visible !== "undefined") { 9053 9054 this.isHidden_ = !opt_opts.visible; 9055 } 9056 if (typeof opt_opts.enableEventPropagation !== "undefined") { 9057 9058 this.enableEventPropagation_ = opt_opts.enableEventPropagation; 9059 } 9060 9061 if (this.div_) { 9062 9063 this.draw(); 9064 } 9065}; 9066 9067/** 9068 * Sets the content of the InfoBox. 9069 * The content can be plain text or an HTML DOM node. 9070 * @param {string|Node} content 9071 */ 9072InfoBox.prototype.setContent = function (content) { 9073 this.content_ = content; 9074 9075 if (this.div_) { 9076 9077 if (this.closeListener_) { 9078 9079 google.maps.event.removeListener(this.closeListener_); 9080 this.closeListener_ = null; 9081 } 9082 9083 // Odd code required to make things work with MSIE. 9084 // 9085 if (!this.fixedWidthSet_) { 9086 9087 this.div_.style.width = ""; 9088 } 9089 9090 if (typeof content.nodeType === "undefined") { 9091 this.div_.innerHTML = this.getCloseBoxImg_() + content; 9092 } else { 9093 this.div_.innerHTML = this.getCloseBoxImg_(); 9094 this.div_.appendChild(content); 9095 } 9096 9097 // Perverse code required to make things work with MSIE. 9098 // (Ensures the close box does, in fact, float to the right.) 9099 // 9100 if (!this.fixedWidthSet_) { 9101 this.div_.style.width = this.div_.offsetWidth + "px"; 9102 if (typeof content.nodeType === "undefined") { 9103 this.div_.innerHTML = this.getCloseBoxImg_() + content; 9104 } else { 9105 this.div_.innerHTML = this.getCloseBoxImg_(); 9106 this.div_.appendChild(content); 9107 } 9108 } 9109 9110 this.addClickHandler_(); 9111 } 9112 9113 /** 9114 * This event is fired when the content of the InfoBox changes. 9115 * @name InfoBox#content_changed 9116 * @event 9117 */ 9118 google.maps.event.trigger(this, "content_changed"); 9119}; 9120 9121/** 9122 * Sets the geographic location of the InfoBox. 9123 * @param {LatLng} latlng 9124 */ 9125InfoBox.prototype.setPosition = function (latlng) { 9126 9127 this.position_ = latlng; 9128 9129 if (this.div_) { 9130 9131 this.draw(); 9132 } 9133 9134 /** 9135 * This event is fired when the position of the InfoBox changes. 9136 * @name InfoBox#position_changed 9137 * @event 9138 */ 9139 google.maps.event.trigger(this, "position_changed"); 9140}; 9141 9142/** 9143 * Sets the zIndex style for the InfoBox. 9144 * @param {number} index 9145 */ 9146InfoBox.prototype.setZIndex = function (index) { 9147 9148 this.zIndex_ = index; 9149 9150 if (this.div_) { 9151 9152 this.div_.style.zIndex = index; 9153 } 9154 9155 /** 9156 * This event is fired when the zIndex of the InfoBox changes. 9157 * @name InfoBox#zindex_changed 9158 * @event 9159 */ 9160 google.maps.event.trigger(this, "zindex_changed"); 9161}; 9162 9163/** 9164 * Sets the visibility of the InfoBox. 9165 * @param {boolean} isVisible 9166 */ 9167InfoBox.prototype.setVisible = function (isVisible) { 9168 9169 this.isHidden_ = !isVisible; 9170 if (this.div_) { 9171 this.div_.style.visibility = (this.isHidden_ ? "hidden" : "visible"); 9172 } 9173}; 9174 9175/** 9176 * Returns the content of the InfoBox. 9177 * @returns {string} 9178 */ 9179InfoBox.prototype.getContent = function () { 9180 9181 return this.content_; 9182}; 9183 9184/** 9185 * Returns the geographic location of the InfoBox. 9186 * @returns {LatLng} 9187 */ 9188InfoBox.prototype.getPosition = function () { 9189 9190 return this.position_; 9191}; 9192 9193/** 9194 * Returns the zIndex for the InfoBox. 9195 * @returns {number} 9196 */ 9197InfoBox.prototype.getZIndex = function () { 9198 9199 return this.zIndex_; 9200}; 9201 9202/** 9203 * Returns a flag indicating whether the InfoBox is visible. 9204 * @returns {boolean} 9205 */ 9206InfoBox.prototype.getVisible = function () { 9207 9208 var isVisible; 9209 9210 if ((typeof this.getMap() === "undefined") || (this.getMap() === null)) { 9211 isVisible = false; 9212 } else { 9213 isVisible = !this.isHidden_; 9214 } 9215 return isVisible; 9216}; 9217 9218/** 9219 * Shows the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] 9220 */ 9221InfoBox.prototype.show = function () { 9222 9223 this.isHidden_ = false; 9224 if (this.div_) { 9225 this.div_.style.visibility = "visible"; 9226 } 9227}; 9228 9229/** 9230 * Hides the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] 9231 */ 9232InfoBox.prototype.hide = function () { 9233 9234 this.isHidden_ = true; 9235 if (this.div_) { 9236 this.div_.style.visibility = "hidden"; 9237 } 9238}; 9239 9240/** 9241 * Adds the InfoBox to the specified map or Street View panorama. If <tt>anchor</tt> 9242 * (usually a <tt>google.maps.Marker</tt>) is specified, the position 9243 * of the InfoBox is set to the position of the <tt>anchor</tt>. If the 9244 * anchor is dragged to a new location, the InfoBox moves as well. 9245 * @param {Map|StreetViewPanorama} map 9246 * @param {MVCObject} [anchor] 9247 */ 9248InfoBox.prototype.open = function (map, anchor) { 9249 9250 var me = this; 9251 9252 if (anchor) { 9253 9254 this.position_ = anchor.getPosition(); 9255 this.moveListener_ = google.maps.event.addListener(anchor, "position_changed", function () { 9256 me.setPosition(this.getPosition()); 9257 }); 9258 } 9259 9260 this.setMap(map); 9261 9262 if (this.div_) { 9263 9264 this.panBox_(); 9265 } 9266}; 9267 9268/** 9269 * Removes the InfoBox from the map. 9270 */ 9271InfoBox.prototype.close = function () { 9272 9273 var i; 9274 9275 if (this.closeListener_) { 9276 9277 google.maps.event.removeListener(this.closeListener_); 9278 this.closeListener_ = null; 9279 } 9280 9281 if (this.eventListeners_) { 9282 9283 for (i = 0; i < this.eventListeners_.length; i++) { 9284 9285 google.maps.event.removeListener(this.eventListeners_[i]); 9286 } 9287 this.eventListeners_ = null; 9288 } 9289 9290 if (this.moveListener_) { 9291 9292 google.maps.event.removeListener(this.moveListener_); 9293 this.moveListener_ = null; 9294 } 9295 9296 if (this.contextListener_) { 9297 9298 google.maps.event.removeListener(this.contextListener_); 9299 this.contextListener_ = null; 9300 } 9301 9302 this.setMap(null); 9303};
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.