1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/public/built.js

29 lines
978 KiB
JavaScript
Raw Normal View History

function generatePDF(t,e,n,i){if(t&&e){if(!n)return refreshTimer&&clearTimeout(refreshTimer),void(refreshTimer=setTimeout(function(){generatePDF(t,e,!0,i)},500));refreshTimer=null,t=calculateAmounts(t);var o=GetPdfMake(t,e,i);return i&&o.getDataUrl(i),o}}function copyObject(t){return!!t&&JSON.parse(JSON.stringify(t))}function processVariables(t){if(!t)return"";for(var e=["MONTH","QUARTER","YEAR"],n=0;n<e.length;n++){var i=e[n],o=new RegExp(":"+i+"[+-]?[\\d]*","g"),a=t.match(o);if(a)for(var s=0;s<a.length;s++){var r=a[s],c=0;r.split("+").length>1?c=r.split("+")[1]:r.split("-").length>1&&(c=parseInt(r.split("-")[1])*-1),t=t.replace(r,getDatePart(i,c))}}return t}function getDatePart(t,e){return e=parseInt(e),e||(e=0),"MONTH"==t?getMonth(e):"QUARTER"==t?getQuarter(e):"YEAR"==t?getYear(e):void 0}function getMonth(t){var e=new Date,n=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getMonth();return i=parseInt(i)+t,i%=12,i<0&&(i+=12),n[i]}function getYear(t){var e=new Date,n=e.getFullYear();return parseInt(n)+t}function getQuarter(t){var e=new Date,n=Math.floor((e.getMonth()+3)/3);return n+=t,n%=4,0==n&&(n=4),"Q"+n}function isStorageSupported(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}function isValidEmailAddress(t){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return e.test(t)}function enableHoverClick(t,e,n){}function setAsLink(t,e){e?(t.css("text-decoration","underline"),t.css("cursor","pointer")):(t.css("text-decoration","none"),t.css("cursor","text"))}function setComboboxValue(t,e,n){t.find("input").val(e),t.find("input.form-control").val(n),e&&n?(t.find("select").combobox("setSelected"),t.find(".combobox-container").addClass("combobox-selected")):t.find(".combobox-container").removeClass("combobox-selected")}function convertDataURIToBinary(t){var e=t.indexOf(BASE64_MARKER)+BASE64_MARKER.length,n=t.substring(e);return base64DecToArr(n)}function comboboxHighlighter(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=t.replace(new RegExp("<br/>","g"),"\n");return n=stripHtmlTags(n),n=n.replace(new RegExp("("+e+")","ig"),function(t,n){return n?"<strong>"+n+"</strong>":e}),n.replace(new RegExp("\n","g"),"<br/>")}function inIframe(){try{return window.self!==window.top}catch(t){return!0}}function comboboxMatcher(t){return~stripHtmlTags(t).toLowerCase().indexOf(this.query.toLowerCase())}function stripHtmlTags(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}function getContactDisplayName(t){return t.first_name||t.last_name?$.trim((t.first_name||"")+" "+(t.last_name||"")):t.email}function getContactDisplayNameWithEmail(t){var e="";return(t.first_name||t.last_name)&&(e+=$.trim((t.first_name||"")+" "+(t.last_name||""))),t.email&&(e&&(e+=" - "),e+=t.email),$.trim(e)}function getClientDisplayName(t){var e=!!t.contacts&&t.contacts[0];return t.name?t.name:e?getContactDisplayName(e):""}function populateInvoiceComboboxes(t,e){for(var n={},i={},o={},a=$("select#client"),s=0;s<invoices.length;s++){var r=invoices[s],c=r.client;o.hasOwnProperty(c.public_id)||(o[c.public_id]=[]),o[c.public_id].push(r),i[r.public_id]
i},inArray:function(t,e,n){var i;if(e){if(Q)return Q.call(e,t,n);for(i=e.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;)t[o++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[o++]=e[i++];return t.length=o,t},grep:function(t,e,n){for(var i,o=[],a=0,s=t.length,r=!n;a<s;a++)i=!e(t[a],a),i!==r&&o.push(t[a]);return o},map:function(t,e,i){var o,a=0,s=t.length,r=n(t),c=[];if(r)for(;a<s;a++)o=e(t[a],a,i),null!=o&&c.push(o);else for(a in t)o=e(t[a],a,i),null!=o&&c.push(o);return K.apply([],c)},guid:1,proxy:function(t,e){var n,i,o;if("string"==typeof e&&(o=t[e],e=t,t=o),ot.isFunction(t))return n=J.call(arguments,2),i=function(){return t.apply(e||this,n.concat(J.call(arguments)))},i.guid=t.guid=t.guid||ot.guid++,i},now:function(){return+new Date},support:nt}),ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Z["[object "+e+"]"]=e.toLowerCase()});var lt=function(t){function e(t,e,n,i){var o,a,s,r,c,l,h,p,f,m;if((e?e.ownerDocument||e:X)!==D&&L(e),e=e||D,n=n||[],r=e.nodeType,"string"!=typeof t||!t||1!==r&&9!==r&&11!==r)return n;if(!i&&q){if(11!==r&&(o=vt.exec(t)))if(s=o[1]){if(9===r){if(a=e.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(e.ownerDocument&&(a=e.ownerDocument.getElementById(s))&&I(e,a)&&a.id===s)return n.push(a),n}else{if(o[2])return Q.apply(n,e.getElementsByTagName(t)),n;if((s=o[3])&&A.getElementsByClassName)return Q.apply(n,e.getElementsByClassName(s)),n}if(A.qsa&&(!W||!W.test(t))){if(p=h=P,f=e,m=1!==r&&t,1===r&&"object"!==e.nodeName.toLowerCase()){for(l=w(t),(h=e.getAttribute("id"))?p=h.replace(yt,"\\$&"):e.setAttribute("id",p),p="[id='"+p+"'] ",c=l.length;c--;)l[c]=p+d(l[c]);f=Mt.test(t)&&u(e.parentNode)||e,m=l.join(",")}if(m)try{return Q.apply(n,f.querySelectorAll(m)),n}catch(g){}finally{h||e.removeAttribute("id")}}}return O(t.replace(ct,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>_.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[P]=!0,t}function o(t){var e=D.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function a(t,e){for(var n=t.split("|"),i=t.length;i--;)_.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function r(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function c(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var o,a=t([],n.length,e),s=a.length;s--;)n[o=a[s]]&&(n[o]=!(i[o]=n[o]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function p(t,e,n){var i=e.dir,o=n&&"parentNode"===i,a=F++;return e.first?function(e,n,a){for(;e=e[i];)if(1===e.nodeType||o)return t(e,n,a)}:function(e,n,s){var r,c,l=[R,a];if(s){for(;e=e[i];)if((1===e.nodeType||o)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||o){if(c=e[P]||(e[P]={}),(r=c[i])&&r[0]===R&&r[1]===a)return l[2]=r[2];if(c[i]=l,l[2]=t(e,n,s))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,a=n.length;o<a;o++)e(t,n[o],i);return i}function g(t,e,n,i,o){for(var a,s=[],r=0,c=t.length,l=null!=e;r<c;r++)(a=t[r])&&(n&&!n(a,i,o)||(s.push(a),l&&e.push(r)));return s}function b(t,e,n,o,a,s){return o&&!o[P]&&(o=b(o)),a&&!a[P]&&(a=b(a,s)),i(function(i,s,r,c){var l,u,h,d=[],p=[],f=s.length,b=i||m(e||"*",r.nodeType?[r]:r,[]),v=!t||!i&&e?b:g(b,d,t,r,c),M=n?a||(i?t:f||o)?[]:s:v;if(n&&n(v,M,r,c),o)for(l=g(M,p),o(l,[],r,c),u=l.length;u--;)(h=l[u])&&(M[p[u]]=!(v[p[u]]=h));if(i){if(a||t){if(a){for(l=[],u=M.length;u--;)(h=M[u])&&l.push(v[u]=h);a(null,M=[],l,c)}for(u=M.length;u--;)(h=M
r=e.length;r--;)a=Wt.exec(e[r])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p&&(l=ot.event.special[p]||{},p=(o?l.delegateType:l.bindType)||p,l=ot.event.special[p]||{},h=ot.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&ot.expr.match.needsContext.test(o),namespace:f.join(".")},c),(d=s[p])||(d=s[p]=[],d.delegateCount=0,l.setup&&l.setup.call(t,i,f,u)!==!1||(t.addEventListener?t.addEventListener(p,u,!1):t.attachEvent&&t.attachEvent("on"+p,u))),l.add&&(l.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,h):d.push(h),ot.event.global[p]=!0);t=null}},remove:function(t,e,n,i,o){var a,s,r,c,l,u,h,d,p,f,m,g=ot.hasData(t)&&ot._data(t);if(g&&(u=g.events)){for(e=(e||"").match(Mt)||[""],l=e.length;l--;)if(r=Wt.exec(e[l])||[],p=m=r[1],f=(r[2]||"").split(".").sort(),p){for(h=ot.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,d=u[p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),c=a=d.length;a--;)s=d[a],!o&&m!==s.origType||n&&n.guid!==s.guid||r&&!r.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(a,1),s.selector&&d.delegateCount--,h.remove&&h.remove.call(t,s));c&&!d.length&&(h.teardown&&h.teardown.call(t,f,g.handle)!==!1||ot.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)ot.event.remove(t,p+e[l],n,i,!0);ot.isEmptyObject(u)&&(delete g.handle,ot._removeData(t,"events"))}},trigger:function(e,n,i,o){var a,s,r,c,l,u,h,d=[i||ft],p=et.call(e,"type")?e.type:e,f=et.call(e,"namespace")?e.namespace.split("."):[];if(r=u=i=i||ft,3!==i.nodeType&&8!==i.nodeType&&!qt.test(p+ot.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:ot.makeArray(n,[e]),l=ot.event.special[p]||{},o||!l.trigger||l.trigger.apply(i,n)!==!1)){if(!o&&!l.noBubble&&!ot.isWindow(i)){for(c=l.delegateType||p,qt.test(c+p)||(r=r.parentNode);r;r=r.parentNode)d.push(r),u=r;u===(i.ownerDocument||ft)&&d.push(u.defaultView||u.parentWindow||t)}for(h=0;(r=d[h++])&&!e.isPropagationStopped();)e.type=h>1?c:l.bindType||p,a=(ot._data(r,"events")||{})[e.type]&&ot._data(r,"handle"),a&&a.apply(r,n),a=s&&r[s],a&&a.apply&&ot.acceptData(r)&&(e.result=a.apply(r,n),e.result===!1&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&ot.acceptData(i)&&s&&i[p]&&!ot.isWindow(i)){u=i[s],u&&(i[s]=null),ot.event.triggered=p;try{i[p]()}catch(m){}ot.event.triggered=void 0,u&&(i[s]=u)}return e.result}},dispatch:function(t){t=ot.event.fix(t);var e,n,i,o,a,s=[],r=J.call(arguments),c=(ot._data(this,"events")||{})[t.type]||[],l=ot.event.special[t.type]||{};if(r[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(s=ot.event.handlers.call(this,t,c),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(i.namespace)||(t.handleObj=i,t.data=i.data,n=((ot.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,r),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,a,s=[],r=e.delegateCount,c=t.target;if(r&&c.nodeType&&(!t.button||"click"!==t.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==t.type)){for(o=[],a=0;a<r;a++)i=e[a],n=i.selector+" ",void 0===o[n]&&(o[n]=i.needsContext?ot(n,this).index(c)>=0:ot.find(n,this,null,[c]).length),o[n]&&o.push(i);o.length&&s.push({elem:c,handlers:o})}return r<e.length&&s.push({elem:this,handlers:e.slice(r)}),s},fix:function(t){if(t[ot.expando])return t;var e,n,i,o=t.type,a=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=kt.test(o)?this.mouseHooks:Dt.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new
ot.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Ae.set},ot.attrHooks.contenteditable={set:function(t,e,n){Ae.set(t,""!==e&&e,n)}},ot.each(["width","height"],function(t,e){ot.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),nt.style||(ot.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Oe=/^(?:input|select|textarea|button|object)$/i,Ne=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return St(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ot.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),ot.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,o,a,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return a=1!==s||!ot.isXMLDoc(t),a&&(e=ot.propFix[e]||e,o=ot.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):Oe.test(t.nodeName)||Ne.test(t.nodeName)&&t.href?0:-1}}}}),nt.hrefNormalized||ot.each(["href","src"],function(t,e){ot.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),nt.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this}),nt.enctype||(ot.propFix.enctype="encoding");var Se=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,n,i,o,a,s,r=0,c=this.length,l="string"==typeof t&&t;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(Mt)||[];r<c;r++)if(n=this[r],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):" ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=ot.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(t){var e,n,i,o,a,s,r=0,c=this.length,l=0===arguments.length||"string"==typeof t&&t;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(Mt)||[];r<c;r++)if(n=this[r],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):"")){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>=0;)i=i.replace(" "+o+" "," ");s=t?ot.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(n){ot(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,i=0,o=ot(this),a=t.match(Mt)||[];e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else n!==zt&&"boolean"!==n||(this.className&&ot._data(this,"__className__",this.className),this.className=this.className||t===!1?"":ot._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Se," ").indexOf(e)>=0)return!0;return!1}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var xe=ot.now(),Le=/\?/,De=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!h){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,i=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),h=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),h=!1,!1},_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}});!function(){function e(t,e,n){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a,s=Math.max,r=Math.abs,c=Math.round,l=/left|center|right/,u=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=i.children()[0];return t("body").append(i),e=a.offsetWidth,i.css("overflow","scroll"),n=a.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),o=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth,a="scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),o=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:o,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop
return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,n){var i=this;t.each(n,function(t,n){i._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?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):void 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())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}});var d,p=(t.ui.autocomplete,"ui-button ui-widget ui-state-default ui-corner-all"),f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},g=function(e){var n=e.name,i=e.form,o=t([]);return n&&(n=n.replace(/'/g,"\\'"),o=i?t(i).find("[name='"+n+"'][type=radio]"):t("[name='"+n+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),o};t.widget("ui.button",{version:"1.11.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,n=this.options,i="checkbox"===this.type||"radio"===this.type,o=i?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===d&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||t(this).removeClass(o)}).bind("click"+this.eventNamespace,function(t){n.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),i&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).addClass("ui-state-active"),e.bu
})},_generateHTML:function(t){var e,n,i,o,a,s,r,c,l,u,h,d,p,f,m,g,b,v,M,y,A,_,z,T,w,C,O,N,S,x,L,D,k,q,W,E,B,I,P,X=new Date,R=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth(),X.getDate())),F=this._get(t,"isRTL"),H=this._get(t,"showButtonPanel"),j=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),$=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),Y=this._get(t,"stepMonths"),J=1!==$[0]||1!==$[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-$[0]*$[1]+1,Q.getDate())),e=G&&e<G?G:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,n=this._get(t,"prevText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z-Y,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+n+"</span></a>":j?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+n+"</span></a>",o=this._get(t,"nextText"),o=U?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,Z+Y,1)),this._getFormatConfig(t)):o,a=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+o+"</span></a>":j?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+o+"</span></a>",s=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?K:R,s=U?this.formatDate(s,r,this._getFormatConfig(t)):s,c=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=H?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(F?c:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(F?"":c)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),b=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),M=this._getDefaultDate(t),y="",_=0;_<$[0];_++){for(z="",this.maxRows=4,T=0;T<$[1];T++){if(w=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),C=" ui-corner-all",O="",J){if(O+="<div class='ui-datepicker-group",$[1]>1)switch(T){case 0:O+=" ui-datepicker-group-first",C=" ui-corner-"+(F?"right":"left");break;case $[1]-1:O+=" ui-datepicker-group-last",C=" ui-corner-"+(F?"left":"right");break;default:O+=" ui-datepicker-group-middle",C=""}O+="'>"}for(O+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===_?F?a:i:"")+(/all|right/.test(C)&&0===_?F?i:a:"")+this._generateMonthYearHeader(t,Z,tt,G,Q,_>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",N=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",A=0;A<7;A++)S=(A+u)%7,N+="<th scope='col'"+((A+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[S]+"'>"+p[S]+"</span></th>";for(O+=N+"</tr></thead><tbody>",x=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,x)),L=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,D=Math.ceil((L+x)/7),k=J&&this.maxRows>D?this.maxRows:D,this.maxRows=k,q=this._daylightSavingAdjust(new Date(tt,Z,1-L)),W=0;W<k;W++){for(O+="<tr>",E=h?"<td class='ui-datepicker-week-col'>
}).mouseleave(function(){r.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,n=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(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),n(this.originalElement),this},_mouseCapture:function(e){var n,i,o=!1;for(n in this.handles)i=t(this.handles[n])[0],(i===e.target||t.contains(i,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var n,i,o,a=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),a.containment&&(n+=t(a.containment).scrollLeft()||0,i+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),s.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i,o=this.originalMousePosition,a=this.axis,s=e.pageX-o.left||0,r=e.pageY-o.top||0,c=this._change[a];return this._updatePrevProperties(),!!c&&(n=c.apply(this,[e,s,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(n=this._updateRatio(n,e)),n=this._respectSize(n,e),this._updateCache(n),this._propagate("resize",e),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var n,i,o,a,s,r,c,l=this.options,u=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),o=i&&this._hasScroll(n[0],"left")?0:u.sizeDiff.height,a=i?0:u.sizeDiff.width,s={width:u.helper.width()-a,height:u.helper.height()-o},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,c=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(t.extend(s,{top:c,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.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,n,i,o,a,s=this.options;a={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=
}})},dragStop:function(e,n){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}};var v=(t.ui.droppable,"ui-effects-"),M=t;t.effects={effect:{}},function(t,e){function n(t,e,n){var i=h[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:i.max<t?i.max:t)}function i(e){var n=l(),i=n._rgba=[];return e=e.toLowerCase(),f(c,function(t,o){var a,s=o.re.exec(e),r=s&&o.parse(s),c=o.space||"rgba";if(r)return a=n[c](r),n[u[c].cache]=a[u[c].cache],i=n._rgba=a._rgba,!1}),i.length?("0,0,0,0"===i.join()&&t.extend(i,a.transparent),n):a[e]}function o(t,e,n){return n=(n+1)%1,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}var a,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,c=[{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})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([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)]}},{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]]}}],l=t.Color=function(e,n,i,o){return new t.Color.fn.parse(e,n,i,o)},u={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"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(o,s,r,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(s),s=e);var h=this,d=t.type(o),p=this._rgba=[];return s!==e&&(o=[o,s,r,c],d="array"),"string"===d?this.parse(i(o)||a._default):"array"===d?(f(u.rgba.props,function(t,e){p[e.idx]=n(o[e.idx],e)}),this):"object"===d?(o instanceof l?f(u,function(t,e){o[e.cache]&&(h[e.cache]=o[e.cache].slice())}):f(u,function(e,i){var a=i.cache;f(i.props,function(t,e){if(!h[a]&&i.to){if("alpha"===t||null==o[t])return;h[a]=i.to(h._rgba)}h[a][e.idx]=n(o[t],e,!0)}),h[a]&&t.inArray(null,h[a].slice(0,3))<0&&(h[a][3]=1,i.from&&(h._rgba=i.from(h[a])))}),this):void 0},is:function(t){var e=l(t),n=!0,i=this;return f(u,function(t,o){var a,s=e[o.cache];return s&&(a=i[o.cache]||o.to&&o.to(i._rgba)||[],f(o.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===a[e.idx]})),n}),n},_space:function(){var t=[],e=this;return f(u,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=l(t),o=i._space(),a=u[o],s=0===this.alpha()?l("transparent"):this,r=s[a.cache]||a.to(s._rgba),c=r.slice();return i=i[a.cache],f(a.props,function(t,o){var a=o.idx,s=r[a],l=i[a],u=h[o.type]||{};null!==l&&(null===s?c[a]=l:(u.mod&&(l-s>u.mod/2?s+=u.mod:s-l>u.mod/2&&(s-=u.mod)),c[a]=n((l-s)*e+s,o)))}),this[o](c)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=l(e)._rgba;return l(t.map(n,function(t,e){return(1-i)*o[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toH
},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,n){t.preventDefault(),e._setSelection(),e._select(n.item.data("ui-selectmenu-item"),t)},focus:function(t,n){var i=n.item.data("ui-selectmenu-item");null!=e.focusIndex&&i.index!==e.focusIndex&&(e._trigger("focus",t,{item:i}),e.isOpen||e._select(i,t)),e.focusIndex=i.index,e.button.attr("aria-activedescendant",e.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),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.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,n){var i=this,o="";t.each(n,function(n,a){a.optgroup!==o&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(e),o=a.optgroup),i._renderItemData(e,a)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var i=t("<li>");return n.disabled&&i.addClass("ui-state-disabled"),this._setText(i,n.label),i.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,i,o=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),o+=":not(.ui-state-disabled)"),i="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](o).eq(-1):n[t+"All"](o).eq(0),i.length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var n=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),n=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this.
if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));a?this._rearrange(e,a,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[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")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){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()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],n=t(o.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderT
return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]={element:e,tooltip:n}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(n,i){var o=t.Event("blur"),a=i.element;o.target=o.currentTarget=a[0],e.close(o,!0),t("#"+n).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var s=t(a);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),a="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,a)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",a=i.data();e+="Text",null==a.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==a[e]?this.options[e]:a[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-a
})}var n=function(e){this.element=t(e)};n.VERSION="3.3.1",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a"),a=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(a),e.trigger(s),!s.isDefaultPrevented()&&!a.isDefaultPrevented()){var r=t(i);this.activate(e.closest("li"),n),this.activate(r,r.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},n.prototype.activate=function(e,i,o){function a(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),r=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&r?s.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),a="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,a)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),a=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=a.top)&&"bottom":!(o+s<=t-i)&&"bottom";var r=null==this.affixed,c=r?o:a.top,l=r?s:e;return null!=n&&c<=n?"top":null!=i&&c+l>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,a=i.bottom,s=t("body").height();"object"!=typeof i&&(a=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof a&&(a=i.bottom(this.$element));var r=this.getState(s,e,o,a);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var c="affix"+(r?"-"+r:""),l=t.Event(c+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:s-e-a})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t,e,n){!function(t){"use strict";"function"==typeof define&&define.amd?
var z=i(c).clone().empty().css("visibility","hidden").removeAttr("id").append(i(e.nTHead).clone(!1)).append(i(e.nTFoot).clone(!1)).append(i("<tbody><tr/></tbody>"));z.find("tfoot th, tfoot td").css("width","");var T=z.find("tbody tr");for(M=F(e,z.find("thead")[0]),n=0;n<v.length;n++)o=l[v[n]],M[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?Tt(o.sWidthOrig):"";if(e.aoData.length)for(n=0;n<v.length;n++)a=v[n],o=l[a],i(_t(e,a)).clone(!1).append(o.sContentPadding).appendTo(T);if(z.appendTo(A),d&&f?z.width(f):d?(z.css("width","auto"),z.width()<A.offsetWidth&&z.width(A.offsetWidth)):h?z.width(A.offsetWidth):y&&z.width(y),At(e,z[0]),d){var w=0;for(n=0;n<v.length;n++)o=l[v[n]],r=i(M[n]).outerWidth(),w+=null===o.sWidthOrig?r:parseInt(o.sWidth,10)+r-i(M[n]).width();z.width(Tt(w)),c.style.width=Tt(w)}for(n=0;n<v.length;n++)o=l[v[n]],s=i(M[n]).width(),s&&(o.sWidth=Tt(s));c.style.width=Tt(z.css("width")),z.remove()}else for(n=0;n<m;n++)l[n].sWidth=Tt(M.eq(n).width());y&&(c.style.width=Tt(y)),!y&&!d||e._reszEvt||(i(t).bind("resize.DT-"+e.sInstance,Mt(function(){p(e)})),e._reszEvt=!0)}function Mt(t,e){var i,o,a=e!==n?e:200;return function(){var e=this,s=+new Date,r=arguments;i&&s<i+a?(clearTimeout(o),o=setTimeout(function(){i=n,t.apply(e,r)},a)):i?(i=s,t.apply(e,r)):i=s}}function yt(t,n){if(!t)return 0;var o=i("<div/>").css("width",Tt(t)).appendTo(n||e.body),a=o[0].offsetWidth;return o.remove(),a}function At(t,e){var n=t.oScroll;if(n.sX||n.sY){var o=n.sX?0:n.iBarWidth;e.style.width=Tt(i(e).outerWidth()-o)}}function _t(t,e){var n=zt(t,e);if(n<0)return null;var o=t.aoData[n];return o.nTr?o.anCells[e]:i("<td/>").html(T(t,n,e,"display"))[0]}function zt(t,e){for(var n,i=-1,o=-1,a=0,s=t.aoData.length;a<s;a++)n=T(t,a,e,"display")+"",n=n.replace(ze,""),n.length>i&&(i=n.length,o=a);return o}function Tt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function wt(){if(!Yt.__scrollbarWidth){var t=i("<p/>").css({width:"100%",height:200,padding:0})[0],e=i("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(t).appendTo("body"),n=t.offsetWidth;e.css("overflow","scroll");var o=t.offsetWidth;n===o&&(o=e[0].clientWidth),e.remove(),Yt.__scrollbarWidth=n-o}return Yt.__scrollbarWidth}function Ct(t){var e,o,a,s,r,c,l,u=[],h=t.aoColumns,d=t.aaSortingFixed,p=i.isPlainObject(d),f=[],m=function(t){t.length&&!i.isArray(t[0])?f.push(t):f.push.apply(f,t)};for(i.isArray(d)&&m(d),p&&d.pre&&m(d.pre),m(t.aaSorting),p&&d.post&&m(d.post),e=0;e<f.length;e++)for(l=f[e][0],s=h[l].aDataSort,o=0,a=s.length;o<a;o++)r=s[o],c=h[r].sType||"string",f[e]._idx===n&&(f[e]._idx=i.inArray(f[e][1],h[r].asSorting)),u.push({src:l,col:r,dir:f[e][1],index:f[e]._idx,type:c,formatter:Yt.ext.type.order[c+"-pre"]});return u}function Ot(t){var e,n,i,o,a,s=[],r=Yt.ext.type.order,c=t.aoData,l=(t.aoColumns,0),u=t.aiDisplayMaster;for(v(t),a=Ct(t),e=0,n=a.length;e<n;e++)o=a[e],o.formatter&&l++,Dt(t,o.col);if("ssp"!=jt(t)&&0!==a.length){for(e=0,i=u.length;e<i;e++)s[u[e]]=e;l===a.length?u.sort(function(t,e){var n,i,o,r,l,u=a.length,h=c[t]._aSortData,d=c[e]._aSortData;for(o=0;o<u;o++)if(l=a[o],n=h[l.col],i=d[l.col],r=n<i?-1:n>i?1:0,0!==r)return"asc"===l.dir?r:-r;return n=s[t],i=s[e],n<i?-1:n>i?1:0}):u.sort(function(t,e){var n,i,o,l,u,h,d=a.length,p=c[t]._aSortData,f=c[e]._aSortData;for(o=0;o<d;o++)if(u=a[o],n=p[u.col],i=f[u.col],h=r[u.type+"-"+u.dir]||r["string-"+u.dir],l=h(n,i),0!==l)return l;return n=s[t],i=s[e],n<i?-1:n>i?1:0})}t.bSorted=!0}function Nt(t){for(var e,n,i=t.aoColumns,o=Ct(t),a=t.oLanguage.oAria,s=0,r=i.length;s<r;s++){var c=i[s],l=c.asSorting,u=c.sTitle.replace(/<.*?>/g,""),h=c.nTh;h.removeAttribute("aria-sort"),c.bSortable?(o.length>0&&o[0].col==s?(h.setAttribute("aria-sort","asc"==o[0].dir?"ascending":"descending"),n=l[o[0].index+1]||l[0]):n=l[0],e=u+("asc"===n?a.sSortAscending:a.sSortDescending)):e=u,h.setAttribute("aria-label",e)}}function St(t,e,o,a){var s,r=t.aoColumns[e],c=t.aaSorting,l=r.asSorting,u=function(t,e){var o=t._idx;return o===n&&(o=i.inArray(t[1],l))
if(0!==this.context.length){var n=this.context[0];if("fromVisible"===t||"toData"===t)return f(n,e);if("fromData"===t||"toVisible"===t)return m(n,e)}}),Gt("column()",function(t,e){return Le(this.columns(t,e))});var Ue=function(t,e,o){var a,s,r,c,l,u,h,d=t.aoData,p=De(t,o),f=me(pe(d,p,"anCells")),m=i([].concat.apply([],f)),g=t.aoColumns.length;return Se(e,function(e){var o="function"==typeof e;if(null===e||e===n||o){for(s=[],r=0,c=p.length;r<c;r++)for(a=p[r],l=0;l<g;l++)u={row:a,column:l},o?(h=t.aoData[a],e(u,T(t,a,l),h.anCells[l])&&s.push(u)):s.push(u);return s}return i.isPlainObject(e)?[e]:m.filter(e).map(function(t,e){return a=e.parentNode._DT_RowIndex,{row:a,column:i.inArray(e,d[a].anCells)}}).toArray()})};Gt("cells()",function(t,e,o){if(i.isPlainObject(t)&&(typeof t.row!==n?(o=e,e=null):(o=t,t=null)),i.isPlainObject(e)&&(o=e,e=null),null===e||e===n)return this.iterator("table",function(e){return Ue(e,t,xe(o))});var a,s,r,c,l,u=this.columns(e,o),h=this.rows(t,o),d=this.iterator("table",function(t,e){for(a=[],s=0,r=h[e].length;s<r;s++)for(c=0,l=u[e].length;c<l;c++)a.push({row:h[e][s],column:u[e][c]});return a},1);return i.extend(d.selector,{cols:e,rows:t,opts:o}),d}),Qt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(t,e,i){var o=t.aoData[e].anCells;return o?o[i]:n},1)}),Gt("cells().data()",function(){return this.iterator("cell",function(t,e,n){return T(t,e,n)},1)}),Qt("cells().cache()","cell().cache()",function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",function(e,n,i){return e.aoData[n][t][i]},1)}),Qt("cells().render()","cell().render()",function(t){return this.iterator("cell",function(e,n,i){return T(e,n,i,t)},1)}),Qt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(t,e,n){return{row:e,column:n,columnVisible:m(t,n)}},1)}),Qt("cells().invalidate()","cell().invalidate()",function(t){return this.iterator("cell",function(e,n,i){D(e,n,t,i)})}),Gt("cell()",function(t,e,n){return Le(this.cells(t,e,n))}),Gt("cell().data()",function(t){var e=this.context,i=this[0];return t===n?e.length&&i.length?T(e[0],i[0].row,i[0].column):n:(w(e[0],i[0].row,i[0].column,t),D(e[0],i[0].row,"data",i[0].column),this)}),Gt("order()",function(t,e){var o=this.context;return t===n?0!==o.length?o[0].aaSorting:n:("number"==typeof t?t=[[t,e]]:i.isArray(t[0])||(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),Gt("order.listener()",function(t,e,n){return this.iterator("table",function(i){xt(i,t,e,n)})}),Gt(["columns().order()","column().order()"],function(t){var e=this;return this.iterator("table",function(n,o){var a=[];i.each(e[o],function(e,n){a.push([n,t])}),n.aaSorting=a})}),Gt("search()",function(t,e,o,a){var s=this.context;return t===n?0!==s.length?s[0].oPreviousSearch.sSearch:n:this.iterator("table",function(n){n.oFeatures.bFilter&&J(n,i.extend({},n.oPreviousSearch,{sSearch:t+"",bRegex:null!==e&&e,bSmart:null===o||o,bCaseInsensitive:null===a||a}),1)})}),Qt("columns().search()","column().search()",function(t,e,o,a){return this.iterator("column",function(s,r){var c=s.aoPreSearchCols;return t===n?c[r].sSearch:void(s.oFeatures.bFilter&&(i.extend(c[r],{sSearch:t+"",bRegex:null!==e&&e,bSmart:null===o||o,bCaseInsensitive:null===a||a}),J(s,s.oPreviousSearch,1)))})}),Gt("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Gt("state.clear()",function(){return this.iterator("table",function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})})}),Gt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Gt("state.save()",function(){return this.iterator("table",function(t){kt(t)})}),Yt.versionCheck=Yt.fnVersionCheck=function(t){for(var e,n,i=Yt.version.split("."),o=t.split("."),a=0,s=o.length;a<s;a++)if(e=parseInt(i[a],10)||0,n=parseInt(o[a],10)||0,e!==n)return e>n;return!0},Yt.isDataTable=Yt.fnIsDataTable=function(t){var e=i(t).get(0),n=!1;return i.each(Yt.settings,function(t,i){i.nTable!==e&&i.nScrollHead!==e&&i.nScrollFoot!==e||(n=!0)}),n},Yt.
var a;if("input"===h.a.B(t)&&t.type&&"click"==i.toLowerCase()?(a=t.type,a="checkbox"==a||"radio"==a):a=!1,o&&!a)o(t).trigger(i);else if("function"==typeof n.createEvent){if("function"!=typeof t.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");a=n.createEvent(d[i]||"HTMLEvents"),a.initEvent(i,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(a)}else if(a&&t.click)t.click();else{if("undefined"==typeof t.fireEvent)throw Error("Browser doesn't support triggering events");t.fireEvent("on"+i)}},c:function(t){return h.v(t)?t():t},Sa:function(t){return h.v(t)?t.o():t},ua:function(t,e,n){if(e){var i=/\S+/g,o=t.className.match(i)||[];h.a.r(e.match(i),function(t){h.a.Y(o,t,n)}),t.className=o.join(" ")}},Xa:function(e,n){var i=h.a.c(n);null!==i&&i!==t||(i="");var o=h.e.firstChild(e);!o||3!=o.nodeType||h.e.nextSibling(o)?h.e.U(e,[e.ownerDocument.createTextNode(i)]):o.data=i,h.a.Vb(e)},Cb:function(t,e){if(t.name=e,7>=f)try{t.mergeAttributes(n.createElement("<input name='"+t.name+"'/>"),!1)}catch(i){}},Vb:function(t){9<=f&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},Tb:function(t){if(f){var e=t.style.width;t.style.width=0,t.style.width=e}},ic:function(t,e){t=h.a.c(t),e=h.a.c(e);for(var n=[],i=t;i<=e;i++)n.push(i);return n},R:function(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e},mc:6===f,nc:7===f,oa:f,ob:function(t,e){for(var n=h.a.R(t.getElementsByTagName("input")).concat(h.a.R(t.getElementsByTagName("textarea"))),i="string"==typeof e?function(t){return t.name===e}:function(t){return e.test(t.name)},o=[],a=n.length-1;0<=a;a--)i(n[a])&&o.push(n[a]);return o},fc:function(t){return"string"==typeof t&&(t=h.a.ta(t))?a&&a.parse?a.parse(t):new Function("return "+t)():null},Ya:function(t,e,n){if(!a||!a.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return a.stringify(h.a.c(t),e,n)},gc:function(t,e,i){i=i||{};var o=i.params||{},a=i.includeFields||this.mb,r=t;if("object"==typeof t&&"form"===h.a.B(t))for(var r=t.action,c=a.length-1;0<=c;c--)for(var l=h.a.ob(t,a[c]),u=l.length-1;0<=u;u--)o[l[u].name]=l[u].value;e=h.a.c(e);var d=n.createElement("form");d.style.display="none",d.action=r,d.method="post";for(var p in e)t=n.createElement("input"),t.name=p,t.value=h.a.Ya(h.a.c(e[p])),d.appendChild(t);s(o,function(t,e){var i=n.createElement("input");i.name=t,i.value=e,d.appendChild(i)}),n.body.appendChild(d),i.submitter?i.submitter(d):d.submit(),setTimeout(function(){d.parentNode.removeChild(d)},0)}}}(),h.b("utils",h.a),h.b("utils.arrayForEach",h.a.r),h.b("utils.arrayFirst",h.a.hb),h.b("utils.arrayFilter",h.a.la),h.b("utils.arrayGetDistinctValues",h.a.ib),h.b("utils.arrayIndexOf",h.a.l),h.b("utils.arrayMap",h.a.ya),h.b("utils.arrayPushAll",h.a.$),h.b("utils.arrayRemoveItem",h.a.ma),h.b("utils.extend",h.a.extend),h.b("utils.fieldsIncludedWithJsonPost",h.a.mb),h.b("utils.getFormFields",h.a.ob),h.b("utils.peekObservable",h.a.Sa),h.b("utils.postJson",h.a.gc),h.b("utils.parseJson",h.a.fc),h.b("utils.registerEventHandler",h.a.q),h.b("utils.stringifyJson",h.a.Ya),h.b("utils.range",h.a.ic),h.b("utils.toggleDomNodeCssClass",h.a.ua),h.b("utils.triggerEvent",h.a.ha),h.b("utils.unwrapObservable",h.a.c),h.b("utils.objectForEach",h.a.A),h.b("utils.addOrRemoveItem",h.a.Y),h.b("unwrap",h.a.c),Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=Array.prototype.slice.call(arguments);return t=n.shift(),function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}}),h.a.f=new function(){function e(e,a){var s=e[i];if(!s||"null"===s||!o[s]){if(!a)return t;s=e[i]="ko"+n++,o[s]={}}return o[s]}var n=0,i="__ko__"+(new Date).getTime(),o={};return{get:function(n,i){var o=e(n,!1);return o===t?t:o[i]},set:function(n,i,o){o===t&&e(n,!1)===t||(e(n,!0)[i]=o)},clear:function(t){var e=t[i];return!!e&&(delete o[e],t[i]=null,!0)},L:function(){return n++ +i}}},h.b("utils.domData",h.a.f),h.b("utils.domD
s=!0}),h.a.q(t,"focus",function(){s=!1}),h.a.q(t,"blur",function(){s&&i()})),h.a.r(o,function(e){var n=i;h.a.kc(e,"after")&&(n=function(){setTimeout(i,0)},e=e.substring(5)),h.a.q(t,e,n)})},update:function(t,e,n){var i=h.a.c(e());if(e=h.i.p(t),i!==e)if("select"===h.a.B(t)){var o=n.get("valueAllowUnset");n=function(){h.i.X(t,i,o)},n(),o||i===h.i.p(t)?setTimeout(n,0):h.k.t(h.a.ha,null,[t,"change"])}else h.i.X(t,i)}},h.g.W.value=!0,h.d.visible={update:function(t,e){var n=h.a.c(e()),i="none"!=t.style.display;n&&!i?t.style.display="":!n&&i&&(t.style.display="none")}},function(t){h.d[t]={init:function(e,n,i,o,a){return h.d.event.init.call(this,e,function(){var e={};return e[t]=n(),e},i,o,a)}}}("click"),h.C=function(){},h.C.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},h.C.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},h.C.prototype.makeTemplateSource=function(t,e){if("string"==typeof t){e=e||n;var i=e.getElementById(t);if(!i)throw Error("Cannot find template with ID "+t);return new h.n.j(i)}if(1==t.nodeType||8==t.nodeType)return new h.n.Z(t);throw Error("Unknown template type: "+t)},h.C.prototype.renderTemplate=function(t,e,n,i){return t=this.makeTemplateSource(t,i),this.renderTemplateSource(t,e,n)},h.C.prototype.isTemplateRewritten=function(t,e){return!1===this.allowTemplateRewriting||this.makeTemplateSource(t,e).data("isRewritten")},h.C.prototype.rewriteTemplate=function(t,e,n){t=this.makeTemplateSource(t,n),e=e(t.text()),t.text(e),t.data("isRewritten",!0)},h.b("templateEngine",h.C),h.Za=function(){function t(t,e,n,i){t=h.g.Ra(t);for(var o=h.g.aa,a=0;a<t.length;a++){var s=t[a].key;if(o.hasOwnProperty(s)){var r=o[s];if("function"==typeof r){if(s=r(t[a].value))throw Error(s)}else if(!r)throw Error("This template engine does not support the '"+s+"' binding within its templates")}}return n="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+h.g.qa(t,{valueAccessors:!0})+" } })()},'"+n.toLowerCase()+"')",i.createJavaScriptEvaluatorBlock(n)+e}var e=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Ub:function(t,e,n){e.isTemplateRewritten(t,n)||e.rewriteTemplate(t,function(t){return h.Za.dc(t,e)},n)},dc:function(i,o){return i.replace(e,function(e,n,i,a,s){return t(s,n,i,o)}).replace(n,function(e,n){return t(n,"<!-- ko -->","#comment",o)})},Mb:function(t,e){return h.w.Na(function(n,i){var o=n.nextSibling;o&&o.nodeName.toLowerCase()===e&&h.xa(o,t,i)})}}}(),h.b("__tr_ambtns",h.Za.Mb),function(){h.n={},h.n.j=function(t){this.j=t},h.n.j.prototype.text=function(){var t=h.a.B(this.j),t="script"===t?"text":"textarea"===t?"value":"innerHTML";if(0==arguments.length)return this.j[t];var e=arguments[0];"innerHTML"===t?h.a.Va(this.j,e):this.j[t]=e};var e=h.a.f.L()+"_";h.n.j.prototype.data=function(t){return 1===arguments.length?h.a.f.get(this.j,e+t):void h.a.f.set(this.j,e+t,arguments[1])};var n=h.a.f.L();h.n.Z=function(t){this.j=t},h.n.Z.prototype=new h.n.j,h.n.Z.prototype.text=function(){if(0==arguments.length){var e=h.a.f.get(this.j,n)||{};return e.$a===t&&e.Ba&&(e.$a=e.Ba.innerHTML),e.$a}h.a.f.set(this.j,n,{$a:arguments[0]})},h.n.j.prototype.nodes=function(){return 0==arguments.length?(h.a.f.get(this.j,n)||{}).Ba:void h.a.f.set(this.j,n,{Ba:arguments[0]})},h.b("templateSources",h.n),h.b("templateSources.domElement",h.n.j),h.b("templateSources.anonymousTemplate",h.n.Z)}(),function(){function e(t,e,n){var i;for(e=h.e.nextSibling(e);t&&(i=t)!==e;)t=h.e.nextSibling(i),n(i,t)}function n(t,n){if(t.length){var i=t[0],o=t[t.length-1],a=i.parentNode,s=h.J.instance,r=s.preprocessNode;if(r){if(e(i,o,function(t,e){var n=t.previousSibling,a=r.call(s,t);a&&(t===i&&(i=a[0]||e),t===o&&(o=a[a.length-1]||n))}),t.length=0,!i)return;i===o?t.push(i):(t.push(i,o),h.a.ea(t,a))}e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||h.fb(n,t)}),e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||h.w.Ib(t,[n])}),h.a.ea(t,a)}}func
n||(n={});var c=function(){r=n.leading===!1?0:p.now(),s=null,a=t.apply(i,o),s||(i=o=null)};return function(){var l=p.now();r||n.leading!==!1||(r=l);var u=e-(l-r);return i=this,o=arguments,u<=0||u>e?(clearTimeout(s),s=null,r=l,a=t.apply(i,o),s||(i=o=null)):s||n.trailing===!1||(s=setTimeout(c,u)),a}},p.debounce=function(t,e,n){var i,o,a,s,r,c=function(){var l=p.now()-s;l<e&&l>0?i=setTimeout(c,e-l):(i=null,n||(r=t.apply(a,o),i||(a=o=null)))};return function(){a=this,o=arguments,s=p.now();var l=n&&!i;return i||(i=setTimeout(c,e)),l&&(r=t.apply(a,o),a=o=null),r}},p.wrap=function(t,e){return p.partial(e,t)},p.negate=function(t){return function(){return!t.apply(this,arguments)}},p.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},p.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},p.before=function(t,e){var n;return function(){return--t>0?n=e.apply(this,arguments):e=null,n}},p.once=p.partial(p.before,2),p.keys=function(t){if(!p.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)p.has(t,n)&&e.push(n);return e},p.values=function(t){for(var e=p.keys(t),n=e.length,i=Array(n),o=0;o<n;o++)i[o]=t[e[o]];return i},p.pairs=function(t){for(var e=p.keys(t),n=e.length,i=Array(n),o=0;o<n;o++)i[o]=[e[o],t[e[o]]];return i},p.invert=function(t){for(var e={},n=p.keys(t),i=0,o=n.length;i<o;i++)e[t[n[i]]]=n[i];return e},p.functions=p.methods=function(t){var e=[];for(var n in t)p.isFunction(t[n])&&e.push(n);return e.sort()},p.extend=function(t){if(!p.isObject(t))return t;for(var e,n,i=1,o=arguments.length;i<o;i++){e=arguments[i];for(n in e)l.call(e,n)&&(t[n]=e[n])}return t},p.pick=function(t,e,n){var i,o={};if(null==t)return o;if(p.isFunction(e)){e=f(e,n);for(i in t){var a=t[i];e(a,i,t)&&(o[i]=a)}}else{var c=r.apply([],s.call(arguments,1));t=new Object(t);for(var l=0,u=c.length;l<u;l++)i=c[l],i in t&&(o[i]=t[i])}return o},p.omit=function(t,e,n){if(p.isFunction(e))e=p.negate(e);else{var i=p.map(r.apply([],s.call(arguments,1)),String);e=function(t,e){return!p.contains(i,e)}}return p.pick(t,e,n)},p.defaults=function(t){if(!p.isObject(t))return t;for(var e=1,n=arguments.length;e<n;e++){var i=arguments[e];for(var o in i)void 0===t[o]&&(t[o]=i[o])}return t},p.clone=function(t){return p.isObject(t)?p.isArray(t)?t.slice():p.extend({},t):t},p.tap=function(t,e){return e(t),t};var M=function(t,e,n,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof p&&(t=t._wrapped),e instanceof p&&(e=e._wrapped);var o=c.call(t);if(o!==c.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}if("object"!=typeof t||"object"!=typeof e)return!1;for(var a=n.length;a--;)if(n[a]===t)return i[a]===e;var s=t.constructor,r=e.constructor;if(s!==r&&"constructor"in t&&"constructor"in e&&!(p.isFunction(s)&&s instanceof s&&p.isFunction(r)&&r instanceof r))return!1;n.push(t),i.push(e);var l,u;if("[object Array]"===o){if(l=t.length,u=l===e.length)for(;l--&&(u=M(t[l],e[l],n,i)););}else{var h,d=p.keys(t);if(l=d.length,u=p.keys(e).length===l)for(;l--&&(h=d[l],u=p.has(e,h)&&M(t[h],e[h],n,i)););}return n.pop(),i.pop(),u};p.isEqual=function(t,e){return M(t,e,[],[])},p.isEmpty=function(t){if(null==t)return!0;if(p.isArray(t)||p.isString(t)||p.isArguments(t))return 0===t.length;for(var e in t)if(p.has(t,e))return!1;return!0},p.isElement=function(t){return!(!t||1!==t.nodeType)},p.isArray=u||function(t){return"[object Array]"===c.call(t)},p.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},p.each(["Arguments","Function","String","Number","Date","RegExp"],function(t){p["is"+t]=function(e){return c.call(e)==="[object "+t+"]"}}),p.isArguments(arguments)||(p.isArguments=function(t){return p.has(t,"callee")}),"function"!=typeof/./&&(p.isFunction=function(t){return"function"==typeof t||!1}),p.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},p.isNaN
daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},g={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},getDaysInMonth:function(t,e){return[31,g.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(i,o,a){function s(){var t=this.slice(0,d[u].length),e=d[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;"string"==typeof o&&(o=g.parseFormat(o));var r,c,u,h=/([\-+]\d+)([dmwy])/,d=i.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(i)){for(i=new Date,u=0;u<d.length;u++)switch(r=h.exec(d[u]),c=parseInt(r[1]),r[2]){case"d":i.setUTCDate(i.getUTCDate()+c);break;case"m":i=l.prototype.moveMonth.call(l.prototype,i,c);break;case"w":i.setUTCDate(i.getUTCDate()+7*c);break;case"y":i=l.prototype.moveYear.call(l.prototype,i,c)}return n(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),0,0,0)}d=i&&i.match(this.nonpunctuation)||[],i=new Date;var p,f,b={},v=["yyyy","yy","M","MM","m","mm","d","dd"],M={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};M.M=M.MM=M.mm=M.m,M.dd=M.d,i=n(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0);var y=o.parts.slice();if(d.length!==y.length&&(y=t(y).filter(function(e,n){return t.inArray(n,v)!==-1}).toArray()),d.length===y.length){var A;for(u=0,A=y.length;u<A;u++){if(p=parseInt(d[u],10),r=y[u],isNaN(p))switch(r){case"MM":f=t(m[a].months).filter(s),p=t.inArray(f[0],m[a].months)+1;break;case"M":f=t(m[a].monthsShort).filter(s),p=t.inArray(f[0],m[a].monthsShort)+1}b[r]=p}var _,z;for(u=0;u<v.length;u++)z=v[u],z in b&&!isNaN(b[z])&&(_=new Date(i),M[z](_,b[z]),isNaN(_)||(i=_))}return i},formatDate:function(e,n,i){if(!e)return"";"string"==typeof n&&(n=g.parseFormat(n));var o={d:e.getUTCDate(),D:m[i].daysShort[e.getUTCDay()],DD:m[i].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:m[i].monthsShort[e.getUTCMonth()],MM:m[i].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var a=t.extend([],n.separators),s=0,r=n.parts.length;s<=r;s++)a.length&&e.push(a.shift()),e.push(o[n.parts[s]]);return e.join("")},headTemplate:'<thead><tr><th class="prev">&#171;</th><th colspan="5" class="datepicker-switch"></th><th class="next">&#187;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};g.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+g.headTemplate+"<tbody></tbody>"+g.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=h,this},t.fn.datepicker.version="1.4.0",t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',funct
n.prototype._processingThumbnail=!1,n.prototype._enqueueThumbnail=function(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(t){return function(){return t._processThumbnailQueue()}}(this),0)},n.prototype._processThumbnailQueue=function(){if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(t){return function(){return t._processingThumbnail=!1,t._processThumbnailQueue()}}(this))},n.prototype.removeFile=function(t){if(t.status===n.UPLOADING&&this.cancelUpload(t),this.files=r(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")},n.prototype.removeAllFiles=function(t){var e,i,o,a;for(null==t&&(t=!1),a=this.files.slice(),i=0,o=a.length;i<o;i++)e=a[i],(e.status!==n.UPLOADING||t)&&this.removeFile(e);return null},n.prototype.createThumbnail=function(t,e){var n;return n=new FileReader,n.onload=function(i){return function(){return"image/svg+xml"===t.type?(i.emit("thumbnail",t,n.result),void(null!=e&&e())):i.createThumbnailFromUrl(t,n.result,e)}}(this),n.readAsDataURL(t)},n.prototype.createThumbnailFromUrl=function(t,e,n,i){var o;return o=document.createElement("img"),i&&(o.crossOrigin=i),o.onload=function(e){return function(){var i,s,r,c,l,u,h,d;if(t.width=o.width,t.height=o.height,r=e.options.resize.call(e,t),null==r.trgWidth&&(r.trgWidth=r.optWidth),null==r.trgHeight&&(r.trgHeight=r.optHeight),i=document.createElement("canvas"),s=i.getContext("2d"),i.width=r.trgWidth,i.height=r.trgHeight,a(s,o,null!=(l=r.srcX)?l:0,null!=(u=r.srcY)?u:0,r.srcWidth,r.srcHeight,null!=(h=r.trgX)?h:0,null!=(d=r.trgY)?d:0,r.trgWidth,r.trgHeight),c=i.toDataURL("image/png"),e.emit("thumbnail",t,c),null!=n)return n()}}(this),null!=n&&(o.onerror=n),o.src=e},n.prototype.processQueue=function(){var t,e,n,i;if(e=this.options.parallelUploads,n=this.getUploadingFiles().length,t=n,!(n>=e)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-n));for(;t<e;){if(!i.length)return;this.processFile(i.shift()),t++}}},n.prototype.processFile=function(t){return this.processFiles([t])},n.prototype.processFiles=function(t){var e,i,o;for(i=0,o=t.length;i<o;i++)e=t[i],e.processing=!0,e.status=n.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},n.prototype._getFilesWithXhr=function(t){var e,n;return n=function(){var n,i,o,a;for(o=this.files,a=[],n=0,i=o.length;n<i;n++)e=o[n],e.xhr===t&&a.push(e);return a}.call(this)},n.prototype.cancelUpload=function(t){var e,i,o,a,s,r,c;if(t.status===n.UPLOADING){for(i=this._getFilesWithXhr(t.xhr),o=0,s=i.length;o<s;o++)e=i[o],e.status=n.CANCELED;for(t.xhr.abort(),a=0,r=i.length;a<r;a++)e=i[a],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(c=t.status)!==n.ADDED&&c!==n.QUEUED||(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},o=function(){var t,e;return e=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},n.prototype.uploadFile=function(t){return this.uploadFiles([t])},n.prototype.uploadFiles=function(t){var e,a,s,r,c,l,u,h,d,p,f,m,g,b,v,M,y,A,_,z,T,w,C,O,N,S,x,L,D,k,q,W,E,B;for(_=new XMLHttpRequest,z=0,O=t.length;z<O;z++)e=t[z],e.xhr=_;m=o(this.options.method,t),y=o(this.options.url,t),_.open(m,y,!0),_.withCredentials=!!this.options.withCredentials,v=null,s=function(n){return function(){var i,o,a;for(a=[],i=0,o=t.length;i<o;i++)e=t[i],a.push(n._errorProcessing(t,v||n.options.dictResponseError.replace("{{statusCode}}",_.status),_));return a}}(this),M=function(n){return function(i){var o,a,s,r,c,l,u,h,d;if(null!=i)for(a=100*i.loaded/i.total,s=0,l=t.length;s<l;s++)e=t[s],e.upload={progress:a,total:i.total,bytesSent:i.loaded};else{for(o=!0,a=100,r=0,
},_updateHint:function(){var t,n,i,o,a,r,c;t=this.menu.getTopSelectable(),n=this.menu.getSelectableData(t),i=this.input.getInputValue(),!n||e.isBlankString(i)||this.input.hasOverflow()?this.input.clearHint():(o=s.normalizeQuery(i),a=e.escapeRegExChars(o),r=new RegExp("^(?:"+a+")(.+$)","i"),c=r.exec(n.val),c&&this.input.setHint(i+c[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,n,i;return e=this.input.getQuery(),n=this.menu.getSelectableData(t),i=n&&e!==n.val,!(!i||this.eventBus.before("autocomplete",n.obj))&&(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj),!0)},moveCursor:function(t){var e,n,i,o,a;return e=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(t),i=this.menu.getSelectableData(n),o=i?i.obj:null,a=this._minLengthMet()&&this.menu.update(e),!a&&!this.eventBus.before("cursorchange",o)&&(this.menu.setCursor(n),i?this.input.setInputValue(i.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",o),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),n}();!function(){"use strict";function o(e,n){e.each(function(){var e,i=t(this);(e=i.data(m.typeahead))&&n(e,i)})}function a(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css(h(t)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function r(t,e){t.data(m.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(n){}return t}function h(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function d(t){var n,i;n=t.data(m.www),i=t.parent().filter(n.selectors.wrapper),e.each(t.data(m.attrs),function(n,i){e.isUndefined(n)?t.removeAttr(i):t.attr(i,n)}),t.removeData(m.typeahead).removeData(m.www).removeData(m.attr).removeClass(n.classes.input),i.length&&(t.detach().insertAfter(i),i.remove())}function p(n){var i,o;return i=e.isJQuery(n)||e.isElement(n),o=i?t(n).first():[],o.length?o:null}var f,m,g;f=t.fn.typeahead,m={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},g={initialize:function(o,h){function d(){var n,d,g,b,v,M,y,A,_,z,T;e.each(h,function(t){t.highlight=!!o.highlight}),n=t(this),d=t(f.html.wrapper),g=p(o.hint),b=p(o.menu),v=o.hint!==!1&&!g,M=o.menu!==!1&&!b,v&&(g=a(n,f)),M&&(b=t(f.html.menu).css(f.css.menu)),g&&g.val(""),n=r(n,f),(v||M)&&(d.css(f.css.wrapper),n.css(v?f.css.input:f.css.inputWithNoHint),n.wrap(d).parent().prepend(v?g:null).append(M?b:null)),T=M?l:c,y=new i({el:n}),A=new s({hint:g,input:n},f),_
},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},R.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&("a"===i?n[i]=t[i]:n[i]=S(t[i]));t=n}return R(t,e)},R.equals=function(t,e){return!(!t||!e)&&R(t).toRgbString()==R(e).toRgbString()},R.random=function(){return R.fromRatio({r:X(),g:X(),b:X()})},R.mix=function(t,e,n){n=0===n?0:n||50;var i,o=R(t).toRgb(),a=R(e).toRgb(),s=n/100,r=2*s-1,c=a.a-o.a;i=r*c==-1?r:(r+c)/(1+r*c),i=(i+1)/2;var l=1-i,u={r:a.r*i+o.r*l,g:a.g*i+o.g*l,b:a.b*i+o.b*l,a:a.a*s+o.a*(1-s)};return R(u)},R.readability=function(t,e){var n=R(t),i=R(e),o=n.toRgb(),a=i.toRgb(),s=n.getBrightness(),r=i.getBrightness(),c=Math.max(o.r,a.r)-Math.min(o.r,a.r)+Math.max(o.g,a.g)-Math.min(o.g,a.g)+Math.max(o.b,a.b)-Math.min(o.b,a.b);return{brightness:Math.abs(s-r),color:c}},R.isReadable=function(t,e){var n=R.readability(t,e);return n.brightness>125&&n.color>500},R.mostReadable=function(t,e){for(var n=null,i=0,o=!1,a=0;a<e.length;a++){var s=R.readability(t,e[a]),r=s.brightness>125&&s.color>500,c=3*(s.brightness/125)+s.color/500;(r&&!o||r&&o&&c>i||!r&&!o&&c>i)&&(o=r,i=c,n=R(e[a]))}return n};var F=R.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",
this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Qe(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ze(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function tn(t,e,n){var i,o,a,s;return this.isValid()?(i=Ce(t,this),i.isValid()?(o=6e4*(i.utcOffset()-this.utcOffset()),e=W(e),"year"===e||"month"===e||"quarter"===e?(s=en(this,i),"quarter"===e?s/=3:"year"===e&&(s/=12)):(a=this-i,s="second"===e?a/1e3:"minute"===e?a/6e4:"hour"===e?a/36e5:"day"===e?(a-o)/864e5:"week"===e?(a-o)/6048e5:a),n?s:v(s)):NaN):NaN}function en(t,e){var n,i,o=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(o,"months");return e-a<0?(n=t.clone().add(o-1,"months"),i=(e-a)/(a-n)):(n=t.clone().add(o+1,"months"),i=(e-a)/(n-a)),-(o+i)||0}function nn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function on(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?T(Date.prototype.toISOString)?this.toDate().toISOString():Y(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Y(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function an(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=Y(this,e);return this.localeData().postformat(n)}function sn(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Pe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function rn(t){return this.from(be(),t)}function cn(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Pe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ln(t){return this.to(be(),t)}function un(t){var e;return void 0===t?this._locale._abbr:(e=te(t),null!=e&&(this._locale=e),this)}function hn(){return this._locale}function dn(t){switch(t=W(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function pn(t){return t=W(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function fn(){return this._d.valueOf()-6e4*(this._offset||0)}function mn(){return Math.floor(this.valueOf()/1e3)}function gn(){return new Date(this.valueOf())}function bn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function vn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Mn(){return this.isValid()?this.toISOString():null}function yn(){return d(this)}function An(){return c({},h(this))}function _n(){return h(this).overflow}function zn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Tn(t,e){U(0,[t,t.length],0,e)}function wn(t){return Sn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Cn(t){return Sn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function On(){return _t(this.year(),1,4)}function Nn(){var t=this.localeData()._week;return _t(this.year(),t.dow,t.doy)}function Sn(t,e,n,i,o){var a;return null==t?At(this,i,o).year:(a=_t(t,i,o),e>a&&(e=a),xn.call(this,t,e,n,i,o))}function xn(t,e,n,i,o){var a=yt(t,e,n,i,o),s=vt(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ln(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Dn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function kn(t,e){e[io]=M(1e3*("0."+t))}function qn(){return this._isUTC?"UTC":""}function Wn(){return this._isUTC?"Coordinated Universal Time":""}function En(t){return be(1e3*t)}function Bn(){return be.apply(null,arguments).parseZone()}function In(t){return t}function Pn(t,e,n,i
2017-09-25 11:22:19 +02:00
links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Addis_Ababa|Africa/Asmara","Africa/Addis_Ababa|Africa/Asmera","Africa/Addis_Ababa|Africa/Dar_es_Salaam","Africa/Addis_Ababa|Africa/Djibouti","Africa/Addis_Ababa|Africa/Kampala","Africa/Addis_Ababa|Africa/Mogadishu","Africa/Addis_Ababa|Africa/Nairobi","Africa/Addis_Ababa|Indian/Antananarivo","Africa/Addis_Ababa|Indian/Comoro","Africa/Addis_Ababa|Indian/Mayotte","Africa/Bangui|Africa/Brazzaville","Africa/Bangui|Africa/Douala","Africa/Bangui|Africa/Kinshasa","Africa/Bangui|Africa/Lagos","Africa/Bangui|Africa/Libreville","Africa/Bangui|Africa/Luanda","Africa/Bangui|Africa/Malabo","Africa/Bangui|Africa/Niamey","Africa/Bangui|Africa/Porto-Novo","Africa/Blantyre|Africa/Bujumbura","Africa/Blantyre|Africa/Gaborone","Africa/Blantyre|Africa/Harare","Africa/Blantyre|Africa/Kigali","Africa/Blantyre|Africa/Lubumbashi","Africa/Blantyre|Africa/Lusaka","Africa/Blantyre|Africa/Maputo","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Juba|Africa/Khartoum","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Anguilla|America/Antigua","America/Anguilla|America/Dominica","America/Anguilla|America/Grenada","America/Anguilla|America/Guadeloupe","America/Anguilla|America/Marigot","America/Anguilla|America/Montserrat","America/Anguilla|America/Port_of_Spain","America/Anguilla|America/St_Barthelemy","America/Anguilla|America/St_Kitts","America/Anguilla|America/St_Lucia","America/Anguilla|America/St_Thomas","America/Anguilla|America/St_Vincent","America/Anguilla|America/Tortola","America/Anguilla|America/Virgin","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Aruba|America/Curacao","America/Aruba|America/Kralendijk","America/Aruba|America/Lower_Princes","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Ensenada|America/Tijuana","America/Ensenada|Mexico/BajaNorte","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/Montreal|America/Toronto","America/Montreal|Canada/Eastern","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Phoenix|US/Arizona","America/Porto_Acre|America/Rio_Branco","America/Porto_Acre|Brazil/Acre","America/Regina|Canada/East-Saskatchewan","America/Regina|Canada/Saskatchewan","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Antarctica/McMurdo|Antarctica/South_Pole","Antarctica/McMurdo|NZ","Antarctica/McMurdo|Pacific/Auckland","Arctic/Longyearbyen|Atlantic/Jan_Mayen","Arctic/Longyearbyen|Europe/Oslo","Asia/Aden|Asia/Kuwait","Asia/Aden|Asia/Riyadh","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bahrain|Asia/Qatar","Asia/Bangkok|Asia/Phnom_Penh","Asia/B
r.style.backgroundColor=t.cancelButtonColor),s.className=l.confirm,L(s,t.confirmButtonClass),r.className=l.cancel,L(r,t.cancelButtonClass),t.buttonsStyling?(L(s,l.styled),L(r,l.styled)):(D(s,l.styled),D(r,l.styled),s.style.backgroundColor=s.style.borderLeftColor=s.style.borderRightColor="",r.style.backgroundColor=r.style.borderLeftColor=r.style.borderRightColor=""),t.animation===!0?D(e,l.noanimation):L(e,l.noanimation)},Y=function(e,i){var o=y();e?(L(o,l.show),L(s,l.fade),D(o,l.hide)):D(o,l.fade),q(o),s.style.overflowY="hidden",R&&!S(o,l.noanimation)?o.addEventListener(R,function a(){o.removeEventListener(R,a),s.style.overflowY="auto"}):s.style.overflowY="auto",L(s,l["in"]),L(document.body,l["in"]),t(),n(),b.previousActiveElement=document.activeElement,null!==i&&"function"==typeof i&&i.call(this,o)};return a.isVisible=function(){var t=y();return B(t)},a.queue=function(t){$=t;var e=y(),n=function(){$=[],e.removeAttribute("data-queue-step")},i=[];return new Promise(function(t,o){!function s(r,c){r<$.length?(e.setAttribute("data-queue-step",r),a($[r]).then(function(t){i.push(t),s(r+1,c)},function(t){n(),o(t)})):(n(),t(i))}(0)})},a.getQueueStep=function(){return y().getAttribute("data-queue-step")},a.insertQueueStep=function(t,e){return e&&e<$.length?$.splice(e,0,t):$.push(t)},a.deleteQueueStep=function(t){"undefined"!=typeof $[t]&&$.splice(t,1)},a.close=a.closeModal=function(t){var n=y();D(n,l.show),L(n,l.hide);var o=n.querySelector("."+l.icon+"."+u.success);D(o,"animate"),D(o.querySelector(".tip"),"animate-success-tip"),D(o.querySelector(".long"),"animate-success-long");var a=n.querySelector("."+l.icon+"."+u.error);D(a,"animate-error-icon"),D(a.querySelector(".x-mark"),"animate-x-mark");var r=n.querySelector("."+l.icon+"."+u.warning);D(r,"pulse-warning"),F();var c=function(){W(n),n.style.minHeight="",D(s,l["in"]),D(document.body,l["in"]),e(),i()};R&&!S(n,l.noanimation)?n.addEventListener(R,function h(){n.removeEventListener(R,h),S(n,l.hide)&&c()}):c(),null!==t&&"function"==typeof t&&t.call(this,n)},a.clickConfirm=function(){w().click()},a.clickCancel=function(){C().click()},a.setDefaults=function(t){if(!t)throw new Error("userParams is required");if("object"!=typeof t)throw new Error("userParams has to be a object");m(U,t)},a.resetDefaults=function(){U=m({},h)},a.noop=function(){},a.version="5.3.8","function"==typeof Promise&&(Promise.prototype.done=Promise.prototype.done||function(){return this["catch"](function(){})}),a}),window.Sweetalert2&&(window.sweetAlert=window.swal=window.Sweetalert2),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function e(t,e){return Math.round(t/e)*e}function n(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,i=n.documentElement,o=h();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),{top:e.top+o.y-i.clientTop,left:e.left+o.x-i.clientLeft}}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){c(t,e),setTimeout(function(){l(t,e)},n)}function a(t){return Math.max(Math.min(t,100),0)}function s(t){return Array.isArray(t)?t:[t]}function r(t){var e=t.split(".");return e.length>1?e[1].length:0}function c(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function l(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function u(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function h(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||""),n=t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,i=t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop;return{x:n,y:i}}function d(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerU
this.options.maxPatternLength=e.maxPatternLength||a.defaultOptions.maxPatternLength,this.pattern=e.caseSensitive?t:t.toLowerCase(),this.patternLen=t.length,this.patternLen<=this.options.maxPatternLength&&(this.matchmask=1<<this.patternLen-1,this.patternAlphabet=this._calculatePatternAlphabet())}var s=/ +/g,r={id:null,caseSensitive:!1,include:[],shouldSort:!0,searchFn:a,sortFn:function(t,e){return t.score-e.score},getFn:i,keys:[],verbose:!1,tokenize:!1};n.VERSION="2.0.1",n.prototype.set=function(t){return this.list=t,t},n.prototype.search=function(t){this.options.verbose&&e("=====================\n","Search term:",t),this.pattern=t,this.results=[],this.resultMap={},this._prepareSearchers(),this._startSearch(),this._computeScore(),this._sort();var n=this._format();return n},n.prototype._prepareSearchers=function(){var t=this.options,e=this.pattern,n=t.searchFn,i=e.split(s),o=0,a=i.length;if(this.options.tokenize)for(this.tokenSearchers=[];o<a;o++)this.tokenSearchers.push(new n(i[o],t));this.fullSeacher=new n(e,t)},n.prototype._startSearch=function(){var t,e,n=this.options,i=n.getFn,o=this.list,a=o.length,s=this.options.keys,r=s.length,c=null;if("string"==typeof o[0])for(t=0;t<a;t++)this._analyze(o[t],t,t);else for(t=0;t<a;t++)for(c=o[t],e=0;e<r;e++)this._analyze(i(c,s[e],[]),c,t)},n.prototype._analyze=function(t,n,i){var a,r,c,l,u,h,d,p,f,m,g,b,v,M,y,A=this.options,_=!1;if(void 0!==t&&null!==t)if(r=[],"string"==typeof t){if(a=t.split(s),A.verbose&&e("---------\n","Record:",a),this.options.tokenize){for(c=this.tokenSearchers,l=c.length,M=0;M<this.tokenSearchers.length;M++){for(m=this.tokenSearchers[M],g=[],y=0;y<a.length;y++)b=a[y],v=m.search(b),v.isMatch?(_=!0,g.push(v.score),r.push(v.score)):(g.push(1),r.push(1));A.verbose&&e('Score for "'+m.pattern+'":',g)}for(h=r[0],p=r.length,M=1;M<p;M++)h+=r[M];h/=p,A.verbose&&e("Individual word score average:",h)}f=this.fullSeacher.search(t),A.verbose&&e("Full text score:",f.score),d=f.score,void 0!==h&&(d=(d+h)/2),A.verbose&&e("Average",d),(_||f.isMatch)&&(u=this.resultMap[i],u?u.scores.push(d):(this.resultMap[i]={item:n,scores:[d]},this.results.push(this.resultMap[i])))}else if(o(t))for(M=0;M<t.length;M++)this._analyze(t[M],n,i)},n.prototype._computeScore=function(){var t,e,n,i,o,a=this.results;for(t=0;t<a.length;t++){for(n=0,i=a[t].scores,o=i.length,e=0;e<o;e++)n+=i[e];a[t].score=n/o}},n.prototype._sort=function(){var t=this.options;t.shouldSort&&(t.verbose&&e("Sorting...."),this.results.sort(t.sortFn))},n.prototype._format=function(){var t,n,i,o,a,s=this.options,r=s.getFn,c=[],l=this.results;for(s.verbose&&e("------------\n","Output:\n",l),o=s.id?function(t){l[t].item=r(l[t].item,s.id,[])[0]}:function(){},a=function(t){var e,n,i;if(s.include.length>0)for(e={item:l[t].item},i=0;i<s.include.length;i++)n=s.include[i],e[n]=l[t][n];else e=l[t].item;return e},n=0,i=l.length;n<i;n++)o(n),t=a(n),c.push(t);return c},a.defaultOptions={location:0,distance:100,threshold:.6,maxPatternLength:32},a.prototype._calculatePatternAlphabet=function(){var t={},e=0;for(e=0;e<this.patternLen;e++)t[this.pattern.charAt(e)]=0;for(e=0;e<this.patternLen;e++)t[this.pattern.charAt(e)]|=1<<this.pattern.length-e-1;return t},a.prototype._bitapScore=function(t,e){var n=t/this.patternLen,i=Math.abs(this.options.location-e);return this.options.distance?n+i/this.options.distance:i?1:n},a.prototype.search=function(t){var e,n,i,o,a,r,c,l,u,h,d,p,f,m,g,b,v,M,y=this.options;if(t=y.caseSensitive?t:t.toLowerCase(),this.pattern===t)return{isMatch:!0,score:0};if(this.patternLen>y.maxPatternLength)return v=t.match(new RegExp(this.pattern.replace(s,"|"))),M=!!v,{isMatch:M,score:M?.5:1};for(o=y.location,i=t.length,a=y.threshold,r=t.indexOf(this.pattern,o),r!=-1&&(a=Math.min(this._bitapScore(0,r),a),r=t.lastIndexOf(this.pattern,o+this.patternLen),r!=-1&&(a=Math.min(this._bitapScore(0,r),a))),r=-1,g=1,b=[],u=this.patternLen+i,e=0;e<this.patternLen;e++){for(c=0,l=u;c<l;)this._bitapScore(e,o+l)<=a?c=l:u=l,l=Math.floor((u-c)/2+c);for(u=l,h=Math.max(1,o-l+1),d=Math.min(o+l,i)+this.patternLen,p=Array(d+2),p[d+1]=(1<<e)-1,n=d;n>=h;n--
c=a.custom_value2);else if("account.company_name"==e)c=o.name;else if("account.id_number"==e)c=o.id_number,invoiceLabels.id_number_orig&&(r=invoiceLabels.id_number);else if("account.vat_number"==e)c=o.vat_number,invoiceLabels.vat_number_orig&&(r=invoiceLabels.vat_number);else if("account.website"==e)c=o.website;else if("account.email"==e)c=o.work_email;else if("account.phone"==e)c=o.work_phone;else if("account.address1"==e)c=o.address1;else if("account.address2"==e)c=o.address2;else if("account.city_state_postal"==e){var l="";if(o.city||o.state||o.postal_code){var u=o.country&&o.country.swap_postal_code;l=formatAddress(o.city,o.state,o.postal_code,u)}c=l}else if("account.postal_city_state"==e){var h="";(o.city||o.state||o.postal_code)&&(h=formatAddress(o.city,o.state,o.postal_code,!0)),c=h}else"account.country"==e?c=!!o.country&&o.country.name:"account.custom_value1"==e?t.account.custom_label1&&t.account.custom_value1&&(r=t.account.custom_label1,c=t.account.custom_value1):"account.custom_value2"==e?t.account.custom_label2&&t.account.custom_value2&&(r=t.account.custom_label2,c=t.account.custom_value2):"invoice.invoice_number"==e?t.is_statement||(r=t.is_quote?invoiceLabels.quote_number:t.balance_amount<0?invoiceLabels.credit_number:invoiceLabels.invoice_number,c=t.invoice_number):"invoice.po_number"==e?c=t.po_number:"invoice.invoice_date"==e?(r=t.is_statement?invoiceLabels.statement_date:t.is_quote?invoiceLabels.quote_date:t.balance_amount<0?invoiceLabels.credit_date:invoiceLabels.invoice_date,c=t.invoice_date):"invoice.due_date"==e?(r=t.is_quote?invoiceLabels.valid_until:invoiceLabels.due_date,c=!t.is_recurring&&(t.partial_due_date?t.partial_due_date:t.due_date)):"invoice.custom_text_value1"==e?t.custom_text_value1&&o.custom_invoice_text_label1&&(r=t.account.custom_invoice_text_label1,c=t.is_recurring?processVariables(t.custom_text_value1):t.custom_text_value1):"invoice.custom_text_value2"==e?t.custom_text_value2&&o.custom_invoice_text_label2&&(r=t.account.custom_invoice_text_label2,c=t.is_recurring?processVariables(t.custom_text_value2):t.custom_text_value2):"invoice.balance_due"==e?(r=t.is_quote||t.balance_amount<0?invoiceLabels.total:invoiceLabels.balance_due,c=formatMoneyInvoice(t.total_amount,t)):"invoice.partial_due"==e?NINJA.parseFloat(t.partial)&&(r=invoiceLabels.partial_due,c=formatMoneyInvoice(t.balance_amount,t)):"invoice.invoice_total"==e?t.is_statement||t.is_quote||t.balance_amount<0||(c=formatMoneyInvoice(t.amount,t)):"invoice.outstanding"==e?t.is_statement||t.is_quote||(c=formatMoneyInvoice(i.balance,t)):".blank"==e&&(c=" ");if(c){var d=!1,p=e.split(".");if(p.length>=2)var d=p[1];var f=snakeToCamel("company_name"==d?"account_name":d);return n?(r||"Blank"==r||invoiceLabels[d]&&(r=invoiceLabels[d]),[{text:r,style:[f+"Label"]},{text:c,style:[f]}]):(r&&(c=r+": "+c),{text:c,style:[f]})}return!1},NINJA.clientDetails=function(t){var e=t.account;if(t.features.invoice_settings&&e.invoice_fields)var n=JSON.parse(e.invoice_fields).client_fields;else var n=["client.client_name","client.id_number","client.vat_number","client.address1","client.address2","client.city_state_postal","client.country","client.email","client.custom_value1","client.custom_value2","contact.custom_value1","contact.custom_value2"];for(var i=[],o=0;o<n.length;o++){var a=n[o],s=NINJA.renderField(t,a);s&&i.push(s)}return NINJA.prepareDataList(i,"clientDetails")},NINJA.getPrimaryColor=function(t){return NINJA.primaryColor?NINJA.primaryColor:t},NINJA.getSecondaryColor=function(t){return NINJA.primaryColor?NINJA.secondaryColor:t},NINJA.prepareDataList=function(t,e){var n=[];t.length||t.push({text:" "});for(var i=0;i<t.length;i++){var o=NINJA.processItem(t[i],e);(o.text||o.stack)&&n.push(o)}return n},NINJA.prepareDataTable=function(t,e){for(var n=[],i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var r=NINJA.processItem(o[s],e);(r.text||r.stack)&&a.push(r)}a.length&&n.push(a)}return n},NINJA.prepareDataPairs=function(t,e){var n=[];t.length||t.push([{text:" "},{text:" "}]);for(var i=0;i<t.length;i++){for(var o=t[i],a=!1,s=0;s<o.length;s++){va
2016-08-15 00:03:47 +02:00
//# sourceMappingURL=built.js.map