2 lines
462 KiB
JavaScript
2 lines
462 KiB
JavaScript
function _typeof2(t){return(_typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}if(function(t,e){"object"===("undefined"==typeof module?"undefined":_typeof2(module))&&"object"===_typeof2(module.exports)?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){var i=[],n=i.slice,o=i.concat,s=i.push,r=i.indexOf,a={},l=a.toString,c=a.hasOwnProperty,u={},h="1.11.3",d=function t(e,i){return new t.fn.init(e,i)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,f=/^-ms-/,g=/-([\da-z])/gi,m=function(t,e){return e.toUpperCase()};function v(t){var e="length"in t&&t.length,i=d.type(t);return"function"!==i&&!d.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}d.fn=d.prototype={jquery:h,constructor:d,selector:"",length:0,toArray:function(){return n.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:n.call(this)},pushStack:function(t){var e=d.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return d.each(this,t,e)},map:function(t){return this.pushStack(d.map(this,(function(e,i){return t.call(e,i,e)})))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:s,sort:i.sort,splice:i.splice},d.extend=d.fn.extend=function(){var t,e,i,n,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"===_typeof2(r)||d.isFunction(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(o=arguments[a]))for(n in o)t=r[n],r!==(i=o[n])&&(c&&i&&(d.isPlainObject(i)||(e=d.isArray(i)))?(e?(e=!1,s=t&&d.isArray(t)?t:[]):s=t&&d.isPlainObject(t)?t:{},r[n]=d.extend(c,s,i)):void 0!==i&&(r[n]=i));return r},d.extend({expando:"jQuery"+(h+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===d.type(t)},isArray:Array.isArray||function(t){return"array"===d.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!d.isArray(t)&&t-parseFloat(t)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==d.type(t)||t.nodeType||d.isWindow(t))return!1;try{if(t.constructor&&!c.call(t,"constructor")&&!c.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(u.ownLast)for(e in t)return c.call(t,e);for(e in t);return void 0===e||c.call(t,e)},type:function(t){return null==t?t+"":"object"===_typeof2(t)||"function"==typeof t?a[l.call(t)]||"object":_typeof2(t)},globalEval:function(e){e&&d.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(f,"ms-").replace(g,m)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var n=0,o=t.length,s=v(t);if(i){if(s)for(;n<o&&!1!==e.apply(t[n],i);n++);else for(n in t)if(!1===e.apply(t[n],i))break}else if(s)for(;n<o&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":(t+"").replace(p,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(v(Object(t))?d.merge(i,"string"==typeof t?[t]:t):s.call(i,t)),i},inArray:function(t,e,i){var n;if(e){if(r)return r.call(e,t,i);for(n=e.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,e){for(var i=+e.length,n=0,o=t.length;n<i;)t[o++]=e[n++];if(i!=i)for(;void 0!==e[n];)t[o++]=e[n++];return t.length=o,t},grep:function(t,e,i){for(var n=[],o=0,s=t.length,r=!i;o<s;o++)!e(t[o],o)!==r&&n.push(t[o]);return n},map:function(t,e,i){var n,s=0,r=t.length,a=[];if(v(t))for(;s<r;s++)null!=(n=e(t[s],s,i))&&a.push(n);else for(s in t)null!=(n=e(t[s],s,i))&&a.push(n);return o.apply([],a)},guid:1,proxy:function(t,e){var i,o,s;if("string"==typeof e&&(s=t[e],e=t,t=s),d.isFunction(t))return i=n.call(arguments,2),o=function(){return t.apply(e||this,i.concat(n.call(arguments)))},o.guid=t.guid=t.guid||d.guid++,o},now:function(){return+new Date},support:u}),d.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(t,e){a["[object "+e+"]"]=e.toLowerCase()}));var y=function(t){var e,i,n,o,s,r,a,l,c,u,h,d,p,f,g,m,v,y,b,w="sizzle"+1*new Date,x=t.document,_=0,C=0,$=rt(),T=rt(),k=rt(),S=function(t,e){return t===e&&(h=!0),0},E=1<<31,D={}.hasOwnProperty,A=[],P=A.pop,I=A.push,N=A.push,O=A.slice,z=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R=M.replace("w","w#"),H="\\[[\\x20\\t\\r\\n\\f]*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+L+"*\\]",W=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",F=new RegExp(L+"+","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),B=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),V=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),Y=new RegExp(W),X=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=/'|\\/g,it=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),nt=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},ot=function(){d()};try{N.apply(A=O.call(x.childNodes),x.childNodes),A[x.childNodes.length].nodeType}catch(t){N={apply:A.length?function(t,e){I.apply(t,O.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function st(t,e,n,o){var s,a,c,u,h,f,v,y,_,C;if((e?e.ownerDocument||e:x)!==p&&d(e),n=n||[],u=(e=e||p).nodeType,"string"!=typeof t||!t||1!==u&&9!==u&&11!==u)return n;if(!o&&g){if(11!==u&&(s=J.exec(t)))if(c=s[1]){if(9===u){if(!(a=e.getElementById(c))||!a.parentNode)return n;if(a.id===c)return n.push(a),n}else if(e.ownerDocument&&(a=e.ownerDocument.getElementById(c))&&b(e,a)&&a.id===c)return n.push(a),n}else{if(s[2])return N.apply(n,e.getElementsByTagName(t)),n;if((c=s[3])&&i.getElementsByClassName)return N.apply(n,e.getElementsByClassName(c)),n}if(i.qsa&&(!m||!m.test(t))){if(y=v=w,_=e,C=1!==u&&t,1===u&&"object"!==e.nodeName.toLowerCase()){for(f=r(t),(v=e.getAttribute("id"))?y=v.replace(et,"\\$&"):e.setAttribute("id",y),y="[id='"+y+"'] ",h=f.length;h--;)f[h]=y+mt(f[h]);_=tt.test(t)&&ft(e.parentNode)||e,C=f.join(",")}if(C)try{return N.apply(n,_.querySelectorAll(C)),n}catch(t){}finally{v||e.removeAttribute("id")}}}return l(t.replace(q,"$1"),e,n,o)}function rt(){var t=[];return function e(i,o){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=o}}function at(t){return t[w]=!0,t}function lt(t){var e=p.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var i=t.split("|"),o=t.length;o--;)n.attrHandle[i[o]]=e}function ut(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||E)-(~t.sourceIndex||E);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function pt(t){return at((function(e){return e=+e,at((function(i,n){for(var o,s=t([],i.length,e),r=s.length;r--;)i[o=s[r]]&&(i[o]=!(n[o]=i[o]))}))}))}function ft(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=st.support={},s=st.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=st.setDocument=function(t){var e,o,r=t?t.ownerDocument||t:x;return r!==p&&9===r.nodeType&&r.documentElement?(p=r,f=r.documentElement,(o=r.defaultView)&&o!==o.top&&(o.addEventListener?o.addEventListener("unload",ot,!1):o.attachEvent&&o.attachEvent("onunload",ot)),g=!s(r),i.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),i.getElementsByTagName=lt((function(t){return t.appendChild(r.createComment("")),!t.getElementsByTagName("*").length})),i.getElementsByClassName=Z.test(r.getElementsByClassName),i.getById=lt((function(t){return f.appendChild(t).id=w,!r.getElementsByName||!r.getElementsByName(w).length})),i.getById?(n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},n.filter.ID=function(t){var e=t.replace(it,nt);return function(t){return t.getAttribute("id")===e}}):(delete n.find.ID,n.filter.ID=function(t){var e=t.replace(it,nt);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;i=s[o++];)1===i.nodeType&&n.push(i);return n}return s},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(g)return e.getElementsByClassName(t)},v=[],m=[],(i.qsa=Z.test(r.querySelectorAll))&&(lt((function(t){f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+j+")"),t.querySelectorAll("[id~="+w+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")})),lt((function(t){var e=r.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),t.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")}))),(i.matchesSelector=Z.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<((function(t){i.disconnectedMatch=y.call(t,"div"),y.call(t,"[s!='']:x"),v.push("!=",W)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Z.test(f.compareDocumentPosition),b=e||Z.test(f.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return h=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t===r||t.ownerDocument===x&&b(x,t)?-1:e===r||e.ownerDocument===x&&b(x,e)?1:u?z(u,t)-z(u,e):0:4&n?-1:1)}:function(t,e){if(t===e)return h=!0,0;var i,n=0,o=t.parentNode,s=e.parentNode,a=[t],l=[e];if(!o||!s)return t===r?-1:e===r?1:o?-1:s?1:u?z(u,t)-z(u,e):0;if(o===s)return ut(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?ut(a[n],l[n]):a[n]===x?-1:l[n]===x?1:0},r):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(V,"='$1']"),i.matchesSelector&&g&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var o=n.attrHandle[e.toLowerCase()],s=o&&D.call(n.attrHandle,e.toLowerCase())?o(t,e,!g):void 0;return void 0!==s?s:i.attributes||!g?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,n=[],o=0,s=0;if(h=!i.detectDuplicates,u=!i.sortStable&&t.slice(0),t.sort(S),h){for(;e=t[s++];)e===t[s]&&(o=n.push(s));for(;o--;)t.splice(n[o],1)}return u=null,t},o=st.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=o(e);return i},(n=st.selectors={cacheLength:50,createPseudo:at,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(it,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(it,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&Y.test(i)&&(e=r(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(it,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=$[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+L+"|$)"))&&$(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var o=st.attr(n,t);return null==o?"!="===e:!e||(o+="","="===e?o===i:"!="===e?o!==i:"^="===e?i&&0===o.indexOf(i):"*="===e?i&&o.indexOf(i)>-1:"$="===e?i&&o.slice(-i.length)===i:"~="===e?(" "+o.replace(F," ")+" ").indexOf(i)>-1:"|="===e&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var c,u,h,d,p,f,g=s!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(s){for(;g;){for(h=e;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(p=(c=(u=m[w]||(m[w]={}))[t]||[])[0]===_&&c[1],d=c[0]===_&&c[2],h=p&&m.childNodes[p];h=++p&&h&&h[g]||(d=p=0)||f.pop();)if(1===h.nodeType&&++d&&h===e){u[t]=[_,p,d];break}}else if(y&&(c=(e[w]||(e[w]={}))[t])&&c[0]===_)d=c[1];else for(;(h=++p&&h&&h[g]||(d=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++d||(y&&((h[w]||(h[w]={}))[t]=[_,d]),h!==e)););return(d-=o)===n||d%n==0&&d/n>=0}}},PSEUDO:function(t,e){var i,o=n.pseudos[t]||n.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?at((function(t,i){for(var n,s=o(t,e),r=s.length;r--;)t[n=z(t,s[r])]=!(i[n]=s[r])})):function(t){return o(t,0,i)}):o}},pseudos:{not:at((function(t){var e=[],i=[],n=a(t.replace(q,"$1"));return n[w]?at((function(t,e,i,o){for(var s,r=n(t,null,o,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))})):function(t,o,s){return e[0]=t,n(e,null,s,i),e[0]=null,!i.pop()}})),has:at((function(t){return function(e){return st(t,e).length>0}})),contains:at((function(t){return t=t.replace(it,nt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}})),lang:at((function(t){return X.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(it,nt).toLowerCase(),function(e){var i;do{if(i=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return Q.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:pt((function(){return[0]})),last:pt((function(t,e){return[e-1]})),eq:pt((function(t,e,i){return[i<0?i+e:i]})),even:pt((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:pt((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:pt((function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t})),gt:pt((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=dt(e);function gt(){}function mt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function vt(t,e,i){var n=e.dir,o=i&&"parentNode"===n,s=C++;return e.first?function(e,i,s){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,s)}:function(e,i,r){var a,l,c=[_,s];if(r){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||o){if((a=(l=e[w]||(e[w]={}))[n])&&a[0]===_&&a[1]===s)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,r))return!0}}}function yt(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function bt(t,e,i,n,o){for(var s,r=[],a=0,l=t.length,c=null!=e;a<l;a++)(s=t[a])&&(i&&!i(s,n,o)||(r.push(s),c&&e.push(a)));return r}function wt(t,e,i,n,o,s){return n&&!n[w]&&(n=wt(n)),o&&!o[w]&&(o=wt(o,s)),at((function(s,r,a,l){var c,u,h,d=[],p=[],f=r.length,g=s||function(t,e,i){for(var n=0,o=e.length;n<o;n++)st(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!s&&e?g:bt(g,d,t,a,l),v=i?o||(s?t:f||n)?[]:r:m;if(i&&i(m,v,a,l),n)for(c=bt(v,p),n(c,[],a,l),u=c.length;u--;)(h=c[u])&&(v[p[u]]=!(m[p[u]]=h));if(s){if(o||t){if(o){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(m[u]=h);o(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=o?z(s,h):d[u])>-1&&(s[c]=!(r[c]=h))}}else v=bt(v===r?v.splice(f,v.length):v),o?o(null,r,v,l):N.apply(r,v)}))}function xt(t){for(var e,i,o,s=t.length,r=n.relative[t[0].type],a=r||n.relative[" "],l=r?1:0,u=vt((function(t){return t===e}),a,!0),h=vt((function(t){return z(e,t)>-1}),a,!0),d=[function(t,i,n){var o=!r&&(n||i!==c)||((e=i).nodeType?u(t,i,n):h(t,i,n));return e=null,o}];l<s;l++)if(i=n.relative[t[l].type])d=[vt(yt(d),i)];else{if((i=n.filter[t[l].type].apply(null,t[l].matches))[w]){for(o=++l;o<s&&!n.relative[t[o].type];o++);return wt(l>1&&yt(d),l>1&&mt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(q,"$1"),i,l<o&&xt(t.slice(l,o)),o<s&&xt(t=t.slice(o)),o<s&&mt(t))}d.push(i)}return yt(d)}return gt.prototype=n.filters=n.pseudos,n.setFilters=new gt,r=st.tokenize=function(t,e){var i,o,s,r,a,l,c,u=T[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=n.preFilter;a;){for(r in i&&!(o=B.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),i=!1,(o=U.exec(a))&&(i=o.shift(),s.push({value:i,type:o[0].replace(q," ")}),a=a.slice(i.length)),n.filter)!(o=G[r].exec(a))||c[r]&&!(o=c[r](o))||(i=o.shift(),s.push({value:i,type:r,matches:o}),a=a.slice(i.length));if(!i)break}return e?a.length:a?st.error(t):T(t,l).slice(0)},a=st.compile=function(t,e){var i,o=[],s=[],a=k[t+" "];if(!a){for(e||(e=r(t)),i=e.length;i--;)(a=xt(e[i]))[w]?o.push(a):s.push(a);(a=k(t,function(t,e){var i=e.length>0,o=t.length>0,s=function(s,r,a,l,u){var h,d,f,g=0,m="0",v=s&&[],y=[],b=c,w=s||o&&n.find.TAG("*",u),x=_+=null==b?1:Math.random()||.1,C=w.length;for(u&&(c=r!==p&&r);m!==C&&null!=(h=w[m]);m++){if(o&&h){for(d=0;f=t[d++];)if(f(h,r,a)){l.push(h);break}u&&(_=x)}i&&((h=!f&&h)&&g--,s&&v.push(h))}if(g+=m,i&&m!==g){for(d=0;f=e[d++];)f(v,y,r,a);if(s){if(g>0)for(;m--;)v[m]||y[m]||(y[m]=P.call(l));y=bt(y)}N.apply(l,y),u&&!s&&y.length>0&&g+e.length>1&&st.uniqueSort(l)}return u&&(_=x,c=b),v};return i?at(s):s}(s,o))).selector=t}return a},l=st.select=function(t,e,o,s){var l,c,u,h,d,p="function"==typeof t&&t,f=!s&&r(t=p.selector||t);if(o=o||[],1===f.length){if((c=f[0]=f[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&i.getById&&9===e.nodeType&&g&&n.relative[c[1].type]){if(!(e=(n.find.ID(u.matches[0].replace(it,nt),e)||[])[0]))return o;p&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(l=G.needsContext.test(t)?0:c.length;l--&&(u=c[l],!n.relative[h=u.type]);)if((d=n.find[h])&&(s=d(u.matches[0].replace(it,nt),tt.test(c[0].type)&&ft(e.parentNode)||e))){if(c.splice(l,1),!(t=s.length&&mt(c)))return N.apply(o,s),o;break}}return(p||a(t,f))(s,e,!g,o,tt.test(t)&&ft(e.parentNode)||e),o},i.sortStable=w.split("").sort(S).join("")===w,i.detectDuplicates=!!h,d(),i.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(p.createElement("div"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ct("type|href|height|width",(function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),i.attributes&<((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ct("value",(function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||ct(j,(function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null})),st}(t);d.find=y,(d.expr=y.selectors)[":"]=d.expr.pseudos,d.unique=y.uniqueSort,d.text=y.getText,d.isXMLDoc=y.isXML,d.contains=y.contains;var b=d.expr.match.needsContext,w=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,x=/^.[^:#\[\.,]*$/;function _(t,e,i){if(d.isFunction(e))return d.grep(t,(function(t,n){return!!e.call(t,n,t)!==i}));if(e.nodeType)return d.grep(t,(function(t){return t===e!==i}));if("string"==typeof e){if(x.test(e))return d.filter(e,t,i);e=d.filter(e,t)}return d.grep(t,(function(t){return d.inArray(t,e)>=0!==i}))}d.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?d.find.matchesSelector(n,t)?[n]:[]:d.find.matches(t,d.grep(e,(function(t){return 1===t.nodeType})))},d.fn.extend({find:function(t){var e,i=[],n=this,o=n.length;if("string"!=typeof t)return this.pushStack(d(t).filter((function(){for(e=0;e<o;e++)if(d.contains(n[e],this))return!0})));for(e=0;e<o;e++)d.find(t,n[e],i);return(i=this.pushStack(o>1?d.unique(i):i)).selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(_(this,t||[],!1))},not:function(t){return this.pushStack(_(this,t||[],!0))},is:function(t){return!!_(this,"string"==typeof t&&b.test(t)?d(t):t||[],!1).length}});var C,$=t.document,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(t,e){var i,n;if(!t)return this;if("string"==typeof t){if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:T.exec(t))||!i[1]&&e)return!e||e.jquery?(e||C).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof d?e[0]:e,d.merge(this,d.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:$,!0)),w.test(i[1])&&d.isPlainObject(e))for(i in e)d.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if((n=$.getElementById(i[2]))&&n.parentNode){if(n.id!==i[2])return C.find(t);this.length=1,this[0]=n}return this.context=$,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):d.isFunction(t)?void 0!==C.ready?C.ready(t):t(d):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),d.makeArray(t,this))}).prototype=d.fn,C=d($);var k=/^(?:parents|prev(?:Until|All))/,S={children:!0,contents:!0,next:!0,prev:!0};function E(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}d.extend({dir:function(t,e,i){for(var n=[],o=t[e];o&&9!==o.nodeType&&(void 0===i||1!==o.nodeType||!d(o).is(i));)1===o.nodeType&&n.push(o),o=o[e];return n},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}}),d.fn.extend({has:function(t){var e,i=d(t,this),n=i.length;return this.filter((function(){for(e=0;e<n;e++)if(d.contains(this,i[e]))return!0}))},closest:function(t,e){for(var i,n=0,o=this.length,s=[],r=b.test(t)||"string"!=typeof t?d(t,e||this.context):0;n<o;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&d.find.matchesSelector(i,t))){s.push(i);break}return this.pushStack(s.length>1?d.unique(s):s)},index:function(t){return t?"string"==typeof t?d.inArray(this[0],d(t)):d.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(d.unique(d.merge(this.get(),d(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),d.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return d.dir(t,"parentNode")},parentsUntil:function(t,e,i){return d.dir(t,"parentNode",i)},next:function(t){return E(t,"nextSibling")},prev:function(t){return E(t,"previousSibling")},nextAll:function(t){return d.dir(t,"nextSibling")},prevAll:function(t){return d.dir(t,"previousSibling")},nextUntil:function(t,e,i){return d.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return d.dir(t,"previousSibling",i)},siblings:function(t){return d.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return d.sibling(t.firstChild)},contents:function(t){return d.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:d.merge([],t.childNodes)}},(function(t,e){d.fn[t]=function(i,n){var o=d.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=d.filter(n,o)),this.length>1&&(S[t]||(o=d.unique(o)),k.test(t)&&(o=o.reverse())),this.pushStack(o)}}));var D,A=/\S+/g,P={};function I(){$.addEventListener?($.removeEventListener("DOMContentLoaded",N,!1),t.removeEventListener("load",N,!1)):($.detachEvent("onreadystatechange",N),t.detachEvent("onload",N))}function N(){($.addEventListener||"load"===event.type||"complete"===$.readyState)&&(I(),d.ready())}d.Callbacks=function(t){t="string"==typeof t?P[t]||function(t){var e=P[t]={};return d.each(t.match(A)||[],(function(t,i){e[i]=!0})),e}(t):d.extend({},t);var e,i,n,o,s,r,a=[],l=!t.once&&[],c=function c(h){for(i=t.memory&&h,n=!0,s=r||0,r=0,o=a.length,e=!0;a&&s<o;s++)if(!1===a[s].apply(h[0],h[1])&&t.stopOnFalse){i=!1;break}e=!1,a&&(l?l.length&&c(l.shift()):i?a=[]:u.disable())},u={add:function(){if(a){var n=a.length;!function e(i){d.each(i,(function(i,n){var o=d.type(n);"function"===o?t.unique&&u.has(n)||a.push(n):n&&n.length&&"string"!==o&&e(n)}))}(arguments),e?o=a.length:i&&(r=n,c(i))}return this},remove:function(){return a&&d.each(arguments,(function(t,i){for(var n;(n=d.inArray(i,a,n))>-1;)a.splice(n,1),e&&(n<=o&&o--,n<=s&&s--)})),this},has:function(t){return t?d.inArray(t,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=l=i=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,i||u.disable(),this},locked:function(){return!l},fireWith:function(t,i){return!a||n&&!l||(i=[t,(i=i||[]).slice?i.slice():i],e?l.push(i):c(i)),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},d.extend({Deferred:function(t){var e=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return d.Deferred((function(i){d.each(e,(function(e,s){var r=d.isFunction(t[e])&&t[e];o[s[1]]((function(){var t=r&&r.apply(this,arguments);t&&d.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[s[0]+"With"](this===n?i.promise():this,r?[t]:arguments)}))})),t=null})).promise()},promise:function(t){return null!=t?d.extend(t,n):n}},o={};return n.pipe=n.then,d.each(e,(function(t,s){var r=s[2],a=s[3];n[s[1]]=r.add,a&&r.add((function(){i=a}),e[1^t][2].disable,e[2][2].lock),o[s[0]]=function(){return o[s[0]+"With"](this===o?n:this,arguments),this},o[s[0]+"With"]=r.fireWith})),n.promise(o),t&&t.call(o,o),o},when:function(t){var e,i,o,s=0,r=n.call(arguments),a=r.length,l=1!==a||t&&d.isFunction(t.promise)?a:0,c=1===l?t:d.Deferred(),u=function(t,i,o){return function(s){i[t]=this,o[t]=arguments.length>1?n.call(arguments):s,o===e?c.notifyWith(i,o):--l||c.resolveWith(i,o)}};if(a>1)for(e=new Array(a),i=new Array(a),o=new Array(a);s<a;s++)r[s]&&d.isFunction(r[s].promise)?r[s].promise().done(u(s,o,r)).fail(c.reject).progress(u(s,i,e)):--l;return l||c.resolveWith(o,r),c.promise()}}),d.fn.ready=function(t){return d.ready.promise().done(t),this},d.extend({isReady:!1,readyWait:1,holdReady:function(t){t?d.readyWait++:d.ready(!0)},ready:function(t){if(!(!0===t?--d.readyWait:d.isReady)){if(!$.body)return setTimeout(d.ready);d.isReady=!0,!0!==t&&--d.readyWait>0||(D.resolveWith($,[d]),d.fn.triggerHandler&&(d($).triggerHandler("ready"),d($).off("ready")))}}}),d.ready.promise=function(e){if(!D)if(D=d.Deferred(),"complete"===$.readyState)setTimeout(d.ready);else if($.addEventListener)$.addEventListener("DOMContentLoaded",N,!1),t.addEventListener("load",N,!1);else{$.attachEvent("onreadystatechange",N),t.attachEvent("onload",N);var i=!1;try{i=null==t.frameElement&&$.documentElement}catch(t){}i&&i.doScroll&&function t(){if(!d.isReady){try{i.doScroll("left")}catch(e){return setTimeout(t,50)}I(),d.ready()}}()}return D.promise(e)};var O,z="undefined";for(O in d(u))break;u.ownLast="0"!==O,u.inlineBlockNeedsLayout=!1,d((function(){var t,e,i,n;(i=$.getElementsByTagName("body")[0])&&i.style&&(e=$.createElement("div"),(n=$.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),_typeof2(e.style.zoom)!==z&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",u.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))})),function(){var t=$.createElement("div");if(null==u.deleteExpando){u.deleteExpando=!0;try{delete t.test}catch(t){u.deleteExpando=!1}}t=null}(),d.acceptData=function(t){var e=d.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||!0!==e&&t.getAttribute("classid")===e)};var j=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,L=/([A-Z])/g;function M(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(L,"-$1").toLowerCase();if("string"==typeof(i=t.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:j.test(i)?d.parseJSON(i):i)}catch(t){}d.data(t,e,i)}else i=void 0}return i}function R(t){var e;for(e in t)if(("data"!==e||!d.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function H(t,e,n,o){if(d.acceptData(t)){var s,r,a=d.expando,l=t.nodeType,c=l?d.cache:t,u=l?t[a]:t[a]&&a;if(u&&c[u]&&(o||c[u].data)||void 0!==n||"string"!=typeof e)return u||(u=l?t[a]=i.pop()||d.guid++:a),c[u]||(c[u]=l?{}:{toJSON:d.noop}),"object"!==_typeof2(e)&&"function"!=typeof e||(o?c[u]=d.extend(c[u],e):c[u].data=d.extend(c[u].data,e)),r=c[u],o||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[d.camelCase(e)]=n),"string"==typeof e?null==(s=r[e])&&(s=r[d.camelCase(e)]):s=r,s}}function W(t,e,i){if(d.acceptData(t)){var n,o,s=t.nodeType,r=s?d.cache:t,a=s?t[d.expando]:d.expando;if(r[a]){if(e&&(n=i?r[a]:r[a].data)){o=(e=d.isArray(e)?e.concat(d.map(e,d.camelCase)):e in n||(e=d.camelCase(e))in n?[e]:e.split(" ")).length;for(;o--;)delete n[e[o]];if(i?!R(n):!d.isEmptyObject(n))return}(i||(delete r[a].data,R(r[a])))&&(s?d.cleanData([t],!0):u.deleteExpando||r!=r.window?delete r[a]:r[a]=null)}}}d.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?d.cache[t[d.expando]]:t[d.expando])&&!R(t)},data:function(t,e,i){return H(t,e,i)},removeData:function(t,e){return W(t,e)},_data:function(t,e,i){return H(t,e,i,!0)},_removeData:function(t,e){return W(t,e,!0)}}),d.fn.extend({data:function(t,e){var i,n,o,s=this[0],r=s&&s.attributes;if(void 0===t){if(this.length&&(o=d.data(s),1===s.nodeType&&!d._data(s,"parsedAttrs"))){for(i=r.length;i--;)r[i]&&0===(n=r[i].name).indexOf("data-")&&M(s,n=d.camelCase(n.slice(5)),o[n]);d._data(s,"parsedAttrs",!0)}return o}return"object"===_typeof2(t)?this.each((function(){d.data(this,t)})):arguments.length>1?this.each((function(){d.data(this,t,e)})):s?M(s,t,d.data(s,t)):void 0},removeData:function(t){return this.each((function(){d.removeData(this,t)}))}}),d.extend({queue:function(t,e,i){var n;if(t)return n=d._data(t,e=(e||"fx")+"queue"),i&&(!n||d.isArray(i)?n=d._data(t,e,d.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){var i=d.queue(t,e=e||"fx"),n=i.length,o=i.shift(),s=d._queueHooks(t,e);"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete s.stop,o.call(t,(function(){d.dequeue(t,e)}),s)),!n&&s&&s.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return d._data(t,i)||d._data(t,i,{empty:d.Callbacks("once memory").add((function(){d._removeData(t,e+"queue"),d._removeData(t,i)}))})}}),d.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?d.queue(this[0],t):void 0===e?this:this.each((function(){var i=d.queue(this,t,e);d._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&d.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){d.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,o=d.Deferred(),s=this,r=this.length,a=function(){--n||o.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(i=d._data(s[r],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),o.promise(e)}});var F=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,q=["Top","Right","Bottom","Left"],B=function(t,e){return"none"===d.css(t=e||t,"display")||!d.contains(t.ownerDocument,t)},U=d.access=function(t,e,i,n,o,s,r){var a=0,l=t.length,c=null==i;if("object"===d.type(i))for(a in o=!0,i)d.access(t,e,a,i[a],!0,s,r);else if(void 0!==n&&(o=!0,d.isFunction(n)||(r=!0),c&&(r?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(d(t),i)})),e))for(;a<l;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return o?t:c?e.call(t):l?e(t[0],i):s},V=/^(?:checkbox|radio)$/i;!function(){var t=$.createElement("input"),e=$.createElement("div"),i=$.createDocumentFragment();if(e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",u.leadingWhitespace=3===e.firstChild.nodeType,u.tbody=!e.getElementsByTagName("tbody").length,u.htmlSerialize=!!e.getElementsByTagName("link").length,u.html5Clone="<:nav></:nav>"!==$.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),u.appendChecked=t.checked,e.innerHTML="<textarea>x</textarea>",u.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,i.appendChild(e),e.innerHTML="<input type='radio' checked='checked' name='t'/>",u.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,u.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",(function(){u.noCloneEvent=!1})),e.cloneNode(!0).click()),null==u.deleteExpando){u.deleteExpando=!0;try{delete e.test}catch(t){u.deleteExpando=!1}}}(),function(){var e,i,n=$.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})i="on"+e,(u[e+"Bubbles"]=i in t)||(n.setAttribute(i,"t"),u[e+"Bubbles"]=!1===n.attributes[i].expando);n=null}();var Y=/^(?:input|select|textarea)$/i,X=/^key/,G=/^(?:mouse|pointer|contextmenu)|click/,Q=/^(?:focusinfocus|focusoutblur)$/,K=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function J(){return!1}function tt(){try{return $.activeElement}catch(t){}}function et(t){var e=it.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}d.event={global:{},add:function(t,e,i,n,o){var s,r,a,l,c,u,h,p,f,g,m,v=d._data(t);if(v){for(i.handler&&(i=(l=i).handler,o=l.selector),i.guid||(i.guid=d.guid++),(r=v.events)||(r=v.events={}),(u=v.handle)||((u=v.handle=function(t){return _typeof2(d)===z||t&&d.event.triggered===t.type?void 0:d.event.dispatch.apply(u.elem,arguments)}).elem=t),a=(e=(e||"").match(A)||[""]).length;a--;)f=m=(s=K.exec(e[a])||[])[1],g=(s[2]||"").split(".").sort(),f&&(c=d.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=d.event.special[f]||{},h=d.extend({type:f,origType:m,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&d.expr.match.needsContext.test(o),namespace:g.join(".")},l),(p=r[f])||((p=r[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,n,g,u)||(t.addEventListener?t.addEventListener(f,u,!1):t.attachEvent&&t.attachEvent("on"+f,u))),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),d.event.global[f]=!0);t=null}},remove:function(t,e,i,n,o){var s,r,a,l,c,u,h,p,f,g,m,v=d.hasData(t)&&d._data(t);if(v&&(u=v.events)){for(c=(e=(e||"").match(A)||[""]).length;c--;)if(f=m=(a=K.exec(e[c])||[])[1],g=(a[2]||"").split(".").sort(),f){for(h=d.event.special[f]||{},p=u[f=(n?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=s=p.length;s--;)r=p[s],!o&&m!==r.origType||i&&i.guid!==r.guid||a&&!a.test(r.namespace)||n&&n!==r.selector&&("**"!==n||!r.selector)||(p.splice(s,1),r.selector&&p.delegateCount--,h.remove&&h.remove.call(t,r));l&&!p.length&&(h.teardown&&!1!==h.teardown.call(t,g,v.handle)||d.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)d.event.remove(t,f+e[c],i,n,!0);d.isEmptyObject(u)&&(delete v.handle,d._removeData(t,"events"))}},trigger:function(e,i,n,o){var s,r,a,l,u,h,p,f=[n||$],g=c.call(e,"type")?e.type:e,m=c.call(e,"namespace")?e.namespace.split("."):[];if(a=h=n=n||$,3!==n.nodeType&&8!==n.nodeType&&!Q.test(g+d.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),r=g.indexOf(":")<0&&"on"+g,(e=e[d.expando]?e:new d.Event(g,"object"===_typeof2(e)&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:d.makeArray(i,[e]),u=d.event.special[g]||{},o||!u.trigger||!1!==u.trigger.apply(n,i))){if(!o&&!u.noBubble&&!d.isWindow(n)){for(l=u.delegateType||g,Q.test(l+g)||(a=a.parentNode);a;a=a.parentNode)f.push(a),h=a;h===(n.ownerDocument||$)&&f.push(h.defaultView||h.parentWindow||t)}for(p=0;(a=f[p++])&&!e.isPropagationStopped();)e.type=p>1?l:u.bindType||g,(s=(d._data(a,"events")||{})[e.type]&&d._data(a,"handle"))&&s.apply(a,i),(s=r&&a[r])&&s.apply&&d.acceptData(a)&&(e.result=s.apply(a,i),!1===e.result&&e.preventDefault());if(e.type=g,!o&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(f.pop(),i))&&d.acceptData(n)&&r&&n[g]&&!d.isWindow(n)){(h=n[r])&&(n[r]=null),d.event.triggered=g;try{n[g]()}catch(t){}d.event.triggered=void 0,h&&(n[r]=h)}return e.result}},dispatch:function(t){t=d.event.fix(t);var e,i,o,s,r,a=[],l=n.call(arguments),c=(d._data(this,"events")||{})[t.type]||[],u=d.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(a=d.event.handlers.call(this,t,c),e=0;(s=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=s.elem,r=0;(o=s.handlers[r++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(o.namespace)||(t.handleObj=o,t.data=o.data,void 0!==(i=((d.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,l))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,o,s,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(o=[],s=0;s<a;s++)void 0===o[i=(n=e[s]).selector+" "]&&(o[i]=n.needsContext?d(i,this).index(l)>=0:d.find(i,this,null,[l]).length),o[i]&&o.push(n);o.length&&r.push({elem:l,handlers:o})}return a<e.length&&r.push({elem:this,handlers:e.slice(a)}),r},fix:function(t){if(t[d.expando])return t;var e,i,n,o=t.type,s=t,r=this.fixHooks[o];for(r||(this.fixHooks[o]=r=G.test(o)?this.mouseHooks:X.test(o)?this.keyHooks:{}),n=r.props?this.props.concat(r.props):this.props,t=new d.Event(s),e=n.length;e--;)t[i=n[e]]=s[i];return t.target||(t.target=s.srcElement||$),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,r.filter?r.filter(t,s):t},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,o,s=e.button,r=e.fromElement;return null==t.pageX&&null!=e.clientX&&(o=(n=t.target.ownerDocument||$).documentElement,i=n.body,t.pageX=e.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),!t.relatedTarget&&r&&(t.relatedTarget=r===t.target?e.toElement:r),t.which||void 0===s||(t.which=1&s?1:2&s?3:4&s?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==tt()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===tt()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(d.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return d.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i,n){var o=d.extend(new d.Event,i,{type:t,isSimulated:!0,originalEvent:{}});n?d.event.trigger(o,null,e):d.event.dispatch.call(e,o),o.isDefaultPrevented()&&i.preventDefault()}},d.removeEvent=$.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i,!1)}:function(t,e,i){var n="on"+e;t.detachEvent&&(_typeof2(t[n])===z&&(t[n]=null),t.detachEvent(n,i))},(d.Event=function(t,e){if(!(this instanceof d.Event))return new d.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Z:J):this.type=t,e&&d.extend(this,e),this.timeStamp=t&&t.timeStamp||d.now(),this[d.expando]=!0}).prototype={isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Z,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Z,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Z,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){d.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,o=t.relatedTarget,s=t.handleObj;return o&&(o===n||d.contains(n,o))||(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=e),i}}})),u.submitBubbles||(d.event.special.submit={setup:function(){if(d.nodeName(this,"form"))return!1;d.event.add(this,"click._submit keypress._submit",(function(t){var e=t.target,i=d.nodeName(e,"input")||d.nodeName(e,"button")?e.form:void 0;i&&!d._data(i,"submitBubbles")&&(d.event.add(i,"submit._submit",(function(t){t._submit_bubble=!0})),d._data(i,"submitBubbles",!0))}))},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&d.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){if(d.nodeName(this,"form"))return!1;d.event.remove(this,"._submit")}}),u.changeBubbles||(d.event.special.change={setup:function(){if(Y.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(d.event.add(this,"propertychange._change",(function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)})),d.event.add(this,"click._change",(function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),d.event.simulate("change",this,t,!0)}))),!1;d.event.add(this,"beforeactivate._change",(function(t){var e=t.target;Y.test(e.nodeName)&&!d._data(e,"changeBubbles")&&(d.event.add(e,"change._change",(function(t){!this.parentNode||t.isSimulated||t.isTrigger||d.event.simulate("change",this.parentNode,t,!0)})),d._data(e,"changeBubbles",!0))}))},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return d.event.remove(this,"._change"),!Y.test(this.nodeName)}}),u.focusinBubbles||d.each({focus:"focusin",blur:"focusout"},(function(t,e){var i=function(t){d.event.simulate(e,t.target,d.event.fix(t),!0)};d.event.special[e]={setup:function(){var n=this.ownerDocument||this,o=d._data(n,e);o||n.addEventListener(t,i,!0),d._data(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=d._data(n,e)-1;o?d._data(n,e,o):(n.removeEventListener(t,i,!0),d._removeData(n,e))}}})),d.fn.extend({on:function(t,e,i,n,o){var s,r;if("object"===_typeof2(t)){for(s in"string"!=typeof e&&(i=i||e,e=void 0),t)this.on(s,e,i,t[s],o);return this}if(null==i&&null==n?(n=e,i=e=void 0):null==n&&("string"==typeof e?(n=i,i=void 0):(n=i,i=e,e=void 0)),!1===n)n=J;else if(!n)return this;return 1===o&&(r=n,(n=function(t){return d().off(t),r.apply(this,arguments)}).guid=r.guid||(r.guid=d.guid++)),this.each((function(){d.event.add(this,t,n,i,e)}))},one:function(t,e,i,n){return this.on(t,e,i,n,1)},off:function(t,e,i){var n,o;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,d(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"===_typeof2(t)){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=J),this.each((function(){d.event.remove(this,t,i,e)}))},trigger:function(t,e){return this.each((function(){d.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var i=this[0];if(i)return d.event.trigger(t,e,i,!0)}});var it="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",nt=/ jQuery\d+="(?:null|\d+)"/g,ot=new RegExp("<(?:"+it+")[\\s/>]","i"),st=/^\s+/,rt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,at=/<([\w:]+)/,lt=/<tbody/i,ct=/<|&#?\w+;/,ut=/<(?:script|style|link)/i,ht=/checked\s*(?:[^=]|=\s*.checked.)/i,dt=/^$|\/(?:java|ecma)script/i,pt=/^true\/(.*)/,ft=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,gt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:u.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},mt=et($).appendChild($.createElement("div"));function vt(t,e){var i,n,o=0,s=_typeof2(t.getElementsByTagName)!==z?t.getElementsByTagName(e||"*"):_typeof2(t.querySelectorAll)!==z?t.querySelectorAll(e||"*"):void 0;if(!s)for(s=[],i=t.childNodes||t;null!=(n=i[o]);o++)!e||d.nodeName(n,e)?s.push(n):d.merge(s,vt(n,e));return void 0===e||e&&d.nodeName(t,e)?d.merge([t],s):s}function yt(t){V.test(t.type)&&(t.defaultChecked=t.checked)}function bt(t,e){return d.nodeName(t,"table")&&d.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function wt(t){return t.type=(null!==d.find.attr(t,"type"))+"/"+t.type,t}function xt(t){var e=pt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function _t(t,e){for(var i,n=0;null!=(i=t[n]);n++)d._data(i,"globalEval",!e||d._data(e[n],"globalEval"))}function Ct(t,e){if(1===e.nodeType&&d.hasData(t)){var i,n,o,s=d._data(t),r=d._data(e,s),a=s.events;if(a)for(i in delete r.handle,r.events={},a)for(n=0,o=a[i].length;n<o;n++)d.event.add(e,i,a[i][n]);r.data&&(r.data=d.extend({},r.data))}}function $t(t,e){var i,n,o;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!u.noCloneEvent&&e[d.expando]){for(n in(o=d._data(e)).events)d.removeEvent(e,n,o.handle);e.removeAttribute(d.expando)}"script"===i&&e.text!==t.text?(wt(e).text=t.text,xt(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),u.html5Clone&&t.innerHTML&&!d.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&V.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}gt.optgroup=gt.option,gt.tbody=gt.tfoot=gt.colgroup=gt.caption=gt.thead,gt.th=gt.td,d.extend({clone:function(t,e,i){var n,o,s,r,a,l=d.contains(t.ownerDocument,t);if(u.html5Clone||d.isXMLDoc(t)||!ot.test("<"+t.nodeName+">")?s=t.cloneNode(!0):(mt.innerHTML=t.outerHTML,mt.removeChild(s=mt.firstChild)),!(u.noCloneEvent&&u.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||d.isXMLDoc(t)))for(n=vt(s),a=vt(t),r=0;null!=(o=a[r]);++r)n[r]&&$t(o,n[r]);if(e)if(i)for(a=a||vt(t),n=n||vt(s),r=0;null!=(o=a[r]);r++)Ct(o,n[r]);else Ct(t,s);return(n=vt(s,"script")).length>0&&_t(n,!l&&vt(t,"script")),n=a=o=null,s},buildFragment:function(t,e,i,n){for(var o,s,r,a,l,c,h,p=t.length,f=et(e),g=[],m=0;m<p;m++)if((s=t[m])||0===s)if("object"===d.type(s))d.merge(g,s.nodeType?[s]:s);else if(ct.test(s)){for(a=a||f.appendChild(e.createElement("div")),l=(at.exec(s)||["",""])[1].toLowerCase(),h=gt[l]||gt._default,a.innerHTML=h[1]+s.replace(rt,"<$1></$2>")+h[2],o=h[0];o--;)a=a.lastChild;if(!u.leadingWhitespace&&st.test(s)&&g.push(e.createTextNode(st.exec(s)[0])),!u.tbody)for(o=(s="table"!==l||lt.test(s)?"<table>"!==h[1]||lt.test(s)?0:a:a.firstChild)&&s.childNodes.length;o--;)d.nodeName(c=s.childNodes[o],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(d.merge(g,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=f.lastChild}else g.push(e.createTextNode(s));for(a&&f.removeChild(a),u.appendChecked||d.grep(vt(g,"input"),yt),m=0;s=g[m++];)if((!n||-1===d.inArray(s,n))&&(r=d.contains(s.ownerDocument,s),a=vt(f.appendChild(s),"script"),r&&_t(a),i))for(o=0;s=a[o++];)dt.test(s.type||"")&&i.push(s);return a=null,f},cleanData:function(t,e){for(var n,o,s,r,a=0,l=d.expando,c=d.cache,h=u.deleteExpando,p=d.event.special;null!=(n=t[a]);a++)if((e||d.acceptData(n))&&(r=(s=n[l])&&c[s])){if(r.events)for(o in r.events)p[o]?d.event.remove(n,o):d.removeEvent(n,o,r.handle);c[s]&&(delete c[s],h?delete n[l]:_typeof2(n.removeAttribute)!==z?n.removeAttribute(l):n[l]=null,i.push(s))}}}),d.fn.extend({text:function(t){return U(this,(function(t){return void 0===t?d.text(this):this.empty().append((this[0]&&this[0].ownerDocument||$).createTextNode(t))}),null,t,arguments.length)},append:function(){return this.domManip(arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||bt(this,t).appendChild(t)}))},prepend:function(){return this.domManip(arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return this.domManip(arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return this.domManip(arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},remove:function(t,e){for(var i,n=t?d.filter(t,this):this,o=0;null!=(i=n[o]);o++)e||1!==i.nodeType||d.cleanData(vt(i)),i.parentNode&&(e&&d.contains(i.ownerDocument,i)&&_t(vt(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&d.cleanData(vt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&d.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return d.clone(this,t,e)}))},html:function(t){return U(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(nt,""):void 0;if("string"==typeof t&&!ut.test(t)&&(u.htmlSerialize||!ot.test(t))&&(u.leadingWhitespace||!st.test(t))&&!gt[(at.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(rt,"<$1></$2>");try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(d.cleanData(vt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,(function(e){t=this.parentNode,d.cleanData(vt(this)),t&&t.replaceChild(e,this)})),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=o.apply([],t);var i,n,s,r,a,l,c=0,h=this.length,p=this,f=h-1,g=t[0],m=d.isFunction(g);if(m||h>1&&"string"==typeof g&&!u.checkClone&&ht.test(g))return this.each((function(i){var n=p.eq(i);m&&(t[0]=g.call(this,i,n.html())),n.domManip(t,e)}));if(h&&(i=(l=d.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=i),i)){for(s=(r=d.map(vt(l,"script"),wt)).length;c<h;c++)n=l,c!==f&&(n=d.clone(n,!0,!0),s&&d.merge(r,vt(n,"script"))),e.call(this[c],n,c);if(s)for(a=r[r.length-1].ownerDocument,d.map(r,xt),c=0;c<s;c++)n=r[c],dt.test(n.type||"")&&!d._data(n,"globalEval")&&d.contains(a,n)&&(n.src?d._evalUrl&&d._evalUrl(n.src):d.globalEval((n.text||n.textContent||n.innerHTML||"").replace(ft,"")));l=i=null}return this}}),d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){d.fn[t]=function(t){for(var i,n=0,o=[],r=d(t),a=r.length-1;n<=a;n++)i=n===a?this:this.clone(!0),d(r[n])[e](i),s.apply(o,i.get());return this.pushStack(o)}}));var Tt,kt,St={};function Et(e,i){var n,o=d(i.createElement(e)).appendTo(i.body),s=t.getDefaultComputedStyle&&(n=t.getDefaultComputedStyle(o[0]))?n.display:d.css(o[0],"display");return o.detach(),s}function Dt(t){var e=$,i=St[t];return i||("none"!==(i=Et(t,e))&&i||((e=((Tt=(Tt||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement))[0].contentWindow||Tt[0].contentDocument).document).write(),e.close(),i=Et(t,e),Tt.detach()),St[t]=i),i}u.shrinkWrapBlocks=function(){return null!=kt?kt:(kt=!1,(e=$.getElementsByTagName("body")[0])&&e.style?(t=$.createElement("div"),(i=$.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(i).appendChild(t),_typeof2(t.style.zoom)!==z&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild($.createElement("div")).style.width="5px",kt=3!==t.offsetWidth),e.removeChild(i),kt):void 0);var t,e,i};var At,Pt,It=/^margin/,Nt=new RegExp("^("+F+")(?!px)[a-z%]+$","i"),Ot=/^(top|right|bottom|left)$/;function zt(t,e){return{get:function(){var i=t();if(null!=i){if(!i)return(this.get=e).apply(this,arguments);delete this.get}}}}t.getComputedStyle?(At=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)},Pt=function(t,e,i){var n,o,s,r,a=t.style;return r=(i=i||At(t))?i.getPropertyValue(e)||i[e]:void 0,i&&(""!==r||d.contains(t.ownerDocument,t)||(r=d.style(t,e)),Nt.test(r)&&It.test(e)&&(n=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=o,a.maxWidth=s)),void 0===r?r:r+""}):$.documentElement.currentStyle&&(At=function(t){return t.currentStyle},Pt=function(t,e,i){var n,o,s,r,a=t.style;return null==(r=(i=i||At(t))?i[e]:void 0)&&a&&a[e]&&(r=a[e]),Nt.test(r)&&!Ot.test(e)&&(n=a.left,(s=(o=t.runtimeStyle)&&o.left)&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":r,r=a.pixelLeft+"px",a.left=n,s&&(o.left=s)),void 0===r?r:r+""||"auto"}),function(){var e,i,n,o,s,r,a;function l(){var e,i,n,l;(i=$.getElementsByTagName("body")[0])&&i.style&&(e=$.createElement("div"),(n=$.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,a=!0,t.getComputedStyle&&(o="1%"!==(t.getComputedStyle(e,null)||{}).top,s="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width,(l=e.appendChild($.createElement("div"))).style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",l.style.marginRight=l.style.width="0",e.style.width="1px",a=!parseFloat((t.getComputedStyle(l,null)||{}).marginRight),e.removeChild(l)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(l=e.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(r=0===l[0].offsetHeight)&&(l[0].style.display="",l[1].style.display="none",r=0===l[0].offsetHeight),i.removeChild(n))}(e=$.createElement("div")).innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(i=(n=e.getElementsByTagName("a")[0])&&n.style)&&(i.cssText="float:left;opacity:.5",u.opacity="0.5"===i.opacity,u.cssFloat=!!i.cssFloat,e.style.backgroundClip="content-box",e.cloneNode(!0).style.backgroundClip="",u.clearCloneStyle="content-box"===e.style.backgroundClip,u.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,d.extend(u,{reliableHiddenOffsets:function(){return null==r&&l(),r},boxSizingReliable:function(){return null==s&&l(),s},pixelPosition:function(){return null==o&&l(),o},reliableMarginRight:function(){return null==a&&l(),a}}))}(),d.swap=function(t,e,i,n){var o,s,r={};for(s in e)r[s]=t.style[s],t.style[s]=e[s];for(s in o=i.apply(t,n||[]),e)t.style[s]=r[s];return o};var jt=/alpha\([^)]*\)/i,Lt=/opacity\s*=\s*([^)]*)/,Mt=/^(none|table(?!-c[ea]).+)/,Rt=new RegExp("^("+F+")(.*)$","i"),Ht=new RegExp("^([+-])=("+F+")","i"),Wt={position:"absolute",visibility:"hidden",display:"block"},Ft={letterSpacing:"0",fontWeight:"400"},qt=["Webkit","O","Moz","ms"];function Bt(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,o=qt.length;o--;)if((e=qt[o]+i)in t)return e;return n}function Ut(t,e){for(var i,n,o,s=[],r=0,a=t.length;r<a;r++)(n=t[r]).style&&(s[r]=d._data(n,"olddisplay"),i=n.style.display,e?(s[r]||"none"!==i||(n.style.display=""),""===n.style.display&&B(n)&&(s[r]=d._data(n,"olddisplay",Dt(n.nodeName)))):(o=B(n),(i&&"none"!==i||!o)&&d._data(n,"olddisplay",o?i:d.css(n,"display"))));for(r=0;r<a;r++)(n=t[r]).style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?s[r]||"":"none"));return t}function Vt(t,e,i){var n=Rt.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function Yt(t,e,i,n,o){for(var s=i===(n?"border":"content")?4:"width"===e?1:0,r=0;s<4;s+=2)"margin"===i&&(r+=d.css(t,i+q[s],!0,o)),n?("content"===i&&(r-=d.css(t,"padding"+q[s],!0,o)),"margin"!==i&&(r-=d.css(t,"border"+q[s]+"Width",!0,o))):(r+=d.css(t,"padding"+q[s],!0,o),"padding"!==i&&(r+=d.css(t,"border"+q[s]+"Width",!0,o)));return r}function Xt(t,e,i){var n=!0,o="width"===e?t.offsetWidth:t.offsetHeight,s=At(t),r=u.boxSizing&&"border-box"===d.css(t,"boxSizing",!1,s);if(o<=0||null==o){if(((o=Pt(t,e,s))<0||null==o)&&(o=t.style[e]),Nt.test(o))return o;n=r&&(u.boxSizingReliable()||o===t.style[e]),o=parseFloat(o)||0}return o+Yt(t,e,i||(r?"border":"content"),n,s)+"px"}function Gt(t,e,i,n,o){return new Gt.prototype.init(t,e,i,n,o)}d.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Pt(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:u.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=d.camelCase(e),l=t.style;if(e=d.cssProps[a]||(d.cssProps[a]=Bt(l,a)),r=d.cssHooks[e]||d.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(o=r.get(t,!1,n))?o:l[e];if(!("string"===(s=_typeof2(i))&&(o=Ht.exec(i))&&(i=(o[1]+1)*o[2]+parseFloat(d.css(t,e)),s="number"),null==i||i!=i||("number"!==s||d.cssNumber[a]||(i+="px"),u.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var o,s,r,a=d.camelCase(e);return e=d.cssProps[a]||(d.cssProps[a]=Bt(t.style,a)),(r=d.cssHooks[e]||d.cssHooks[a])&&"get"in r&&(s=r.get(t,!0,i)),void 0===s&&(s=Pt(t,e,n)),"normal"===s&&e in Ft&&(s=Ft[e]),""===i||i?(o=parseFloat(s),!0===i||d.isNumeric(o)?o||0:s):s}}),d.each(["height","width"],(function(t,e){d.cssHooks[e]={get:function(t,i,n){if(i)return Mt.test(d.css(t,"display"))&&0===t.offsetWidth?d.swap(t,Wt,(function(){return Xt(t,e,n)})):Xt(t,e,n)},set:function(t,i,n){var o=n&&At(t);return Vt(0,i,n?Yt(t,e,n,u.boxSizing&&"border-box"===d.css(t,"boxSizing",!1,o),o):0)}}})),u.opacity||(d.cssHooks.opacity={get:function(t,e){return Lt.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,o=d.isNumeric(e)?"alpha(opacity="+100*e+")":"",s=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===d.trim(s.replace(jt,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=jt.test(s)?s.replace(jt,o):s+" "+o)}}),d.cssHooks.marginRight=zt(u.reliableMarginRight,(function(t,e){if(e)return d.swap(t,{display:"inline-block"},Pt,[t,"marginRight"])})),d.each({margin:"",padding:"",border:"Width"},(function(t,e){d.cssHooks[t+e]={expand:function(i){for(var n=0,o={},s="string"==typeof i?i.split(" "):[i];n<4;n++)o[t+q[n]+e]=s[n]||s[n-2]||s[0];return o}},It.test(t)||(d.cssHooks[t+e].set=Vt)})),d.fn.extend({css:function(t,e){return U(this,(function(t,e,i){var n,o,s={},r=0;if(d.isArray(e)){for(n=At(t),o=e.length;r<o;r++)s[e[r]]=d.css(t,e[r],!1,n);return s}return void 0!==i?d.style(t,e,i):d.css(t,e)}),t,e,arguments.length>1)},show:function(){return Ut(this,!0)},hide:function(){return Ut(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){B(this)?d(this).show():d(this).hide()}))}}),d.Tween=Gt,Gt.prototype={constructor:Gt,init:function(t,e,i,n,o,s){this.elem=t,this.prop=i,this.easing=o||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=s||(d.cssNumber[i]?"":"px")},cur:function(){var t=Gt.propHooks[this.prop];return t&&t.get?t.get(this):Gt.propHooks._default.get(this)},run:function(t){var e,i=Gt.propHooks[this.prop];return this.options.duration?this.pos=e=d.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Gt.propHooks._default.set(this),this}},Gt.prototype.init.prototype=Gt.prototype,Gt.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=d.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){d.fx.step[t.prop]?d.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[d.cssProps[t.prop]]||d.cssHooks[t.prop])?d.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},Gt.propHooks.scrollTop=Gt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},d.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},(d.fx=Gt.prototype.init).step={};var Qt,Kt,Zt,Jt,te,ee,ie,ne=/^(?:toggle|show|hide)$/,oe=new RegExp("^(?:([+-])=|)("+F+")([a-z%]*)$","i"),se=/queueHooks$/,re=[function(t,e,i){var n,o,s,r,a,l,c,h=this,p={},f=t.style,g=t.nodeType&&B(t),m=d._data(t,"fxshow");i.queue||(null==(a=d._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,d.queue(t,"fx").length||a.empty.fire()}))})));1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],c=d.css(t,"display"),"inline"===("none"===c?d._data(t,"olddisplay")||Dt(t.nodeName):c)&&"none"===d.css(t,"float")&&(u.inlineBlockNeedsLayout&&"inline"!==Dt(t.nodeName)?f.zoom=1:f.display="inline-block"));i.overflow&&(f.overflow="hidden",u.shrinkWrapBlocks()||h.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})));for(n in e)if(o=e[n],ne.exec(o)){if(delete e[n],s=s||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[n])continue;g=!0}p[n]=m&&m[n]||d.style(t,n)}else c=void 0;if(d.isEmptyObject(p))"inline"===("none"===c?Dt(t.nodeName):c)&&(f.display=c);else for(n in m?"hidden"in m&&(g=m.hidden):m=d._data(t,"fxshow",{}),s&&(m.hidden=!g),g?d(t).show():h.done((function(){d(t).hide()})),h.done((function(){var e;for(e in d._removeData(t,"fxshow"),p)d.style(t,e,p[e])})),p)r=ue(g?m[n]:0,n,h),n in m||(m[n]=r.start,g&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}],ae={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),o=oe.exec(e),s=o&&o[3]||(d.cssNumber[t]?"":"px"),r=(d.cssNumber[t]||"px"!==s&&+n)&&oe.exec(d.css(i.elem,t)),a=1,l=20;if(r&&r[3]!==s){s=s||r[3],o=o||[],r=+n||1;do{r/=a=a||".5",d.style(i.elem,t,r+s)}while(a!==(a=i.cur()/n)&&1!==a&&--l)}return o&&(r=i.start=+r||+n||0,i.unit=s,i.end=o[1]?r+(o[1]+1)*o[2]:+o[2]),i}]};function le(){return setTimeout((function(){Qt=void 0})),Qt=d.now()}function ce(t,e){var i,n={height:t},o=0;for(e=e?1:0;o<4;o+=2-e)n["margin"+(i=q[o])]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function ue(t,e,i){for(var n,o=(ae[e]||[]).concat(ae["*"]),s=0,r=o.length;s<r;s++)if(n=o[s].call(i,e,t))return n}function he(t,e,i){var n,o,s=0,r=re.length,a=d.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var e=Qt||le(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(n);return a.notifyWith(t,[c,n,i]),n<1&&r?i:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:d.extend({},e),opts:d.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Qt||le(),duration:i.duration,tweens:[],createTween:function(e,i){var n=d.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)c.tweens[i].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),u=c.props;for(!function(t,e){var i,n,o,s,r;for(i in t)if(o=e[n=d.camelCase(i)],s=t[i],d.isArray(s)&&(o=s[1],s=t[i]=s[0]),i!==n&&(t[n]=s,delete t[i]),(r=d.cssHooks[n])&&"expand"in r)for(i in s=r.expand(s),delete t[n],s)i in t||(t[i]=s[i],e[i]=o);else e[n]=o}(u,c.opts.specialEasing);s<r;s++)if(n=re[s].call(c,t,u,c.opts))return n;return d.map(u,ue,c),d.isFunction(c.opts.start)&&c.opts.start.call(t,c),d.fx.timer(d.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}d.Animation=d.extend(he,{tweener:function(t,e){d.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,o=t.length;n<o;n++)i=t[n],ae[i]=ae[i]||[],ae[i].unshift(e)},prefilter:function(t,e){e?re.unshift(t):re.push(t)}}),d.speed=function(t,e,i){var n=t&&"object"===_typeof2(t)?d.extend({},t):{complete:i||!i&&e||d.isFunction(t)&&t,duration:t,easing:i&&e||e&&!d.isFunction(e)&&e};return n.duration=d.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in d.fx.speeds?d.fx.speeds[n.duration]:d.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){d.isFunction(n.old)&&n.old.call(this),n.queue&&d.dequeue(this,n.queue)},n},d.fn.extend({fadeTo:function(t,e,i,n){return this.filter(B).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=d.isEmptyObject(t),s=d.speed(e,i,n),r=function(){var e=he(this,d.extend({},t),s);(o||d._data(this,"finish"))&&e.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",s=d.timers,r=d._data(this);if(o)r[o]&&r[o].stop&&n(r[o]);else for(o in r)r[o]&&r[o].stop&&se.test(o)&&n(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=t&&s[o].queue!==t||(s[o].anim.stop(i),e=!1,s.splice(o,1));!e&&i||d.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=d._data(this),n=i[t+"queue"],o=i[t+"queueHooks"],s=d.timers,r=n?n.length:0;for(i.finish=!0,d.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<r;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),d.each(["toggle","show","hide"],(function(t,e){var i=d.fn[e];d.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(ce(e,!0),t,n,o)}})),d.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){d.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),d.timers=[],d.fx.tick=function(){var t,e=d.timers,i=0;for(Qt=d.now();i<e.length;i++)(t=e[i])()||e[i]!==t||e.splice(i--,1);e.length||d.fx.stop(),Qt=void 0},d.fx.timer=function(t){d.timers.push(t),t()?d.fx.start():d.timers.pop()},d.fx.interval=13,d.fx.start=function(){Kt||(Kt=setInterval(d.fx.tick,d.fx.interval))},d.fx.stop=function(){clearInterval(Kt),Kt=null},d.fx.speeds={slow:600,fast:200,_default:400},d.fn.delay=function(t,e){return t=d.fx&&d.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var n=setTimeout(e,t);i.stop=function(){clearTimeout(n)}}))},(Jt=$.createElement("div")).setAttribute("className","t"),Jt.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ee=Jt.getElementsByTagName("a")[0],ie=(te=$.createElement("select")).appendChild($.createElement("option")),Zt=Jt.getElementsByTagName("input")[0],ee.style.cssText="top:1px",u.getSetAttribute="t"!==Jt.className,u.style=/top/.test(ee.getAttribute("style")),u.hrefNormalized="/a"===ee.getAttribute("href"),u.checkOn=!!Zt.value,u.optSelected=ie.selected,u.enctype=!!$.createElement("form").enctype,te.disabled=!0,u.optDisabled=!ie.disabled,(Zt=$.createElement("input")).setAttribute("value",""),u.input=""===Zt.getAttribute("value"),Zt.value="t",Zt.setAttribute("type","radio"),u.radioValue="t"===Zt.value;var de=/\r/g;d.fn.extend({val:function(t){var e,i,n,o=this[0];return arguments.length?(n=d.isFunction(t),this.each((function(i){var o;1===this.nodeType&&(null==(o=n?t.call(this,i,d(this).val()):t)?o="":"number"==typeof o?o+="":d.isArray(o)&&(o=d.map(o,(function(t){return null==t?"":t+""}))),(e=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=d.valHooks[o.type]||d.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:"string"==typeof(i=o.value)?i.replace(de,""):null==i?"":i:void 0}}),d.extend({valHooks:{option:{get:function(t){var e=d.find.attr(t,"value");return null!=e?e:d.trim(d.text(t))}},select:{get:function(t){for(var e,i,n=t.options,o=t.selectedIndex,s="select-one"===t.type||o<0,r=s?null:[],a=s?o+1:n.length,l=o<0?a:s?o:0;l<a;l++)if(((i=n[l]).selected||l===o)&&(u.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!d.nodeName(i.parentNode,"optgroup"))){if(e=d(i).val(),s)return e;r.push(e)}return r},set:function(t,e){for(var i,n,o=t.options,s=d.makeArray(e),r=o.length;r--;)if(n=o[r],d.inArray(d.valHooks.option.get(n),s)>=0)try{n.selected=i=!0}catch(t){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),o}}}}),d.each(["radio","checkbox"],(function(){d.valHooks[this]={set:function(t,e){if(d.isArray(e))return t.checked=d.inArray(d(t).val(),e)>=0}},u.checkOn||(d.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var pe,fe,ge=d.expr.attrHandle,me=/^(?:checked|selected)$/i,ve=u.getSetAttribute,ye=u.input;d.fn.extend({attr:function(t,e){return U(this,d.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){d.removeAttr(this,t)}))}}),d.extend({attr:function(t,e,i){var n,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return _typeof2(t.getAttribute)===z?d.prop(t,e,i):(1===s&&d.isXMLDoc(t)||(e=e.toLowerCase(),n=d.attrHooks[e]||(d.expr.match.bool.test(e)?fe:pe)),void 0===i?n&&"get"in n&&null!==(o=n.get(t,e))?o:null==(o=d.find.attr(t,e))?void 0:o:null!==i?n&&"set"in n&&void 0!==(o=n.set(t,i,e))?o:(t.setAttribute(e,i+""),i):void d.removeAttr(t,e))},removeAttr:function(t,e){var i,n,o=0,s=e&&e.match(A);if(s&&1===t.nodeType)for(;i=s[o++];)n=d.propFix[i]||i,d.expr.match.bool.test(i)?ye&&ve||!me.test(i)?t[n]=!1:t[d.camelCase("default-"+i)]=t[n]=!1:d.attr(t,i,""),t.removeAttribute(ve?i:n)},attrHooks:{type:{set:function(t,e){if(!u.radioValue&&"radio"===e&&d.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}}}),fe={set:function(t,e,i){return!1===e?d.removeAttr(t,i):ye&&ve||!me.test(i)?t.setAttribute(!ve&&d.propFix[i]||i,i):t[d.camelCase("default-"+i)]=t[i]=!0,i}},d.each(d.expr.match.bool.source.match(/\w+/g),(function(t,e){var i=ge[e]||d.find.attr;ge[e]=ye&&ve||!me.test(e)?function(t,e,n){var o,s;return n||(s=ge[e],ge[e]=o,o=null!=i(t,e,n)?e.toLowerCase():null,ge[e]=s),o}:function(t,e,i){if(!i)return t[d.camelCase("default-"+e)]?e.toLowerCase():null}})),ye&&ve||(d.attrHooks.value={set:function(t,e,i){if(!d.nodeName(t,"input"))return pe&&pe.set(t,e,i);t.defaultValue=e}}),ve||(pe={set:function(t,e,i){var n=t.getAttributeNode(i);if(n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i))return e}},ge.id=ge.name=ge.coords=function(t,e,i){var n;if(!i)return(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},d.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);if(i&&i.specified)return i.value},set:pe.set},d.attrHooks.contenteditable={set:function(t,e,i){pe.set(t,""!==e&&e,i)}},d.each(["width","height"],(function(t,e){d.attrHooks[e]={set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}}}))),u.style||(d.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var be=/^(?:input|select|textarea|button|object)$/i,we=/^(?:a|area)$/i;d.fn.extend({prop:function(t,e){return U(this,d.prop,t,e,arguments.length>1)},removeProp:function(t){return t=d.propFix[t]||t,this.each((function(){try{this[t]=void 0,delete this[t]}catch(t){}}))}}),d.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,i){var n,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return(1!==s||!d.isXMLDoc(t))&&(e=d.propFix[e]||e,o=d.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=d.find.attr(t,"tabindex");return e?parseInt(e,10):be.test(t.nodeName)||we.test(t.nodeName)&&t.href?0:-1}}}}),u.hrefNormalized||d.each(["href","src"],(function(t,e){d.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}})),u.optSelected||(d.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),d.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){d.propFix[this.toLowerCase()]=this})),u.enctype||(d.propFix.enctype="encoding");var xe=/[\t\r\n\f]/g;d.fn.extend({addClass:function(t){var e,i,n,o,s,r,a=0,l=this.length,c="string"==typeof t&&t;if(d.isFunction(t))return this.each((function(e){d(this).addClass(t.call(this,e,this.className))}));if(c)for(e=(t||"").match(A)||[];a<l;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(xe," "):" ")){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r=d.trim(n),i.className!==r&&(i.className=r)}return this},removeClass:function(t){var e,i,n,o,s,r,a=0,l=this.length,c=0===arguments.length||"string"==typeof t&&t;if(d.isFunction(t))return this.each((function(e){d(this).removeClass(t.call(this,e,this.className))}));if(c)for(e=(t||"").match(A)||[];a<l;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(xe," "):"")){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>=0;)n=n.replace(" "+o+" "," ");r=t?d.trim(n):"",i.className!==r&&(i.className=r)}return this},toggleClass:function(t,e){var i=_typeof2(t);return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):d.isFunction(t)?this.each((function(i){d(this).toggleClass(t.call(this,i,this.className,e),e)})):this.each((function(){if("string"===i)for(var e,n=0,o=d(this),s=t.match(A)||[];e=s[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else i!==z&&"boolean"!==i||(this.className&&d._data(this,"__className__",this.className),this.className=this.className||!1===t?"":d._data(this,"__className__")||"")}))},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(xe," ").indexOf(e)>=0)return!0;return!1}}),d.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){d.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}})),d.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var _e=d.now(),Ce=/\?/,$e=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;d.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var i,n=null,o=d.trim(e+"");return o&&!d.trim(o.replace($e,(function(t,e,o,s){return i&&e&&(n=0),0===n?t:(i=o||e,n+=!s-!o,"")})))?Function("return "+o)():d.error("Invalid JSON: "+e)},d.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?i=(new DOMParser).parseFromString(e,"text/xml"):((i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(e))}catch(t){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||d.error("Invalid XML: "+e),i};var Te,ke,Se=/#.*$/,Ee=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ae=/^(?:GET|HEAD)$/,Pe=/^\/\//,Ie=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ne={},Oe={},ze="*/".concat("*");try{ke=location.href}catch(t){(ke=$.createElement("a")).href="",ke=ke.href}function je(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,s=e.toLowerCase().match(A)||[];if(d.isFunction(i))for(;n=s[o++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Le(t,e,i,n){var o={},s=t===Oe;function r(a){var l;return o[a]=!0,d.each(t[a]||[],(function(t,a){var c=a(e,i,n);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)})),l}return r(e.dataTypes[0])||!o["*"]&&r("*")}function Me(t,e){var i,n,o=d.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&d.extend(!0,t,i),t}Te=Ie.exec(ke.toLowerCase())||[],d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Te[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Me(Me(t,d.ajaxSettings),e):Me(d.ajaxSettings,t)},ajaxPrefilter:je(Ne),ajaxTransport:je(Oe),ajax:function(t,e){"object"===_typeof2(t)&&(e=t,t=void 0);var i,n,o,s,r,a,l,c,u=d.ajaxSetup({},e=e||{}),h=u.context||u,p=u.context&&(h.nodeType||h.jquery)?d(h):d.event,f=d.Deferred(),g=d.Callbacks("once memory"),m=u.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!c)for(c={};e=De.exec(s);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return b||(t=y[i]=y[i]||t,v[t]=e),this},overrideMimeType:function(t){return b||(u.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return l&&l.abort(e),_(0,e),this}};if(f.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,u.url=((t||u.url||ke)+"").replace(Se,"").replace(Pe,Te[1]+"//"),u.type=e.method||e.type||u.method||u.type,u.dataTypes=d.trim(u.dataType||"*").toLowerCase().match(A)||[""],null==u.crossDomain&&(i=Ie.exec(u.url.toLowerCase()),u.crossDomain=!(!i||i[1]===Te[1]&&i[2]===Te[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Te[3]||("http:"===Te[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=d.param(u.data,u.traditional)),Le(Ne,u,e,x),2===b)return x;for(n in(a=d.event&&u.global)&&0==d.active++&&d.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!Ae.test(u.type),o=u.url,u.hasContent||(u.data&&(o=u.url+=(Ce.test(o)?"&":"?")+u.data,delete u.data),!1===u.cache&&(u.url=Ee.test(o)?o.replace(Ee,"$1_="+_e++):o+(Ce.test(o)?"&":"?")+"_="+_e++)),u.ifModified&&(d.lastModified[o]&&x.setRequestHeader("If-Modified-Since",d.lastModified[o]),d.etag[o]&&x.setRequestHeader("If-None-Match",d.etag[o])),(u.data&&u.hasContent&&!1!==u.contentType||e.contentType)&&x.setRequestHeader("Content-Type",u.contentType),x.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+ze+"; q=0.01":""):u.accepts["*"]),u.headers)x.setRequestHeader(n,u.headers[n]);if(u.beforeSend&&(!1===u.beforeSend.call(h,x,u)||2===b))return x.abort();for(n in w="abort",{success:1,error:1,complete:1})x[n](u[n]);if(l=Le(Oe,u,e,x)){x.readyState=1,a&&p.trigger("ajaxSend",[x,u]),u.async&&u.timeout>0&&(r=setTimeout((function(){x.abort("timeout")}),u.timeout));try{b=1,l.send(v,_)}catch(t){if(!(b<2))throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,i,n){var c,v,y,w,_,C=e;2!==b&&(b=2,r&&clearTimeout(r),l=void 0,s=n||"",x.readyState=t>0?4:0,c=t>=200&&t<300||304===t,i&&(w=function(t,e,i){for(var n,o,s,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(r in a)if(a[r]&&a[r].test(o)){l.unshift(r);break}if(l[0]in i)s=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){s=r;break}n||(n=r)}s=s||n}if(s)return s!==l[0]&&l.unshift(s),i[s]}(u,x,i)),w=function(t,e,i,n){var o,s,r,a,l,c={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(s=u.shift();s;)if(t.responseFields[s]&&(i[t.responseFields[s]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],u.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(u,w,x,c),c?(u.ifModified&&((_=x.getResponseHeader("Last-Modified"))&&(d.lastModified[o]=_),(_=x.getResponseHeader("etag"))&&(d.etag[o]=_)),204===t||"HEAD"===u.type?C="nocontent":304===t?C="notmodified":(C=w.state,v=w.data,c=!(y=w.error))):(y=C,!t&&C||(C="error",t<0&&(t=0))),x.status=t,x.statusText=(e||C)+"",c?f.resolveWith(h,[v,C,x]):f.rejectWith(h,[x,C,y]),x.statusCode(m),m=void 0,a&&p.trigger(c?"ajaxSuccess":"ajaxError",[x,u,c?v:y]),g.fireWith(h,[x,C]),a&&(p.trigger("ajaxComplete",[x,u]),--d.active||d.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,i){return d.get(t,e,i,"json")},getScript:function(t,e){return d.get(t,void 0,e,"script")}}),d.each(["get","post"],(function(t,e){d[e]=function(t,i,n,o){return d.isFunction(i)&&(o=o||n,n=i,i=void 0),d.ajax({url:t,type:e,dataType:o,data:i,success:n})}})),d._evalUrl=function(t){return d.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},d.fn.extend({wrapAll:function(t){if(d.isFunction(t))return this.each((function(e){d(this).wrapAll(t.call(this,e))}));if(this[0]){var e=d(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return d.isFunction(t)?this.each((function(e){d(this).wrapInner(t.call(this,e))})):this.each((function(){var e=d(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=d.isFunction(t);return this.each((function(i){d(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(){return this.parent().each((function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)})).end()}}),d.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!u.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||d.css(t,"display"))},d.expr.filters.visible=function(t){return!d.expr.filters.hidden(t)};var Re=/%20/g,He=/\[\]$/,We=/\r?\n/g,Fe=/^(?:submit|button|image|reset|file)$/i,qe=/^(?:input|select|textarea|keygen)/i;function Be(t,e,i,n){var o;if(d.isArray(e))d.each(e,(function(e,o){i||He.test(t)?n(t,o):Be(t+"["+("object"===_typeof2(o)?e:"")+"]",o,i,n)}));else if(i||"object"!==d.type(e))n(t,e);else for(o in e)Be(t+"["+o+"]",e[o],i,n)}d.param=function(t,e){var i,n=[],o=function(t,e){e=d.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(t)||t.jquery&&!d.isPlainObject(t))d.each(t,(function(){o(this.name,this.value)}));else for(i in t)Be(i,t[i],e,o);return n.join("&").replace(Re,"+")},d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=d.prop(this,"elements");return t?d.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!d(this).is(":disabled")&&qe.test(this.nodeName)&&!Fe.test(t)&&(this.checked||!V.test(t))})).map((function(t,e){var i=d(this).val();return null==i?null:d.isArray(i)?d.map(i,(function(t){return{name:e.name,value:t.replace(We,"\r\n")}})):{name:e.name,value:i.replace(We,"\r\n")}})).get()}}),d.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Xe()||function(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:Xe;var Ue=0,Ve={},Ye=d.ajaxSettings.xhr();function Xe(){try{return new t.XMLHttpRequest}catch(t){}}t.attachEvent&&t.attachEvent("onunload",(function(){for(var t in Ve)Ve[t](void 0,!0)})),u.cors=!!Ye&&"withCredentials"in Ye,(Ye=u.ajax=!!Ye)&&d.ajaxTransport((function(t){var e;if(!t.crossDomain||u.cors)return{send:function(i,n){var o,s=t.xhr(),r=++Ue;if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)void 0!==i[o]&&s.setRequestHeader(o,i[o]+"");s.send(t.hasContent&&t.data||null),e=function(i,o){var a,l,c;if(e&&(o||4===s.readyState))if(delete Ve[r],e=void 0,s.onreadystatechange=d.noop,o)4!==s.readyState&&s.abort();else{c={},a=s.status,"string"==typeof s.responseText&&(c.text=s.responseText);try{l=s.statusText}catch(t){l=""}a||!t.isLocal||t.crossDomain?1223===a&&(a=204):a=c.text?200:404}c&&n(a,l,c,s.getAllResponseHeaders())},t.async?4===s.readyState?setTimeout(e):s.onreadystatechange=Ve[r]=e:e()},abort:function(){e&&e(void 0,!0)}}})),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return d.globalEval(t),t}}}),d.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),d.ajaxTransport("script",(function(t){if(t.crossDomain){var e,i=$.head||d("head")[0]||$.documentElement;return{send:function(n,o){(e=$.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}}));var Ge=[],Qe=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ge.pop()||d.expando+"_"+_e++;return this[t]=!0,t}}),d.ajaxPrefilter("json jsonp",(function(e,i,n){var o,s,r,a=!1!==e.jsonp&&(Qe.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=d.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qe,"$1"+o):!1!==e.jsonp&&(e.url+=(Ce.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||d.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=t[o],t[o]=function(){r=arguments},n.always((function(){t[o]=s,e[o]&&(e.jsonpCallback=i.jsonpCallback,Ge.push(o)),r&&d.isFunction(s)&&s(r[0]),r=s=void 0})),"script"})),d.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||$;var n=w.exec(t),o=!i&&[];return n?[e.createElement(n[1])]:(n=d.buildFragment([t],e,o),o&&o.length&&d(o).remove(),d.merge([],n.childNodes))};var Ke=d.fn.load;d.fn.load=function(t,e,i){if("string"!=typeof t&&Ke)return Ke.apply(this,arguments);var n,o,s,r=this,a=t.indexOf(" ");return a>=0&&(n=d.trim(t.slice(a,t.length)),t=t.slice(0,a)),d.isFunction(e)?(i=e,e=void 0):e&&"object"===_typeof2(e)&&(s="POST"),r.length>0&&d.ajax({url:t,type:s,dataType:"html",data:e}).done((function(t){o=arguments,r.html(n?d("<div>").append(d.parseHTML(t)).find(n):t)})).complete(i&&function(t,e){r.each(i,o||[t.responseText,e,t])}),this},d.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){d.fn[e]=function(t){return this.on(e,t)}})),d.expr.filters.animated=function(t){return d.grep(d.timers,(function(e){return t===e.elem})).length};var Ze=t.document.documentElement;function Je(t){return d.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}d.offset={setOffset:function(t,e,i){var n,o,s,r,a,l,c=d.css(t,"position"),u=d(t),h={};"static"===c&&(t.style.position="relative"),a=u.offset(),s=d.css(t,"top"),l=d.css(t,"left"),("absolute"===c||"fixed"===c)&&d.inArray("auto",[s,l])>-1?(r=(n=u.position()).top,o=n.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),d.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(h.top=e.top-a.top+r),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):u.css(h)}},d.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){d.offset.setOffset(this,t,e)}));var e,i,n={top:0,left:0},o=this[0],s=o&&o.ownerDocument;return s?(e=s.documentElement,d.contains(e,o)?(_typeof2(o.getBoundingClientRect)!==z&&(n=o.getBoundingClientRect()),i=Je(s),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===d.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),d.nodeName(t[0],"html")||(i=t.offset()),i.top+=d.css(t[0],"borderTopWidth",!0),i.left+=d.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-d.css(n,"marginTop",!0),left:e.left-i.left-d.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||Ze;t&&!d.nodeName(t,"html")&&"static"===d.css(t,"position");)t=t.offsetParent;return t||Ze}))}}),d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i=/Y/.test(e);d.fn[t]=function(n){return U(this,(function(t,n,o){var s=Je(t);if(void 0===o)return s?e in s?s[e]:s.document.documentElement[n]:t[n];s?s.scrollTo(i?d(s).scrollLeft():o,i?o:d(s).scrollTop()):t[n]=o}),t,n,arguments.length,null)}})),d.each(["top","left"],(function(t,e){d.cssHooks[e]=zt(u.pixelPosition,(function(t,i){if(i)return i=Pt(t,e),Nt.test(i)?d(t).position()[e]+"px":i}))})),d.each({Height:"height",Width:"width"},(function(t,e){d.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){d.fn[n]=function(n,o){var s=arguments.length&&(i||"boolean"!=typeof n),r=i||(!0===n||!0===o?"margin":"border");return U(this,(function(e,i,n){var o;return d.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===n?d.css(e,i,r):d.style(e,i,n,r)}),e,s?n:void 0,s,null)}}))})),d.fn.size=function(){return this.length},d.fn.andSelf=d.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return d}));var ti=t.jQuery,ei=t.$;return d.noConflict=function(e){return t.$===d&&(t.$=ei),e&&t.jQuery===d&&(t.jQuery=ti),d},_typeof2(e)===z&&(t.jQuery=t.$=d),d})),function(t,e){function i(e,i){var o,s,r,a=e.nodeName.toLowerCase();return"area"===a?(s=(o=e.parentNode).name,!(!e.href||!s||"map"!==o.nodeName.toLowerCase())&&(!!(r=t("img[usemap=#"+s+"]")[0])&&n(r))):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a&&e.href||i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter((function(){return"hidden"===t.css(this,"visibility")})).length}var o=0,s=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each((function(){var e=this;setTimeout((function(){t(e).focus(),n&&n.call(e)}),i)})):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter((function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))})).eq(0):this.parents().filter((function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))})).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,o,s=t(this[0]);s.length&&s[0]!==document;){if(("absolute"===(n=s.css("position"))||"relative"===n||"fixed"===n)&&(o=parseInt(s.css("zIndex"),10),!isNaN(o)&&0!==o))return o;s=s.parent()}return 0},uniqueId:function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++o)}))},removeUniqueId:function(){return this.each((function(){s.test(this.id)&&t(this).removeAttr("id")}))}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(e,!o)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],(function(i,n){function o(e,i,n,o){return t.each(s,(function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)})),i}var s="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each((function(){t(this).css(r,o(this,i)+"px")}))},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each((function(){t(this).css(r,o(this,e,!0,i)+"px")}))}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",(function(t){t.preventDefault()}))},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var o,s=t.ui[e].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(t,e,i){var n,o=t.plugins[e];if(o&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return e[n]>0||(e[n]=1,o=e[n]>0,e[n]=0,o)}})}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,o=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(t){}o(e)},t.widget=function(i,n,o){var s,r,a,l,c={},u=i.split(".")[0];i=i.split(".")[1],s=u+"-"+i,o||(o=n,n=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[u]=t[u]||{},r=t[u][i],a=t[u][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new a(t,i)},t.extend(a,r,{version:o.version,_proto:t.extend({},o),_childConstructors:[]}),(l=new n).options=t.widget.extend({},l.options),t.each(o,(function(i,o){return t.isFunction(o)?(c[i]=function(){var t=function(){return n.prototype[i].apply(this,arguments)},e=function(t){return n.prototype[i].apply(this,t)};return function(){var i,n=this._super,s=this._superApply;return this._super=t,this._superApply=e,i=o.apply(this,arguments),this._super=n,this._superApply=s,i}}(),e):(c[i]=o,e)})),a.prototype=t.widget.extend(l,{widgetEventPrefix:r?l.widgetEventPrefix:i},c,{constructor:a,namespace:u,widgetName:i,widgetFullName:s}),r?(t.each(r._childConstructors,(function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,a,i._proto)})),delete r._childConstructors):n._childConstructors.push(a),t.widget.bridge(i,a)},t.widget.extend=function(i){for(var o,s,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(o in r[a])s=r[a][o],r[a].hasOwnProperty(o)&&s!==e&&(i[o]=t.isPlainObject(s)?t.isPlainObject(i[o])?t.widget.extend({},i[o],s):t.widget.extend({},s):s);return i},t.widget.bridge=function(i,o){var s=o.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),c=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each((function(){var n,o=t.data(this,s);return o?t.isFunction(o[r])&&"_"!==r.charAt(0)?(n=o[r].apply(o,l))!==o&&n!==e?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):e:t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")})):this.each((function(){var e=t.data(this,s);e?e.option(r||{})._init():t.data(this,s,new o(r,this))})),c}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},o=i.split("."),i=o.shift(),o.length){for(s=a[i]=t.widget.extend({},this.options[i]),r=0;o.length-1>r;r++)s[o[r]]=s[o[r]]||{},s=s[o[r]];if(i=o.pop(),n===e)return s[i]===e?null:s[i];s[i]=n}else{if(n===e)return this.options[i]===e?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,n,o){var s,r=this;"boolean"!=typeof i&&(o=n,n=i,i=!1),o?(n=s=t(n),this.bindings=this.bindings.add(n)):(o=n,n=this.element,s=this.widget()),t.each(o,(function(o,a){function l(){return i||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?r[a]:a).apply(r,arguments):e}"string"!=typeof a&&(l.guid=a.guid=a.guid||l.guid||t.guid++);var c=o.match(/^(\w+)\s*(.*)$/),u=c[1]+r.eventNamespace,h=c[2];h?s.delegate(h,u,l):n.bind(u,l)}))},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var o,s,r=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(o in s)o in i||(i[o]=s[o]);return this.element.trigger(i,n),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(n,o,s){"string"==typeof o&&(o={effect:o});var r,a=o?!0===o||"number"==typeof o?i:o.effect||i:e;"number"==typeof(o=o||{})&&(o={duration:o}),r=!t.isEmptyObject(o),o.complete=s,o.delay&&n.delay(o.delay),r&&t.effects&&t.effects.effect[a]?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,s):n.queue((function(i){t(this)[e](),s&&s.call(n[0]),i()}))}}))}(jQuery),function(t){var e=!1;t(document).mouseup((function(){e=!1})),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).bind("click."+this.widgetName,(function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0})),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,o=1===i.which,s=!("string"!=typeof this.options.cancel||!i.target.nodeName)&&t(i.target).closest(this.options.cancel).length;return!(o&&!s&&this._mouseCapture(i))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){n.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=!1!==this._mouseStart(i),!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0))}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(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)),!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}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function o(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var s,r=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(undefined!==s)return s;var e,i,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),e===(i=o.offsetWidth)&&(i=n[0].clientWidth),n.remove(),s=e-i},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),n=e.isWindow?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var s,p,g,m,v,y,b=t(e.of),w=t.position.getWithinInfo(e.within),x=t.position.getScrollInfo(w),_=(e.collision||"flip").split(" "),C={};return y=o(b),b[0].preventDefault&&(e.at="left top"),p=y.width,g=y.height,m=y.offset,v=t.extend({},m),t.each(["my","at"],(function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):u.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=u.test(n[1])?n[1]:"center",t=h.exec(n[0]),i=h.exec(n[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]})),1===_.length&&(_[1]=_[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),s=i(C.at,p,g),v.left+=s[0],v.top+=s[1],this.each((function(){var o,c,u=t(this),h=u.outerWidth(),d=u.outerHeight(),f=n(this,"marginLeft"),y=n(this,"marginTop"),$=h+f+n(this,"marginRight")+x.width,T=d+y+n(this,"marginBottom")+x.height,k=t.extend({},v),S=i(C.my,u.outerWidth(),u.outerHeight());"right"===e.my[0]?k.left-=h:"center"===e.my[0]&&(k.left-=h/2),"bottom"===e.my[1]?k.top-=d:"center"===e.my[1]&&(k.top-=d/2),k.left+=S[0],k.top+=S[1],t.support.offsetFractions||(k.left=l(k.left),k.top=l(k.top)),o={marginLeft:f,marginTop:y},t.each(["left","top"],(function(i,n){t.ui.position[_[i]]&&t.ui.position[_[i]][n](k,{targetWidth:p,targetHeight:g,elemWidth:h,elemHeight:d,collisionPosition:o,collisionWidth:$,collisionHeight:T,offset:[s[0]+S[0],s[1]+S[1]],my:e.my,at:e.at,within:w,elem:u})})),e.using&&(c=function(t){var i=m.left-k.left,n=i+p-h,o=m.top-k.top,s=o+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:u,left:k.left,top:k.top,width:h,height:d},horizontal:0>n?"left":i>0?"right":"center",vertical:0>s?"top":o>0?"bottom":"middle"};h>p&&p>a(i+n)&&(l.horizontal="center"),d>g&&g>a(o+s)&&(l.vertical="middle"),l.important=r(a(i),a(n))>r(a(o),a(s))?"horizontal":"vertical",e.using.call(this,t,l)}),u.offset(t.extend(k,{using:c}))}))},t.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=o-a,c=a+e.collisionWidth-s-o;e.collisionWidth>s?l>0&&0>=c?(i=t.left+l+e.collisionWidth-s-o,t.left+=l-i):t.left=c>0&&0>=l?o:l>c?o+s-e.collisionWidth:o:l>0?t.left+=l:c>0?t.left-=c:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=o-a,c=a+e.collisionHeight-s-o;e.collisionHeight>s?l>0&&0>=c?(i=t.top+l+e.collisionHeight-s-o,t.top+=l-i):t.top=c>0&&0>=l?o:l>c?o+s-e.collisionHeight:o:l>0?t.top+=l:c>0?t.top-=c:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,s=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,c=t.left-e.collisionPosition.marginLeft,u=c-l,h=c+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>u?(0>(i=t.left+d+p+f+e.collisionWidth-r-s)||a(u)>i)&&(t.left+=d+p+f):h>0&&(((n=t.left-e.collisionPosition.marginLeft+d+p+f-l)>0||h>a(n))&&(t.left+=d+p+f))},top:function(t,e){var i,n,o=e.within,s=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,c=t.top-e.collisionPosition.marginTop,u=c-l,h=c+e.collisionHeight-r-l,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];0>u?(n=t.top+d+p+f+e.collisionHeight-r-s,t.top+d+p+f>u&&(0>n||a(u)>n)&&(t.top+=d+p+f)):h>0&&(i=t.top-e.collisionPosition.marginTop+d+p+f-l,t.top+d+p+f>h&&(i>0||h>a(i))&&(t.top+=d+p+f))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,o,s,r=document.getElementsByTagName("body")[0],a=document.createElement("div");for(s in e=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"}),n)e.style[s]=n[s];e.appendChild(a),(i=r||document.documentElement).insertBefore(e,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",o=t(a).offset().left,t.support.offsetFractions=o>10&&11>o,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(t(!0===i.iframeFix?"iframe":i.iframeFix).each((function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")})),!0))},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!t.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1)},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each((function(){this.parentNode.removeChild(this)})),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_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(){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.element.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.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options;return o.containment?"window"===o.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),void((n=(i=t(o.containment))[0])&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i))):void(this.containment=null)},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:o.scrollTop(),left:o.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(e){var i,n,o,s,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,c=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,c=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1]:o,s=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?s-this.offset.click.left>=i[0]||s-this.offset.click.left>i[2]?s:s-this.offset.click.left>=i[0]?s-r.grid[0]:s+r.grid[0]:s)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var n=t(this).data("ui-draggable"),o=n.options,s=t.extend({},i,{item:n.element});n.sortables=[],t(o.connectToSortable).each((function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,s))}))},stop:function(e,i){var n=t(this).data("ui-draggable"),o=t.extend({},i,{item:n.element});t.each(n.sortables,(function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,o))}))},drag:function(e,i){var n=t(this).data("ui-draggable"),o=this;t.each(n.sortables,(function(){var s=!1,r=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(s=!0,t.each(n.sortables,(function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==r&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(r.instance.element[0],this.instance.element[0])&&(s=!1),s}))),s?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(o).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",e),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",e),n.dropped=!1)}))}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var n=t(i.helper),o=t(this).data("ui-draggable").options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),n=i.options,o=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop+n.scrollSpeed:e.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft+n.scrollSpeed:e.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(document).scrollTop()<n.scrollSensitivity?o=t(document).scrollTop(t(document).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<n.scrollSensitivity&&(o=t(document).scrollTop(t(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(document).scrollLeft()<n.scrollSensitivity?o=t(document).scrollLeft(t(document).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<n.scrollSensitivity&&(o=t(document).scrollLeft(t(document).scrollLeft()+n.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each((function(){var i=t(this),n=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})}))},drag:function(e,i){var n,o,s,r,a,l,c,u,h,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,y=i.offset.top,b=y+p.helperProportions.height;for(h=p.snapElements.length-1;h>=0;h--)l=(a=p.snapElements[h].left)+p.snapElements[h].width,u=(c=p.snapElements[h].top)+p.snapElements[h].height,a-g>v||m>l+g||c-g>b||y>u+g||!t.contains(p.snapElements[h].item.ownerDocument,p.snapElements[h].item)?(p.snapElements[h].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-y),s=g>=Math.abs(a-v),r=g>=Math.abs(l-m),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=n||o||s||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-y),o=g>=Math.abs(u-b),s=g>=Math.abs(a-m),r=g>=Math.abs(l-v),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[h].snapping&&(n||o||s||r||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=n||o||s||r||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each((function(i){t(this).css("zIndex",e+i)})),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),o=t(this).data("ui-draggable").options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,o=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&t.ui.intersect(n,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(o=!0,!1):void 0})),!o&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,n){if(!i.offset)return!1;var o,s=(t.positionAbs||t.position.absolute).left,r=s+t.helperProportions.width,a=(t.positionAbs||t.position.absolute).top,l=a+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,h=i.offset.top,d=h+i.proportions.height;switch(n){case"fit":return s>=c&&u>=r&&a>=h&&d>=l;case"intersect":return s+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&a+t.helperProportions.height/2>h&&d>l-t.helperProportions.height/2;case"pointer":return o=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,e((t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,h,i.proportions.height)&&e(o,c,i.proportions.width);case"touch":return(a>=h&&d>=a||l>=h&&d>=l||h>a&&l>d)&&(s>=c&&u>=s||r>=c&&u>=r||c>s&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,o,s=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;s.length>n;n++)if(!(s[n].options.disabled||e&&!s[n].accept.call(s[n].element[0],e.currentItem||e.element))){for(o=0;a.length>o;o++)if(a[o]===s[n].element[0]){s[n].proportions.height=0;continue t}s[n].visible="none"!==s[n].element.css("display"),s[n].visible&&("mousedown"===r&&s[n]._activate.call(s[n],i),s[n].offset=s[n].element.offset(),s[n].proportions={width:s[n].element[0].offsetWidth,height:s[n].element[0].offsetHeight})}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),n},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,o,s,r=t.ui.intersect(e,this,this.options.tolerance),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,(s=this.element.parents(":data(ui-droppable)").filter((function(){return t.data(this,"ui-droppable").options.scope===o}))).length&&((n=t.data(s[0],"ui-droppable")).greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,n,o,s=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)n=t.trim(e[i]),(o=t("<div class='ui-resizable-handle "+("ui-resizable-"+n)+"'></div>")).css({zIndex:r.zIndex}),"se"===n&&o.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(o);this._renderAxis=function(e){var i,n,o,s;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=t(this.handles[i],this.element),s=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,s),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover((function(){s.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=o&&o[1]?o[1]:"se")})),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter((function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),s._handles.show())})).mouseleave((function(){r.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())}))),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=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&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,o=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(i){var n,o,s,r=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=e(this.helper.css("left")),o=e(this.helper.css("top")),r.containment&&(n+=t(r.containment).scrollLeft()||0,o+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:o},this.size=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:o},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===s?this.axis+"-resize":s),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,n=this.helper,o={},s=this.originalMousePosition,r=this.axis,a=this.position.top,l=this.position.left,c=this.size.width,u=this.size.height,h=e.pageX-s.left||0,d=e.pageY-s.top||0,p=this._change[r];return!!p&&(i=p.apply(this,[e,h,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==a&&(o.top=this.position.top+"px"),this.position.left!==l&&(o.left=this.position.left+"px"),this.size.width!==c&&(o.width=this.size.width+"px"),this.size.height!==u&&(o.height=this.size.height+"px"),n.css(o),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(o)||this._trigger("resize",e,this.ui()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,o,s,r,a,l,c=this.options,u=this;return this._helper&&(o=(n=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&t.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,s=n?0:u.sizeDiff.width,r={width:u.helper.width()-s,height:u.helper.height()-o},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(t.extend(r,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,n,o,s,r,a=this.options;r={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,o=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),o>r.minHeight&&(r.minHeight=o),r.maxWidth>n&&(r.maxWidth=n),r.maxHeight>s&&(r.maxHeight=s)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,o=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===o&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===o&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,o=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,s=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,r=i(t.width)&&e.minWidth&&e.minWidth>t.width,a=i(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,u=/sw|nw|w/.test(n),h=/nw|ne|n/.test(n);return r&&(t.width=e.minWidth),a&&(t.height=e.minHeight),o&&(t.width=e.maxWidth),s&&(t.height=e.maxHeight),r&&u&&(t.left=l-e.minWidth),o&&u&&(t.left=l-e.maxWidth),a&&h&&(t.top=c-e.minHeight),s&&h&&(t.top=c-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,n,o,s=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(o=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[o.css("borderTopWidth"),o.css("borderRightWidth"),o.css("borderBottomWidth"),o.css("borderLeftWidth")],n=[o.css("paddingTop"),o.css("paddingRight"),o.css("paddingBottom"),o.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(n[e],10)||0);o.css({height:s.height()-this.borderDif[0]-this.borderDif[2]||0,width:s.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,o=this.originalPosition;return{top:o.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),n=i.options,o=i._proportionallyResizeElements,s=o.length&&/textarea/i.test(o[0].nodeName),r=s&&t.ui.hasScroll(o[0],"left")?0:i.sizeDiff.height,a=s?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};o&&o.length&&t(o[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,n,o,s,r,a,l,c=t(this).data("ui-resizable"),u=c.options,h=c.element,d=u.containment,p=d instanceof t?d.get(0):/parent/.test(d)?h.parent().get(0):d;p&&(c.containerElement=t(p),/document/.test(d)||d===document?(c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),n=[],t(["Top","Right","Left","Bottom"]).each((function(t,o){n[t]=e(i.css("padding"+o))})),c.containerOffset=i.offset(),c.containerPosition=i.position(),c.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},o=c.containerOffset,s=c.containerSize.height,r=c.containerSize.width,a=t.ui.hasScroll(p,"left")?p.scrollWidth:r,l=t.ui.hasScroll(p)?p.scrollHeight:s,c.parentData={element:p,left:o.left,top:o.top,width:a,height:l}))},resize:function(e){var i,n,o,s,r=t(this).data("ui-resizable"),a=r.options,l=r.containerOffset,c=r.position,u=r._aspectRatio||e.shiftKey,h={top:0,left:0},d=r.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),c.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-h.left),u&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=a.helper?l.left:0),c.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),u&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?l.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top,i=Math.abs((r._helper,r.offset.left-h.left+r.sizeDiff.width)),n=Math.abs((r._helper?r.offset.top-h.top:r.offset.top-l.top)+r.sizeDiff.height),o=r.containerElement.get(0)===r.element.parent().get(0),s=/relative|absolute/.test(r.containerElement.css("position")),o&&s&&(i-=r.parentData.left),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,u&&(r.size.height=r.size.width/r.aspectRatio)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,u&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.containerOffset,o=e.containerPosition,s=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,c=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(s.css("position"))&&t(this).css({left:a.left-o.left-n.left,width:l,height:c}),e._helper&&!i.animate&&/static/.test(s.css("position"))&&t(this).css({left:a.left-o.left-n.left,width:l,height:c})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable").options,i=function(e){t(e).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})}))};"object"!=_typeof2(e.alsoResize)||e.alsoResize.parentNode?i(e.alsoResize):e.alsoResize.length?(e.alsoResize=e.alsoResize[0],i(e.alsoResize)):t.each(e.alsoResize,(function(t){i(t)}))},resize:function(e,i){var n=t(this).data("ui-resizable"),o=n.options,s=n.originalSize,r=n.originalPosition,a={height:n.size.height-s.height||0,width:n.size.width-s.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(e,n){t(e).each((function(){var e=t(this),o=t(this).data("ui-resizable-alsoresize"),s={},r=n&&n.length?n:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,(function(t,e){var i=(o[e]||0)+(a[e]||0);i&&i>=0&&(s[e]=i||null)})),e.css(s)}))};"object"!=_typeof2(o.alsoResize)||o.alsoResize.nodeType?l(o.alsoResize):t.each(o.alsoResize,(function(t,e){l(t,e)}))},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size,o=e.originalSize,s=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,c=a[1]||1,u=Math.round((n.width-o.width)/l)*l,h=Math.round((n.height-o.height)/c)*c,d=o.width+u,p=o.height+h,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=a,m&&(d+=l),v&&(p+=c),f&&(d-=l),g&&(p-=c),/^(se|s|e)$/.test(r)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(r)?(e.size.width=d,e.size.height=p,e.position.top=s.top-h):/^(sw)$/.test(r)?(e.size.width=d,e.size.height=p,e.position.left=s.left-u):(e.size.width=d,e.size.height=p,e.position.top=s.top-h,e.position.left=s.left-u)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){(e=t(i.options.filter,i.element[0])).addClass("ui-selectee"),e.each((function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})}))},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))})),t(e.target).parents().addBack().each((function(){var n,o=t.data(this,"selectable-item");return o?(n=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),o.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),o.unselecting=!n,o.selecting=n,o.selected=n,n?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1):void 0})))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,o=this.options,s=this.opos[0],r=this.opos[1],a=e.pageX,l=e.pageY;return s>a&&(i=a,a=s,s=i),r>l&&(i=l,l=r,r=i),this.helper.css({left:s,top:r,width:a-s,height:l-r}),this.selectees.each((function(){var i=t.data(this,"selectable-item"),c=!1;i&&i.element!==n.element[0]&&("touch"===o.tolerance?c=!(i.left>a||s>i.right||i.top>l||r>i.bottom):"fit"===o.tolerance&&(c=i.left>s&&a>i.right&&i.top>r&&l>i.bottom),c?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))})),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each((function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})})),t(".ui-selecting",this.element[0]).each((function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})})),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||i(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,o=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each((function(){return t.data(this,s.widgetName+"-item")===s?(n=t(this),!1):void 0})),t.data(e.target,s.widgetName+"-item")===s&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var o,s,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-t(document).scrollTop()<r.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<r.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+r.scrollSpeed)),e.pageX-t(document).scrollLeft()<r.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<r.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+r.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(n=this.items[i]).item[0],(s=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&o!==this.currentItem[0]&&this.placeholder[1===s?"next":"prev"]()[0]!==o&&!t.contains(this.placeholder[0],o)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,r={};s&&"x"!==s||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){n._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each((function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")})),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=t.left,r=s+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||n+c>a&&l>n+c,d="y"===this.options.axis||e+u>s&&r>e+u,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>s&&r>i-this.helperProportions.width/2&&n+this.helperProportions.height/2>a&&l>o-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=i&&n,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!o&&(this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&n||"left"===s&&!n:o&&("down"===o&&i||"up"===o&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,n,o,s,r=[],a=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(n=(o=t(l[i])).length-1;n>=0;n--)(s=t.data(o[n],this.widgetFullName))&&s!==this&&!s.options.disabled&&a.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(a.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each((function(){r.push(this)}));return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,o,s,r,a,l,c,u=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=(o=t(d[i])).length-1;n>=0;n--)(s=t.data(o[n],this.widgetFullName))&&s!==this&&!s.options.disabled&&(h.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(s.options.items,s.element),s]),this.containers.push(s));for(i=h.length-1;i>=0;i--)for(r=h[i][1],n=0,c=(a=h[i][0]).length;c>n;n++)(l=t(a[n])).data(this.widgetName+"-item",r),u.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,n,o,s;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(n=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,n=(e=e||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each((function(){t("<td> </td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(o)})):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){(!i||n.forcePlaceholderSize)&&(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(n){var o,s,r,a,l,c,u,h,d,p,f=null,g=null;for(o=this.containers.length-1;o>=0;o--)if(!t.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&t.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],g=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger("out",n,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",n,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(r=1e4,a=null,l=(p=f.floating||i(this.currentItem))?"left":"top",c=p?"width":"height",u=this.positionAbs[l]+this.offset.click[l],s=this.items.length-1;s>=0;s--)t.contains(this.containers[g].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[s].top,this.items[s].height))&&(h=this.items[s].item.offset()[l],d=!1,Math.abs(h-u)>Math.abs(h+this.items[s][c]-u)&&(d=!0,h+=this.items[s][c]),r>Math.abs(h-u)&&(r=Math.abs(h-u),a=this.items[s],this.direction=d?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;a?this._rearrange(n,a,null,!0):this._rearrange(n,null,this.containers[g].element,!0),this._trigger("change",n,this._uiHash()),this.containers[g]._trigger("change",n,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",n,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_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,i,n,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],i=t(o.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())*n}},_generatePosition:function(e){var i,n,o=this.options,s=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!n)}))},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(n.push((function(t){this._trigger("remove",t,this._uiHash())})),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||n.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;n.length>i;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;n.length>i;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){var e=jQuery.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")}(),function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.3.0",i.TRANSITION_DURATION=150,i.prototype.close=function(e){var n=t(this),o=n.attr("data-target");o||(o=(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);function r(){s.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),s.length||(s=n.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",r).emulateTransitionEnd(i.TRANSITION_DURATION):r())};var n=t.fn.alert;t.fn.alert=function(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)}))},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(jQuery),function(t){"use strict";var e=function e(i,n){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,n),this.isLoading=!1};function i(i){return this.each((function(){var n=t(this),o=n.data("bs.button"),s="object"==_typeof2(i)&&i;o||n.data("bs.button",o=new e(this,s)),"toggle"==i?o.toggle():i&&o.setState(i)}))}e.VERSION="3.3.0",e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"html",s=n.data();e+="Text",null==s.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy((function(){n[o](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))}),this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=i,t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(e){var n=t(e.target);n.hasClass("btn")||(n=n.closest(".btn")),i.call(n,"toggle"),e.preventDefault()})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus","focus"==e.type)}))}(jQuery),function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};function i(i){return this.each((function(){var n=t(this),o=n.data("bs.carousel"),s=t.extend({},e.DEFAULTS,n.data(),"object"==_typeof2(i)&&i),r="string"==typeof i?i:s.slide;o||n.data("bs.carousel",o=new e(this,s)),"number"==typeof i?o.to(i):r?o[r]():s.interval&&o.pause().cycle()}))}e.VERSION="3.3.0",e.TRANSITION_DURATION=600,e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},e.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},e.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},e.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},e.prototype.getItemForDirection=function(t,e){var i="prev"==t?-1:1,n=(this.getItemIndex(e)+i)%this.$items.length;return this.$items.eq(n)},e.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(i,n){var o=this.$element.find(".item.active"),s=n||this.getItemForDirection(i,o),r=this.interval,a="next"==i?"left":"right",l="next"==i?"first":"last",c=this;if(!s.length){if(!this.options.wrap)return;s=this.$element.find(".item")[l]()}if(s.hasClass("active"))return this.sliding=!1;var u=s[0],h=t.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(s)]);d&&d.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(i),s[0].offsetWidth,o.addClass(a),s.addClass(a),o.one("bsTransitionEnd",(function(){s.removeClass([i,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),c.sliding=!1,setTimeout((function(){c.$element.trigger(p)}),0)})).emulateTransitionEnd(e.TRANSITION_DURATION)):(o.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(p)),r&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=i,t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(e){var n,o=t(this),s=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var r=t.extend({},s.data(),o.data()),a=o.attr("data-slide-to");a&&(r.interval=!1),i.call(s,r),a&&s.data("bs.carousel").to(a),e.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(jQuery),function(t){"use strict";var e='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};function n(i){i&&3===i.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),n=o(e),s={relatedTarget:this};n.hasClass("open")&&(n.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(e.attr("aria-expanded","false"),n.removeClass("open").trigger("hidden.bs.dropdown",s)))})))}function o(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}i.VERSION="3.3.0",i.prototype.toggle=function(e){var i=t(this);if(!i.is(".disabled, :disabled")){var s=o(i),r=s.hasClass("open");if(n(),!r){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(s.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},i.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var s=o(n),r=s.hasClass("open");if(!r&&27!=i.which||r&&27==i.which)return 27==i.which&&s.find(e).trigger("focus"),n.trigger("click");var a=" li:not(.divider):visible a",l=s.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var c=l.index(i.target);38==i.which&&c>0&&c--,40==i.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new i(this)),"string"==typeof e&&o[e].call(n)}))},t.fn.dropdown.Constructor=i,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,i.prototype.toggle).on("keydown.bs.dropdown.data-api",e,i.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',i.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',i.prototype.keydown)}(jQuery),function(t){"use strict";var e=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function i(i,n){return this.each((function(){var o=t(this),s=o.data("bs.modal"),r=t.extend({},e.DEFAULTS,o.data(),"object"==_typeof2(i)&&i);s||o.data("bs.modal",s=new e(this,r)),"string"==typeof i?s[i](n):r.show&&s.show(n)}))}e.VERSION="3.3.0",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(i){var n=this,o=t.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop((function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),o&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:i});o?n.$element.find(".modal-dialog").one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(s)})).emulateTransitionEnd(e.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)})))},e.prototype.hide=function(i){i&&i.preventDefault(),i=t.Event("hide.bs.modal"),this.$element.trigger(i),this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(i){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t('<div class="modal-backdrop '+o+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy((function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))}),this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;s?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):i()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop(),i&&i()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):r()}else i&&i()},e.prototype.checkScrollbar=function(){this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},e.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},e.prototype.measureScrollbar=function(){if(document.body.clientWidth>=window.innerWidth)return 0;var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var n=t(this),o=n.attr("href"),s=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),r=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),n.data());n.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){n.is(":visible")&&n.trigger("focus")}))})),i.call(s,r,this)}))}(jQuery),function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.VERSION="3.3.0",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var o=this.options.trigger.split(" "),s=o.length;s--;){var r=o[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,(function(t,n){i[t]!=n&&(e[t]=n)})),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i&&i.$tip&&i.$tip.is(":visible"))i.hoverState="in";else{if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)}},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)},e.prototype.show=function(){var i=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!n)return;var o=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element);var u=this.getPosition(),h=s[0].offsetWidth,d=s[0].offsetHeight;if(c){var p=a,f=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(f);a="bottom"==a&&u.bottom+d>g.bottom?"top":"top"==a&&u.top-d<g.top?"bottom":"right"==a&&u.right+h>g.width?"left":"left"==a&&u.left-h<g.left?"right":a,s.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,u,h,d);this.applyPlacement(m,a);var v=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",v).emulateTransitionEnd(e.TRANSITION_DURATION):v()}},e.prototype.applyPlacement=function(e,i){var n=this.tip(),o=n[0].offsetWidth,s=n[0].offsetHeight,r=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),e.top=e.top+r,e.left=e.left+a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=s&&(e.top=e.top+s-c);var u=this.getViewportAdjustedDelta(i,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var h=/top|bottom/.test(i),d=h?2*u.left-o+l:2*u.top-s+c,p=h?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][p],h)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(i){var n=this,o=this.tip(),s=t.Event("hide.bs."+this.type);function r(){"in"!=n.hoverState&&o.detach(),n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),i&&i()}if(this.$element.trigger(s),!s.isDefaultPrevented())return o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",r).emulateTransitionEnd(e.TRANSITION_DURATION):r(),this.hoverState=null,this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var i=(e=e||this.$element)[0],n="BODY"==i.tagName,o=i.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var s=n?{top:0,left:0}:e.offset(),r={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,r,a,s)},e.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var s=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-r.scroll,l=e.top+s-r.scroll+n;a<r.top?o.top=r.top-a:l>r.top+r.height&&(o.top=r.top+r.height-l)}else{var c=e.left-s,u=e.left+s+i;c<r.left?o.left=r.left-c:u>r.width&&(o.left=r.left+r.width-u)}return o},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type)}))};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each((function(){var n=t(this),o=n.data("bs.tooltip"),s="object"==_typeof2(i)&&i,r=s&&s.selector;(o||"destroy"!=i)&&(r?(o||n.data("bs.tooltip",o={}),o[r]||(o[r]=new e(this,s))):o||n.data("bs.tooltip",o=new e(this,s)),"string"==typeof i&&o[i]())}))},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.0",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),(e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype)).constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each((function(){var n=t(this),o=n.data("bs.popover"),s="object"==_typeof2(i)&&i,r=s&&s.selector;(o||"destroy"!=i)&&(r?(o||n.data("bs.popover",o={}),o[r]||(o[r]=new e(this,s))):o||n.data("bs.popover",o=new e(this,s)),"string"==typeof i&&o[i]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";var e=function(e){this.element=t(e)};function i(i){return this.each((function(){var n=t(this),o=n.data("bs.tab");o||n.data("bs.tab",o=new e(this)),"string"==typeof i&&o[i]()}))}e.VERSION="3.3.0",e.TRANSITION_DURATION=150,e.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),r=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(s),e.trigger(r),!r.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),(function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})}))}}},e.prototype.activate=function(i,n,o){var s=n.find("> .active"),r=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);function a(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade"),i.parent(".dropdown-menu")&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}s.length&&r?s.one("bsTransitionEnd",a).emulateTransitionEnd(e.TRANSITION_DURATION):a(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=i,t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(e){e.preventDefault(),i.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";var e=function e(i,n){this.options=t.extend({},e.DEFAULTS,n),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(i),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};function i(i){return this.each((function(){var n=t(this),o=n.data("bs.affix"),s="object"==_typeof2(i)&&i;o||n.data("bs.affix",o=new e(this,s)),"string"==typeof i&&o[i]()}))}e.VERSION="3.3.0",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),s=this.$element.offset(),r=this.$target.height();if(null!=i&&"top"==this.affixed)return o<i&&"top";if("bottom"==this.affixed)return null!=i?!(o+this.unpin<=s.top)&&"bottom":!(o+r<=t-n)&&"bottom";var a=null==this.affixed,l=a?o:s.top;return null!=i&&l<=i?"top":null!=n&&l+(a?r:e)>=t-n&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var i=this.$element.height(),n=this.options.offset,o=n.top,s=n.bottom,r=t("body").height();"object"!=_typeof2(n)&&(s=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof s&&(s=n.bottom(this.$element));var a=this.getState(r,i,o,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-i-s})}};var n=t.fn.affix;t.fn.affix=i,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),n=e.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),i.call(e,n)}))}))}(jQuery),function(t){"use strict";var e=function e(i,n){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,n),this.$trigger=t(this.options.trigger).filter('[href="#'+i.id+'"], [data-target="#'+i.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function i(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function n(i){return this.each((function(){var n=t(this),o=n.data("bs.collapse"),s=t.extend({},e.DEFAULTS,n.data(),"object"==_typeof2(i)&&i);!o&&s.toggle&&"show"==i&&(s.toggle=!1),o||n.data("bs.collapse",o=new e(this,s)),"string"==typeof i&&o[i]()}))}e.VERSION="3.3.0",e.TRANSITION_DURATION=350,e.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},e.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i,o=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(o&&o.length&&(i=o.data("bs.collapse"))&&i.transitioning)){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),i||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[r](this.$element[0][l])}}}},e.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(e.TRANSITION_DURATION)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},e.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(e,n){var o=t(n);this.addAriaAndCollapsedClass(i(o),o)}),this)).end()},e.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){var o=t(this);o.attr("data-target")||e.preventDefault();var s=i(o),r=s.data("bs.collapse")?"toggle":t.extend({},o.data(),{trigger:this});n.call(s,r)}))}(jQuery),function(t){"use strict";function e(i,n){var o=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(i).is("body")?t(window):t(i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o),this.refresh(),this.process()}function i(i){return this.each((function(){var n=t(this),o=n.data("bs.scrollspy"),s="object"==_typeof2(i)&&i;o||n.data("bs.scrollspy",o=new e(this,s)),"string"==typeof i&&o[i]()}))}e.VERSION="3.3.0",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",i=0;t.isWindow(this.$scrollElement[0])||(e="position",i=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var n=this;this.$body.find(this.selector).map((function(){var n=t(this),o=n.data("target")||n.attr("href"),s=/^#./.test(o)&&t(o);return s&&s.length&&s.is(":visible")&&[[s[e]().top+i,o]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){n.offsets.push(this[0]),n.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,s=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return r!=(t=s[s.length-1])&&this.activate(t);if(r&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)r!=s[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(jQuery),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||t(n).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),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";var e='[data-toggle="context"]',i=function(e,i){this.$element=t(e),this.before=i.before||this.before,this.onItem=i.onItem||this.onItem,this.scopes=i.scopes||null,i.target&&this.$element.data("target",i.target),this.listen()};i.prototype={constructor:i,show:function(e){var i,n,o={relatedTarget:this};if(!this.isDisabled()&&(this.closemenu(),this.before.call(this,e,t(e.currentTarget))))return(i=this.getMenu()).trigger(t.Event("show.bs.context",o)),n=this.getPosition(e,i),"li:not(.divider)",i.attr("style","").css(n).addClass("open").on("click.context.data-api","li:not(.divider)",t.proxy(this.onItem,this,t(e.currentTarget))).trigger("shown.bs.context",o),t("html").on("click.context.data-api",i.selector,t.proxy(this.closemenu,this)),!1},closemenu:function(e){var i,n;if((i=this.getMenu()).hasClass("open"))return n={relatedTarget:this},i.trigger(t.Event("hide.bs.context",n)),"li:not(.divider)",i.removeClass("open").off("click.context.data-api","li:not(.divider)").trigger("hidden.bs.context",n),t("html").off("click.context.data-api",i.selector),!1},keydown:function(t){27==t.which&&this.closemenu(t)},before:function(t){return!0},onItem:function(t){return!0},listen:function(){this.$element.on("contextmenu.context.data-api",this.scopes,t.proxy(this.show,this)),t("html").on("click.context.data-api",t.proxy(this.closemenu,this)),t("html").on("keydown.context.data-api",t.proxy(this.keydown,this))},destroy:function(){this.$element.off(".context.data-api").removeData("context"),t("html").off(".context.data-api")},isDisabled:function(){return this.$element.hasClass("disabled")||this.$element.attr("disabled")},getMenu:function(){var e,i=this.$element.data("target");return i||(i=(i=this.$element.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),(e=t(i))&&e.length?e:this.$element.find(i)},getPosition:function(e,i){var n,o,s,r=e.clientX,a=e.clientY,l=t(window).width(),c=t(window).height(),u=i.find(".dropdown-menu").outerWidth(),h=i.find(".dropdown-menu").outerHeight();return n=a+h>c?{top:a-h+t(window).scrollTop()}:{top:a+t(window).scrollTop()},o=r+u>l&&r-u>0?{left:r-u+t(window).scrollLeft()}:{left:r+t(window).scrollLeft()},s=i.offsetParent().offset(),o.left=o.left-s.left,n.top=n.top-s.top,t.extend({position:"absolute","z-index":9999},n,o)}},t.fn.contextmenu=function(e,n){return this.each((function(){var o=t(this),s=o.data("context"),r="object"==_typeof2(e)&&e;s||o.data("context",s=new i(o,r)),"string"==typeof e&&s[e].call(s,n)}))},t.fn.contextmenu.Constructor=i,t(document).on("contextmenu.context.data-api",(function(){t(e).each((function(){var e=t(this).data("context");e&&e.closemenu()}))})).on("contextmenu.context.data-api",e,(function(e){t(this).contextmenu("show",e),e.preventDefault(),e.stopPropagation()}))}(jQuery),function(t){var e=new Array("00","33","66","99","CC","FF"),n=new Array("FF0000","00FF00","0000FF","FFFF00","00FFFF","FF00FF");t.fn.colorpicker=function(o){var s=jQuery.extend({},jQuery.fn.colorpicker.defaults,o);return function(){t("body").append('<style>.colorpicker-controller{background-color:#fff;border: 1px solid #bbb;width:18px;height:18px;}.colorpicker{margin:2px;outline:none;display:inline-block;cursor:pointer;width:12px;height:12px;}</style><div id="color-panel" style="background-color:#fff;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,0.2);padding:5px;border:solid 1px #ccc;position:absolute;z-index:1051;display:none;"></div>');var o="",s="";for(i=0;i<2;i++)for(j=0;j<6;j++)for(o+='<tr height="12">',s=0==i?e[j]+e[j]+e[j]:n[j],o=o+'<td width="11" rel="#'+s+'" style="background-color:#'+s+'">',k=0;k<3;k++)for(l=0;l<6;l++)s=e[k+3*i]+e[l]+e[j],o=o+'<td width="11" rel="#'+s+'" style="background-color:#'+s+'">';o='<table width="230" border="0" cellspacing="0" cellpadding="0"><tr height="30"><td colspan="21" bgcolor="#fff"><table cellpadding="0" cellspacing="1" border="0" style="border-collapse:collapse"><tr><td width="3"><td><input type="text" id="color-panel-color" size="6" disabled style="border:inset 1px #ccc;"></td><td width="3"><td><input type="text" id="color-panel-hex-color" size="7" style="border:inset 1px #ccc; font-family:Arial;"><a href="javascript:;" id="color-panel-close" style="padding-left:15px;">关闭</a> <a href="javascript:;" style="padding-left:5px;" id="color-panel-reset">重置</a></td></tr></table></td></table><table width="230" id="color-panel-body" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse" style="cursor:pointer;">'+o+"</table>";var r=t("#color-panel");r.html(o),t(document).on("mousedown.colorpicker",(function(){r.hide()})),r.on("mousedown.colorpicker",(function(t){t.stopPropagation()})),t("#color-panel-close").on("click.colorpicker",(function(){return r.hide(),!1}))}(),this.each((function(){var e=t(this);e.on(s.event+".colorpicker",(function(){var i=t("#color-panel"),n=t(this).offset().top,o=t(this).height(),a=t(this).offset().left;i.css({top:n+o+15,left:a}).show();var l,c=s.target?t(s.target):e;null==c.data("color")&&c.data("color",c.css("color")),null==c.data("value")&&c.data("value",c.val()),t("#color-panel-reset").on("click.colorpicker",(function(){c.css("color",c.data("color")).val(c.data("value"));var t=c.data("value");t=s.ishex?t:r(t),i.hide(),s.reset(e,t)})),t("#color-panel-body").off("click.colorpicker").on("mouseover.colorpicker","tr td",(function(){var e=t(this).css("background-color");t("#color-panel-color").css("background",e),t("#color-panel-hex-color").val(t(this).attr("rel"))})).on("click.colorpicker","tr td",(function(){var n=t(this).attr("rel");n=s.ishex?n:r(n),s.fillcolor&&c.val(n),c.css("color",n),i.hide(),t("#color-panel-reset").off("click.colorpicker"),s.change(e,n)})),l=c.val(),t("#color-panel-color").css("background",l),t("#color-panel-hex-color").val(l)}))}));function r(t){var e;return t&&t.constructor==Array&&3==t.length&&(t=t),(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))&&(t=[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]),(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))&&(t=[2.55*parseFloat(e[1]),2.55*parseFloat(e[2]),2.55*parseFloat(e[3])]),(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))&&(t=[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]),(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))&&(t=[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]),"rgb("+t[0]+","+t[1]+","+t[2]+")"}},jQuery.fn.colorpicker.defaults={ishex:!0,fillcolor:!1,target:null,event:"click",change:function(){},reset:function(){}}}(jQuery),function(t,e,i,n){var o="table2excel",s={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0,preserveColors:!1};function r(e,i){this.element=e,this.settings=t.extend({},s,i),this._defaults=s,this._name=o,this.init()}function a(t){return t.filename?t.filename:"table2excel"}r.prototype={init:function(){var e=this;e.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},e.tableRows=[];var i="",n=null;t(e.element).each((function(o,s){var r,a="";t(s).find("tr").not(e.settings.exclude).each((function(o,s){i="",e.settings.preserveColors&&(n=getComputedStyle(s),i+=n&&n.backgroundColor?"background-color: "+n.backgroundColor+";":"",i+=n&&n.color?"color: "+n.color+";":""),a+="<tr style='"+i+"'>",t(s).find("td,th").not(e.settings.exclude).each((function(o,s){i="",e.settings.preserveColors&&(n=getComputedStyle(s),i+=n&&n.backgroundColor?"background-color: "+n.backgroundColor+";":"",i+=n&&n.color?"color: "+n.color+";":"");var r=t(this).attr("rowspan"),l=t(this).attr("colspan");t(s).find(e.settings.exclude).length>0?a+="<td> </td>":(a+="<td",r>0&&(a+=" rowspan='"+r+"' "),l>0&&(a+=" colspan='"+l+"' "),i&&(a+=" style='"+i+"'"),a+=">"+t(s).html()+"</td>")})),a+="</tr>"})),e.settings.exclude_img&&(r=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i,a=a.replace(/<img[^>]*>/gi,(function(t){var e=r.exec(t);return null!==e&&e.length>=2?e[2]:""}))),e.settings.exclude_links&&(a=function(t){return t.replace(/<a[^>]*>|<\/a>/gi,"")}(a)),e.settings.exclude_inputs&&(a=function(t){var e=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return t.replace(/<input[^>]*>|<\/input>/gi,(function(t){var i=e.exec(t);return null!==i&&i.length>=2?i[2]:""}))}(a)),e.tableRows.push(a)})),e.tableToExcel(e.tableRows,e.settings.name,e.settings.sheetName)},tableToExcel:function(n,o,s){var r,l,c,u=this,h="";for(r in u.format=function(t,e){return t.replace(/{(\w+)}/g,(function(t,i){return e[i]}))},s=void 0===s?"Sheet":s,u.ctx={worksheet:o||"Worksheet",table:n,sheetName:s},h=u.template.head,t.isArray(n)&&Object.keys(n).forEach((function(t){h+=u.template.sheet.head+s+t+u.template.sheet.tail})),h+=u.template.mid,t.isArray(n)&&Object.keys(n).forEach((function(t){h+=u.template.table.head+"{table"+t+"}"+u.template.table.tail})),h+=u.template.foot,n)u.ctx["table"+r]=n[r];if(delete u.ctx.table,-1!==navigator.appVersion.indexOf("MSIE 10")||-1!==navigator.userAgent.indexOf("Trident")&&-1!==navigator.userAgent.indexOf("rv:11"))if("undefined"!=typeof Blob){h=[h=u.format(h,u.ctx)];var d=new Blob(h,{type:"text/html"});e.navigator.msSaveBlob(d,a(u.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(u.format(h,u.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,a(u.settings));else{var p=new Blob([u.format(h,u.ctx)],{type:"application/vnd.ms-excel"});e.URL=e.URL||e.webkitURL,l=e.URL.createObjectURL(p),(c=i.createElement("a")).download=a(u.settings),c.href=l,i.body.appendChild(c),c.click(),i.body.removeChild(c)}return!0}},t.fn.table2excel=function(e){var i=this;return i.each((function(){t.data(i,"plugin_table2excel")||t.data(i,"plugin_table2excel",new r(this,e))})),i}}(jQuery,window,document),function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Viewer=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return _typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof2(t)})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var r={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,zoom:null,zoomed:null},a="undefined"!=typeof window&&void 0!==window.document,l=a?window:{},c=!!a&&"ontouchstart"in l.document.documentElement,u=!!a&&"PointerEvent"in l,h="viewer",d="move",p="switch",f="zoom",g="".concat(h,"-active"),m="".concat(h,"-close"),v="".concat(h,"-fade"),y="".concat(h,"-fixed"),b="".concat(h,"-fullscreen"),w="".concat(h,"-fullscreen-exit"),x="".concat(h,"-hide"),_="".concat(h,"-hide-md-down"),C="".concat(h,"-hide-sm-down"),$="".concat(h,"-hide-xs-down"),T="".concat(h,"-in"),k="".concat(h,"-invisible"),S="".concat(h,"-loading"),E="".concat(h,"-move"),D="".concat(h,"-open"),A="".concat(h,"-show"),P="".concat(h,"-transition"),I="click",N="dblclick",O="dragstart",z="hidden",j="hide",L="keydown",M="load",R=u?"pointerdown":c?"touchstart":"mousedown",H=u?"pointermove":c?"touchmove":"mousemove",W=u?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",F="ready",q="resize",B="show",U="shown",V="transitionend",Y="view",X="viewed",G="wheel",Q="zoom",K="zoomed",Z="".concat(h,"Action"),J=/\s\s*/,tt=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function et(t){return"string"==typeof t}var it=Number.isNaN||l.isNaN;function nt(t){return"number"==typeof t&&!it(t)}function ot(t){return void 0===t}function st(e){return"object"===t(e)&&null!==e}var rt=Object.prototype.hasOwnProperty;function at(t){if(!st(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&rt.call(i,"isPrototypeOf")}catch(t){return!1}}function lt(t){return"function"==typeof t}function ct(t,e){if(t&<(e))if(Array.isArray(t)||nt(t.length)){var i,n=t.length;for(i=0;i<n&&!1!==e.call(t,t[i],i,t);i+=1);}else st(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}));return t}var ut=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return st(t)&&i.length>0&&i.forEach((function(e){st(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},ht=/^(?:width|height|left|top|marginLeft|marginTop)$/;function dt(t,e){var i=t.style;ct(e,(function(t,e){ht.test(e)&&nt(t)&&(t+="px"),i[e]=t}))}function pt(t){return et(t)?t.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):t}function ft(t,e){return!(!t||!e)&&(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)}function gt(t,e){if(t&&e)if(nt(t.length))ct(t,(function(t){gt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function mt(t,e){t&&e&&(nt(t.length)?ct(t,(function(t){mt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function vt(t,e,i){e&&(nt(t.length)?ct(t,(function(t){vt(t,e,i)})):i?gt(t,e):mt(t,e))}var yt=/([a-z\d])([A-Z])/g;function bt(t){return t.replace(yt,"$1-$2").toLowerCase()}function wt(t,e){return st(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(bt(e)))}function xt(t,e,i){st(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(bt(e)),i)}var _t=function(){var t=!1;if(a){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});l.addEventListener("test",i,n),l.removeEventListener("test",i,n)}return t}();function Ct(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(J).forEach((function(e){if(!_t){var s=t.listeners;s&&s[e]&&s[e][i]&&(o=s[e][i],delete s[e][i],0===Object.keys(s[e]).length&&delete s[e],0===Object.keys(s).length&&delete t.listeners)}t.removeEventListener(e,o,n)}))}function $t(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(J).forEach((function(e){if(n.once&&!_t){var s=t.listeners,r=void 0===s?{}:s;o=function(){delete r[e][i],t.removeEventListener(e,o,n);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];i.apply(t,a)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],n),r[e][i]=o,t.listeners=r}t.addEventListener(e,o,n)}))}function Tt(t,e,i){var n;return lt(Event)&<(CustomEvent)?n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(n)}function kt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function St(t){var e=t.rotate,i=t.scaleX,n=t.scaleY,o=t.translateX,s=t.translateY,r=[];nt(o)&&0!==o&&r.push("translateX(".concat(o,"px)")),nt(s)&&0!==s&&r.push("translateY(".concat(s,"px)")),nt(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),nt(i)&&1!==i&&r.push("scaleX(".concat(i,")")),nt(n)&&1!==n&&r.push("scaleY(".concat(n,")"));var a=r.length?r.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}var Et=l.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(l.navigator.userAgent);function Dt(t,e){var i=document.createElement("img");if(t.naturalWidth&&!Et)return e(t.naturalWidth,t.naturalHeight),i;var n=document.body||document.documentElement;return i.onload=function(){e(i.width,i.height),Et||n.removeChild(i)},i.src=t.src,Et||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(i)),i}function At(t){switch(t){case 2:return $;case 3:return C;case 4:return _;default:return""}}function Pt(t,e){var i=t.pageX,n=t.pageY,o={endX:i,endY:n};return e?o:s({timeStamp:Date.now(),startX:i,startY:n},o)}function It(t){var e=0,i=0,n=0;return ct(t,(function(t){var o=t.startX,s=t.startY;e+=o,i+=s,n+=1})),{pageX:e/=n,pageY:i/=n}}var Nt={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var t,e=this.options,i=this.parent;e.inline&&(t={width:Math.max(i.offsetWidth,e.minWidth),height:Math.max(i.offsetHeight,e.minHeight)},this.parentData=t),!this.fulled&&t||(t=this.containerData),this.viewerData=ut({},t)},renderViewer:function(){this.options.inline&&!this.fulled&&dt(this.viewer,this.viewerData)},initList:function(){var t=this,e=this.element,i=this.options,n=this.list,o=[];n.innerHTML="",ct(this.images,(function(e,s){var r=e.src,a=e.alt||function(t){return et(t)?decodeURIComponent(t.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(r),l=i.url;if(et(l)?l=e.getAttribute(l):lt(l)&&(l=l.call(t,e)),r||l){var c=document.createElement("li"),u=document.createElement("img");u.src=r||l,u.alt=a,u.setAttribute("data-index",s),u.setAttribute("data-original-url",l||r),u.setAttribute("data-viewer-action","view"),u.setAttribute("role","button"),c.appendChild(u),n.appendChild(c),o.push(c)}})),this.items=o,ct(o,(function(e){var n=e.firstElementChild;xt(n,"filled",!0),i.loading&>(e,S),$t(n,M,(function(n){i.loading&&mt(e,S),t.loadImage(n)}),{once:!0})})),i.transition&&$t(e,X,(function(){gt(n,P)}),{once:!0})},renderList:function(t){var e=t||this.index,i=this.items[e].offsetWidth||30,n=i+1;dt(this.list,ut({width:n*this.length},St({translateX:(this.viewerData.width-i)/2-n*e})))},resetList:function(){var t=this.list;t.innerHTML="",mt(t,P),dt(t,St({translateX:0}))},initImage:function(t){var e,i=this,n=this.options,o=this.image,s=this.viewerData,r=this.footer.offsetHeight,a=s.width,l=Math.max(s.height-r,r),c=this.imageData||{};this.imageInitializing={abort:function(){e.onload=null}},e=Dt(o,(function(e,o){var s=e/o,r=a,u=l;i.imageInitializing=!1,l*s>a?u=a/s:r=l*s;var h={naturalWidth:e,naturalHeight:o,aspectRatio:s,ratio:(r=Math.min(.9*r,e))/e,width:r,height:u=Math.min(.9*u,o),left:(a-r)/2,top:(l-u)/2},d=ut({},h);n.rotatable&&(h.rotate=c.rotate||0,d.rotate=0),n.scalable&&(h.scaleX=c.scaleX||1,h.scaleY=c.scaleY||1,d.scaleX=1,d.scaleY=1),i.imageData=h,i.initialImageData=d,t&&t()}))},renderImage:function(t){var e=this,i=this.image,n=this.imageData;if(dt(i,ut({width:n.width,height:n.height,marginLeft:n.left,marginTop:n.top},St(n))),t)if((this.viewing||this.zooming)&&this.options.transition){var o=function(){e.imageRendering=!1,t()};this.imageRendering={abort:function(){Ct(i,V,o)}},$t(i,V,o,{once:!0})}else t()},resetImage:function(){if(this.viewing||this.viewed){var t=this.image;this.viewing&&this.viewing.abort(),t.parentNode.removeChild(t),this.image=null}}},Ot={bind:function(){var t=this.options,e=this.viewer,i=this.canvas,n=this.element.ownerDocument;$t(e,I,this.onClick=this.click.bind(this)),$t(e,O,this.onDragStart=this.dragstart.bind(this)),$t(i,R,this.onPointerDown=this.pointerdown.bind(this)),$t(n,H,this.onPointerMove=this.pointermove.bind(this)),$t(n,W,this.onPointerUp=this.pointerup.bind(this)),$t(n,L,this.onKeyDown=this.keydown.bind(this)),$t(window,q,this.onResize=this.resize.bind(this)),t.zoomable&&t.zoomOnWheel&&$t(e,G,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleOnDblclick&&$t(i,N,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var t=this.options,e=this.viewer,i=this.canvas,n=this.element.ownerDocument;Ct(e,I,this.onClick),Ct(e,O,this.onDragStart),Ct(i,R,this.onPointerDown),Ct(n,H,this.onPointerMove),Ct(n,W,this.onPointerUp),Ct(n,L,this.onKeyDown),Ct(window,q,this.onResize),t.zoomable&&t.zoomOnWheel&&Ct(e,G,this.onWheel,{passive:!1,capture:!0}),t.toggleOnDblclick&&Ct(i,N,this.onDblclick)}},zt={click:function(t){var e=t.target,i=this.options,n=this.imageData,o=wt(e,Z);switch(c&&t.isTrusted&&e===this.canvas&&clearTimeout(this.clickCanvasTimeout),o){case"mix":this.played?this.stop():i.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.hide();break;case"view":this.view(wt(e,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(i.loop);break;case"play":this.play(i.fullscreen);break;case"next":this.next(i.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(t){t.preventDefault(),this.viewed&&t.target===this.image&&(c&&t.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle())},load:function(){var t=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var e=this.element,i=this.options,n=this.image,o=this.index,s=this.viewerData;mt(n,k),i.loading&&mt(this.canvas,S),n.style.cssText="height:0;"+"margin-left:".concat(s.width/2,"px;")+"margin-top:".concat(s.height/2,"px;")+"max-width:none!important;position:absolute;width:0;",this.initImage((function(){vt(n,E,i.movable),vt(n,P,i.transition),t.renderImage((function(){t.viewed=!0,t.viewing=!1,lt(i.viewed)&&$t(e,X,i.viewed,{once:!0}),Tt(e,X,{originalImage:t.images[o],index:o,image:n})}))}))},loadImage:function(t){var e=t.target,i=e.parentNode,n=i.offsetWidth||30,o=i.offsetHeight||50,s=!!wt(e,"filled");Dt(e,(function(t,i){var r=t/i,a=n,l=o;o*r>n?s?a=o*r:l=n/r:s?l=n/r:a=o*r,dt(e,ut({width:a,height:l},St({translateX:(n-a)/2,translateY:(o-l)/2})))}))},keydown:function(t){var e=this.options;if(this.fulled&&e.keyboard)switch(t.keyCode||t.which||t.charCode){case 27:this.played?this.stop():e.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.prev(e.loop);break;case 38:t.preventDefault(),this.zoom(e.zoomRatio,!0);break;case 39:this.next(e.loop);break;case 40:t.preventDefault(),this.zoom(-e.zoomRatio,!0);break;case 48:case 49:t.ctrlKey&&(t.preventDefault(),this.toggle())}},dragstart:function(t){"img"===t.target.tagName.toLowerCase()&&t.preventDefault()},pointerdown:function(t){var e=this.options,i=this.pointers,n=t.buttons,o=t.button;if(!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(nt(n)&&1!==n||nt(o)&&0!==o||t.ctrlKey))){t.preventDefault(),t.changedTouches?ct(t.changedTouches,(function(t){i[t.identifier]=Pt(t)})):i[t.pointerId||0]=Pt(t);var s=!!e.movable&&d;e.zoomOnTouch&&e.zoomable&&Object.keys(i).length>1?s=f:e.slideOnTouch&&("touch"===t.pointerType||"touchstart"===t.type)&&this.isSwitchable()&&(s=p),!e.transition||s!==d&&s!==f||mt(this.image,P),this.action=s}},pointermove:function(t){var e=this.pointers,i=this.action;this.viewed&&i&&(t.preventDefault(),t.changedTouches?ct(t.changedTouches,(function(t){ut(e[t.identifier]||{},Pt(t,!0))})):ut(e[t.pointerId||0]||{},Pt(t,!0)),this.change(t))},pointerup:function(t){var e,i=this,n=this.options,o=this.action,s=this.pointers;t.changedTouches?ct(t.changedTouches,(function(t){e=s[t.identifier],delete s[t.identifier]})):(e=s[t.pointerId||0],delete s[t.pointerId||0]),o&&(t.preventDefault(),!n.transition||o!==d&&o!==f||gt(this.image,P),this.action=!1,c&&o!==f&&e&&Date.now()-e.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&t.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout((function(){Tt(i.image,N)}),50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout((function(){i.imageClicked=!1}),500)):(this.imageClicked=!1,n.backdrop&&"static"!==n.backdrop&&t.target===this.canvas&&(this.clickCanvasTimeout=setTimeout((function(){Tt(i.canvas,I)}),50)))))},resize:function(){var t=this;if(this.isShown&&!this.hiding&&(this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){t.renderImage()})),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();ct(this.player.getElementsByTagName("img"),(function(e){$t(e,M,t.loadImage.bind(t),{once:!0}),Tt(e,M)}))}},wheel:function(t){var e=this;if(this.viewed&&(t.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50);var i=Number(this.options.zoomRatio)||.1,n=1;t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,!0,t)}}},jt={show:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.element,i=this.options;if(i.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(t),this;if(lt(i.show)&&$t(e,B,i.show,{once:!0}),!1===Tt(e,B)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var n=this.viewer;if(mt(n,x),i.transition&&!t){var o=this.shown.bind(this);this.transitioning={abort:function(){Ct(n,V,o),mt(n,T)}},gt(n,P),n.initialOffsetWidth=n.offsetWidth,$t(n,V,o,{once:!0}),gt(n,T)}else gt(n,T),this.shown();return this},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.element,i=this.options;if(i.inline||this.hiding||!this.isShown&&!this.showing)return this;if(lt(i.hide)&&$t(e,j,i.hide,{once:!0}),!1===Tt(e,j))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var n=this.viewer;if(i.transition&&!t){var o=this.hidden.bind(this),s=function(){setTimeout((function(){$t(n,V,o,{once:!0}),mt(n,T)}),0)};this.transitioning={abort:function(){this.viewed?Ct(this.image,V,s):Ct(n,V,o)}},this.viewed&&ft(this.image,P)?($t(this.image,V,s,{once:!0}),this.zoomTo(0,!1,!1,!0)):s()}else mt(n,T),this.hidden();return this},view:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(e=Number(e)||0,this.hiding||this.played||e<0||e>=this.length||this.viewed&&e===this.index)return this;if(!this.isShown)return this.index=e,this.show();this.viewing&&this.viewing.abort();var i=this.element,n=this.options,o=this.title,s=this.canvas,r=this.items[e],a=r.querySelector("img"),l=wt(a,"originalUrl"),c=a.getAttribute("alt"),u=document.createElement("img");if(u.src=l,u.alt=c,lt(n.view)&&$t(i,Y,n.view,{once:!0}),!1===Tt(i,Y,{originalImage:this.images[e],index:e,image:u})||!this.isShown||this.hiding||this.played)return this;this.image=u,mt(this.items[this.index],g),gt(r,g),this.viewed=!1,this.index=e,this.imageData={},gt(u,k),n.loading&>(s,S),s.innerHTML="",s.appendChild(u),this.renderList(),o.innerHTML="";var h,d=function(){var e=t.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;o.innerHTML=pt(lt(i)?i.call(t,u,e):"".concat(c," (").concat(e.naturalWidth," × ").concat(e.naturalHeight,")"))};return $t(i,X,d,{once:!0}),this.viewing={abort:function(){Ct(i,X,d),u.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(u.src="",Ct(u,M,h),this.timeout&&clearTimeout(this.timeout))}},u.complete?this.load():($t(u,M,h=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((function(){mt(u,k),t.timeout=!1}),1e3)),this},prev:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.index-1;return e<0&&(e=t?this.length-1:0),this.view(e),this},next:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.length-1,i=this.index+1;return i>e&&(i=t?0:e),this.view(i),this},move:function(t,e){var i=this.imageData;return this.moveTo(ot(t)?t:i.left+Number(t),ot(e)?e:i.top+Number(e)),this},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData;if(t=Number(t),e=Number(e),this.viewed&&!this.played&&this.options.movable){var n=!1;nt(t)&&(i.left=t,n=!0),nt(e)&&(i.top=e,n=!0),n&&this.renderImage()}return this},zoom:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.imageData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(n.width*t/n.naturalWidth,e,i),this},zoomTo:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=this.element,r=this.options,a=this.pointers,l=this.imageData,c=l.width,u=l.height,h=l.left,d=l.top,p=l.naturalWidth,f=l.naturalHeight;if(nt(t=Math.max(0,t))&&this.viewed&&!this.played&&(o||r.zoomable)){if(!o){var g=Math.max(.01,r.minZoomRatio),m=Math.min(100,r.maxZoomRatio);t=Math.min(Math.max(t,g),m)}n&&t>.95&&t<1.05&&(t=1);var v=p*t,y=f*t,b=v-c,w=y-u,x=c/p;if(lt(r.zoom)&&$t(s,Q,r.zoom,{once:!0}),!1===Tt(s,Q,{ratio:t,oldRatio:x,originalEvent:n}))return this;if(this.zooming=!0,n){var _=kt(this.viewer),C=a&&Object.keys(a).length?It(a):{pageX:n.pageX,pageY:n.pageY};l.left-=b*((C.pageX-_.left-h)/c),l.top-=w*((C.pageY-_.top-d)/u)}else l.left-=b/2,l.top-=w/2;l.width=v,l.height=y,l.ratio=t,this.renderImage((function(){e.zooming=!1,lt(r.zoomed)&&$t(s,K,r.zoomed,{once:!0}),Tt(s,K,{ratio:t,oldRatio:x,originalEvent:n})})),i&&this.tooltip()}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t)),this},rotateTo:function(t){var e=this.imageData;return nt(t=Number(t))&&this.viewed&&!this.played&&this.options.rotatable&&(e.rotate=t,this.renderImage()),this},scaleX:function(t){return this.scale(t,this.imageData.scaleY),this},scaleY:function(t){return this.scale(this.imageData.scaleX,t),this},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData;if(t=Number(t),e=Number(e),this.viewed&&!this.played&&this.options.scalable){var n=!1;nt(t)&&(i.scaleX=t,n=!0),nt(e)&&(i.scaleY=e,n=!0),n&&this.renderImage()}return this},play:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var i=this.options,n=this.player,o=this.loadImage.bind(this),s=[],r=0,a=0;if(this.played=!0,this.onLoadWhenPlay=o,e&&this.requestFullscreen(),gt(n,A),ct(this.items,(function(t,e){var l=t.querySelector("img"),c=document.createElement("img");c.src=wt(l,"originalUrl"),c.alt=l.getAttribute("alt"),r+=1,gt(c,v),vt(c,P,i.transition),ft(t,g)&&(gt(c,T),a=e),s.push(c),$t(c,M,o,{once:!0}),n.appendChild(c)})),nt(i.interval)&&i.interval>0){var l=function e(){t.playing=setTimeout((function(){mt(s[a],T),gt(s[a=(a+=1)<r?a:0],T),e()}),i.interval)};r>1&&l()}return this},stop:function(){var t=this;if(!this.played)return this;var e=this.player;return this.played=!1,clearTimeout(this.playing),ct(e.getElementsByTagName("img"),(function(e){Ct(e,M,t.onLoadWhenPlay)})),mt(e,A),e.innerHTML="",this.exitFullscreen(),this},full:function(){var t=this,e=this.options,i=this.viewer,n=this.image,o=this.list;return!this.isShown||this.played||this.fulled||!e.inline||(this.fulled=!0,this.open(),gt(this.button,w),e.transition&&(mt(o,P),this.viewed&&mt(n,P)),gt(i,y),i.setAttribute("style",""),dt(i,{zIndex:e.zIndex}),this.initContainer(),this.viewerData=ut({},this.containerData),this.renderList(),this.viewed&&this.initImage((function(){t.renderImage((function(){e.transition&&setTimeout((function(){gt(n,P),gt(o,P)}),0)}))}))),this},exit:function(){var t=this,e=this.options,i=this.viewer,n=this.image,o=this.list;return this.isShown&&!this.played&&this.fulled&&e.inline?(this.fulled=!1,this.close(),mt(this.button,w),e.transition&&(mt(o,P),this.viewed&&mt(n,P)),mt(i,y),dt(i,{zIndex:e.zIndexInline}),this.viewerData=ut({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){t.renderImage((function(){e.transition&&setTimeout((function(){gt(n,P),gt(o,P)}),0)}))})),this):this},tooltip:function(){var t=this,e=this.options,i=this.tooltipBox,n=this.imageData;return this.viewed&&!this.played&&e.tooltip?(i.textContent="".concat(Math.round(100*n.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):e.transition?(this.fading&&Tt(i,V),gt(i,A),gt(i,v),gt(i,P),i.initialOffsetWidth=i.offsetWidth,gt(i,T)):gt(i,A),this.tooltipping=setTimeout((function(){e.transition?($t(i,V,(function(){mt(i,A),mt(i,v),mt(i,P),t.fading=!1}),{once:!0}),mt(i,T),t.fading=!0):mt(i,A),t.tooltipping=!1}),1e3),this):this},toggle:function(){return 1===this.imageData.ratio?this.zoomTo(this.initialImageData.ratio,!0):this.zoomTo(1,!0),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=ut({},this.initialImageData),this.renderImage()),this},update:function(){var t=this.element,e=this.options,i=this.isImg;if(i&&!t.parentNode)return this.destroy();var n=[];if(ct(i?[t]:t.querySelectorAll("img"),(function(t){e.filter?e.filter(t)&&n.push(t):n.push(t)})),!n.length)return this;if(this.images=n,this.length=n.length,this.ready){var o=[];if(ct(this.items,(function(t,e){var i=t.querySelector("img"),s=n[e];s&&i?s.src!==i.src&&o.push(e):o.push(e)})),dt(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=o.indexOf(this.index);s>=0?(this.viewed=!1,this.view(Math.max(this.index-(s+1),0))):gt(this.items[this.index],g)}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var t=this.element,e=this.options;return t.viewer?(this.destroyed=!0,this.ready?(this.played&&this.stop(),e.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):e.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),e.inline||Ct(t,I,this.onStart),t.viewer=void 0,this):this}},Lt={open:function(){var t=this.body;gt(t,D),t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyPaddingRight)||0),"px")},close:function(){var t=this.body;mt(t,D),t.style.paddingRight=this.initialBodyPaddingRight},shown:function(){var t=this.element,e=this.options;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,lt(e.shown)&&$t(t,U,e.shown,{once:!0}),!1!==Tt(t,U)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var t=this.element,e=this.options;this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),gt(this.viewer,x),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(lt(e.hidden)&&$t(t,z,e.hidden,{once:!0}),Tt(t,z))},requestFullscreen:function(){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var e=t.documentElement;e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}},exitFullscreen:function(){var t=this.element.ownerDocument;this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},change:function(t){var e=this.options,i=this.pointers,n=i[Object.keys(i)[0]],o=n.endX-n.startX,r=n.endY-n.startY;switch(this.action){case d:this.move(o,r);break;case f:this.zoom(function(t){var e=s({},t),i=[];return ct(t,(function(t,n){delete e[n],ct(e,(function(e){var n=Math.abs(t.startX-e.startX),o=Math.abs(t.startY-e.startY),s=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),a=Math.sqrt(n*n+o*o),l=(Math.sqrt(s*s+r*r)-a)/a;i.push(l)}))})),i.sort((function(t,e){return Math.abs(t)<Math.abs(e)})),i[0]}(i),!1,t);break;case p:this.action="switched";var a=Math.abs(o);a>1&&a>Math.abs(r)&&(this.pointers={},o>1?this.prev(e.loop):o<-1&&this.next(e.loop))}ct(i,(function(t){t.startX=t.endX,t.startY=t.endY}))},isSwitchable:function(){var t=this.imageData,e=this.viewerData;return this.length>1&&t.left>=0&&t.top>=0&&t.width<=e.width&&t.height<=e.height}},Mt=l.Viewer,Rt=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||1!==i.nodeType)throw new Error("The first argument is required and must be an element.");this.element=i,this.options=ut({},r,at(n)&&n),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.init()}var n,o,s;return n=t,s=[{key:"noConflict",value:function(){return window.Viewer=Mt,t}},{key:"setDefaults",value:function(t){ut(r,at(t)&&t)}}],(o=[{key:"init",value:function(){var t=this,e=this.element,i=this.options;if(!e.viewer){e.viewer=this;var n="img"===e.tagName.toLowerCase(),o=[];ct(n?[e]:e.querySelectorAll("img"),(function(e){lt(i.filter)?i.filter.call(t,e)&&o.push(e):o.push(e)})),this.isImg=n,this.length=o.length,this.images=o;var s=e.ownerDocument,r=s.body||s.documentElement;if(this.body=r,this.scrollbarWidth=window.innerWidth-s.documentElement.clientWidth,this.initialBodyPaddingRight=window.getComputedStyle(r).paddingRight,ot(document.createElement(h).style.transition)&&(i.transition=!1),i.inline){var a=0,l=function(){var e;(a+=1)===t.length&&(t.initializing=!1,t.delaying={abort:function(){clearTimeout(e)}},e=setTimeout((function(){t.delaying=!1,t.build()}),0))};this.initializing={abort:function(){ct(o,(function(t){t.complete||Ct(t,M,l)}))}},ct(o,(function(t){t.complete?l():$t(t,M,l,{once:!0})}))}else $t(e,I,this.onStart=function(e){var n=e.target;"img"!==n.tagName.toLowerCase()||lt(i.filter)&&!i.filter.call(t,n)||t.view(t.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var t=this.element,e=this.options,i=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="viewer-container" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list"></ul></div></div><div class="viewer-tooltip"></div><div role="button" class="viewer-button" data-viewer-action="mix"></div><div class="viewer-player"></div></div>';var o=n.querySelector(".".concat(h,"-container")),s=o.querySelector(".".concat(h,"-title")),r=o.querySelector(".".concat(h,"-toolbar")),a=o.querySelector(".".concat(h,"-navbar")),l=o.querySelector(".".concat(h,"-button")),c=o.querySelector(".".concat(h,"-canvas"));if(this.parent=i,this.viewer=o,this.title=s,this.toolbar=r,this.navbar=a,this.button=l,this.canvas=c,this.footer=o.querySelector(".".concat(h,"-footer")),this.tooltipBox=o.querySelector(".".concat(h,"-tooltip")),this.player=o.querySelector(".".concat(h,"-player")),this.list=o.querySelector(".".concat(h,"-list")),gt(s,e.title?At(Array.isArray(e.title)?e.title[0]:e.title):x),gt(a,e.navbar?At(e.navbar):x),vt(l,x,!e.button),e.backdrop&&(gt(o,"".concat(h,"-backdrop")),e.inline||"static"===e.backdrop||xt(c,Z,"hide")),et(e.className)&&e.className&&e.className.split(J).forEach((function(t){gt(o,t)})),e.toolbar){var u=document.createElement("ul"),d=at(e.toolbar),p=tt.slice(0,3),f=tt.slice(7,9),g=tt.slice(9);d||gt(r,At(e.toolbar)),ct(d?e.toolbar:tt,(function(t,i){var n=d&&at(t),o=d?bt(i):t,s=n&&!ot(t.show)?t.show:t;if(s&&(e.zoomable||-1===p.indexOf(o))&&(e.rotatable||-1===f.indexOf(o))&&(e.scalable||-1===g.indexOf(o))){var r=n&&!ot(t.size)?t.size:t,a=n&&!ot(t.click)?t.click:t,l=document.createElement("li");l.setAttribute("role","button"),gt(l,"".concat(h,"-").concat(o)),lt(a)||xt(l,Z,o),nt(s)&>(l,At(s)),-1!==["small","large"].indexOf(r)?gt(l,"".concat(h,"-").concat(r)):"play"===o&>(l,"".concat(h,"-large")),lt(a)&&$t(l,I,a),u.appendChild(l)}})),r.appendChild(u)}else gt(r,x);if(!e.rotatable){var w=r.querySelectorAll('li[class*="rotate"]');gt(w,k),ct(w,(function(t){r.appendChild(t)}))}if(e.inline)gt(l,b),dt(o,{zIndex:e.zIndexInline}),"static"===window.getComputedStyle(i).position&&dt(i,{position:"relative"}),i.insertBefore(o,t.nextSibling);else{gt(l,m),gt(o,y),gt(o,v),gt(o,x),dt(o,{zIndex:e.zIndex});var _=e.container;et(_)&&(_=t.ownerDocument.querySelector(_)),_||(_=this.body),_.appendChild(o)}e.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,lt(e.ready)&&$t(t,F,e.ready,{once:!0}),!1!==Tt(t,F)?this.ready&&e.inline&&this.view(this.index):this.ready=!1}}}])&&i(n.prototype,o),s&&i(n,s),t}();return ut(Rt.prototype,Nt,Ot,zt,jt,Lt),Rt})),function(t){t(["jquery"],(function(t){return function(){var e,i,n,o=0,s="error",r="info",a="success",l="warning",c={clear:function(i,n){var o=f();e||u(o);h(i,o,n)||function(i){for(var n=e.children(),o=n.length-1;o>=0;o--)h(t(n[o]),i)}(o)},remove:function(i){var n=f();e||u(n);if(i&&0===t(":focus",i).length)return void g(i);e.children().length&&e.remove()},error:function(t,e,i){return p({type:s,iconClass:f().iconClasses.error,message:t,optionsOverride:i,title:e})},getContainer:u,info:function(t,e,i){return p({type:r,iconClass:f().iconClasses.info,message:t,optionsOverride:i,title:e})},options:{},subscribe:function(t){i=t},success:function(t,e,i){return p({type:a,iconClass:f().iconClasses.success,message:t,optionsOverride:i,title:e})},version:"2.1.3",warning:function(t,e,i){return p({type:l,iconClass:f().iconClasses.warning,message:t,optionsOverride:i,title:e})}};return c;function u(i,n){return i||(i=f()),(e=t("#"+i.containerId)).length||n&&(e=function(i){return(e=t("<div/>").attr("id",i.containerId).addClass(i.positionClass)).appendTo(t(i.target)),e}(i)),e}function h(e,i,n){var o=!(!n||!n.force)&&n.force;return!(!e||!o&&0!==t(":focus",e).length)&&(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){g(e)}}),!0)}function d(t){i&&i(t)}function p(i){var s=f(),r=i.iconClass||s.iconClass;if(void 0!==i.optionsOverride&&(s=t.extend(s,i.optionsOverride),r=i.optionsOverride.iconClass||r),!function(t,e){if(t.preventDuplicates){if(e.message===n)return!0;n=e.message}return!1}(s,i)){o++,e=u(s,!0);var a=null,l=t("<div/>"),c=t("<div/>"),h=t("<div/>"),p=t("<div/>"),m=t(s.closeHtml),v={intervalId:null,hideEta:null,maxHideTime:null},y={toastId:o,state:"visible",startTime:new Date,options:s,map:i};return i.iconClass&&l.addClass(s.toastClass).addClass(r),function(){if(i.title){var t=i.title;s.escapeHtml&&(t=b(i.title)),c.append(t).addClass(s.titleClass),l.append(c)}}(),function(){if(i.message){var t=i.message;s.escapeHtml&&(t=b(i.message)),h.append(t).addClass(s.messageClass),l.append(h)}}(),s.closeButton&&(m.addClass(s.closeClass).attr("role","button"),l.prepend(m)),s.progressBar&&(p.addClass(s.progressClass),l.prepend(p)),s.rtl&&l.addClass("rtl"),s.newestOnTop?e.prepend(l):e.append(l),function(){var t="";switch(i.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}l.attr("aria-live",t)}(),l.hide(),l[s.showMethod]({duration:s.showDuration,easing:s.showEasing,complete:s.onShown}),s.timeOut>0&&(a=setTimeout(w,s.timeOut),v.maxHideTime=parseFloat(s.timeOut),v.hideEta=(new Date).getTime()+v.maxHideTime,s.progressBar&&(v.intervalId=setInterval(C,10))),function(){s.closeOnHover&&l.hover(_,x);!s.onclick&&s.tapToDismiss&&l.click(w);s.closeButton&&m&&m.click((function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),s.onCloseClick&&s.onCloseClick(t),w(!0)}));s.onclick&&l.click((function(t){s.onclick(t),w()}))}(),d(y),s.debug&&console&&console.log(y),l}function b(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function w(e){var i=e&&!1!==s.closeMethod?s.closeMethod:s.hideMethod,n=e&&!1!==s.closeDuration?s.closeDuration:s.hideDuration,o=e&&!1!==s.closeEasing?s.closeEasing:s.hideEasing;if(!t(":focus",l).length||e)return clearTimeout(v.intervalId),l[i]({duration:n,easing:o,complete:function(){g(l),clearTimeout(a),s.onHidden&&"hidden"!==y.state&&s.onHidden(),y.state="hidden",y.endTime=new Date,d(y)}})}function x(){(s.timeOut>0||s.extendedTimeOut>0)&&(a=setTimeout(w,s.extendedTimeOut),v.maxHideTime=parseFloat(s.extendedTimeOut),v.hideEta=(new Date).getTime()+v.maxHideTime)}function _(){clearTimeout(a),v.hideEta=0,l.stop(!0,!0)[s.showMethod]({duration:s.showDuration,easing:s.showEasing})}function C(){var t=(v.hideEta-(new Date).getTime())/v.maxHideTime*100;p.width(t+"%")}}function f(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">×</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},c.options)}function g(t){e||(e=u()),t.is(":visible")||(t.remove(),t=null,0===e.children().length&&(e.remove(),n=void 0))}}()}))}("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)}),function(){function t(){var t=Math.random().toString().replace(".","");this.id="paging_"+t}$.fn.Paging=function(e){var i=[];return $(this).each((function(){var n=$.extend({target:$(this)},e),o=new t;o.init(n),i.push(o)})),i},t.prototype={init:function(t){this.settings=$.extend({callback:null,pagesize:10,current:1,prevTpl:"上一页",nextTpl:"下一页",firstTpl:"首页",lastTpl:"末页",ellipseTpl:"...",toolbar:!0,hash:!1,pageSizeList:[5,10,15,20]},t),this.target=$(this.settings.target),this.container=$('<div id="'+this.id+'" class="ui-paging-container" /><div class="clearfix"></div>'),this.target.append(this.container),this.render(this.settings),this.format(),this.bindEvent()},render:function(t){this.count=t.count||this.settings.count,this.pagesize=t.pagesize||this.settings.pagesize,this.current=t.current||this.settings.current,this.pagecount=Math.ceil(this.count/this.pagesize),0===t.count&&(this.count=0,this.pagecount=0,this.current=0),this.format()},bindEvent:function(){var t=this;this.container.on("click","li.js-page-action, li.ui-pager",(function(e){if($(this).hasClass("ui-pager-disabled")||$(this).hasClass("focus"))return!1;$(this).hasClass("js-page-action")?($(this).hasClass("js-page-first")&&(t.current=1),$(this).hasClass("js-page-prev")&&(t.current=Math.max(1,t.current-1)),$(this).hasClass("js-page-next")&&(t.current=Math.min(t.pagecount,t.current+1)),$(this).hasClass("js-page-last")&&(t.current=t.pagecount)):$(this).data("page")&&(t.current=parseInt($(this).data("page"))),t.go()}))},go:function(t){this.current=t||this.current,this.current=Math.max(1,this.current),this.current=Math.min(this.current,this.pagecount),this.format(),this.settings.hash&&Query.setHash({page:this.current}),this.settings.callback&&this.settings.callback(this.current,this.pagesize,this.pagecount)},changePagesize:function(t){this.render({pagesize:t}),this.settings.callback&&this.settings.callback(this.current,this.pagesize,this.pagecount)},format:function(){var t="<ul>";if(t+='<li class="js-page-first js-page-action ui-pager">'+this.settings.firstTpl+"</li>",t+='<li class="js-page-prev js-page-action ui-pager">'+this.settings.prevTpl+"</li>",this.pagecount>3)if(this.current<=1)t+='<li data-page="1" class="ui-pager">1</li>',t+='<li data-page="2" class="ui-pager">2</li>',t+='<li data-page="3" class="ui-pager">3</li>';else if(this.current>1&&this.current<=this.pagecount-1)t+='<li data-page="'+(this.current-1)+'" class="ui-pager">'+(this.current-1)+"</li>",t+='<li data-page="'+this.current+'" class="ui-pager">'+this.current+"</li>",t+='<li data-page="'+(this.current+1)+'" class="ui-pager">'+(this.current+1)+"</li>";else for(var e=this.pagecount-2;e<this.pagecount+1;e++)t+='<li data-page="'+e+'" class="ui-pager">'+e+"</li>";else for(e=1;e<=this.pagecount;e++)t+='<li data-page="'+e+'" class="ui-pager">'+e+"</li>";t+='<li class="js-page-next js-page-action ui-pager">'+this.settings.nextTpl+"</li>",t+='<li class="js-page-last js-page-action ui-pager">'+this.settings.lastTpl+"</li>",t+="</ul>",t+='<div class="js-page-total">共'+this.count+"条记录 "+this.current+"/"+this.pagecount+"页</div>",$(this.container[0]).html(t),0!=this.current&&1!=this.current||($(".js-page-prev",this.container).addClass("ui-pager-disabled"),$(".js-page-first",this.container).addClass("ui-pager-disabled")),this.current==this.pagecount&&($(".js-page-next",this.container).addClass("ui-pager-disabled"),$(".js-page-last",this.container).addClass("ui-pager-disabled")),this.container.find('li[data-page="'+this.current+'"]').addClass("focus").siblings().removeClass("focus"),this.settings.toolbar&&this.bindToolbar()},bindToolbar:function(){for(var t=this,e=$('<li class="ui-paging-toolbar"><select class="ui-select-pagesize form-control input-sm input-inline"></select><input type="text" class="form-control input-sm input-inline ui-paging-count"/><a href="javascript:;">跳转</a></li>'),i=$(".ui-select-pagesize",e),n="",o=0,s=this.settings.pageSizeList.length;o<s;o++)n+='<option value="'+this.settings.pageSizeList[o]+'">'+this.settings.pageSizeList[o]+"条/页</option>";i.html(n),i.val(this.pagesize),$("input",e).val(this.current),$("input",e).click((function(){$(this).select()})).keydown((function(e){if(13==e.keyCode){var i=parseInt($(this).val())||1;t.go(i)}})),$("a",e).click((function(){var e=parseInt($(this).prev().val())||1;t.go(e)})),i.change((function(){t.changePagesize($(this).val())})),this.container.children("ul").append(e)}}}(),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof module?"undefined":_typeof2(module))&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}((function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;var i;return function(){var t,i,n;e&&e.requirejs||(e?i=e:e={},function(e){var o,s,r,a,l={},c={},u={},h={},d=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function g(t,e){return d.call(t,e)}function m(t,e){var i,n,o,s,r,a,l,c,h,d,p,g=e&&e.split("/"),m=u.map,v=m&&m["*"]||{};if(t){for(r=(t=t.split("/")).length-1,u.nodeIdCompat&&f.test(t[r])&&(t[r]=t[r].replace(f,"")),"."===t[0].charAt(0)&&g&&(t=g.slice(0,g.length-1).concat(t)),h=0;h<t.length;h++)if("."===(p=t[h]))t.splice(h,1),h-=1;else if(".."===p){if(0===h||1===h&&".."===t[2]||".."===t[h-1])continue;h>0&&(t.splice(h-1,2),h-=2)}t=t.join("/")}if((g||v)&&m){for(h=(i=t.split("/")).length;h>0;h-=1){if(n=i.slice(0,h).join("/"),g)for(d=g.length;d>0;d-=1)if((o=m[g.slice(0,d).join("/")])&&(o=o[n])){s=o,a=h;break}if(s)break;!l&&v&&v[n]&&(l=v[n],c=h)}!s&&l&&(s=l,a=c),s&&(i.splice(0,a,s),t=i.join("/"))}return t}function v(t,i){return function(){var n=p.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),s.apply(e,n.concat([t,i]))}}function y(t){return function(e){l[t]=e}}function b(t){if(g(c,t)){var i=c[t];delete c[t],h[t]=!0,o.apply(e,i)}if(!g(l,t)&&!g(h,t))throw new Error("No "+t);return l[t]}function w(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function x(t){return t?w(t):[]}function _(t){return function(){return u&&u.config&&u.config[t]||{}}}r=function(t,e){var i,n,o=w(t),s=o[0],r=e[1];return t=o[1],s&&(i=b(s=m(s,r))),s?t=i&&i.normalize?i.normalize(t,(n=r,function(t){return m(t,n)})):m(t,r):(s=(o=w(t=m(t,r)))[0],t=o[1],s&&(i=b(s))),{f:s?s+"!"+t:t,n:t,pr:s,p:i}},a={require:function(t){return v(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:_(t)}}},o=function(t,i,n,o){var s,u,d,p,f,m,w,_=[],C=_typeof2(n);if(m=x(o=o||t),"undefined"===C||"function"===C){for(i=!i.length&&n.length?["require","exports","module"]:i,f=0;f<i.length;f+=1)if("require"===(u=(p=r(i[f],m)).f))_[f]=a.require(t);else if("exports"===u)_[f]=a.exports(t),w=!0;else if("module"===u)s=_[f]=a.module(t);else if(g(l,u)||g(c,u)||g(h,u))_[f]=b(u);else{if(!p.p)throw new Error(t+" missing "+u);p.p.load(p.n,v(o,!0),y(u),{}),_[f]=l[u]}d=n?n.apply(l[t],_):void 0,t&&(s&&s.exports!==e&&s.exports!==l[t]?l[t]=s.exports:d===e&&w||(l[t]=d))}else t&&(l[t]=n)},t=i=s=function(t,i,n,l,c){if("string"==typeof t)return a[t]?a[t](i):b(r(t,x(i)).f);if(!t.splice){if((u=t).deps&&s(u.deps,u.callback),!i)return;i.splice?(t=i,i=n,n=null):t=e}return i=i||function(){},"function"==typeof n&&(n=l,l=c),l?o(e,t,i,n):setTimeout((function(){o(e,t,i,n)}),4),s},s.config=function(t){return s(t)},t._defined=l,(n=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),g(l,t)||g(c,t)||(c[t]=[t,e,i])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=i,e.define=n)}(),e.define("almond",(function(){})),e.define("jquery",[],(function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e})),e.define("select2/utils",["jquery"],(function(t){var e={};function i(t){var e=t.prototype,i=[];for(var n in e){"function"==typeof e[n]&&("constructor"!==n&&i.push(n))}return i}e.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},e.Decorate=function(t,e){var n=i(e),o=i(t);function s(){var i=Array.prototype.unshift,n=e.prototype.constructor.length,o=t.prototype.constructor;n>0&&(i.call(arguments,t.prototype.constructor),o=e.prototype.constructor),o.apply(this,arguments)}e.displayName=t.displayName,s.prototype=new function(){this.constructor=s};for(var r=0;r<o.length;r++){var a=o[r];s.prototype[a]=t.prototype[a]}for(var l=function(t){var i=function(){};t in s.prototype&&(i=s.prototype[t]);var n=e.prototype[t];return function(){var t=Array.prototype.unshift;return t.call(arguments,i),n.apply(this,arguments)}},c=0;c<n.length;c++){var u=n[c];s.prototype[u]=l(u)}return s};var n=function(){this.listeners={}};return n.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},n.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},e.Observable=n,e.generateChars=function(t){for(var e="",i=0;i<t;i++){e+=Math.floor(36*Math.random()).toString(36)}return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var o=0;o<i.length;o++){var s=i[o];(s=s.substring(0,1).toLowerCase()+s.substring(1))in n||(n[s]={}),o==i.length-1&&(n[s]=t[e]),n=n[s]}delete t[e]}}return t},e.hasScroll=function(e,i){var n=t(i),o=i.style.overflowX,s=i.style.overflowY;return(o!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===o||"scroll"===s||(n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth))},e.escapeMarkup=function(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,(function(t){return e[t]}))},e.appendMany=function(e,i){if("1.7"===t.fn.jquery.substr(0,3)){var n=t();t.map(i,(function(t){n=n.add(t)})),i=n}e.append(i)},e})),e.define("select2/results",["jquery","./utils"],(function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(e.message);n.append(i(o(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],o=this.option(n);e.push(o)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var e=this;this.data.current((function(i){var n=t.map(i,(function(t){return t.id.toString()}));e.$results.find(".select2-results__option[aria-selected]").each((function(){var e=t(this),i=t.data(this,"data"),o=""+i.id;null!=i.element&&i.element.selected||null==i.element&&t.inArray(o,n)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")}))}))},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var i=document.createElement("li");i.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var o in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(i.id=e._resultId),e.title&&(i.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var s=n[o];i.setAttribute(o,s)}if(e.children){var r=t(i),a=document.createElement("strong");a.className="select2-results__group";t(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],h=this.option(u);l.push(h)}var d=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});d.append(l),r.append(a),r.append(d)}else this.template(e,i);return t.data(i,"data",e),i},i.prototype.bind=function(e,i){var n=this,o=e.id+"-results";this.$results.attr("id",o),e.on("results:all",(function(t){n.clear(),n.append(t.data),e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("results:append",(function(t){n.append(t.data),e.isOpen()&&n.setClasses()})),e.on("query",(function(t){n.hideMessages(),n.showLoading(t)})),e.on("select",(function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("unselect",(function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("open",(function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()})),e.on("close",(function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")})),e.on("results:toggle",(function(){var t=n.getHighlightedResults();0!==t.length&&t.trigger("mouseup")})),e.on("results:select",(function(){var t=n.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?n.trigger("close",{}):n.trigger("select",{data:e})}})),e.on("results:previous",(function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t);if(0!==i){var o=i-1;0===t.length&&(o=0);var s=e.eq(o);s.trigger("mouseenter");var r=n.$results.offset().top,a=s.offset().top,l=n.$results.scrollTop()+(a-r);0===o?n.$results.scrollTop(0):a-r<0&&n.$results.scrollTop(l)}})),e.on("results:next",(function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var o=e.eq(i);o.trigger("mouseenter");var s=n.$results.offset().top+n.$results.outerHeight(!1),r=o.offset().top+o.outerHeight(!1),a=n.$results.scrollTop()+r-s;0===i?n.$results.scrollTop(0):r>s&&n.$results.scrollTop(a)}})),e.on("results:focus",(function(t){t.element.addClass("select2-results__option--highlighted")})),e.on("results:message",(function(t){n.displayMessage(t)})),t.fn.mousewheel&&this.$results.on("mousewheel",(function(t){var e=n.$results.scrollTop(),i=n.$results.get(0).scrollHeight-e+t.deltaY,o=t.deltaY>0&&e-t.deltaY<=0,s=t.deltaY<0&&i<=n.$results.height();o?(n.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):s&&(n.$results.scrollTop(n.$results.get(0).scrollHeight-n.$results.height()),t.preventDefault(),t.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(e){var i=t(this),o=i.data("data");"true"!==i.attr("aria-selected")?n.trigger("select",{originalEvent:e,data:o}):n.options.get("multiple")?n.trigger("unselect",{originalEvent:e,data:o}):n.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(e){var i=t(this).data("data");n.getHighlightedResults().removeClass("select2-results__option--highlighted"),n.trigger("results:focus",{data:i,element:t(this)})}))},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,o=this.$results.scrollTop()+(n-i),s=n-i;o-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),s=n(e,i);null==s?i.style.display="none":"string"==typeof s?i.innerHTML=o(s):t(i).append(s)},i})),e.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),e.define("select2/selection/base",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},n.prototype.bind=function(t,e){var n=this,o=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",(function(t){n.trigger("focus",t)})),this.$selection.on("blur",(function(t){n._handleBlur(t)})),this.$selection.on("keydown",(function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()})),t.on("results:focus",(function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)})),t.on("selection:update",(function(t){n.update(t.data)})),t.on("open",(function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",o),n._attachCloseHandler(t)})),t.on("close",(function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(t)})),t.on("enable",(function(){n.$selection.attr("tabindex",n._tabindex)})),t.on("disable",(function(){n.$selection.attr("tabindex","-1")}))},n.prototype._handleBlur=function(e){var i=this;window.setTimeout((function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)}),1)},n.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2."+e.id,(function(e){var i=t(e.target).closest(".select2");t(".select2.select2-container--open").each((function(){var e=t(this);this!=i[0]&&e.data("element").select2("close")}))}))},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n})),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(t,e,i,n){function o(){o.__super__.constructor.apply(this,arguments)}return i.Extend(o,e),o.prototype.render=function(){var t=o.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},o.prototype.bind=function(t,e){var i=this;o.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",(function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})})),this.$selection.on("focus",(function(t){})),this.$selection.on("blur",(function(t){})),t.on("focus",(function(e){t.isOpen()||i.$selection.focus()})),t.on("selection:update",(function(t){i.update(t.data)}))},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},o.prototype.selectionContainer=function(){return t("<span></span>")},o.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n),i.prop("title",e.title||e.text)}else this.clear()},o})),e.define("select2/selection/multiple",["jquery","./base","../utils"],(function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(e,i){var o=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(t){o.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!o.options.get("disabled")){var i=t(this).parent().data("data");o.trigger("unselect",{originalEvent:e,data:i})}}))},n.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n<t.length;n++){var o=t[n],s=this.selectionContainer(),r=this.display(o,s);s.append(r),s.prop("title",o.title||o.text),s.data("data",o),e.push(s)}var a=this.$selection.find(".select2-selection__rendered");i.appendMany(a,e)}},n})),e.define("select2/selection/placeholder",["../utils"],(function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e})),e.define("select2/selection/allowClear",["jquery","../keys"],(function(t,e){function i(){}return i.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(t){n._handleClear(t)})),e.on("keypress",(function(t){n._handleKeyboardClear(t,e)}))},i.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){e.stopPropagation();for(var n=i.data("data"),o=0;o<n.length;o++){var s={data:n[o]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},i.prototype._handleKeyboardClear=function(t,i,n){n.isOpen()||i.which!=e.DELETE&&i.which!=e.BACKSPACE||this._handleClear(i)},i.prototype.update=function(e,i){if(e.call(this,i),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var n=t('<span class="select2-selection__clear">×</span>');n.data("data",i),this.$selection.find(".select2-selection__rendered").prepend(n)}},i})),e.define("select2/selection/search",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=i,this.$search=i.find("input");var n=e.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(t,e,n){var o=this;t.call(this,e,n),e.on("open",(function(){o.$search.trigger("focus")})),e.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),e.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),e.on("disable",(function(){o.$search.prop("disabled",!0)})),e.on("focus",(function(t){o.$search.trigger("focus")})),e.on("results:focus",(function(t){o.$search.attr("aria-activedescendant",t.id)})),this.$selection.on("focusin",".select2-search--inline",(function(t){o.trigger("focus",t)})),this.$selection.on("focusout",".select2-search--inline",(function(t){o._handleBlur(t)})),this.$selection.on("keydown",".select2-search--inline",(function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===o.$search.val()){var e=o.$searchContainer.prev(".select2-selection__choice");if(e.length>0){var n=e.data("data");o.searchRemoveChoice(n),t.preventDefault()}}}));var s=document.documentMode,r=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(t){r?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(t){if(r&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&o.handleSearch(t)}}))},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.focus()},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},n})),e.define("select2/selection/eventRelay",["jquery"],(function(t){function e(){}return e.prototype.bind=function(e,i,n){var o=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];e.call(this,i,n),i.on("*",(function(e,i){if(-1!==t.inArray(e,s)){i=i||{};var n=t.Event("select2:"+e,{params:i});o.$element.trigger(n),-1!==t.inArray(e,r)&&(i.prevented=n.isDefaultPrevented())}}))},e})),e.define("select2/translation",["jquery","require"],(function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i})),e.define("select2/diacritics",[],(function(){return{"Ⓐ":"A",A:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","Ⓑ":"B",B:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","Ⓒ":"C",C:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","Ⓓ":"D",D:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",Ḏ:"D",Đ:"D",Ƌ:"D",Ɗ:"D",Ɖ:"D",Ꝺ:"D",DZ:"DZ",DŽ:"DZ",Dz:"Dz",Dž:"Dz","Ⓔ":"E",E:"E",È:"E",É:"E",Ê:"E",Ề:"E",Ế:"E",Ễ:"E",Ể:"E",Ẽ:"E",Ē:"E",Ḕ:"E",Ḗ:"E",Ĕ:"E",Ė:"E",Ë:"E",Ẻ:"E",Ě:"E",Ȅ:"E",Ȇ:"E",Ẹ:"E",Ệ:"E",Ȩ:"E",Ḝ:"E",Ę:"E",Ḙ:"E",Ḛ:"E",Ɛ:"E",Ǝ:"E","Ⓕ":"F",F:"F",Ḟ:"F",Ƒ:"F",Ꝼ:"F","Ⓖ":"G",G:"G",Ǵ:"G",Ĝ:"G",Ḡ:"G",Ğ:"G",Ġ:"G",Ǧ:"G",Ģ:"G",Ǥ:"G",Ɠ:"G",Ꞡ:"G",Ᵹ:"G",Ꝿ:"G","Ⓗ":"H",H:"H",Ĥ:"H",Ḣ:"H",Ḧ:"H",Ȟ:"H",Ḥ:"H",Ḩ:"H",Ḫ:"H",Ħ:"H",Ⱨ:"H",Ⱶ:"H",Ɥ:"H","Ⓘ":"I",I:"I",Ì:"I",Í:"I",Î:"I",Ĩ:"I",Ī:"I",Ĭ:"I",İ:"I",Ï:"I",Ḯ:"I",Ỉ:"I",Ǐ:"I",Ȉ:"I",Ȋ:"I",Ị:"I",Į:"I",Ḭ:"I",Ɨ:"I","Ⓙ":"J",J:"J",Ĵ:"J",Ɉ:"J","Ⓚ":"K",K:"K",Ḱ:"K",Ǩ:"K",Ḳ:"K",Ķ:"K",Ḵ:"K",Ƙ:"K",Ⱪ:"K",Ꝁ:"K",Ꝃ:"K",Ꝅ:"K",Ꞣ:"K","Ⓛ":"L",L:"L",Ŀ:"L",Ĺ:"L",Ľ:"L",Ḷ:"L",Ḹ:"L",Ļ:"L",Ḽ:"L",Ḻ:"L",Ł:"L",Ƚ:"L",Ɫ:"L",Ⱡ:"L",Ꝉ:"L",Ꝇ:"L",Ꞁ:"L",LJ:"LJ",Lj:"Lj","Ⓜ":"M",M:"M",Ḿ:"M",Ṁ:"M",Ṃ:"M",Ɱ:"M",Ɯ:"M","Ⓝ":"N",N:"N",Ǹ:"N",Ń:"N",Ñ:"N",Ṅ:"N",Ň:"N",Ṇ:"N",Ņ:"N",Ṋ:"N",Ṉ:"N",Ƞ:"N",Ɲ:"N",Ꞑ:"N",Ꞥ:"N",NJ:"NJ",Nj:"Nj","Ⓞ":"O",O:"O",Ò:"O",Ó:"O",Ô:"O",Ồ:"O",Ố:"O",Ỗ:"O",Ổ:"O",Õ:"O",Ṍ:"O",Ȭ:"O",Ṏ:"O",Ō:"O",Ṑ:"O",Ṓ:"O",Ŏ:"O",Ȯ:"O",Ȱ:"O",Ö:"O",Ȫ:"O",Ỏ:"O",Ő:"O",Ǒ:"O",Ȍ:"O",Ȏ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ỡ:"O",Ở:"O",Ợ:"O",Ọ:"O",Ộ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Ɔ:"O",Ɵ:"O",Ꝋ:"O",Ꝍ:"O",Ƣ:"OI",Ꝏ:"OO",Ȣ:"OU","Ⓟ":"P",P:"P",Ṕ:"P",Ṗ:"P",Ƥ:"P",Ᵽ:"P",Ꝑ:"P",Ꝓ:"P",Ꝕ:"P","Ⓠ":"Q",Q:"Q",Ꝗ:"Q",Ꝙ:"Q",Ɋ:"Q","Ⓡ":"R",R:"R",Ŕ:"R",Ṙ:"R",Ř:"R",Ȑ:"R",Ȓ:"R",Ṛ:"R",Ṝ:"R",Ŗ:"R",Ṟ:"R",Ɍ:"R",Ɽ:"R",Ꝛ:"R",Ꞧ:"R",Ꞃ:"R","Ⓢ":"S",S:"S",ẞ:"S",Ś:"S",Ṥ:"S",Ŝ:"S",Ṡ:"S",Š:"S",Ṧ:"S",Ṣ:"S",Ṩ:"S",Ș:"S",Ş:"S",Ȿ:"S",Ꞩ:"S",Ꞅ:"S","Ⓣ":"T",T:"T",Ṫ:"T",Ť:"T",Ṭ:"T",Ț:"T",Ţ:"T",Ṱ:"T",Ṯ:"T",Ŧ:"T",Ƭ:"T",Ʈ:"T",Ⱦ:"T",Ꞇ:"T",Ꜩ:"TZ","Ⓤ":"U",U:"U",Ù:"U",Ú:"U",Û:"U",Ũ:"U",Ṹ:"U",Ū:"U",Ṻ:"U",Ŭ:"U",Ü:"U",Ǜ:"U",Ǘ:"U",Ǖ:"U",Ǚ:"U",Ủ:"U",Ů:"U",Ű:"U",Ǔ:"U",Ȕ:"U",Ȗ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ữ:"U",Ử:"U",Ự:"U",Ụ:"U",Ṳ:"U",Ų:"U",Ṷ:"U",Ṵ:"U",Ʉ:"U","Ⓥ":"V",V:"V",Ṽ:"V",Ṿ:"V",Ʋ:"V",Ꝟ:"V",Ʌ:"V",Ꝡ:"VY","Ⓦ":"W",W:"W",Ẁ:"W",Ẃ:"W",Ŵ:"W",Ẇ:"W",Ẅ:"W",Ẉ:"W",Ⱳ:"W","Ⓧ":"X",X:"X",Ẋ:"X",Ẍ:"X","Ⓨ":"Y",Y:"Y",Ỳ:"Y",Ý:"Y",Ŷ:"Y",Ỹ:"Y",Ȳ:"Y",Ẏ:"Y",Ÿ:"Y",Ỷ:"Y",Ỵ:"Y",Ƴ:"Y",Ɏ:"Y",Ỿ:"Y","Ⓩ":"Z",Z:"Z",Ź:"Z",Ẑ:"Z",Ż:"Z",Ž:"Z",Ẓ:"Z",Ẕ:"Z",Ƶ:"Z",Ȥ:"Z",Ɀ:"Z",Ⱬ:"Z",Ꝣ:"Z","ⓐ":"a",a:"a",ẚ:"a",à:"a",á:"a",â:"a",ầ:"a",ấ:"a",ẫ:"a",ẩ:"a",ã:"a",ā:"a",ă:"a",ằ:"a",ắ:"a",ẵ:"a",ẳ:"a",ȧ:"a",ǡ:"a",ä:"a",ǟ:"a",ả:"a",å:"a",ǻ:"a",ǎ:"a",ȁ:"a",ȃ:"a",ạ:"a",ậ:"a",ặ:"a",ḁ:"a",ą:"a",ⱥ:"a",ɐ:"a",ꜳ:"aa",æ:"ae",ǽ:"ae",ǣ:"ae",ꜵ:"ao",ꜷ:"au",ꜹ:"av",ꜻ:"av",ꜽ:"ay","ⓑ":"b",b:"b",ḃ:"b",ḅ:"b",ḇ:"b",ƀ:"b",ƃ:"b",ɓ:"b","ⓒ":"c",c:"c",ć:"c",ĉ:"c",ċ:"c",č:"c",ç:"c",ḉ:"c",ƈ:"c",ȼ:"c",ꜿ:"c",ↄ:"c","ⓓ":"d",d:"d",ḋ:"d",ď:"d",ḍ:"d",ḑ:"d",ḓ:"d",ḏ:"d",đ:"d",ƌ:"d",ɖ:"d",ɗ:"d",ꝺ:"d",dz:"dz",dž:"dz","ⓔ":"e",e:"e",è:"e",é:"e",ê:"e",ề:"e",ế:"e",ễ:"e",ể:"e",ẽ:"e",ē:"e",ḕ:"e",ḗ:"e",ĕ:"e",ė:"e",ë:"e",ẻ:"e",ě:"e",ȅ:"e",ȇ:"e",ẹ:"e",ệ:"e",ȩ:"e",ḝ:"e",ę:"e",ḙ:"e",ḛ:"e",ɇ:"e",ɛ:"e",ǝ:"e","ⓕ":"f",f:"f",ḟ:"f",ƒ:"f",ꝼ:"f","ⓖ":"g",g:"g",ǵ:"g",ĝ:"g",ḡ:"g",ğ:"g",ġ:"g",ǧ:"g",ģ:"g",ǥ:"g",ɠ:"g",ꞡ:"g",ᵹ:"g",ꝿ:"g","ⓗ":"h",h:"h",ĥ:"h",ḣ:"h",ḧ:"h",ȟ:"h",ḥ:"h",ḩ:"h",ḫ:"h",ẖ:"h",ħ:"h",ⱨ:"h",ⱶ:"h",ɥ:"h",ƕ:"hv","ⓘ":"i",i:"i",ì:"i",í:"i",î:"i",ĩ:"i",ī:"i",ĭ:"i",ï:"i",ḯ:"i",ỉ:"i",ǐ:"i",ȉ:"i",ȋ:"i",ị:"i",į:"i",ḭ:"i",ɨ:"i",ı:"i","ⓙ":"j",j:"j",ĵ:"j",ǰ:"j",ɉ:"j","ⓚ":"k",k:"k",ḱ:"k",ǩ:"k",ḳ:"k",ķ:"k",ḵ:"k",ƙ:"k",ⱪ:"k",ꝁ:"k",ꝃ:"k",ꝅ:"k",ꞣ:"k","ⓛ":"l",l:"l",ŀ:"l",ĺ:"l",ľ:"l",ḷ:"l",ḹ:"l",ļ:"l",ḽ:"l",ḻ:"l",ſ:"l",ł:"l",ƚ:"l",ɫ:"l",ⱡ:"l",ꝉ:"l",ꞁ:"l",ꝇ:"l",lj:"lj","ⓜ":"m",m:"m",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m",ɯ:"m","ⓝ":"n",n:"n",ǹ:"n",ń:"n",ñ:"n",ṅ:"n",ň:"n",ṇ:"n",ņ:"n",ṋ:"n",ṉ:"n",ƞ:"n",ɲ:"n",ʼn:"n",ꞑ:"n",ꞥ:"n",nj:"nj","ⓞ":"o",o:"o",ò:"o",ó:"o",ô:"o",ồ:"o",ố:"o",ỗ:"o",ổ:"o",õ:"o",ṍ:"o",ȭ:"o",ṏ:"o",ō:"o",ṑ:"o",ṓ:"o",ŏ:"o",ȯ:"o",ȱ:"o",ö:"o",ȫ:"o",ỏ:"o",ő:"o",ǒ:"o",ȍ:"o",ȏ:"o",ơ:"o",ờ:"o",ớ:"o",ỡ:"o",ở:"o",ợ:"o",ọ:"o",ộ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",ɔ:"o",ꝋ:"o",ꝍ:"o",ɵ:"o",ƣ:"oi",ȣ:"ou",ꝏ:"oo","ⓟ":"p",p:"p",ṕ:"p",ṗ:"p",ƥ:"p",ᵽ:"p",ꝑ:"p",ꝓ:"p",ꝕ:"p","ⓠ":"q",q:"q",ɋ:"q",ꝗ:"q",ꝙ:"q","ⓡ":"r",r:"r",ŕ:"r",ṙ:"r",ř:"r",ȑ:"r",ȓ:"r",ṛ:"r",ṝ:"r",ŗ:"r",ṟ:"r",ɍ:"r",ɽ:"r",ꝛ:"r",ꞧ:"r",ꞃ:"r","ⓢ":"s",s:"s",ß:"s",ś:"s",ṥ:"s",ŝ:"s",ṡ:"s",š:"s",ṧ:"s",ṣ:"s",ṩ:"s",ș:"s",ş:"s",ȿ:"s",ꞩ:"s",ꞅ:"s",ẛ:"s","ⓣ":"t",t:"t",ṫ:"t",ẗ:"t",ť:"t",ṭ:"t",ț:"t",ţ:"t",ṱ:"t",ṯ:"t",ŧ:"t",ƭ:"t",ʈ:"t",ⱦ:"t",ꞇ:"t",ꜩ:"tz","ⓤ":"u",u:"u",ù:"u",ú:"u",û:"u",ũ:"u",ṹ:"u",ū:"u",ṻ:"u",ŭ:"u",ü:"u",ǜ:"u",ǘ:"u",ǖ:"u",ǚ:"u",ủ:"u",ů:"u",ű:"u",ǔ:"u",ȕ:"u",ȗ:"u",ư:"u",ừ:"u",ứ:"u",ữ:"u",ử:"u",ự:"u",ụ:"u",ṳ:"u",ų:"u",ṷ:"u",ṵ:"u",ʉ:"u","ⓥ":"v",v:"v",ṽ:"v",ṿ:"v",ʋ:"v",ꝟ:"v",ʌ:"v",ꝡ:"vy","ⓦ":"w",w:"w",ẁ:"w",ẃ:"w",ŵ:"w",ẇ:"w",ẅ:"w",ẘ:"w",ẉ:"w",ⱳ:"w","ⓧ":"x",x:"x",ẋ:"x",ẍ:"x","ⓨ":"y",y:"y",ỳ:"y",ý:"y",ŷ:"y",ỹ:"y",ȳ:"y",ẏ:"y",ÿ:"y",ỷ:"y",ẙ:"y",ỵ:"y",ƴ:"y",ɏ:"y",ỿ:"y","ⓩ":"z",z:"z",ź:"z",ẑ:"z",ż:"z",ž:"z",ẓ:"z",ẕ:"z",ƶ:"z",ȥ:"z",ɀ:"z",ⱬ:"z",ꝣ:"z",Ά:"Α",Έ:"Ε",Ή:"Η",Ί:"Ι",Ϊ:"Ι",Ό:"Ο",Ύ:"Υ",Ϋ:"Υ",Ώ:"Ω",ά:"α",έ:"ε",ή:"η",ί:"ι",ϊ:"ι",ΐ:"ι",ό:"ο",ύ:"υ",ϋ:"υ",ΰ:"υ",ω:"ω",ς:"σ"}})),e.define("select2/data/base",["../utils"],(function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e})),e.define("select2/data/select",["./base","../utils","jquery"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each((function(){var t=i(this),o=n.item(t);e.push(o)})),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,i(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var o=[];(t=[t]).push.apply(t,n);for(var s=0;s<t.length;s++){var r=t[s].id;-1===i.inArray(r,o)&&o.push(r)}e.$element.val(o),e.$element.trigger("change")}));else{var n=t.id;this.$element.val(n),this.$element.trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,i(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("change");this.current((function(n){for(var o=[],s=0;s<n.length;s++){var r=n[s].id;r!==t.id&&-1===i.inArray(r,o)&&o.push(r)}e.$element.val(o),e.$element.trigger("change")}))}},n.prototype.bind=function(t,e){var i=this;this.container=t,t.on("select",(function(t){i.select(t.data)})),t.on("unselect",(function(t){i.unselect(t.data)}))},n.prototype.destroy=function(){this.$element.find("*").each((function(){i.removeData(this,"data")}))},n.prototype.query=function(t,e){var n=[],o=this;this.$element.children().each((function(){var e=i(this);if(e.is("option")||e.is("optgroup")){var s=o.item(e),r=o.matches(t,s);null!==r&&n.push(r)}})),e({results:n})},n.prototype.addOptions=function(t){e.appendMany(this.$element,t)},n.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:void 0!==(e=document.createElement("option")).textContent?e.textContent=t.text:e.innerText=t.text,void 0!==t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var n=i(e),o=this._normalizeItem(t);return o.element=e,i.data(e,"data",o),n},n.prototype.item=function(t){var e={};if(null!=(e=i.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var n=t.children("option"),o=[],s=0;s<n.length;s++){var r=i(n[s]),a=this.item(r);o.push(a)}e.children=o}return(e=this._normalizeItem(e)).element=t[0],i.data(t[0],"data",e),e},n.prototype._normalizeItem=function(t){i.isPlainObject(t)||(t={id:t,text:t});return null!=(t=i.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),i.extend({},{selected:!1,disabled:!1},t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n})),e.define("select2/data/array",["./select","../utils","jquery"],(function(t,e,i){function n(t,e){var i=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(i))}return e.Extend(n,t),n.prototype.select=function(t){var e=this.$element.find("option").filter((function(e,i){return i.value==t.id.toString()}));0===e.length&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){var n=this,o=this.$element.find("option"),s=o.map((function(){return n.item(i(this)).id})).get(),r=[];function a(t){return function(){return i(this).val()==t.id}}for(var l=0;l<t.length;l++){var c=this._normalizeItem(t[l]);if(i.inArray(c.id,s)>=0){var u=o.filter(a(c)),h=this.item(u),d=i.extend(!0,{},c,h),p=this.option(d);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);e.appendMany(f,g)}r.push(f)}}return r},n})),e.define("select2/data/ajax",["./array","../utils","jquery"],(function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var o=i.ajax(t);return o.then(e),o.fail(n),o}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var n=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=i.extend({type:"GET"},this.ajaxOptions);function s(){var s=o.transport(o,(function(o){var s=n.processResults(o,t);n.options.get("debug")&&window.console&&console.error&&(s&&s.results&&i.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(s)}),(function(){s.status&&"0"===s.status||n.trigger("results:message",{message:"errorLoading"})}));n._request=s}"function"==typeof o.url&&(o.url=o.url.call(this.$element,t)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,t)),this.ajaxOptions.delay?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},n})),e.define("select2/data/tags",["jquery"],(function(t){function e(e,i,n){var o=n.get("tags"),s=n.get("createTag");void 0!==s&&(this.createTag=s);var r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,i,n),t.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return e.prototype.query=function(t,e,i){var n=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,(function t(o,s){for(var r=o.results,a=0;a<r.length;a++){var l=r[a],c=null!=l.children&&!t({results:l.children},!0);if((l.text||"").toUpperCase()===(e.term||"").toUpperCase()||c)return!s&&(o.data=r,void i(o))}if(s)return!0;var u=n.createTag(e);if(null!=u){var h=n.option(u);h.attr("data-select2-tag",!0),n.addOptions([h]),n.insertTag(r,u)}o.results=r,i(o)})):t.call(this,e,i)},e.prototype.createTag=function(e,i){var n=t.trim(i.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(t,e,i){e.unshift(i)},e.prototype._removeOldTags=function(e){this._lastTag;this.$element.find("option[data-select2-tag]").each((function(){this.selected||t(this).remove()}))},e})),e.define("select2/data/tokenizer",["jquery"],(function(t){function e(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return e.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,i,n){var o=this;i.term=i.term||"";var s=this.tokenizer(i,this.options,(function(e){var i=o._normalizeItem(e);if(!o.$element.find("option").filter((function(){return t(this).val()===i.id})).length){var n=o.option(i);n.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([n])}!function(t){o.trigger("select",{data:t})}(i)}));s.term!==i.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),i.term=s.term),e.call(this,i,n)},e.prototype.tokenizer=function(e,i,n,o){for(var s=n.get("tokenSeparators")||[],r=i.term,a=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};a<r.length;){var c=r[a];if(-1!==t.inArray(c,s)){var u=r.substr(0,a),h=l(t.extend({},i,{term:u}));null!=h?(o(h),r=r.substr(a+1)||"",a=0):a++}else a++}return{term:r}},e})),e.define("select2/data/minimumInputLength",[],(function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),e.define("select2/data/maximumInputLength",[],(function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),e.define("select2/data/maximumSelectionLength",[],(function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){var n=this;this.current((function(o){var s=null!=o?o.length:0;n.maximumSelectionLength>0&&s>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t.call(n,e,i)}))},t})),e.define("select2/dropdown",["jquery","./utils"],(function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i})),e.define("select2/dropdown/search",["jquery","../utils"],(function(t,e){function i(){}return i.prototype.render=function(e){var i=e.call(this),n=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(e,i,n){var o=this;e.call(this,i,n),this.$search.on("keydown",(function(t){o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented()})),this.$search.on("input",(function(e){t(this).off("keyup")})),this.$search.on("keyup input",(function(t){o.handleSearch(t)})),i.on("open",(function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout((function(){o.$search.focus()}),0)})),i.on("close",(function(){o.$search.attr("tabindex",-1),o.$search.val("")})),i.on("focus",(function(){i.isOpen()||o.$search.focus()})),i.on("results:all",(function(t){null!=t.query.term&&""!==t.query.term||(o.showSearch(t)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))}))},i.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.showSearch=function(t,e){return!0},i})),e.define("select2/dropdown/hidePlaceholder",[],(function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var o=e[n];this.placeholder.id===o.id&&i.splice(n,1)}return i},t})),e.define("select2/dropdown/infiniteScroll",["jquery"],(function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,i,n){var o=this;e.call(this,i,n),i.on("query",(function(t){o.lastParams=t,o.loading=!0})),i.on("query:append",(function(t){o.lastParams=t,o.loading=!0})),this.$results.on("scroll",(function(){var e=t.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&e&&(o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore())}))},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e})),e.define("select2/dropdown/attachBody",["jquery","../utils"],(function(t,e){function i(e,i,n){this.$dropdownParent=n.get("dropdownParent")||t(document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this,o=!1;t.call(this,e,i),e.on("open",(function(){n._showDropdown(),n._attachPositioningHandler(e),o||(o=!0,e.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),e.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})))})),e.on("close",(function(){n._hideDropdown(),n._detachPositioningHandler(e)})),this.$dropdownContainer.on("mousedown",(function(t){t.stopPropagation()}))},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t("<span></span>"),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._attachPositioningHandler=function(i,n){var o=this,s="scroll.select2."+n.id,r="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each((function(){t(this).data("select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})})),l.on(s,(function(e){var i=t(this).data("select2-scroll-position");t(this).scrollTop(i.y)})),t(window).on(s+" "+r+" "+a,(function(t){o._positionDropdown(),o._resizeDropdown()}))},i.prototype._detachPositioningHandler=function(i,n){var o="scroll.select2."+n.id,s="resize.select2."+n.id,r="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(o),t(window).off(o+" "+s+" "+r)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),o=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=s.top,r.bottom=s.top+r.height;var a=this.$dropdown.outerHeight(!1),l=e.scrollTop(),c=e.scrollTop()+e.height(),u=l<s.top-a,h=c>s.bottom+a,d={left:s.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();d.top-=f.top,d.left-=f.left,i||n||(o="below"),h||!u||i?!u&&h&&i&&(o="below"):o="above",("above"==o||i&&"below"!==o)&&(d.top=r.top-f.top-a),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i})),e.define("select2/dropdown/minimumResultsForSearch",[],(function(){function t(e){for(var i=0,n=0;n<e.length;n++){var o=e[n];o.children?i+=t(o.children):i++}return i}function e(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return e.prototype.showSearch=function(e,i){return!(t(i.data.results)<this.minimumResultsForSearch)&&e.call(this,i)},e})),e.define("select2/dropdown/selectOnClose",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",(function(t){n._handleSelectOnClose(t)}))},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var i=e.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var o=n.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t})),e.define("select2/dropdown/closeOnSelect",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",(function(t){n._selectTriggered(t)})),e.on("unselect",(function(t){n._selectTriggered(t)}))},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t})),e.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}})),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],(function(t,e,i,n,o,s,r,a,l,c,u,h,d,p,f,g,m,v,y,b,w,x,_,C,$,T,k,S,E){function D(){this.reset()}return D.prototype.apply=function(h){if(null==(h=t.extend(!0,{},this.defaults,h)).dataAdapter){if(null!=h.ajax?h.dataAdapter=f:null!=h.data?h.dataAdapter=p:h.dataAdapter=d,h.minimumInputLength>0&&(h.dataAdapter=c.Decorate(h.dataAdapter,v)),h.maximumInputLength>0&&(h.dataAdapter=c.Decorate(h.dataAdapter,y)),h.maximumSelectionLength>0&&(h.dataAdapter=c.Decorate(h.dataAdapter,b)),h.tags&&(h.dataAdapter=c.Decorate(h.dataAdapter,g)),null==h.tokenSeparators&&null==h.tokenizer||(h.dataAdapter=c.Decorate(h.dataAdapter,m)),null!=h.query){var E=e(h.amdBase+"compat/query");h.dataAdapter=c.Decorate(h.dataAdapter,E)}if(null!=h.initSelection){var D=e(h.amdBase+"compat/initSelection");h.dataAdapter=c.Decorate(h.dataAdapter,D)}}if(null==h.resultsAdapter&&(h.resultsAdapter=i,null!=h.ajax&&(h.resultsAdapter=c.Decorate(h.resultsAdapter,C)),null!=h.placeholder&&(h.resultsAdapter=c.Decorate(h.resultsAdapter,_)),h.selectOnClose&&(h.resultsAdapter=c.Decorate(h.resultsAdapter,k))),null==h.dropdownAdapter){if(h.multiple)h.dropdownAdapter=w;else{var A=c.Decorate(w,x);h.dropdownAdapter=A}if(0!==h.minimumResultsForSearch&&(h.dropdownAdapter=c.Decorate(h.dropdownAdapter,T)),h.closeOnSelect&&(h.dropdownAdapter=c.Decorate(h.dropdownAdapter,S)),null!=h.dropdownCssClass||null!=h.dropdownCss||null!=h.adaptDropdownCssClass){var P=e(h.amdBase+"compat/dropdownCss");h.dropdownAdapter=c.Decorate(h.dropdownAdapter,P)}h.dropdownAdapter=c.Decorate(h.dropdownAdapter,$)}if(null==h.selectionAdapter){if(h.multiple?h.selectionAdapter=o:h.selectionAdapter=n,null!=h.placeholder&&(h.selectionAdapter=c.Decorate(h.selectionAdapter,s)),h.allowClear&&(h.selectionAdapter=c.Decorate(h.selectionAdapter,r)),h.multiple&&(h.selectionAdapter=c.Decorate(h.selectionAdapter,a)),null!=h.containerCssClass||null!=h.containerCss||null!=h.adaptContainerCssClass){var I=e(h.amdBase+"compat/containerCss");h.selectionAdapter=c.Decorate(h.selectionAdapter,I)}h.selectionAdapter=c.Decorate(h.selectionAdapter,l)}if("string"==typeof h.language)if(h.language.indexOf("-")>0){var N=h.language.split("-")[0];h.language=[h.language,N]}else h.language=[h.language];if(t.isArray(h.language)){var O=new u;h.language.push("en");for(var z=h.language,j=0;j<z.length;j++){var L=z[j],M={};try{M=u.loadPath(L)}catch(t){try{L=this.defaults.amdLanguageBase+L,M=u.loadPath(L)}catch(t){h.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+L+'" could not be automatically loaded. A fallback will be used instead.');continue}}O.extend(M)}h.translations=O}else{var R=u.loadPath(this.defaults.amdLanguageBase+"en"),H=new u(h.language);H.extend(R),h.translations=H}return h},D.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,(function(t){return h[t]||t}))}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:E,matcher:function i(n,o){if(""===t.trim(n.term))return o;if(o.children&&o.children.length>0){for(var s=t.extend(!0,{},o),r=o.children.length-1;r>=0;r--){null==i(n,o.children[r])&&s.children.splice(r,1)}return s.children.length>0?s:i(n,s)}var a=e(o.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},D.prototype.set=function(e,i){var n={};n[t.camelCase(e)]=i;var o=c._convertData(n);t.extend(this.defaults,o)},new D})),e.define("select2/options",["require","jquery","./defaults","./utils"],(function(t,e,i,n){function o(e,o){if(this.options=e,null!=o&&this.fromElement(o),this.options=i.apply(this.options),o&&o.is("input")){var s=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,s)}}return o.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var o={};o=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var s=e.extend(!0,{},o);for(var r in s=n._convertData(s))e.inArray(r,i)>-1||(e.isPlainObject(this.options[r])?e.extend(this.options[r],s[r]):this.options[r]=s[r]);return this},o.prototype.get=function(t){return this.options[t]},o.prototype.set=function(t,e){this.options[t]=e},o})),e.define("select2/core",["jquery","./options","./utils","./keys"],(function(t,e,i,n){var o=function t(i,n){null!=i.data("select2")&&i.data("select2").destroy(),this.$element=i,this.id=this._generateId(i),n=n||{},this.options=new e(n,i),t.__super__.constructor.call(this);var o=i.attr("tabindex")||0;i.data("old-tabindex",o),i.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(i,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(i,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var l=this.options.get("dropdownAdapter");this.dropdown=new l(i,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var c=this.options.get("resultsAdapter");this.results=new c(i,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(t){u.trigger("selection:update",{data:t})})),i.addClass("select2-hidden-accessible"),i.attr("aria-hidden","true"),this._syncAttributes(),i.data("select2",this)};return i.Extend(o,i.Observable),o.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},o.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var o=t.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==e){var s=t.attr("style");if("string"!=typeof s)return null;for(var r=s.split(";"),a=0,l=r.length;a<l;a+=1){var c=r[a].replace(/\s/g,"").match(i);if(null!==c&&c.length>=1)return c[1]}return null}return e},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=n?(this._observer=new n((function(i){t.each(i,e._syncA),t.each(i,e._syncS)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},o.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerSelectionEvents=function(){var e=this,i=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,o){-1===t.inArray(n,i)&&e.trigger(n,o)}))},o.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerEvents=function(){var e=this;e.lastPage=1,e.lastResults=null,e.lastTerm=null,this.on("open",(function(){e.$container.addClass("select2-container--open")})),this.on("close",(function(){e.$container.removeClass("select2-container--open")})),this.on("enable",(function(){e.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){e.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){e.$container.removeClass("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||(e.trigger("open",{}),void 0!==e.dropdown.$search&&e.dropdown.$search.val(e.lastTerm)),1==e.options.options.resultCache&&e.lastResults&&null==t.term?(t.page=e.lastPage,e.trigger("results:all",{data:e.lastResults,query:t})):(e.lastTerm=t.term,e.lastPage=1,this.dataAdapter.query(t,(function(i){e.lastResults=i,e.trigger("results:all",{data:i,query:t})})))})),this.on("query:append",(function(i){e.lastPage<i.page&&(e.lastPage=i.page,this.dataAdapter.query(i,(function(n){t.each(n.results,(function(t,i){e.lastResults.results.push(i)})),e.lastResults.pagination.more=n.pagination.more,e.trigger("results:append",{data:n,query:i})})))})),this.on("keypress",(function(t){var i=t.which;e.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&t.altKey?(e.close(),t.preventDefault()):i===n.ENTER?(e.trigger("results:select",{}),t.preventDefault()):i===n.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):i===n.UP?(e.trigger("results:previous",{}),t.preventDefault()):i===n.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(t,e){var i=!1,n=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var o=0;o<e.addedNodes.length;o++){e.addedNodes[o].selected&&(i=!0)}else e.removedNodes&&e.removedNodes.length>0&&(i=!0);else i=!0;i&&this.dataAdapter.current((function(t){n.trigger("selection:update",{data:t})}))}},o.prototype.trigger=function(t,e){var i=o.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in n){var s=n[t],r={prevented:!1,name:t,args:e};if(i.call(this,s,r),r.prevented)return void(e.prevented=!0)}i.call(this,t,e)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current((function(e){t=e})),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var i=e[0];t.isArray(i)&&(i=t.map(i,(function(t){return t.toString()}))),this.$element.val(i).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},o})),e.define("select2/compat/utils",["jquery"],(function(t){return{syncCssClasses:function(e,i,n){var o,s,r=[];(o=t.trim(e.attr("class")))&&t((o=""+o).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&r.push(this)})),(o=t.trim(i.attr("class")))&&t((o=""+o).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(s=n(this))&&r.push(s)})),e.attr("class",r.join(" "))}}})),e.define("select2/compat/containerCss",["jquery","./utils"],(function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var o=n.call(this),s=this.options.get("containerCssClass")||"";t.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptContainerCssClass");if(r=r||i,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("containerCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},n})),e.define("select2/compat/dropdownCss",["jquery","./utils"],(function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var o=n.call(this),s=this.options.get("dropdownCssClass")||"";t.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptDropdownCssClass");if(r=r||i,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("dropdownCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},n})),e.define("select2/compat/initSelection",["jquery"],(function(t){function e(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=i.get("initSelection"),this._isInitialized=!1,t.call(this,e,i)}return e.prototype.current=function(e,i){var n=this;this._isInitialized?e.call(this,i):this.initSelection.call(null,this.$element,(function(e){n._isInitialized=!0,t.isArray(e)||(e=[e]),i(e)}))},e})),e.define("select2/compat/inputData",["jquery"],(function(t){function e(t,e,i){this._currentData=[],this._valueSeparator=i.get("valueSeparator")||",","hidden"===e.prop("type")&&i.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),t.call(this,e,i)}return e.prototype.current=function(e,i){function n(e,i){var o=[];return e.selected||-1!==t.inArray(e.id,i)?(e.selected=!0,o.push(e)):e.selected=!1,e.children&&o.push.apply(o,n(e.children,i)),o}for(var o=[],s=0;s<this._currentData.length;s++){var r=this._currentData[s];o.push.apply(o,n(r,this.$element.val().split(this._valueSeparator)))}i(o)},e.prototype.select=function(e,i){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+i.id,this.$element.val(n),this.$element.trigger("change")}else this.current((function(e){t.map(e,(function(t){t.selected=!1}))})),this.$element.val(i.id),this.$element.trigger("change")},e.prototype.unselect=function(t,e){var i=this;e.selected=!1,this.current((function(t){for(var n=[],o=0;o<t.length;o++){var s=t[o];e.id!=s.id&&n.push(s.id)}i.$element.val(n.join(i._valueSeparator)),i.$element.trigger("change")}))},e.prototype.query=function(t,e,i){for(var n=[],o=0;o<this._currentData.length;o++){var s=this._currentData[o],r=this.matches(e,s);null!==r&&n.push(r)}i({results:n})},e.prototype.addOptions=function(e,i){var n=t.map(i,(function(e){return t.data(e[0],"data")}));this._currentData.push.apply(this._currentData,n)},e})),e.define("select2/compat/matcher",["jquery"],(function(t){return function(e){return function(i,n){var o=t.extend(!0,{},n);if(null==i.term||""===t.trim(i.term))return o;if(n.children){for(var s=n.children.length-1;s>=0;s--){var r=n.children[s];e(i.term,r.text,r)||o.children.splice(s,1)}if(o.children.length>0)return o}return e(i.term,n.text,n)?o:null}}})),e.define("select2/compat/query",[],(function(){function t(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.callback=i,this.options.get("query").call(null,e)},t})),e.define("select2/dropdown/attachContainer",[],(function(){function t(t,e,i){t.call(this,e,i)}return t.prototype.position=function(t,e,i){i.find(".dropdown-wrapper").append(e),e.addClass("select2-dropdown--below"),i.addClass("select2-container--below")},t})),e.define("select2/dropdown/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(t){t.stopPropagation()}))},t})),e.define("select2/selection/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(t){t.stopPropagation()}))},t})),i=function(t){var e,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(t.event.fixHooks)for(var r=n.length;r;)t.event.fixHooks[n[--r]]=t.event.mouseHooks;var a=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",a.getLineHeight(this)),t.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var o=n||window.event,r=s.call(arguments,1),l=0,h=0,d=0,p=0,f=0,g=0;if((n=t.event.fix(o)).type="mousewheel","detail"in o&&(d=-1*o.detail),"wheelDelta"in o&&(d=o.wheelDelta),"wheelDeltaY"in o&&(d=o.wheelDeltaY),"wheelDeltaX"in o&&(h=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(h=-1*d,d=0),l=0===d?h:d,"deltaY"in o&&(l=d=-1*o.deltaY),"deltaX"in o&&(h=o.deltaX,0===d&&(l=-1*h)),0!==d||0!==h){if(1===o.deltaMode){var m=t.data(this,"mousewheel-line-height");l*=m,d*=m,h*=m}else if(2===o.deltaMode){var v=t.data(this,"mousewheel-page-height");l*=v,d*=v,h*=v}if(p=Math.max(Math.abs(d),Math.abs(h)),(!i||p<i)&&(i=p,u(o,p)&&(i/=40)),u(o,p)&&(l/=40,h/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/i),h=Math[h>=1?"floor":"ceil"](h/i),d=Math[d>=1?"floor":"ceil"](d/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=n.clientX-y.left,g=n.clientY-y.top}return n.deltaX=h,n.deltaY=d,n.deltaFactor=i,n.offsetX=f,n.offsetY=g,n.deltaMode=0,r.unshift(n,l,h,d),e&&clearTimeout(e),e=setTimeout(c,200),(t.event.dispatch||t.event.handle).apply(this,r)}}function c(){i=null}function u(t,e){return a.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],i):"object"===("undefined"==typeof exports?"undefined":_typeof2(exports))?module.exports=i:i(t),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(t,e,i,n){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"===_typeof2(e=e||{}))return this.each((function(){var n=t.extend(!0,{},e);new i(t(this),n)})),this;if("string"==typeof e){var n,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var i=t(this).data("select2");null==i&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=i[e].apply(i,s)})),t.inArray(e,o)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i})),{define:e.define,require:e.require}}(),i=e.require("jquery.select2");return t.fn.select2.amd=e,i})),function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var t=jQuery.fn.select2.amd;t.define("select2/i18n/zh-CN",[],(function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(t){return"请删除"+(t.input.length-t.maximum)+"个字符"},inputTooShort:function(t){return"请再输入至少"+(t.minimum-t.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(t){return"最多只能选择"+t.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}})),t.define,t.require}(),function(t,e){var i="agDropdownCellEditor",n="ag.dropdown.celleditor",o={maxHeight:200},s=27,r=9,a=37,l=38,c=39,u=40,h=13,d=16,p=function(e,n){this.grid=n.grid,this.config=n.config,this.items=n.data.items,this.selected=n.data.selected,this.hook=n.hook,this.arrow=n.arrow||"icon-search",this.name=n.name,this.onSelect=n.select||function(){},this.$input=t(e),this.settings=t.extend({},o,n),this.init(),t.fn[i].instances.push(this)};t.extend(p.prototype,{init:function(){this._construct(),this._events()},_construct:function(){this.$container=t('<div class="combo-select combo-open combo-'+this.name+'" />'),this.$arrow=t('<div class="combo-arrow"><i class="fa '+this.arrow+'"></i></div>'),this.$dropdown=t('<ul class="combo-dropdown" />').appendTo(this.$container),this._build(),this.$input.after(this.$arrow),t("body").append(this.$container);var e=this.$input.outerHeight(),i=this.$input.outerWidth(),n=this.$input.offset();this.$container.css({width:i+2,left:n.left-1,top:n.top+e+1})},_build:function(){var e=this,i="",n=0;i+='<li class="option-item-empty">无匹配选项</li>',t.each(this.items,(function(t,o){if("optgroup"==o)return i+='<li class="option-group">'+this.label+"</li>";i+='<li class="'+(this.disabled?"option-disabled":"option-item")+" "+(this.id==e.selected?"option-selected":"")+'" data-index="'+n+'" data-value="'+this.id+'">'+this.name+"<i>"+this.code+"</i></li>",n++})),this.$dropdown.html(i),this.$items=this.$dropdown.children()},_events:function(){this.$arrow.off(),this.$container.off(),this.$input.off(),this.$arrow.on("click.arrow",t.proxy(this._toggle,this)),this.$container.on("dropdown:close",t.proxy(this._close,this)),this.$container.on("dropdown:open",t.proxy(this._open,this)),this.$container.on("dropdown:update",t.proxy(this._update,this)),this.$input.on("keydown",t.proxy(this._keydown,this)),this.$input.on("keyup",t.proxy(this._keyup,this)),this.$container.on("click.item",".option-item",t.proxy(this._select,this))},_keydown:function(t){switch(t.which){case s:this.$container.trigger("dropdown:close");break;case l:this._move("up",t),t.stopPropagation();break;case u:this._move("down",t),t.stopPropagation();break;case r:this._enter(t);break;case c:break;case h:this._enter(t)}},_keyup:function(t){switch(t.which){case s:case h:case l:case u:case a:case c:case r:case d:break;default:this._filter(t.target.value)}},_enter:function(t){var e=this._getHovered();this._select(e)},_move:function(t,e){var i=this._getVisible(),n=this._getHovered().prevAll(".option-item").filter(":visible").length,o=i.length;switch(t){case"up":--n<0&&(n=o-1);break;case"down":++n>=o&&(n=0)}i.removeClass("option-hover").eq(n).addClass("option-hover"),this.opened||this.$container.trigger("dropdown:open"),this._fixScroll()},_select:function(e){var i=(e.currentTarget?t(e.currentTarget):t(e)).data("index");this._selectByIndex(i),this.$container.trigger("dropdown:close")},_selectByIndex:function(e){void 0===e&&(e=-1),this._getAll().removeClass("option-selected").filter((function(){return t(this).data("index")==e})).addClass("option-selected"),this._change()},_autofill:function(){var t=this._getHovered();if(t.length){var e=t.data("index");this._selectByIndex(e)}},_filter:function(e){var i=this._getAll(),n=t.trim(e).toLowerCase(),o=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\"].join("|\\")+")","g"),s="("+e.replace(o,"\\$1")+")";t(".combo-marker",i).contents().unwrap(),n?(this.$items.filter(".option-group, .option-disabled").hide(),i.hide().filter((function(){var e=t(this);if(-1!=t.trim(e.text()).toLowerCase().toString().indexOf(n))return e.html((function(t,e){return e.replace(new RegExp(s,"gi"),'<span class="combo-marker">$1</span>')})),!0})).show()):i.show(),this.$container.trigger("dropdown:open"),0==this._getVisible().length?this.$items.filter(".option-item-empty").show():this.$items.filter(".option-item-empty").hide()},_highlight:function(){var t=this._getVisible().removeClass("option-hover"),e=t.filter(".option-selected");e.length?e.addClass("option-hover"):t.removeClass("option-hover").first().addClass("option-hover")},_updateInput:function(){var t=this._getAll().filter(".option-selected").data("index");this.onSelect.call(this,this.items[t])},_focus:function(t){this.$container.toggleClass("combo-focus",!this.opened),this.opened||this.$container.trigger("dropdown:open")},_change:function(){this._updateInput()},_getAll:function(){return this.$items.filter(".option-item")},_getVisible:function(){return this.$items.filter(".option-item").filter(":visible")},_getHovered:function(){return this._getVisible().filter(".option-hover")},_open:function(){var e=this;this.$container.addClass("combo-open"),this.$arrow.addClass("combo-arrow-open"),this.opened=!0,this._highlight(),this._fixScroll(),t.each(t.fn[i].instances,(function(t,i){i!=e&&i.opened&&i.$container.trigger("dropdown:close")}))},_toggle:function(t){this.opened?this._close.call(this):this._open.call(this),this.$input.focus(),t.stopPropagation()},_close:function(){this.$container.removeClass("combo-open combo-focus"),this.$arrow.removeClass("combo-arrow-open"),this.$container.trigger("dropdown:closed"),this.opened=!1,this.$items.filter(".option-item").show()},_fixScroll:function(){if(!this.$dropdown.is(":hidden")){var t=this._getHovered();if(t.length){var e,i,n,o=t.outerHeight();e=t[0].offsetTop,n=(i=this.$dropdown.scrollTop())+this.settings.maxHeight-o,e<i?this.$dropdown.scrollTop(e):e>n&&this.$dropdown.scrollTop(e-this.settings.maxHeight+o)}}},_update:function(){this.$dropdown.empty(),this._build()},dispose:function(){this.$arrow.remove(),this.$input.remove(),this.$dropdown.remove()}}),t.fn[i]=function(e,i){return this.each((function(){var o=t(this).data("plugin_"+n);"string"==typeof e?o&&"function"==typeof o[e]&&o[e](i):(o&&o.dispose&&o.dispose(),t.data(this,"plugin_"+n,new p(this,e)))})),this},t.fn[i].instances=[]}(jQuery),function(t){var e,i=null;function n(e,i){var n=t("#gdoo-gird-suggest");n.is(":visible")&&(n.hide(),e.trigger("onHideDropdown",[i?i.data:[]]))}function o(e,n,o){return function(e,i){var n=t("#gdoo-gird-suggest");n.is(":visible")||(n.show(),e.trigger("onShowDropdown",[i?i.data:[]]))}(e,o),i.remoteParams.q=e.val(),i.remoteData(),e}function s(e,i,n,o){return n=t.trim(n),o.ignorecase&&(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase()),n&&(function(e,i){var n=i.effectiveFields;return!("__index"===e||n.length&&!~t.inArray(e,n))}(i,o)||function(e,i){return~t.inArray(e,i.searchFields)}(i,o))&&(~n.indexOf(e)||o.twoWayMatch&&~e.indexOf(n))}var r={query:{},item:{},data:[],allowNoKeyword:!0,ignorecase:!1,searchFields:[],twoWayMatch:!0,delay:300,showBtn:!0,clearable:!1,keyLeft:37,keyUp:38,keyRight:39,keyDown:40,keyEnter:13,fnGetData:function(t,e,i,n){var o,r,a,l,c=[];if(t=t||"",n.url)i(e,n.data,n);else{if(o=n.data)if(t){for(l=o.length,r=0;r<l;r++)for(a in o[r])if(o[r][a]&&s(t,a,o[r][a]+"",n)){c.push(o[r]),c[c.length-1].__index=r;break}}else c=o;i(e,c,n)}}},a={init:function(s){return s=s||{},s=t.extend(!0,{},r,s),this.each((function(){var r,a,l=t(this),c=l.parent(),u=function(e,i){var n=e.prev("i.clearable");return i.clearable&&!n.length&&(n=t('<i class="clearable glyphicon glyphicon-remove"></i>').prependTo(e.parent())),n.css({position:"absolute",top:12,zIndex:4,cursor:"pointer",fontSize:12}).hide()}(l,s),h=t("#gdoo-gird-suggest");0===h.length&&(h=t('<div class="gdoo-gird-suggest" id="gdoo-gird-suggest" style="position:absolute;display:none;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%);"></div>'),t("body").append(h)),function(e,o){var s=o.query;s.suggest=!0,t("#gdoo-gird-suggest").html('<div style="height:180px;overflow:auto;width:auto;"><div id="suggest-'+s.id+'" class="ag-theme-balham" style="width:100%;height:180px;border-left:1px solid #BDC3C7;border-right:1px solid #BDC3C7;"></div></div>');var r=gdoo.formKey(s),a=gdoo.event.get(r.key);a.trigger("query",s),a.trigger("open",s),s.prefix;var l=document.querySelector("#suggest-"+s.id);i=new agGridOptions;var c=0!=s.multi;i.remoteDataUrl=app.url(s.url),i.remoteParams=s,i.rowSelection=c?"multiple":"single",i.suppressRowClickSelection=!0,i.columnDefs=[{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"code",headerName:"存货编码",width:100},{suppressMenu:!0,cellClass:"text-left",sortable:!0,field:"name",headerName:"产品名称",minWidth:140},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"spec",headerName:"规格型号",width:100},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"barcode",headerName:"产品条码",width:120},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"unit_id_name",headerName:"计量单位",width:80},{suppressMenu:!0,cellClass:"text-right",field:"price",headerName:"价格",width:80}],i.onRowClicked=function(t){i.writeSelected(t.data)&&n(e,o)},i.writeSelected=function(t){var i=!0,n=gdoo.forms[s.form_id],r=n.links[s.id],l=o.item;for(key in 0==query.grid_id&&(query.grid_id=n.lastEditCell.data.id),r)l[key]=t[r[key]];return a.exist("onSelect")&&(i=a.trigger("onSelect",l,t)),n.lastEditCell.data=l,n.api.memoryStore.update(l),e.trigger("onSelect",[l]),n.generatePinnedBottomData(),i},new agGrid.Grid(l,i)}(l,s),l.off(),s.showBtn||(l.css("borderRadius",4),c.css("width","100%").find(".btn:eq(0)").hide()),l.removeClass("disabled").prop("disabled",!1).attr("autocomplete","off"),l.on("keydown",(function(t){h.is(":visible")&&t.keyCode===s.keyEnter&&n(l,s)})).on("compositionstart",(function(t){e=!0})).on("compositionend",(function(t){e=!1})).on("keyup input paste",(function(i){var n;~t.inArray(i.keyCode,[s.keyDown,s.keyUp,s.keyEnter])?l.val(l.val()):(clearTimeout(a),a=setTimeout((function(){e||(n=l.val(),t.trim(n)&&n===function(t,e){return void 0!==e?t.attr("alt",e):t.attr("alt")}(l)||(n.length||s.allowNoKeyword)&&s.fnGetData(t.trim(n),l,o,s))}),s.delay||300))})).on("blur",(function(){r||n(l,s)})).on("focus",(function(){h.off();var e=t(window).width(),i=t(window).height(),n=l.outerWidth(),o=l.outerHeight(),s=l.offset(),a=h.outerWidth(),c=h.outerHeight(),u={top:s.top+o};e<768?(u.minWidth=360,u.left=14,u.right=14):(u.left=s.left-1,e<s.left+a+10&&(u.left=s.left-a+n+1),i<s.top+c+10&&(u.top=s.top-c)),h.css(u),h.on("mouseenter",(function(){r=1,l.blur()})).on("mouseleave",(function(){r=0,l.focus()})).on("click",(function(){return!1}))})),u.length&&(u.click((function(){})),c.mouseenter((function(){l.prop("disabled")||u.css("right",s.showBtn?Math.max(l.next(".input-group-btn").width(),33)+2:12).show()})).mouseleave((function(){u.hide()})))}))},show:function(){return this.each((function(){t(this).click()}))},hide:function(){return this.each((function(){n(t(this))}))},disable:function(){return this.each((function(){t(this).attr("disabled",!0).parent().find(".btn:eq(0)").prop("disabled",!0)}))},enable:function(){return this.each((function(){t(this).attr("disabled",!1).parent().find(".btn:eq(0)").prop("disabled",!1)}))},destroy:function(){return this.each((function(){t(this).off().removeData("gdooSuggest").removeAttr("style").parent().find(".btn:eq(0)").off().show().attr("data-toggle","dropdown").prop("disabled",!1).next().css("display","").off()}))}};t.fn.gdooSuggest=function(e){if("string"==typeof e&&a[e]){var i=!0;return this.each((function(){if(!t(this).data("gdooSuggest"))return i=!1})),i||"init"===e||"version"===e?a[e].apply(this,[].slice.call(arguments,1)):this}return a.init.apply(this,arguments)}}(jQuery);var formGridList={};function gridForms(t,e,i){i.master=t;var n=gridForm(e,i);return formGridList[t].push(n),n}function gridForm(t,e){e=$.extend({heightTop:70,data:[],dataType:"local"},e);var i=new agGridOptions;i.suppressLoadingOverlay=!0,i.suppressNoRowsOverlay=!0,i.rowMultiSelectWithClick=!1,i.singleClickEdit=!0,i.rowSelection="single",i.suppressCellSelection=!1,i.suppressRowClickSelection=!1,i.columnDefs=e.columns,i.links=e.links,i.tableTitle=e.title,i.tableKey=e.table,i.defaultColDef.sortable=!1,i.defaultColDef.filter=!1,i.defaultColDef.suppressMenu=!0,i.defaultColDef.suppressNavigable=!0,i.isEditing=!1,i.isEditingDialog=!1;var n=gdoo.event.get("grid."+t),o=n.editable||{};i.defaultColDef.editable=function(t){if(t.node.rowPinned)return!1;var e=t.colDef,n=o[e.field];return"function"==typeof n?n.call(i,t):!!t.colDef._editable},i.getRowNodeId=function(t){if(t.id)return t.id},i.onRowClicked=function(t){},i.stopEditingWhenGridLosesFocus=!1,i.onRowDoubleClicked=function(t){},i.onCellEditingStarted=function(t){i.lastEditCell=t,i.isEditingDialog="dialogCellEditor"==t.colDef.cellEditor,i.isEditing=!0},i.onCellEditingStopped=function(){i.isEditing=!1,i.isEditingDialog&&$("#gdoo-gird-suggest").hide()};var s=!1,r=document.querySelector("#grid_"+t);""==r.style.height&&(s=!0,r.style.height=l()+"px"),n.trigger("init",i),new agGrid.Grid(r,i),i.api.dialogSelected=function(t){var n=gdoo.event.get(t.form_id+"."+t.id),o=e.links[t.id],s=gdoo.dialogs[t.form_id+"_"+t.id].getSelectedRows(),r=i.api.memoryStore,a=[];i.api.forEachNode((function(e,i){null==e.data[t.id]&&a.push(e.data)})),0==t.grid_id&&(t.grid_id=i.lastEditCell.data.id);for(var l=0;l<s.length;l++){var c=a[l],u=!0;if(null==c&&(c={},u=!1),1==s.length){var h=i.api.getSelectedRows();if(0==h.length){if(c={},t.grid_id)c=i.api.getRowNode(t.grid_id).data,u=!0}else t.grid_id&&(c=h[0],u=!0)}var d=s[l];for(key in o)c[key]=d[o[key]];n.trigger("onSelect",c,d),u?r.update(c):r.create(c),1==s.length&&t.grid_id&&$("#"+t.name+"_"+t.grid_id).val(c[t.name])}i.generatePinnedBottomData()},i.api.memoryStore={lastIndex:1,created:[],updated:[],deleted:[],create:function(t,e){this.lastIndex++,t.id="draft_"+this.lastIndex,t=i.calcRow(t),this.created.push(t),i.api.updateRowData({add:[t],addIndex:e})},update:function(t){t=i.calcRow(t),this.updated.push(t),i.api.updateRowData({update:[t]})},delete:function(t,e){0==e&&this.deleted.push(t),this.created=this.created.filter((function(e){return e.id!=t.id})),this.updated=this.updated.filter((function(e){return e.id!=t.id}));i.api.updateRowData({remove:[t]});i.generatePinnedBottomData()}},i.onFirstDataRendered=function(t){this.api;this.generatePinnedBottomData()},i.calcRow=function(t,i){for(var n=0;n<e.columns.length;n++){var o=e.columns[n];if(o.calcRow){var s=new Function("data","column",o.calcRow),r=parseFloat(s(t,i||{}));(isNaN(r)||0===r)&&(r=""),t[o.field]=r}}return t},i.onCellValueChanged=function(t){var e=this;if(t.oldValue!=t.newValue){var i=t.data;i=e.calcRow(i,t.column),e.api.updateRowData({update:[i]}),e.generatePinnedBottomData()}},"local"==e.dataType&&(e.data.length>0?("function"==typeof n.dataLoaded&&n.dataLoaded.call(i,e.data),i.api.updateRowData({add:e.data})):i.api.memoryStore.create({})),i.api.deleteRow=function(t){var e=i.api.getRowNode(t.id).data;0===(""+e.id).indexOf("draft_")?i.api.memoryStore.delete(e,!0):i.api.memoryStore.delete(e,!1)};var a=$(r);function l(){var t=$("#tab-content-"+e.master).position(),i=$(window).height()-t.top-e.heightTop;return i>320?i:320}return a.off(),a.on("click",'[data-toggle="event"]',(function(){var t=$(this).data();"option"==t.action&&("add"==t.type?i.api.memoryStore.create({}):i.api.getDisplayedRowCount()>1&&i.api.deleteRow(t))})),a.on("blur",".ag-input-wrapper",(function(){i.isEditingDialog||i.isEditing&&i.api.stopEditing()})),i.onGridReady=function(t){n.trigger("ready",i),s&&window.addEventListener("resize",(function(){setTimeout((function(){r.style.height=l()+"px"}))}))},gdoo.forms[t]=i,i}function getPanelHeight(t){return"calc(100vh - "+($(".list-jqgrid").position().top+t+"px")+")"}!function(t,e){var i={page:"页",more:"更多",to:"到",of:"至",next:"下一页",last:"上一页",first:"首页",previous:"上一页",loadingOoo:"加载中...",selectAll:"查询全部",searchOoo:"查询...",blanks:"空白",filterOoo:"过滤...",applyFilter:"daApplyFilter...",equals:"相等",notEqual:"不相等",lessThan:"小于",greaterThan:"大于",lessThanOrEqual:"小于等于",greaterThanOrEqual:"大于等于",inRange:"范围",contains:"包含",notContains:"不包含",startsWith:"开始于",endsWith:"结束于",group:"组",columns:"列",filters:"筛选",rowGroupColumns:"laPivot Cols",rowGroupColumnsEmptyMessage:"la drag cols to group",valueColumns:"laValue Cols",pivotMode:"laPivot-Mode",groups:"laGroups",values:"值",pivots:"laPivots",valueColumnsEmptyMessage:"la drag cols to aggregate",pivotColumnsEmptyMessage:"la drag here to pivot",toolPanelButton:"la tool panel",noRowsToShow:"数据为空",pinColumn:"laPin Column",groupBy:"排序",ungroupBy:"不排序",resetColumns:"重置列",expandAll:"展开全部",collapseAll:"关闭",toolPanel:"工具面板",export:"导出",csvExport:"导出为CSV格式文件",excelExport:"导出到Excel",sum:"总数",min:"最小值",max:"最大值",none:"无",count:"总",average:"平均值",copy:"复制",copyWithHeaders:"携带表头复制",ctrlC:"ctrl + C",paste:"粘贴",ctrlV:"ctrl + V"};function n(){}function o(){}function s(){}function r(){}function a(){}function l(){}function c(){}function u(){}n.prototype.init=function(t){t.node.rowPinned||(this.eGui=document.createElement("div"),this.eGui.className="options",this.eGui.innerHTML='<a data-toggle="event" data-action="option" data-type="add" data-index="'+t.rowIndex+'" data-id="'+t.data.id+'" class="fa fa-plus" title="新增行"></a> <a data-toggle="event" data-action="option" data-type="delete" data-id="'+t.data.id+'" data-index="'+t.rowIndex+'" class="fa fa-times" title="删除行"></a></div>')},n.prototype.getGui=function(){return this.eGui},o.prototype.init=function(t){this.eGui=document.createElement("span"),this.eGui.innerHTML=t.value||""},o.prototype.getGui=function(){return this.eGui},s.prototype.init=function(t){var e=t.api.gridCore.gridOptions;if(!t.node.rowPinned&&null!=t.data){var i=t.data,n="";i.master_id>0&&t.colDef.options.forEach((function(t){if(t.display){var o='<a data-toggle="event" class="option" data-action="'+t.action+'" data-master_name="'+i.name+'" data-master_id="'+i.master_id+'" href="javascript:;">'+t.name+"</a>";n+=e.actionCellBeforeRender(o,t,i)||""}})),this.eGui=document.createElement("span"),this.eGui.innerHTML=n}},s.prototype.getGui=function(){return this.eGui},r.prototype.init=function(t){this.grid=t,this.selectedKey=null,this.items=t.colDef.cellEditorParams.values,this.eInput=document.createElement("input"),this.eInput.value=t.value||"",this.eInput.className="ag-cell-edit-input form-control"},r.prototype.getGui=function(t){return this.eInput},r.prototype.afterGuiAttached=function(){var t=this,i=t.grid,n=t.eInput.value;e(t.eInput).agDropdownCellEditor({grid:t,arrow:"fa-caret-down",data:{items:t.items,selected:i.data[i.select_key]},select:function(e){e?(i.data[i.select_key]=e.id,t.eInput.value=e.name,t.selectedKey=e.id):t.eInput.value=n,i.stopEditing()}}),t.eInput.focus(),t.eInput.select()},r.prototype.getValue=function(){return this.eInput.value},r.prototype.destroy=function(){e("body").find(".combo-select").remove()},a.prototype.init=function(t){var e=t.value,i=t.colDef.cellEditorParams.values;this.eGui=document.createElement("div"),this.eGui.innerHTML=i[e]||i[0]},a.prototype.getGui=function(){return this.eGui},l.prototype.init=function(t){var e=t.value;this.eInput=document.createElement("input"),this.eInput.type="checkbox",this.eInput.checked=e,this.eInput.value=e},l.prototype.getGui=function(t){return this.eInput},l.prototype.afterGuiAttached=function(){this.eInput.focus(),this.eInput.select()},l.prototype.getValue=function(){return this.eInput.checked?1:0},l.prototype.destroy=function(){},c.prototype.init=function(t){this.params=t,this.eInput=document.createElement("div"),this.eInput.tabIndex="-1";var i=t.colDef.field+"_"+t.data.id,n=t.query;n.multi=1,n.is_grid=1,n.url=t.url,n.grid_id=t.data.id,n.title=t.title;var o="";e.each(n,(function(t,e){o+=" data-"+t+'="'+e+'"'})),this.query=n,this.eInput.innerHTML='<input class="ag-cell-edit-input" value="'+(t.value||"")+'" id="'+i+'"><a class="combo-arrow" data-toggle="dialog-view" '+o+'><i class="fa fa-search"></i></a>',this.eInput.className="ag-input-wrapper ag-input-dialog-wrapper"},c.prototype.getGui=function(t){return this.eInput},c.prototype.afterGuiAttached=function(){var t=this;e(t.eInput).find("input").gdooSuggest({item:t.params.data,query:t.query}).on("onSelect",(function(e,i){t.params.data[t.query.name]=i[t.query.name],t.eInput.querySelector("input").value=i[t.query.name]})),t.eInput.querySelector("input").select()},c.prototype.getValue=function(){return this.params.data[this.params.query.name]},c.prototype.destroy=function(){e(this.eInput).find("input").off()},c.prototype.isPopup=function(){return!1},u.prototype.init=function(t){this.params=t.colDef.cellEditorParams,this.eInput=document.createElement("div"),this.eInput.innerHTML='<input type="text" class="ag-cell-edit-input" data-toggle="date" value="'+(t.value||"")+'">',this.eInput.className="ag-input-wrapper ag-input-date-wrapper"},u.prototype.getGui=function(t){return this.eInput},u.prototype.afterGuiAttached=function(){this.eInput.querySelector("input").click()},u.prototype.getValue=function(){return this.eInput.querySelector("input").value},u.prototype.destroy=function(){},t.agGridOptions=function(){var t={defaultColDef:{minWidth:100,enableRowGroup:!0,enablePivot:!0,enableValue:!0,sortable:!0,resizable:!0,filter:!0,comparator:function(t,e){return"htmlCellRenderer"==this.cellRenderer?(t=delHtmlTag(t),e=delHtmlTag(e),t.localeCompare(e)):"string"==typeof t?t.localeCompare(e):t>e?1:t<e?-1:0}},pinnedBottomRowData:[],rowDragManaged:!0,suppressRowClickSelection:!0,rowMultiSelectWithClick:!1,rowSelection:"multiple",localeText:i,suppressAnimationFrame:!0,suppressContextMenu:!0,suppressPropertyNamesCheck:!0,suppressCellSelection:!0,enableCellTextSelection:!0,remoteDataUrl:"",remoteParams:{},dialogList:{},editableList:{},autoColumnsToFit:!0,lastEditCell:{},selectedRows:[],pager:!1,pagerDom:null,pagePer:50,numberEmptyDefaultValue:!1,pageList:[50,100,500,1e3,2e3,5e3,1e4,2e4,5e4],onCellEditingStarted:function(t){this.lastEditCell=t},remoteSuccessed:function(){},onGridSizeChanged:function(t){},onGridReady:function(t){},onFirstDataRendered:function(t){var e=this,i=e.api;e.autoColumnsToFit&&i.sizeColumnsToFit(),"function"==typeof e.onCustomFirstDataRendered&&e.onCustomFirstDataRendered.call(e,t),e.generatePinnedBottomData()},onCellValueChanged:function(t){this.generatePinnedBottomData()},getRowStyle:function(t){},onRowClicked:function(t){!1===t.node.isSelected()&&t.node.setSelected(!0,!0)},getSelectedRows:function(){return this.selectedRows},onRowSelected:function(t){var e=this,i=t.node;if(i.selected)e.selectedRows.push(i.data);else for(var n=0;n<e.selectedRows.length;n++){var o=e.selectedRows[n];i.data.id==o.id&&e.selectedRows.splice(n,1)}"function"==typeof e.onCustomRowSelected&&e.onCustomRowSelected.call(e,t)},onRowDoubleClicked:function(t){console.log("onRowDoubleClicked")},columnTypes:{number:{cellClass:"ag-cell-number",valueFormatter:function(e){if(e.node.rowPinned&&!e.colDef.calcFooter)return"";var i=e.colDef.numberOptions||{},n=null==i.places?2:i.places,o=null==i.separator?".":i.separator,s=null==i.thousands?",":i.thousands,r=null==i.default?0:i.default,a=parseFloat(e.value);return isNaN(a)||0==a?0==t.numberEmptyDefaultValue?r:"":a=number_format(a,n,o,s)},valueParser:function(t){var e=parseFloat(t.newValue);return isNaN(e)?0:e}},sn:{cellClass:"ag-cell-sn",valueFormatter:function(t){return t.node.rowPinned?"":parseInt(t.node.childIndex)+1},valueParser:function(t){return parseFloat(t.newValue)}},datetime:{cellClass:"ag-cell-datetime",valueFormatter:function(t){return t.node.rowPinned?"":format_datetime(t.value)},valueParser:function(t){return parseFloat(t.newValue)}},date:{cellClass:"ag-cell-date",valueFormatter:function(t){return t.node.rowPinned?"":format_date(t.value)},valueParser:function(t){return parseFloat(t.newValue)}}},components:{optionCellRenderer:n,actionCellRenderer:s,htmlCellRenderer:o,selectCellEditor:r,dialogCellEditor:c,dateCellEditor:u,checkboxCellEditor:l,checkboxCellRenderer:a},overlayLoadingTemplate:'<span class="ag-overlay-loading-center">数据加载中...</span>',overlayNoRowsTemplate:'<div style="padding-top:20px;"><img alt="暂无数据" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxlbGxpcHNlIGZpbGw9IiNGNUY1RjUiIGN4PSIzMiIgY3k9IjMzIiByeD0iMzIiIHJ5PSI3Ii8+CiAgICA8ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgIDxwYXRoIGQ9Ik01NSAxMi43Nkw0NC44NTQgMS4yNThDNDQuMzY3LjQ3NCA0My42NTYgMCA0Mi45MDcgMEgyMS4wOTNjLS43NDkgMC0xLjQ2LjQ3NC0xLjk0NyAxLjI1N0w5IDEyLjc2MVYyMmg0NnYtOS4yNHoiLz4KICAgICAgPHBhdGggZD0iTTQxLjYxMyAxNS45MzFjMC0xLjYwNS45OTQtMi45MyAyLjIyNy0yLjkzMUg1NXYxOC4xMzdDNTUgMzMuMjYgNTMuNjggMzUgNTIuMDUgMzVoLTQwLjFDMTAuMzIgMzUgOSAzMy4yNTkgOSAzMS4xMzdWMTNoMTEuMTZjMS4yMzMgMCAyLjIyNyAxLjMyMyAyLjIyNyAyLjkyOHYuMDIyYzAgMS42MDUgMS4wMDUgMi45MDEgMi4yMzcgMi45MDFoMTQuNzUyYzEuMjMyIDAgMi4yMzctMS4zMDggMi4yMzctMi45MTN2LS4wMDd6IiBmaWxsPSIjRkFGQUZBIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K"><div style="padding-top:5px;color:#999;">暂无数据</div></div>',generatePinnedBottomData:function(){var e=this,i={},n=!1;t.columnApi.getAllGridColumns().forEach((function(t){t.colDef.calcFooter&&(n=!0,i[t.colId]=e.calculatePinnedBottomData(t))})),n&&e.api.setPinnedBottomRowData([i])},calculatePinnedBottomData:function(e){var i=0;return t.api.forEachNode((function(t){i+=toNumber(t.data[e.colId])})),0==i?"":i},actionCellBeforeRender:function(t,e,i){return t},remoteData:function(i,n){var o=this,s=t.remoteParams;for(var r in i)s[r]=i[r];t.api.showLoadingOverlay(),e.post(t.remoteDataUrl,s,(function(i){if(i.per_page)if(null===o.pagerDom){var s=o.api.gridCore.eGridDiv,r=s.id+"-pager";e(s).after('<div id="'+r+'" class="ag-pager"></div>'),o.pagerDom=e("#"+r).Paging({pagesize:i.per_page,count:i.total,current:i.current_page,pageSizeList:[50,100,500,1e3,2e3,5e3,1e4,2e4,5e4],callback:function(t,e,i){o.remoteData2({page:t,limit:e})}})}else o.pagerDom[0].render({pagesize:i.per_page,count:i.total,current:i.current_page});t.api.hideOverlay(),t.api.setRowData(i.data),t.generatePinnedBottomData(),"function"==typeof n&&n(i),t.remoteSuccessed.call(t,i.data)}),"json")},remoteData2:function(i,n){var o=t.remoteParams;for(var s in i)o[s]=i[s];t.api.showLoadingOverlay(),e.post(t.remoteDataUrl,o,(function(e){t.api.hideOverlay(),t.api.setRowData(e.data),t.generatePinnedBottomData(),"function"==typeof n&&n(e),t.remoteSuccessed.call(t,e.data)}),"json")}};return t}}(window,jQuery);var PCAD="北京市$市辖区,东城区,西城区,朝阳区,丰台区,石景山区,海淀区,门头沟区,房山区,通州区,顺义区,昌平区,大兴区,怀柔区,平谷区|市辖县,密云县,延庆县#天津市$市辖区,和平区,河东区,河西区,南开区,河北区,红桥区,东丽区,西青区,津南区,北辰区,武清区,宝坻区,滨海新区|市辖县,宁河县,静海县,蓟县#河北省$石家庄市,市辖区,长安区,桥东区,桥西区,新华区,井陉矿区,裕华区,井陉县,正定县,栾城县,行唐县,灵寿县,高邑县,深泽县,赞皇县,无极县,平山县,元氏县,赵县,辛集市,藁城市,晋州市,新乐市,鹿泉市|唐山市,市辖区,路南区,路北区,古冶区,开平区,丰南区,丰润区,滦县,滦南县,乐亭县,迁西县,玉田县,唐海县,遵化市,迁安市|秦皇岛市,市辖区,海港区,山海关区,北戴河区,青龙满族自治县,昌黎县,抚宁县,卢龙县|邯郸市,市辖区,邯山区,丛台区,复兴区,峰峰矿区,邯郸县,临漳县,成安县,大名县,涉县,磁县,肥乡县,永年县,邱县,鸡泽县,广平县,馆陶县,魏县,曲周县,武安市|邢台市,市辖区,桥东区,桥西区,邢台县,临城县,内丘县,柏乡县,隆尧县,任县,南和县,宁晋县,巨鹿县,新河县,广宗县,平乡县,威县,清河县,临西县,南宫市,沙河市|保定市,市辖区,新市区,北市区,南市区,满城县,清苑县,涞水县,阜平县,徐水县,定兴县,唐县,高阳县,容城县,涞源县,望都县,安新县,易县,曲阳县,蠡县,顺平县,博野县,雄县,涿州市,定州市,安国市,高碑店市|张家口市,市辖区,桥东区,桥西区,宣化区,下花园区,宣化县,张北县,康保县,沽源县,尚义县,蔚县,阳原县,怀安县,万全县,怀来县,涿鹿县,赤城县,崇礼县|承德市,市辖区,双桥区,双滦区,鹰手营子矿区,承德县,兴隆县,平泉县,滦平县,隆化县,丰宁满族自治县,宽城满族自治县,围场满族蒙古族自治县|沧州市,市辖区,新华区,运河区,沧县,青县,东光县,海兴县,盐山县,肃宁县,南皮县,吴桥县,献县,孟村回族自治县,泊头市,任丘市,黄骅市,河间市|廊坊市,市辖区,安次区,广阳区,固安县,永清县,香河县,大城县,文安县,大厂回族自治县,霸州市,三河市|衡水市,市辖区,桃城区,枣强县,武邑县,武强县,饶阳县,安平县,故城县,景县,阜城县,冀州市,深州市#山西省$太原市,市辖区,小店区,迎泽区,杏花岭区,尖草坪区,万柏林区,晋源区,清徐县,阳曲县,娄烦县,古交市|大同市,市辖区,城区,矿区,南郊区,新荣区,阳高县,天镇县,广灵县,灵丘县,浑源县,左云县,大同县|阳泉市,市辖区,城区,矿区,郊区,平定县,盂县|长治市,市辖区,城区,郊区,长治县,襄垣县,屯留县,平顺县,黎城县,壶关县,长子县,武乡县,沁县,沁源县,潞城市|晋城市,市辖区,城区,沁水县,阳城县,陵川县,泽州县,高平市|朔州市,市辖区,朔城区,平鲁区,山阴县,应县,右玉县,怀仁县|晋中市,市辖区,榆次区,榆社县,左权县,和顺县,昔阳县,寿阳县,太谷县,祁县,平遥县,灵石县,介休市|运城市,市辖区,盐湖区,临猗县,万荣县,闻喜县,稷山县,新绛县,绛县,垣曲县,夏县,平陆县,芮城县,永济市,河津市|忻州市,市辖区,忻府区,定襄县,五台县,代县,繁峙县,宁武县,静乐县,神池县,五寨县,岢岚县,河曲县,保德县,偏关县,原平市|临汾市,市辖区,尧都区,曲沃县,翼城县,襄汾县,洪洞县,古县,安泽县,浮山县,吉县,乡宁县,大宁县,隰县,永和县,蒲县,汾西县,侯马市,霍州市|吕梁市,市辖区,离石区,文水县,交城县,兴县,临县,柳林县,石楼县,岚县,方山县,中阳县,交口县,孝义市,汾阳市#内蒙古自治区$呼和浩特市,市辖区,新城区,回民区,玉泉区,赛罕区,土默特左旗,托克托县,和林格尔县,清水河县,武川县|包头市,市辖区,东河区,昆都仑区,青山区,石拐区,白云鄂博矿区,九原区,土默特右旗,固阳县,达尔罕茂明安联合旗|乌海市,市辖区,海勃湾区,海南区,乌达区|赤峰市,市辖区,红山区,元宝山区,松山区,阿鲁科尔沁旗,巴林左旗,巴林右旗,林西县,克什克腾旗,翁牛特旗,喀喇沁旗,宁城县,敖汉旗|通辽市,市辖区,科尔沁区,科尔沁左翼中旗,科尔沁左翼后旗,开鲁县,库伦旗,奈曼旗,扎鲁特旗,霍林郭勒市|鄂尔多斯市,市辖区,东胜区,达拉特旗,准格尔旗,鄂托克前旗,鄂托克旗,杭锦旗,乌审旗,伊金霍洛旗|呼伦贝尔市,市辖区,海拉尔区,阿荣旗,莫力达瓦达斡尔族自治旗,鄂伦春自治旗,鄂温克族自治旗,陈巴尔虎旗,新巴尔虎左旗,新巴尔虎右旗,满洲里市,牙克石市,扎兰屯市,额尔古纳市,根河市|巴彦淖尔市,市辖区,临河区,五原县,磴口县,乌拉特前旗,乌拉特中旗,乌拉特后旗,杭锦后旗|乌兰察布市,市辖区,集宁区,卓资县,化德县,商都县,兴和县,凉城县,察哈尔右翼前旗,察哈尔右翼中旗,察哈尔右翼后旗,四子王旗,丰镇市|兴安盟,乌兰浩特市,阿尔山市,科尔沁右翼前旗,科尔沁右翼中旗,扎赉特旗,突泉县|锡林郭勒盟,二连浩特市,锡林浩特市,阿巴嘎旗,苏尼特左旗,苏尼特右旗,东乌珠穆沁旗,西乌珠穆沁旗,太仆寺旗,镶黄旗,正镶白旗,正蓝旗,多伦县|阿拉善盟,阿拉善左旗,阿拉善右旗,额济纳旗#辽宁省$沈阳市,市辖区,和平区,沈河区,大东区,皇姑区,铁西区,苏家屯区,东陵区,沈北新区,于洪区,辽中县,康平县,法库县,新民市|大连市,市辖区,中山区,西岗区,沙河口区,甘井子区,旅顺口区,金州区,长海县,瓦房店市,普兰店市,庄河市|鞍山市,市辖区,铁东区,铁西区,立山区,千山区,台安县,岫岩满族自治县,海城市|抚顺市,市辖区,新抚区,东洲区,望花区,顺城区,抚顺县,新宾满族自治县,清原满族自治县|本溪市,市辖区,平山区,溪湖区,明山区,南芬区,本溪满族自治县,桓仁满族自治县|丹东市,市辖区,元宝区,振兴区,振安区,宽甸满族自治县,东港市,凤城市|锦州市,市辖区,古塔区,凌河区,太和区,黑山县,义县,凌海市,北镇市|营口市,市辖区,站前区,西市区,鲅鱼圈区,老边区,盖州市,大石桥市|阜新市,市辖区,海州区,新邱区,太平区,清河门区,细河区,阜新蒙古族自治县,彰武县|辽阳市,市辖区,白塔区,文圣区,宏伟区,弓长岭区,太子河区,辽阳县,灯塔市|盘锦市,市辖区,双台子区,兴隆台区,大洼县,盘山县|铁岭市,市辖区,银州区,清河区,铁岭县,西丰县,昌图县,调兵山市,开原市|朝阳市,市辖区,双塔区,龙城区,朝阳县,建平县,喀喇沁左翼蒙古族自治县,北票市,凌源市|葫芦岛市,市辖区,连山区,龙港区,南票区,绥中县,建昌县,兴城市#吉林省$长春市,市辖区,南关区,宽城区,朝阳区,二道区,绿园区,双阳区,农安县,九台市,榆树市,德惠市|吉林市,市辖区,昌邑区,龙潭区,船营区,丰满区,永吉县,蛟河市,桦甸市,舒兰市,磐石市|四平市,市辖区,铁西区,铁东区,梨树县,伊通满族自治县,公主岭市,双辽市|辽源市,市辖区,龙山区,西安区,东丰县,东辽县|通化市,市辖区,东昌区,二道江区,通化县,辉南县,柳河县,梅河口市,集安市|白山市,市辖区,八道江区,江源区,抚松县,靖宇县,长白朝鲜族自治县,临江市|松原市,市辖区,宁江区,前郭尔罗斯蒙古族自治县,长岭县,乾安县,扶余县|白城市,市辖区,洮北区,镇赉县,通榆县,洮南市,大安市|延边朝鲜族自治州,延吉市,图们市,敦化市,珲春市,龙井市,和龙市,汪清县,安图县#黑龙江省$哈尔滨市,市辖区,道里区,南岗区,道外区,平房区,松北区,香坊区,呼兰区,阿城区,依兰县,方正县,宾县,巴彦县,木兰县,通河县,延寿县,双城市,尚志市,五常市|齐齐哈尔市,市辖区,龙沙区,建华区,铁锋区,昂昂溪区,富拉尔基区,碾子山区,梅里斯达斡尔族区,龙江县,依安县,泰来县,甘南县,富裕县,克山县,克东县,拜泉县,讷河市|鸡西市,市辖区,鸡冠区,恒山区,滴道区,梨树区,城子河区,麻山区,鸡东县,虎林市,密山市|鹤岗市,市辖区,向阳区,工农区,南山区,兴安区,东山区,兴山区,萝北县,绥滨县|双鸭山市,市辖区,尖山区,岭东区,四方台区,宝山区,集贤县,友谊县,宝清县,饶河县|大庆市,市辖区,萨尔图区,龙凤区,让胡路区,红岗区,大同区,肇州县,肇源县,林甸县,杜尔伯特蒙古族自治县|伊春市,市辖区,伊春区,南岔区,友好区,西林区,翠峦区,新青区,美溪区,金山屯区,五营区,乌马河区,汤旺河区,带岭区,乌伊岭区,红星区,上甘岭区,嘉荫县,铁力市|佳木斯市,市辖区,向阳区,前进区,东风区,郊区,桦南县,桦川县,汤原县,抚远县,同江市,富锦市|七台河市,市辖区,新兴区,桃山区,茄子河区,勃利县|牡丹江市,市辖区,东安区,阳明区,爱民区,西安区,东宁县,林口县,绥芬河市,海林市,宁安市,穆棱市|黑河市,市辖区,爱辉区,嫩江县,逊克县,孙吴县,北安市,五大连池市|绥化市,市辖区,北林区,望奎县,兰西县,青冈县,庆安县,明水县,绥棱县,安达市,肇东市,海伦市|大兴安岭地区,呼玛县,塔河县,漠河县#上海市$市辖区,黄浦区,徐汇区,长宁区,静安区,普陀区,闸北区,虹口区,杨浦区,闵行区,宝山区,嘉定区,浦东新区,金山区,松江区,青浦区,奉贤区|市辖县,崇明县#江苏省$南京市,市辖区,玄武区,白下区,秦淮区,建邺区,鼓楼区,下关区,浦口区,栖霞区,雨花台区,江宁区,六合区,溧水县,高淳县|无锡市,市辖区,崇安区,南长区,北塘区,锡山区,惠山区,滨湖区,江阴市,宜兴市|徐州市,市辖区,鼓楼区,云龙区,贾汪区,泉山区,铜山区,丰县,沛县,睢宁县,新沂市,邳州市|常州市,市辖区,天宁区,钟楼区,戚墅堰区,新北区,武进区,溧阳市,金坛市|苏州市,市辖区,沧浪区,平江区,金阊区,虎丘区,吴中区,相城区,常熟市,张家港市,昆山市,吴江市,太仓市|南通市,市辖区,崇川区,港闸区,通州区,海安县,如东县,启东市,如皋市,海门市|连云港市,市辖区,连云区,新浦区,海州区,赣榆县,东海县,灌云县,灌南县|淮安市,市辖区,清河区,楚州区,淮阴区,清浦区,涟水县,洪泽县,盱眙县,金湖县|盐城市,市辖区,亭湖区,盐都区,响水县,滨海县,阜宁县,射阳县,建湖县,东台市,大丰市|扬州市,市辖区,广陵区,邗江区,江都区,宝应县,仪征市,高邮市|镇江市,市辖区,京口区,润州区,丹徒区,丹阳市,扬中市,句容市|泰州市,市辖区,海陵区,高港区,兴化市,靖江市,泰兴市,姜堰市|宿迁市,市辖区,宿城区,宿豫区,沭阳县,泗阳县,泗洪县#浙江省$杭州市,市辖区,上城区,下城区,江干区,拱墅区,西湖区,滨江区,萧山区,余杭区,桐庐县,淳安县,建德市,富阳市,临安市|宁波市,市辖区,海曙区,江东区,江北区,北仑区,镇海区,鄞州区,象山县,宁海县,余姚市,慈溪市,奉化市|温州市,市辖区,鹿城区,龙湾区,瓯海区,洞头县,永嘉县,平阳县,苍南县,文成县,泰顺县,瑞安市,乐清市|嘉兴市,市辖区,南湖区,秀洲区,嘉善县,海盐县,海宁市,平湖市,桐乡市|湖州市,市辖区,吴兴区,南浔区,德清县,长兴县,安吉县|绍兴市,市辖区,越城区,绍兴县,新昌县,诸暨市,上虞市,嵊州市|金华市,市辖区,婺城区,金东区,武义县,浦江县,磐安县,兰溪市,义乌市,东阳市,永康市|衢州市,市辖区,柯城区,衢江区,常山县,开化县,龙游县,江山市|舟山市,市辖区,定海区,普陀区,岱山县,嵊泗县|台州市,市辖区,椒江区,黄岩区,路桥区,玉环县,三门县,天台县,仙居县,温岭市,临海市|丽水市,市辖区,莲都区,青田县,缙云县,遂昌县,松阳县,云和县,庆元县,景宁畲族自治县,龙泉市#安徽省$合肥市,市辖区,瑶海区,庐阳区,蜀山区,包河区,长丰县,肥东县,肥西县,庐江县,巢湖市|芜湖市,市辖区,镜湖区,弋江区,鸠江区,三山区,芜湖县,繁昌县,南陵县,无为县|蚌埠市,市辖区,龙子湖区,蚌山区,禹会区,淮上区,怀远县,五河县,固镇县|淮南市,市辖区,大通区,田家庵区,谢家集区,八公山区,潘集区,凤台县|马鞍山市,市辖区,金家庄区,花山区,雨山区,当涂县,含山县,和县|淮北市,市辖区,杜集区,相山区,烈山区,濉溪县|铜陵市,市辖区,铜官山区,狮子山区,郊区,铜陵县|安庆市,市辖区,迎江区,大观区,宜秀区,怀宁县,枞阳县,潜山县,太湖县,宿松县,望江县,岳西县,桐城市|黄山市,市辖区,屯溪区,黄山区,徽州区,歙县,休宁县,黟县,祁门县|滁州市,市辖区,琅琊区,南谯区,来安县,全椒县,定远县,凤阳县,天长市,明光市|阜阳市,市辖区,颍州区,颍东区,颍泉区,临泉县,太和县,阜南县,颍上县,界首市|宿州市,市辖区,埇桥区,砀山县,萧县,灵璧县,泗县|六安市,市辖区,金安区,裕安区,寿县,霍邱县,舒城县,金寨县,霍山县|亳州市,市辖区,谯城区,涡阳县,蒙城县,利辛县|池州市,市辖区,贵池区,东至县,石台县,青阳县|宣城市,市辖区,宣州区,郎溪县,广德县,泾县,绩溪县,旌德县,宁国市#福建省$福州市,市辖区,鼓楼区,台江区,仓山区,马尾区,晋安区,闽侯县,连江县,罗源县,闽清县,永泰县,平潭县,福清市,长乐市|厦门市,市辖区,思明区,海沧区,湖里区,集美区,同安区,翔安区|莆田市,市辖区,城厢区,涵江区,荔城区,秀屿区,仙游县|三明市,市辖区,梅列区,三元区,明溪县,清流县,宁化县,大田县,尤溪县,沙县,将乐县,泰宁县,建宁县,永安市|泉州市,市辖区,鲤城区,丰泽区,洛江区,泉港区,惠安县,安溪县,永春县,德化县,金门县,石狮市,晋江市,南安市|漳州市,市辖区,芗城区,龙文区,云霄县,漳浦县,诏安县,长泰县,东山县,南靖县,平和县,华安县,龙海市|南平市,市辖区,延平区,顺昌县,浦城县,光泽县,松溪县,政和县,邵武市,武夷山市,建瓯市,建阳市|龙岩市,市辖区,新罗区,长汀县,永定县,上杭县,武平县,连城县,漳平市|宁德市,市辖区,蕉城区,霞浦县,古田县,屏南县,寿宁县,周宁县,柘荣县,福安市,福鼎市#江西省$南昌市,市辖区,东湖区,西湖区,青云谱区,湾里区,青山湖区,南昌县,新建县,安义县,进贤县|景德镇市,市辖区,昌江区,珠山区,浮梁县,乐平市|萍乡市,市辖区,安源区,湘东区,莲花县,上栗县,芦溪县|九江市,市辖区,庐山区,浔阳区,九江县,武宁县,修水县,永修县,德安县,星子县,都昌县,湖口县,彭泽县,瑞昌市,共青城市|新余市,市辖区,渝水区,分宜县|鹰潭市,市辖区,月湖区,余江县,贵溪市|赣州市,市辖区,章贡区,赣县,信丰县,大余县,上犹县,崇义县,安远县,龙南县,定南县,全南县,宁都县,于都县,兴国县,会昌县,寻乌县,石城县,瑞金市,南康市|吉安市,市辖区,吉州区,青原区,吉安县,吉水县,峡江县,新干县,永丰县,泰和县,遂川县,万安县,安福县,永新县,井冈山市|宜春市,市辖区,袁州区,奉新县,万载县,上高县,宜丰县,靖安县,铜鼓县,丰城市,樟树市,高安市|抚州市,市辖区,临川区,南城县,黎川县,南丰县,崇仁县,乐安县,宜黄县,金溪县,资溪县,东乡县,广昌县|上饶市,市辖区,信州区,上饶县,广丰县,玉山县,铅山县,横峰县,弋阳县,余干县,鄱阳县,万年县,婺源县,德兴市#山东省$济南市,市辖区,历下区,市中区,槐荫区,天桥区,历城区,长清区,平阴县,济阳县,商河县,章丘市|青岛市,市辖区,市南区,市北区,四方区,黄岛区,崂山区,李沧区,城阳区,胶州市,即墨市,平度市,胶南市,莱西市|淄博市,市辖区,淄川区,张店区,博山区,临淄区,周村区,桓台县,高青县,沂源县|枣庄市,市辖区,市中区,薛城区,峄城区,台儿庄区,山亭区,滕州市|东营市,市辖区,东营区,河口区,垦利县,利津县,广饶县|烟台市,市辖区,芝罘区,福山区,牟平区,莱山区,长岛县,龙口市,莱阳市,莱州市,蓬莱市,招远市,栖霞市,海阳市|潍坊市,市辖区,潍城区,寒亭区,坊子区,奎文区,临朐县,昌乐县,青州市,诸城市,寿光市,安丘市,高密市,昌邑市|济宁市,市辖区,市中区,任城区,微山县,鱼台县,金乡县,嘉祥县,汶上县,泗水县,梁山县,曲阜市,兖州市,邹城市|泰安市,市辖区,泰山区,岱岳区,宁阳县,东平县,新泰市,肥城市|威海市,市辖区,环翠区,文登市,荣成市,乳山市|日照市,市辖区,东港区,岚山区,五莲县,莒县|莱芜市,市辖区,莱城区,钢城区|临沂市,市辖区,兰山区,罗庄区,河东区,沂南县,郯城县,沂水县,苍山县,费县,平邑县,莒南县,蒙阴县,临沭县|德州市,市辖区,德城区,陵县,宁津县,庆云县,临邑县,齐河县,平原县,夏津县,武城县,乐陵市,禹城市|聊城市,市辖区,东昌府区,阳谷县,莘县,茌平县,东阿县,冠县,高唐县,临清市|滨州市,市辖区,滨城区,惠民县,阳信县,无棣县,沾化县,博兴县,邹平县|菏泽市,市辖区,牡丹区,曹县,单县,成武县,巨野县,郓城县,鄄城县,定陶县,东明县#河南省$郑州市,市辖区,中原区,二七区,管城回族区,金水区,上街区,惠济区,中牟县,巩义市,荥阳市,新密市,新郑市,登封市|开封市,市辖区,龙亭区,顺河回族区,鼓楼区,禹王台区,金明区,杞县,通许县,尉氏县,开封县,兰考县|洛阳市,市辖区,老城区,西工区,瀍河回族区,涧西区,吉利区,洛龙区,孟津县,新安县,栾川县,嵩县,汝阳县,宜阳县,洛宁县,伊川县,偃师市|平顶山市,市辖区,新华区,卫东区,石龙区,湛河区,宝丰县,叶县,鲁山县,郏县,舞钢市,汝州市|安阳市,市辖区,文峰区,北关区,殷都区,龙安区,安阳县,汤阴县,滑县,内黄县,林州市|鹤壁市,市辖区,鹤山区,山城区,淇滨区,浚县,淇县|新乡市,市辖区,红旗区,卫滨区,凤泉区,牧野区,新乡县,获嘉县,原阳县,延津县,封丘县,长垣县,卫辉市,辉县市|焦作市,市辖区,解放区,中站区,马村区,山阳区,修武县,博爱县,武陟县,温县,沁阳市,孟州市|濮阳市,市辖区,华龙区,清丰县,南乐县,范县,台前县,濮阳县|许昌市,市辖区,魏都区,许昌县,鄢陵县,襄城县,禹州市,长葛市|漯河市,市辖区,源汇区,郾城区,召陵区,舞阳县,临颍县|三门峡市,市辖区,湖滨区,渑池县,陕县,卢氏县,义马市,灵宝市|南阳市,市辖区,宛城区,卧龙区,南召县,方城县,西峡县,镇平县,内乡县,淅川县,社旗县,唐河县,新野县,桐柏县,邓州市|商丘市,市辖区,梁园区,睢阳区,民权县,睢县,宁陵县,柘城县,虞城县,夏邑县,永城市|信阳市,市辖区,浉河区,平桥区,罗山县,光山县,新县,商城县,固始县,潢川县,淮滨县,息县|周口市,市辖区,川汇区,扶沟县,西华县,商水县,沈丘县,郸城县,淮阳县,太康县,鹿邑县,项城市|驻马店市,市辖区,驿城区,西平县,上蔡县,平舆县,正阳县,确山县,泌阳县,汝南县,遂平县,新蔡县|省直辖县级行政区划,济源市#湖北省$武汉市,市辖区,江岸区,江汉区,硚口区,汉阳区,武昌区,青山区,洪山区,东西湖区,汉南区,蔡甸区,江夏区,黄陂区,新洲区|黄石市,市辖区,黄石港区,西塞山区,下陆区,铁山区,阳新县,大冶市|十堰市,市辖区,茅箭区,张湾区,郧县,郧西县,竹山县,竹溪县,房县,丹江口市|宜昌市,市辖区,西陵区,伍家岗区,点军区,猇亭区,夷陵区,远安县,兴山县,秭归县,长阳土家族自治县,五峰土家族自治县,宜都市,当阳市,枝江市|襄阳市,市辖区,襄城区,樊城区,襄州区,南漳县,谷城县,保康县,老河口市,枣阳市,宜城市|鄂州市,市辖区,梁子湖区,华容区,鄂城区|荆门市,市辖区,东宝区,掇刀区,京山县,沙洋县,钟祥市|孝感市,市辖区,孝南区,孝昌县,大悟县,云梦县,应城市,安陆市,汉川市|荆州市,市辖区,沙市区,荆州区,公安县,监利县,江陵县,石首市,洪湖市,松滋市|黄冈市,市辖区,黄州区,团风县,红安县,罗田县,英山县,浠水县,蕲春县,黄梅县,麻城市,武穴市|咸宁市,市辖区,咸安区,嘉鱼县,通城县,崇阳县,通山县,赤壁市|随州市,市辖区,曾都区,随县,广水市|恩施土家族苗族自治州,恩施市,利川市,建始县,巴东县,宣恩县,咸丰县,来凤县,鹤峰县|省直辖县级行政区划,仙桃市,潜江市,天门市,神农架林区#湖南省$长沙市,市辖区,芙蓉区,天心区,岳麓区,开福区,雨花区,望城区,长沙县,宁乡县,浏阳市|株洲市,市辖区,荷塘区,芦淞区,石峰区,天元区,株洲县,攸县,茶陵县,炎陵县,醴陵市|湘潭市,市辖区,雨湖区,岳塘区,湘潭县,湘乡市,韶山市|衡阳市,市辖区,珠晖区,雁峰区,石鼓区,蒸湘区,南岳区,衡阳县,衡南县,衡山县,衡东县,祁东县,耒阳市,常宁市|邵阳市,市辖区,双清区,大祥区,北塔区,邵东县,新邵县,邵阳县,隆回县,洞口县,绥宁县,新宁县,城步苗族自治县,武冈市|岳阳市,市辖区,岳阳楼区,云溪区,君山区,岳阳县,华容县,湘阴县,平江县,汨罗市,临湘市|常德市,市辖区,武陵区,鼎城区,安乡县,汉寿县,澧县,临澧县,桃源县,石门县,津市市|张家界市,市辖区,永定区,武陵源区,慈利县,桑植县|益阳市,市辖区,资阳区,赫山区,南县,桃江县,安化县,沅江市|郴州市,市辖区,北湖区,苏仙区,桂阳县,宜章县,永兴县,嘉禾县,临武县,汝城县,桂东县,安仁县,资兴市|永州市,市辖区,零陵区,冷水滩区,祁阳县,东安县,双牌县,道县,江永县,宁远县,蓝山县,新田县,江华瑶族自治县|怀化市,市辖区,鹤城区,中方县,沅陵县,辰溪县,溆浦县,会同县,麻阳苗族自治县,新晃侗族自治县,芷江侗族自治县,靖州苗族侗族自治县,通道侗族自治县,洪江市|娄底市,市辖区,娄星区,双峰县,新化县,冷水江市,涟源市|湘西土家族苗族自治州,吉首市,泸溪县,凤凰县,花垣县,保靖县,古丈县,永顺县,龙山县#广东省$广州市,市辖区,荔湾区,越秀区,海珠区,天河区,白云区,黄埔区,番禺区,花都区,南沙区,萝岗区,增城市,从化市|韶关市,市辖区,武江区,浈江区,曲江区,始兴县,仁化县,翁源县,乳源瑶族自治县,新丰县,乐昌市,南雄市|深圳市,市辖区,罗湖区,福田区,南山区,宝安区,龙岗区,盐田区|珠海市,市辖区,香洲区,斗门区,金湾区|汕头市,市辖区,龙湖区,金平区,濠江区,潮阳区,潮南区,澄海区,南澳县|佛山市,市辖区,禅城区,南海区,顺德区,三水区,高明区|江门市,市辖区,蓬江区,江海区,新会区,台山市,开平市,鹤山市,恩平市|湛江市,市辖区,赤坎区,霞山区,坡头区,麻章区,遂溪县,徐闻县,廉江市,雷州市,吴川市|茂名市,市辖区,茂南区,茂港区,电白县,高州市,化州市,信宜市|肇庆市,市辖区,端州区,鼎湖区,广宁县,怀集县,封开县,德庆县,高要市,四会市|惠州市,市辖区,惠城区,惠阳区,博罗县,惠东县,龙门县|梅州市,市辖区,梅江区,梅县,大埔县,丰顺县,五华县,平远县,蕉岭县,兴宁市|汕尾市,市辖区,城区,海丰县,陆河县,陆丰市|河源市,市辖区,源城区,紫金县,龙川县,连平县,和平县,东源县|阳江市,市辖区,江城区,阳西县,阳东县,阳春市|清远市,市辖区,清城区,佛冈县,阳山县,连山壮族瑶族自治县,连南瑶族自治县,清新县,英德市,连州市|东莞市|中山市|潮州市,市辖区,湘桥区,潮安县,饶平县|揭阳市,市辖区,榕城区,揭东县,揭西县,惠来县,普宁市|云浮市,市辖区,云城区,新兴县,郁南县,云安县,罗定市#广西壮族自治区$南宁市,市辖区,兴宁区,青秀区,江南区,西乡塘区,良庆区,邕宁区,武鸣县,隆安县,马山县,上林县,宾阳县,横县|柳州市,市辖区,城中区,鱼峰区,柳南区,柳北区,柳江县,柳城县,鹿寨县,融安县,融水苗族自治县,三江侗族自治县|桂林市,市辖区,秀峰区,叠彩区,象山区,七星区,雁山区,阳朔县,临桂县,灵川县,全州县,兴安县,永福县,灌阳县,龙胜各族自治县,资源县,平乐县,荔蒲县,恭城瑶族自治县|梧州市,市辖区,万秀区,蝶山区,长洲区,苍梧县,藤县,蒙山县,岑溪市|北海市,市辖区,海城区,银海区,铁山港区,合浦县|防城港市,市辖区,港口区,防城区,上思县,东兴市|钦州市,市辖区,钦南区,钦北区,灵山县,浦北县|贵港市,市辖区,港北区,港南区,覃塘区,平南县,桂平市|玉林市,市辖区,玉州区,容县,陆川县,博白县,兴业县,北流市|百色市,市辖区,右江区,田阳县,田东县,平果县,德保县,靖西县,那坡县,凌云县,乐业县,田林县,西林县,隆林各族自治县|贺州市,市辖区,八步区,昭平县,钟山县,富川瑶族自治县|河池市,市辖区,金城江区,南丹县,天峨县,凤山县,东兰县,罗城仫佬族自治县,环江毛南族自治县,巴马瑶族自治县,都安瑶族自治县,大化瑶族自治县,宜州市|来宾市,市辖区,兴宾区,忻城县,象州县,武宣县,金秀瑶族自治县,合山市|崇左市,市辖区,江洲区,扶绥县,宁明县,龙州县,大新县,天等县,凭祥市#海南省$海口市,市辖区,秀英区,龙华区,琼山区,美兰区|三亚市,市辖区|省直辖县级行政区划,五指山市,琼海市,儋州市,文昌市,万宁市,东方市,定安县,屯昌县,澄迈县,临高县,白沙黎族自治县,昌江黎族自治县,乐东黎族自治县,陵水黎族自治县,保亭黎族苗族自治县,琼中黎族苗族自治县,西沙群岛,南沙群岛,中沙群岛的岛礁及其海域#重庆市$市辖区,万州区,涪陵区,渝中区,大渡口区,江北区,沙坪坝区,九龙坡区,南岸区,北碚区,綦江区,大足区,渝北区,巴南区,黔江区,长寿区,江津区,合川区,永川区,南川区|市辖县,潼南县,铜梁县,荣昌县,璧山县,梁平县,城口县,丰都县,垫江县,武隆县,忠县,开县,云阳县,奉节县,巫山县,巫溪县,石柱土家族自治县,秀山土家族苗族自治县,酉阳土家族苗族自治县,彭水苗族土家族自治县#四川省$成都市,市辖区,锦江区,青羊区,金牛区,武侯区,成华区,龙泉驿区,青白江区,新都区,温江区,金堂县,双流县,郫县,大邑县,蒲江县,新津县,都江堰市,彭州市,邛崃市,崇州市|自贡市,市辖区,自流井区,贡井区,大安区,沿滩区,荣县,富顺县|攀枝花市,市辖区,东区,西区,仁和区,米易县,盐边县|泸州市,市辖区,江阳区,纳溪区,龙马潭区,泸县,合江县,叙永县,古蔺县|德阳市,市辖区,旌阳区,中江县,罗江县,广汉市,什邡市,绵竹市|绵阳市,市辖区,涪城区,游仙区,三台县,盐亭县,安县,梓潼县,北川羌族自治县,平武县,江油市|广元市,市辖区,利州区,元坝区,朝天区,旺苍县,青川县,剑阁县,苍溪县|遂宁市,市辖区,船山区,安居区,蓬溪县,射洪县,大英县|内江市,市辖区,市中区,东兴区,威远县,资中县,隆昌县|乐山市,市辖区,市中区,沙湾区,五通桥区,金口河区,犍为县,井研县,夹江县,沐川县,峨边彝族自治县,马边彝族自治县,峨眉山市|南充市,市辖区,顺庆区,高坪区,嘉陵区,南部县,营山县,蓬安县,仪陇县,西充县,阆中市|眉山市,市辖区,东坡区,仁寿县,彭山县,洪雅县,丹棱县,青神县|宜宾市,市辖区,翠屏区,南溪区,宜宾县,江安县,长宁县,高县,珙县,筠连县,兴文县,屏山县|广安市,市辖区,广安区,岳池县,武胜县,邻水县,华蓥市|达州市,市辖区,通川区,达县,宣汉县,开江县,大竹县,渠县,万源市|雅安市,市辖区,雨城区,名山县,荥经县,汉源县,石棉县,天全县,芦山县,宝兴县|巴中市,市辖区,巴州区,通江县,南江县,平昌县|资阳市,市辖区,雁江区,安岳县,乐至县,简阳市|阿坝藏族羌族自治州,汶川县,理县,茂县,松潘县,九寨沟县,金川县,小金县,黑水县,马尔康县,壤塘县,阿坝县,若尔盖县,红原县|甘孜藏族自治州,康定县,泸定县,丹巴县,九龙县,雅江县,道孚县,炉霍县,甘孜县,新龙县,德格县,白玉县,石渠县,色达县,理塘县,巴塘县,乡城县,稻城县,得荣县|凉山彝族自治州,西昌市,木里藏族自治县,盐源县,德昌县,会理县,会东县,宁南县,普格县,布拖县,金阳县,昭觉县,喜德县,冕宁县,越西县,甘洛县,美姑县,雷波县#贵州省$贵阳市,市辖区,南明区,云岩区,花溪区,乌当区,白云区,小河区,开阳县,息烽县,修文县,清镇市|六盘水市,钟山区,六枝特区,水城县,盘县|遵义市,市辖区,红花岗区,汇川区,遵义县,桐梓县,绥阳县,正安县,道真仡佬族苗族自治县,务川仡佬族苗族自治县,凤冈县,湄潭县,余庆县,习水县,赤水市,仁怀市|安顺市,市辖区,西秀区,平坝县,普定县,镇宁布依族苗族自治县,关岭布依族苗族自治县,紫云苗族布依族自治县|毕节市,市辖区,七星关区,大方县,黔西县,金沙县,织金县,纳雍县,威宁彝族回族苗族自治县,赫章县|铜仁市,市辖区,碧江区,万山区,江口县,玉屏侗族自治县,石阡县,思南县,印江土家族苗族自治县,德江县,沿河土家族自治县,松桃苗族自治县|黔西南布依族苗族自治州,兴义市,兴仁县,普安县,晴隆县,贞丰县,望谟县,册亨县,安龙县|黔东南苗族侗族自治州,凯里市,黄平县,施秉县,三穗县,镇远县,岑巩县,天柱县,锦屏县,剑河县,台江县,黎平县,榕江县,从江县,雷山县,麻江县,丹寨县|黔南布依族苗族自治州,都匀市,福泉市,荔波县,贵定县,瓮安县,独山县,平塘县,罗甸县,长顺县,龙里县,惠水县,三都水族自治县#云南省$昆明市,市辖区,五华区,盘龙区,官渡区,西山区,东川区,呈贡区,晋宁县,富民县,宜良县,石林彝族自治县,嵩明县,禄劝彝族苗族自治县,寻甸回族彝族自治县,安宁市|曲靖市,市辖区,麒麟区,马龙县,陆良县,师宗县,罗平县,富源县,会泽县,沾益县,宣威市|玉溪市,市辖区,红塔区,江川县,澄江县,通海县,华宁县,易门县,峨山彝族自治县,新平彝族傣族自治县,元江哈尼族彝族傣族自治县|保山市,市辖区,隆阳区,施甸县,腾冲县,龙陵县,昌宁县|昭通市,市辖区,昭阳区,鲁甸县,巧家县,盐津县,大关县,永善县,绥江县,镇雄县,彝良县,威信县,水富县|丽江市,市辖区,古城区,玉龙纳西族自治县,永胜县,华坪县,宁蒗彝族自治县|普洱市,市辖区,思茅区,宁洱哈尼族彝族自治县,墨江哈尼族自治县,景东彝族自治县,景谷傣族彝族自治县,镇沅彝族哈尼族拉祜族自治县,江城哈尼族彝族自治县,孟连傣族拉祜族佤族自治县,澜沧拉祜族自治县,西盟佤族自治县|临沧市,市辖区,临翔区,凤庆县,云县,永德县,镇康县,双江拉祜族佤族布朗族傣族自治县,耿马傣族佤族自治县,沧源佤族自治县|楚雄彝族自治州,楚雄市,双柏县,牟定县,南华县,姚安县,大姚县,永仁县,元谋县,武定县,禄丰县|红河哈尼族彝族自治州,个旧市,开远市,蒙自市,屏边苗族自治县,建水县,石屏县,弥勒县,泸西县,元阳县,红河县,金平苗族瑶族傣族自治县,绿春县,河口瑶族自治县|文山壮族苗族自治州,文山市,砚山县,西畴县,麻栗坡县,马关县,丘北县,广南县,富宁县|西双版纳傣族自治州,景洪市,勐海县,勐腊县|大理白族自治州,大理市,漾濞彝族自治县,祥云县,宾川县,弥渡县,南涧彝族自治县,巍山彝族回族自治县,永平县,云龙县,洱源县,剑川县,鹤庆县|德宏傣族景颇族自治州,瑞丽市,芒市,梁河县,盈江县,陇川县|怒江傈僳族自治州,泸水县,福贡县,贡山独龙族怒族自治县,兰坪白族普米族自治县|迪庆藏族自治州,香格里拉县,德钦县,维西傈僳族自治县#西藏自治区$拉萨市,市辖区,城关区,林周县,当雄县,尼木县,曲水县,堆龙德庆县,达孜县,墨竹工卡县|昌都地区,昌都县,江达县,贡觉县,类乌齐县,丁青县,察雅县,八宿县,左贡县,芒康县,洛隆县,边坝县|山南地区,乃东县,扎囊县,贡嘎县,桑日县,琼结县,曲松县,措美县,洛扎县,加查县,隆子县,错那县,浪卡子县|日喀则地区,日喀则市,南木林县,江孜县,定日县,萨迦县,拉孜县,昂仁县,谢通门县,白朗县,仁布县,康马县,定结县,仲巴县,亚东县,吉隆县,聂拉木县,萨嘎县,岗巴县|那曲地区,那曲县,嘉黎县,比如县,聂荣县,安多县,申扎县,索县,班戈县,巴青县,尼玛县|阿里地区,普兰县,札达县,噶尔县,日土县,革吉县,改则县,措勤县|林芝地区,林芝县,工布江达县,米林县,墨脱县,波密县,察隅县,朗县#陕西省$西安市,市辖区,新城区,碑林区,莲湖区,灞桥区,未央区,雁塔区,阎良区,临潼区,长安区,蓝田县,周至县,户县,高陵县|铜川市,市辖区,王益区,印台区,耀州区,宜君县|宝鸡市,市辖区,渭滨区,金台区,陈仓区,凤翔县,岐山县,扶风县,眉县,陇县,千阳县,麟游县,凤县,太白县|咸阳市,市辖区,秦都区,杨陵区,渭城区,三原县,泾阳县,乾县,礼泉县,永寿县,彬县,长武县,旬邑县,淳化县,武功县,兴平市|渭南市,市辖区,临渭区,华县,潼关县,大荔县,合阳县,澄城县,蒲城县,白水县,富平县,韩城市,华阴市|延安市,市辖区,宝塔区,延长县,延川县,子长县,安塞县,志丹县,吴起县,甘泉县,富县,洛川县,宜川县,黄龙县,黄陵县|汉中市,市辖区,汉台区,南郑县,城固县,洋县,西乡县,勉县,宁强县,略阳县,镇巴县,留坝县,佛坪县|榆林市,市辖区,榆阳区,神木县,府谷县,横山县,靖边县,定边县,绥德县,米脂县,佳县,吴堡县,清涧县,子洲县|安康市,市辖区,汉滨区,汉阴县,石泉县,宁陕县,紫阳县,岚皋县,平利县,镇坪县,旬阳县,白河县|商洛市,市辖区,商州区,洛南县,丹凤县,商南县,山阳县,镇安县,柞水县#甘肃省$兰州市,市辖区,城关区,七里河区,西固区,安宁区,红古区,永登县,皋兰县,榆中县|嘉峪关市,市辖区|金昌市,市辖区,金川区,永昌县|白银市,市辖区,白银区,平川区,靖远县,会宁县,景泰县|天水市,市辖区,秦州区,麦积区,清水县,秦安县,甘谷县,武山县,张家川回族自治县|武威市,市辖区,凉州区,民勤县,古浪县,天祝藏族自治县|张掖市,市辖区,甘州区,肃南裕固族自治县,民乐县,临泽县,高台县,山丹县|平凉市,市辖区,崆峒区,泾川县,灵台县,崇信县,华亭县,庄浪县,静宁县|酒泉市,市辖区,肃州区,金塔县,瓜州县,肃北蒙古族自治县,阿克塞哈萨克族自治县,玉门市,敦煌市|庆阳市,市辖区,西峰区,庆城县,环县,华池县,合水县,正宁县,宁县,镇原县|定西市,市辖区,安定区,通渭县,陇西县,渭源县,临洮县,漳县,岷县|陇南市,市辖区,武都区,成县,文县,宕昌县,康县,西和县,礼县,徽县,两当县|临夏回族自治州,临夏市,临夏县,康乐县,永靖县,广河县,和政县,东乡族自治县,积石山保安族东乡族撒拉族自治县|甘南藏族自治州,合作市,临潭县,卓尼县,舟曲县,迭部县,玛曲县,碌曲县,夏河县#青海省$西宁市,市辖区,城东区,城中区,城西区,城北区,大通回族土族自治县,湟中县,湟源县|海东地区,平安县,民和回族土族自治县,乐都县,互助土族自治县,化隆回族自治县,循化撒拉族自治县|海北藏族自治州,门源回族自治县,祁连县,海晏县,刚察县|黄南藏族自治州,同仁县,尖扎县,泽库县,河南蒙古族自治县|海南藏族自治州,共和县,同德县,贵德县,兴海县,贵南县|果洛藏族自治州,玛沁县,班玛县,甘德县,达日县,久治县,玛多县|玉树藏族自治州,玉树县,杂多县,称多县,治多县,囊谦县,曲麻莱县|海西蒙古族藏族自治州,格尔木市,德令哈市,乌兰县,都兰县,天峻县#宁夏回族自治区$银川市,市辖区,兴庆区,西夏区,金凤区,永宁县,贺兰县,灵武市|石嘴山市,市辖区,大武口区,惠农区,平罗县|吴忠市,市辖区,利通区,红寺堡区,盐池县,同心县,青铜峡市|固原市,市辖区,原州区,西吉县,隆德县,泾源县,彭阳县|中卫市,市辖区,沙坡头区,中宁县,海原县#新疆维吾尔自治区$乌鲁木齐市,市辖区,天山区,沙依巴克区,新市区,水磨沟区,头屯河区,达坂城区,米东区,乌鲁木齐县|克拉玛依市,市辖区,独山子区,克拉玛依区,白碱滩区,乌尔禾区|吐鲁番地区,吐鲁番市,鄯善县,托克逊县|哈密地区,哈密市,巴里坤哈萨克自治县,伊吾县|昌吉回族自治州,昌吉市,阜康市,呼图壁县,玛纳斯县,奇台县,吉木萨尔县,木垒哈萨克自治县|博尔塔拉蒙古自治州,博乐市,精河县,温泉县|巴音郭楞蒙古自治州,库尔勒市,轮台县,尉犁县,若羌县,且末县,焉耆回族自治县,和静县,和硕县,博湖县|阿克苏地区,阿克苏市,温宿县,库车县,沙雅县,新和县,拜城县,乌什县,阿瓦提县,柯坪县|克孜勒苏柯尔克孜自治州,阿图什市,阿克陶县,阿合奇县,乌恰县|喀什地区,喀什市,疏附县,疏勒县,英吉沙县,泽普县,莎车县,叶城县,麦盖提县,岳普湖县,伽师县,巴楚县,塔什库尔干塔吉克自治县|和田地区,和田市,和田县,墨玉县,皮山县,洛浦县,策勒县,于田县,民丰县|伊犁哈萨克自治州,伊宁市,奎屯市,伊宁县,察布查尔锡伯自治县,霍城县,巩留县,新源县,昭苏县,特克斯县,尼勒克县|塔城地区,塔城市,乌苏市,额敏县,沙湾县,托里县,裕民县,和布克赛尔蒙古自治县|阿勒泰地区,阿勒泰市,布尔津县,富蕴县,福海县,哈巴河县,青河县,吉木乃县|自治区直辖县级行政区划,石河子市,阿拉尔市,图木舒克市,五家渠市#香港特别行政区$香港,香港特别行政区#澳门特别行政区$澳门,澳门特别行政区#台湾省$台北市,中正区,大同区,中山区,松山区,大安区,万华区,信义区,士林区,北投区,内湖区,南港区,文山区|高雄市,新兴区,前金区,芩雅区,盐埕区,鼓山区,旗津区,前镇区,三民区,左营区,楠梓区,小港区|基隆市,仁爱区,信义区,中正区,中山区,安乐区,暖暖区,七堵区|台中市,中区,东区,南区,西区,北区,北屯区,西屯区,南屯区|台南市,中西区,东区,南区,北区,安平区,安南区|新竹市,东区,北区,香山区|嘉义市,东区,西区|县,台北县(板桥市),宜兰县(宜兰市),新竹县(竹北市),桃园县(桃园市),苗栗县(苗栗市),台中县(丰原市),彰化县(彰化市),南投县(南投市),嘉义县(太保市),云林县(斗六市),台南县(新营市),高雄县(凤山市),屏东县(屏东市),台东县(台东市),花莲县(花莲市),澎湖县(马公市)#其它$亚洲,阿富汗,巴林,孟加拉国,不丹,文莱,缅甸,塞浦路斯,印度,印度尼西亚,伊朗,伊拉克,日本,约旦,朝鲜,科威特,老挝,马尔代夫,黎巴嫩,马来西亚,以色列,蒙古,尼泊尔,阿曼,巴基斯坦,巴勒斯坦,菲律宾,沙特阿拉伯,新加坡,斯里兰卡,叙利亚,泰国,柬埔寨,土耳其,阿联酋,越南,也门,韩国,中国,中国香港,中国澳门,中国台湾|非洲,阿尔及利亚,安哥拉,厄里特里亚,法罗群鸟,加那利群岛(西)(拉斯帕尔马斯),贝宁,博茨瓦纳,布基纳法索,布隆迪,喀麦隆,加那利群岛(西)(圣克鲁斯),佛得角,中非,乍得,科摩罗,刚果,吉布提,埃及,埃塞俄比亚,赤道几内亚,加蓬,冈比亚,加纳,几内亚,南非,几内亚比绍,科特迪瓦,肯尼亚,莱索托,利比里亚,利比亚,马达加斯加,马拉维,马里,毛里塔尼亚,毛里求斯,摩洛哥,莫桑比克,尼日尔,尼日利亚,留尼旺岛,卢旺达,塞内加尔,塞舌尔,塞拉利昂,索马里,苏丹,斯威士兰,坦桑尼亚,圣赤勒拿,多哥,突尼斯,乌干达,扎伊尔,赞比亚,津巴布韦,纳米比亚,迪戈加西亚,桑给巴尔,马约特岛,圣多美和普林西比|欧洲,阿尔巴尼亚,安道尔,奥地利,比利时,保加利亚,捷克,丹麦,芬兰,法国,德国,直布罗陀(英),希腊,匈牙利,冰岛,爱尔兰,意大利,列支敦士登,斯洛伐克,卢森堡,马耳他,摩纳哥,荷兰,挪威,波兰,葡萄牙,马其顿,罗马尼亚,南斯拉夫,圣马力诺,西班牙,瑞典,瑞士,英国,科罗地亚,斯洛文尼亚,梵蒂冈,波斯尼亚和塞哥维那,俄罗斯联邦,亚美尼亚共和国,白俄罗斯共和国,格鲁吉亚共和国,哈萨克斯坦共和国,吉尔吉斯坦共和国,乌兹别克斯坦共和国,塔吉克斯坦共和国,土库曼斯坦共和国,乌克兰,立陶宛,拉脱维亚,爱沙尼亚,摩尔多瓦,阿塞拜疆|美洲,安圭拉岛,安提瓜和巴布达,阿根廷,阿鲁巴岛,阿森松,巴哈马,巴巴多斯,伯利兹,百慕大群岛,玻利维亚,巴西,加拿大,开曼群岛,智利,哥伦比亚,多米尼加联邦,哥斯达黎加,古巴,多米尼加共和国,厄瓜多尔,萨尔瓦多,法属圭亚那,格林纳达,危地马拉,圭亚那,海地,洪都拉斯,牙买加,马提尼克(法),墨西哥,蒙特塞拉特岛,荷属安的列斯群岛,尼加拉瓜,巴拿马,巴拉圭,秘鲁,波多黎哥,圣皮埃尔岛密克隆岛(法),圣克里斯托弗和尼维斯,圣卢西亚,福克兰群岛,维尔京群岛(英),圣文森特岛(英),维尔京群岛(美),苏里南,特立尼达和多巴哥,乌拉圭,美国,委内瑞拉,格陵兰岛,特克斯和凯科斯群岛,瓜多罗普|大洋洲,澳大利亚,科克群岛,斐济,法属波里尼西亚、塔希提,瓦努阿图,关岛,基里巴斯,马里亚纳群岛,中途岛,瑙鲁,新咯里多尼亚群岛,新西兰,巴布亚新几内亚,东萨摩亚,西萨摩亚,所罗门群岛,汤加,对诞岛,威克岛,科科斯岛,夏威夷,诺福克岛,帕劳,纽埃岛,图瓦卢,托克鲁,密克罗尼西亚,马绍尔群岛,瓦里斯加富士那群岛";!function(t,e){for(SPT="省份",SCT="城市",SAT="地区",ShowT=1,ShowT&&(PCAD1=SPT+"$"+SCT+","+SAT+"#"+PCAD),PCAArea=[],PCAP=[],PCAC=[],PCAA=[],PCAN=PCAD1.split("#"),i=0;i<PCAN.length;i++){for(PCAA[i]=[],TArea=PCAN[i].split("$")[1].split("|"),j=0;j<TArea.length;j++)PCAA[i][j]=TArea[j].split(","),1==PCAA[i][j].length&&(PCAA[i][j][1]=SAT),TArea[j]=TArea[j].split(",")[0];PCAArea[i]=PCAN[i].split("$")[0]+","+TArea.join(","),PCAP[i]=PCAArea[i].split(",")[0],PCAC[i]=PCAArea[i].split(",")}function n(){this.SelP=document.getElementById(arguments[0]),this.SelC=document.getElementById(arguments[1]),this.SelA=document.getElementById(arguments[2]),this.DefP=this.SelA?arguments[3]:arguments[2],this.DefC=this.SelA?arguments[4]:arguments[3],this.DefA=this.SelA?arguments[5]:arguments[4],this.SelP.PCA=this,this.SelC.PCA=this,this.SelP.onchange=function(){n.SetC(this.PCA)},this.SelA&&(this.SelC.onchange=function(){n.SetA(this.PCA)}),n.SetP(this)}n.SetP=function(t){for(i=0;i<PCAP.length;i++)PCAPT=PCAPV=PCAP[i],PCAPT==SPT&&(PCAPV=""),t.SelP.options.add(new Option(PCAPT,PCAPV)),t.DefP==PCAPV&&(t.SelP[i].selected=!0);n.SetC(t)},n.SetC=function(t){for(PI=t.SelP.selectedIndex,t.SelC.length=0,i=1;i<PCAC[PI].length;i++)PCACT=PCACV=PCAC[PI][i],PCACT==SCT&&(PCACV=""),t.SelC.options.add(new Option(PCACT,PCACV)),t.DefC==PCACV&&(t.SelC[i-1].selected=!0);t.SelA&&n.SetA(t)},n.SetA=function(t){for(PI=t.SelP.selectedIndex,CI=t.SelC.selectedIndex,t.SelA.length=0,i=1;i<PCAA[PI][CI].length;i++)PCAAT=PCAAV=PCAA[PI][CI][i],PCAAT==SAT&&(PCAAV=""),t.SelA.options.add(new Option(PCAAT,PCAAV)),t.DefA==PCAAV&&(t.SelA[i-1].selected=!0)},t.pcas=n}(window),function(){function t(t){return t.replace(m,"").replace(v,",").replace(y,"").replace(b,"").replace(w,"").split(x)}function e(t){return"'"+t.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}function i(i,n){function o(t){return f+=t.split(/\n/).length-1,u&&(t=t.replace(/\s+/g," ").replace(/<!--[\w\W]*?-->/g,"")),t&&(t=y[1]+e(t)+y[2]+"\n"),t}function s(e){var i=f;if(c?e=c(e,n):r&&(e=e.replace(/\n/g,(function(){return"$line="+ ++f+";"}))),0===e.indexOf("=")){var o=p&&!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),o){var s=e.replace(/\s*\([^\)]+\)/,"");h[s]||/^(include|print)$/.test(s)||(e="$escape("+e+")")}else e="$string("+e+")";e=y[1]+e+y[2]}return r&&(e="$line="+i+";"+e),g(t(e),(function(t){var e;t&&!m[t]&&(e="print"===t?w:"include"===t?x:h[t]?"$utils."+t:d[t]?"$helpers."+t:"$data."+t,_+=t+"="+e+",",m[t]=!0)})),e+"\n"}var r=n.debug,a=n.openTag,l=n.closeTag,c=n.parser,u=n.compress,p=n.escape,f=1,m={$data:1,$filename:1,$utils:1,$helpers:1,$out:1,$line:1},v="".trim,y=v?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],b=v?"$out+=text;return $out;":"$out.push(text);",w="function(){var text=''.concat.apply('',arguments);"+b+"}",x="function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);"+b+"}",_="'use strict';var $utils=this,$helpers=$utils.$helpers,"+(r?"$line=0,":""),C=y[0],$="return new String("+y[3]+");";g(i.split(a),(function(t){var e=(t=t.split(l))[0],i=t[1];1===t.length?C+=o(e):(C+=s(e),i&&(C+=o(i)))}));var T=_+C+$;r&&(T="try{"+T+"}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:"+e(i)+".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");try{var k=new Function("$data","$filename",T);return k.prototype=h,k}catch(t){throw t.temp="function anonymous($data,$filename) {"+T+"}",t}}var n=function(t,e){return"string"==typeof e?f(e,{filename:t}):r(t,e)};n.version="3.0.0",n.config=function(t,e){o[t]=e};var o=n.defaults={openTag:"<%",closeTag:"%>",escape:!0,cache:!0,compress:!1,parser:null},s=n.cache={};n.render=function(t,e){return f(t,e)};var r=n.renderFile=function(t,e){var i=n.get(t)||p({filename:t,name:"Render Error",message:"Template not found"});return e?i(e):i};n.get=function(t){var e;if(s[t])e=s[t];else if("object"==("undefined"==typeof document?"undefined":_typeof2(document))){var i=document.getElementById(t);if(i){var n=(i.value||i.innerHTML).replace(/^\s*|\s*$/g,"");e=f(n,{filename:t})}}return e};var a=function t(e,i){return"string"!=typeof e&&("number"===(i=_typeof2(e))?e+="":e="function"===i?t(e.call(e)):""),e},l={"<":"<",">":">",'"':""","'":"'","&":"&"},c=function(t){return l[t]},u=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},h=n.utils={$helpers:{},$include:r,$string:a,$escape:function(t){return a(t).replace(/&(?![\w#]+;)|[<>"']/g,c)},$each:function(t,e){var i,n;if(u(t))for(i=0,n=t.length;n>i;i++)e.call(t,t[i],i,t);else for(i in t)e.call(t,t[i],i)}};n.helper=function(t,e){d[t]=e};var d=n.helpers=h.$helpers;n.onerror=function(t){var e="Template Error\n\n";for(var i in t)e+="<"+i+">\n"+t[i]+"\n\n";"object"==("undefined"==typeof console?"undefined":_typeof2(console))&&console.error(e)};var p=function(t){return n.onerror(t),function(){return"{Template Error}"}},f=n.compile=function(t,e){function n(i){try{return new l(i,a)+""}catch(n){return e.debug?p(n)():(e.debug=!0,f(t,e)(i))}}for(var r in e=e||{},o)void 0===e[r]&&(e[r]=o[r]);var a=e.filename;try{var l=i(t,e)}catch(t){return t.filename=a||"anonymous",t.name="Syntax Error",p(t)}return n.prototype=l.prototype,n.toString=function(){return l.toString()},a&&e.cache&&(s[a]=n),n},g=h.$each,m=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,v=/[^\w$]+/g,y=new RegExp(["\\b"+"break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined".replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),b=/^\d[^,]*|,\d[^,]*/g,w=/^,+|,+$/g,x=/^$|,+/;"function"==typeof define?define((function(){return n})):"undefined"!=typeof exports?module.exports=n:this.template=n}(),function(t){var e=function(t){var e=this;e.args=t,e.trigger=function(t){if("function"==typeof e.args[t]){for(var i=[],n=1;n<arguments.length;n++)i.push(arguments[n]);return e.args[t].apply(e,i)}},e.exist=function(t){return"function"==typeof e.args[t]}},i={formKey:function(t){if(t.form_id)var e=t.form_id+"."+t.id,i=t.form_id+"_"+t.id,n=t.form_id+"_"+t.name;else e=t.id,i=t.id,n=t.name;return{id:i,key:e,name:n}},widgets:{},forms:{},dialogs:{},grids:{},event:{events:{},set:function(t,i){this.events[t]=new e(i)},get:function(t){return this.events[t]||new e({})}}};window.gdoo=i}(jQuery);var select2List={};!function(t){t.fn.select2Field=function(e){$this=t(this);var i=$this.attr("key"),n=gdoo.event.get(i),o={width:"100%",placeholder:" - ",allowClear:!0,minimumInputLength:0,resultCache:!0,ajax:{type:"POST",url:"",dataType:"json",delay:250,cache:!1,data:function(t){var i=e.ajaxParams||{};return i.q=t.term||"",i.page=t.page||1,i.resultCache=!0,n.trigger("query",i),i},processResults:function(t,e){return{results:t.data,pagination:{more:t.current_page<t.last_page}}}},escapeMarkup:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},createTag:function(e){var i=t.trim(e.term);return""===i?null:{id:"draft_"+i,text:i}},initSelection:function(t,e){e({id:t.val(),text:t.text()})}};e=t.extend(!0,{},o,e),n.trigger("init",e);var s=$this.select2(e);return s.on("select2:select",(function(t){n.trigger("onSelect",t.params.data)})),s.on("select2:opening",(function(){})),s.on("select2:open",(function(){})),s}}(jQuery),function(t){"use strict";var e=null,i={query:{},item:{},data:[],delay:300,showBtn:!0,clearable:!1,keyLeft:37,keyUp:38,keyRight:39,keyDown:40,keyEnter:13};function n(e,i){var n=t("#gdoo-suggest");n.is(":visible")&&(n.hide(),e.trigger("onHideSuggest",[i?i.data:[]]))}function o(i,n,o){!function(e,i){var n=t("#gdoo-suggest");n.is(":visible")||(n.show(),e.trigger("onShowSuggest",[i?i.data:[]]))}(i,n);var s=gdoo.event.get(o.form_id+"."+o.id);return s.trigger("open",o),s.trigger("query",o),o.suggest=!0,o.q=i.val(),e.rowSelection=1==o.multi?"multiple":"single",e.remoteDataUrl=app.url(o.url),e.remoteParams=o,e.remoteData(),i}t.fn.gdooDialogInput=function(s){return s=s||{},s=t.extend(!0,{},i,s),t("body").append('<div class="gdoo-gird-suggest" id="gdoo-suggest" style="position:absolute;display:none;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%);"></div>'),this.each((function(){var i=t(this),r=i.data(),a=null,l=0,c=t("#gdoo-suggest");!function(i,o,s){t("#gdoo-suggest").html('<div style="height:180px;overflow:auto;width:auto;"><div id="suggest-aggrid" class="ag-theme-balham" style="width:100%;height:180px;border-left:1px solid #BDC3C7;border-right:1px solid #BDC3C7;"></div></div>');var r=document.querySelector("#suggest-aggrid");(e=new agGridOptions).suppressRowClickSelection=!0,e.columnDefs=[{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"code",headerName:"存货编码",width:100},{suppressMenu:!0,cellClass:"text-left",sortable:!0,field:"name",headerName:"产品名称",minWidth:140},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"spec",headerName:"规格型号",width:100},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"barcode",headerName:"产品条码",width:120},{suppressMenu:!0,cellClass:"text-center",sortable:!0,field:"unit_id_name",headerName:"计量单位",width:80},{suppressMenu:!0,cellClass:"text-right",field:"price",headerName:"价格",width:80}],e.onRowClicked=function(t){e.writeSelected([t.data])&&n(i,o)},e.writeSelected=function(i){var n=e.remoteParams,o=1==n.prefix?"sid":"id",s=[],r=[];t.each(i,(function(t,e){s.push(e[o]),r.push(e.name)}));var a=n.form_id+"_"+n.id;t("#"+a).val(s.join(",")),t("#"+a+"_text").val(r.join(","));var l=gdoo.event.get(n.form_id+"."+n.id);return!l.exist("onSelect")||l.trigger("onSelect","multiple"==e.rowSelection?i:i[0])},new agGrid.Grid(r,e)}(i,s),i.off(),i.on("keydown",(function(t){c.is(":visible")&&t.keyCode===s.keyEnter&&n(i,s)})).on("keyup input paste",(function(e){~t.inArray(e.keyCode,[s.keyDown,s.keyUp,s.keyEnter])?i.val(i.val()):(clearTimeout(a),a=setTimeout((function(){o(i,s,r)}),s.delay))})).on("focus",(function(){c.off();var e=t(window).width(),n=t(window).height(),o=i.outerWidth(),s=i.outerHeight(),r=i.offset(),a=c.outerWidth(),u=c.outerHeight(),h={top:r.top+s-1};e<768?(h.minWidth=360,h.left=14,h.right=14):(h.left=r.left,e<r.left+a+10&&(h.left=r.left-a+o),n<r.top+u+10&&(h.top=r.top-u+1)),c.css(h),c.on("mouseenter",(function(){l=1,i.blur()})).on("mouseleave",(function(){l=0,i.focus()})).on("click",(function(){return!1}))})).on("blur",(function(){l||n(i,s)}))}))}}(jQuery),function(t){"use strict";t.fn.searchForm=function(e){var i=this,n=[],o=e.data,s=1==e.advanced||1==o.advanced?1:0,r=i.attr("id"),a=!1,l="search-field-",c="search-condition-",u="search-value-";function h(e,s,r){i.find("#"+u+s),n[s]={condition:i.find("#"+c+s),value:i.find("#"+u+s)},function(e,i,o){var s=n[e].condition.empty(),r={};1==a&&(o="");if(r.number=[{key:"eq",value:"等于"},{key:"neq",value:"不等于"},{key:"gt",value:"大于"},{key:"lt",value:"小于"}],r.date=[{key:"eq",value:"等于"},{key:"neq",value:"不等于"},{key:"gt",value:"大于"},{key:"lt",value:"小于"}],r.second=[{key:"eq",value:"等于"},{key:"neq",value:"不等于"},{key:"gt",value:"大于"},{key:"lt",value:"小于"}],r.text=[{key:"like",value:"包含"},{key:"not_like",value:"不包含"},{key:"eq",value:"等于"},{key:"neq",value:"不等于"},{key:"gt",value:"大于"},{key:"lt",value:"小于"},{key:"empty",value:"为空"},{key:"not_empty",value:"不为空"}],"second"==i||"text"==i||"number"==i||"date"==i){var l=o||r[i][0].key;t.map(r[i],(function(t){s.append('<option value="'+t.key+'">'+t.value+"</option>")})),s.parent("div").css("display","inline-block")}else if("birthday"==i){s.append('<option value="birthday">birthday</option>'),s.parent("div").hide();l="birthday"}else if("date2"==i){s.append('<option value="date2">date2</option>'),s.parent("div").hide();l="date2"}else if("region"==i){s.append('<option value="region">region</option>'),s.parent("div").hide();l="region"}else if("second2"==i){s.append('<option value="second2">second2</option>'),s.parent("div").hide();l="second2"}else if("dialog"==i){s.append('<option value="dialog">dialog</option>'),s.parent("div").hide();l="dialog"}else{s.append('<option value="eq">eq</option>'),s.parent("div").hide();l="eq"}s.val(l),d(e,l),s.on("change",(function(){d(e,t(this).val())}))}(s,e,o.condition[s]||""),f[e].call(i,s,r)}function d(t,e){var i=n[t].value;"empty"==e||"not_empty"==e?i.hide():i.show()}function p(t,e){var i=u,n={},s="",l="";if(null!=e&&(s="-"+e,l="_"+e),n.id=r+"_"+i+t+s,n.name="search_"+t+l,0==a)if(s){var c=o.search[t][e];n.value=null==c?"":c}else{c=o.search[t];n.value=null==c?"":c}else n.value="";return n}s&&(l="advanced-"+l,c="advanced-"+c,u="advanced-"+u),i._select=function(e,i,o,r){var a,l,c,u=p(i,o),h=(a=e,l=t.type(a),c=1==s?'<option value=""> - </option>':"","array"==l||"object"==l?t.map(a,(function(t){c+='<option value="'+t.id+'">'+t.name+"</option>"})):c=c.concat(a),c),d=t('<select name="'+u.name+'" id="'+u.id+'" class="form-control input-sm">'+h+"</select>");n[i].value.append(d),""!==u.value&&d.val(u.value)},i._text=function(e,i,o){var s=p(e,i),r=t('<input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" class="form-control input-sm">');n[e].value.append(r)},i._year=function(e,i,o){var s=p(e,i),r=t('<input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" autocomplete="off" data-toggle="date" data-format="yyyy" class="form-control input-sm">');n[e].value.append(r)},i._date=function(e,i,o){var s=p(e,i),r=t('<input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" autocomplete="off" data-toggle="date" class="form-control input-sm">');n[e].value.append(r)},i._date2=function(e,i,o){var s=p(e,0),r=p(e,1),a=t('<table class="table date-field"><tr><td><input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" data-toggle="date" autocomplete="off" class="form-control input-sm"></td><td class="date-apart"> - </td><td><input name="'+r.name+'" id="'+r.id+'" value="'+r.value+'" type="text" autocomplete="off" data-toggle="date" class="form-control input-sm"></td></tr></table>');n[e].value.append(a)},i._second2=function(e,i,o){var s=p(e,0),r=p(e,1),a=t('<table class="table date-field"><tr><td><input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" autocomplete="off" data-toggle="date" class="form-control input-sm"></td><td class="date-apart"> - </td><td><input name="'+r.name+'" id="'+r.id+'" value="'+r.value+'" type="text" autocomplete="off" data-toggle="date" class="form-control input-sm"></td></tr></table>');n[e].value.append(a)},i._birthday=function(e,i,o){var s=p(e,0),r=p(e,1),a=t('<input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" data-toggle="date" autocomplete="off" data-format="MM-dd" class="form-control input-sm"> - <input name="'+r.name+'" id="'+r.id+'" value="'+r.value+'" type="text" data-toggle="date" autocomplete="off" data-format="MM-dd" class="form-control input-sm">');n[e].value.append(a)},i._birthday2=function(e,i,o){var s=p(e,0),r=p(e,1),a=t('<input name="'+s.name+'" id="'+s.id+'" value="'+s.value+'" type="text" data-toggle="date" autocomplete="off" data-format="MM-dd" class="form-control input-sm"> - <input name="'+r.name+'" id="'+r.id+'" value="'+r.value+'" type="text" data-toggle="date" autocomplete="off" data-format="MM-dd" class="form-control input-sm">');n[e].value.append(a)},i._dialog=function(e,o,r,a){var c=p(o,r),u=[];if(e.query&&(e.query.multi="undefined"==e.query.multi?1:e.query.multi,t.each(e.query,(function(t,e){u.push("data-"+t+'="'+e+'"')}))),s)var h=i.find("#"+l+o);else h=i.find("#"+l+"0").find("option:selected");var d='<div class="select-group input-group">';d+='<input class="form-control input-sm" data-toggle="dialog-view" readonly="readonly" data-title="'+h.data().title+'" data-url="'+e.url+'" data-id="'+c.id+'" '+u.join(" ")+' style="min-width:153px;cursor:pointer;" id="'+c.id+'_text" />',d+='<input type="hidden" id="'+c.id+'" name="'+c.name+'" value="'+c.value+'">',d+='<div class="input-group-btn">',d+='<a data-toggle="dialog-clear" data-id="'+c.id+'" class="btn btn-sm btn-default"><i class="fa fa-times"></i></a>',d+="</div>",n[o].value.append(t(d))},i._product_category=function(e,o){var s=i.attr(e,0),r=i.attr(e,1),a=s.value,l=r.value;function c(e){var i='<option value=""> - </option>';if(a){var n={field_0:"product.category_id",condition_0:"eq",search_0:a,limit:0};t.post(app.url("product/product/dialog",n),(function(e){t.map(e.data,(function(t){i+='<option value="'+t.id+'">'+t.text+"</option>"}));var n=t("#"+r.id).html(i);l&&n.val(l)}))}else t("#"+r.id).html(i)}n[e].value.append('<select name="'+s.name+'" id="'+s.id+'" class="form-control input-sm"></select> <select name="'+r.name+'" id="'+r.id+'" class="form-control input-sm"></select>'),t.post(app.url("product/category/dialog",o),(function(i){var n='<option value=""> - </option>';t.map(i.rows,(function(t){n+='<option value="'+t.id+'">'+t.layer_space+t.name+"</option>"}));var o=t("#"+s.id).html(n);a&&o.val(a),c(e)})),i.on("change","#"+s.id,(function(){a=this.value,l=0,c(e)}))};var f={empty:function(t){n[t].value.empty()},text:function(t){i._text(t)},select2:function(t){i._text(t)},select:function(t,e){i._select(e,t)},number:function(t){i._text(t)},year:function(t){i._year(t)},date:function(t){i._date(t)},date2:function(t){i._date2(t)},birthday:function(t){i._birthday(t)},dialog:function(t,e){i._dialog(e,t)},second:function(t){i._date(t)},second2:function(t){i._second2(t)},option:function(t,e){i._select(e,t)},address:function(t){var e=p(t,0),i=p(t,1),o='<select name="'+e.name+'" id="'+e.id+'" class="form-control input-sm"></select> <select name="'+i.name+'" id="'+i.id+'" class="form-control input-sm"></select>';n[t].value.append(o),new pcas(e.id,i.id,e.value,i.value)},region:function(e){var o=p(e,0),s=p(e,1),r=p(e,2),a=o.value,l=s.value,c=r.value;function u(e,i){t.get(app.url("index/api/region",{layer:2,parent_id:a}),(function(e){var i="";t.map(e,(function(t){i+='<option value="'+t.id+'">'+t.name+"</option>"}));var n=t("#"+s.id).html(i);l&&n.val(l)}))}function h(e,i){t.get(app.url("index/api/region",{layer:3,parent_id:l}),(function(e){var i="";t.map(e,(function(t){i+='<option value="'+t.id+'">'+t.name+"</option>"}));var n=t("#"+r.id).html(i);c&&n.val(c)}))}n[e].value.append('<select name="'+o.name+'" id="'+o.id+'" class="form-control input-sm"></select> <select name="'+s.name+'" id="'+s.id+'" class="form-control input-sm"></select> <select name="'+r.name+'" id="'+r.id+'" class="form-control input-sm"></select>'),t.get(app.url("index/api/region",{layer:1}),(function(n){var r="";t.map(n,(function(t){r+='<option value="'+t.id+'">'+t.name+"</option>"}));var d=t("#"+o.id).html(r);a&&d.val(a),u(e),h(e),i.on("change","#"+o.id,(function(){a=this.value,l=0,c=0,u(e),h(e)})),i.on("change","#"+s.id,(function(){l=this.value,c=0,h(e)}))}))},circle:function(e){var o=i.attr(e,0),s=i.attr(e,1),r=o.value,a=s.value;function l(e){var i='<option value=""> - </option>';r?t.post(app.url("customer/customer/dialog",{limit:500,circle_id:r}),(function(e){t.map(e.data,(function(t){i+='<option value="'+t.id+'">'+t.text+"</option>"}));var n=t("#"+s.id).html(i);a&&n.val(a)})):t("#"+s.id).html(i)}n[e].value.append('<select name="'+o.name+'" id="'+o.id+'" class="form-control input-sm"></select> <select name="'+s.name+'" id="'+s.id+'" class="form-control input-sm"></select>'),t.post(app.url("customer/circle/dialog"),(function(i){var n='<option value=""> - </option>';t.map(i,(function(t){n+='<option value="'+t.id+'">'+t.name+"</option>"}));var s=t("#"+o.id).html(n);r&&s.val(r),l(e)})),i.on("change","#"+o.id,(function(){r=this.value,a=0,l(e)}))}};return i.attr=p,i.element=n,i.options=e,"function"==typeof e.init&&e.init.call(this,f),function(){if(s)t.each(o.field,(function(t){h(i.find("#"+l+t).data("type"),t,o.option[t])}));else{var e=i.find("#"+l+"0");e.val(o.field[0]),h(e.find("option:selected").data("type"),0,o.option[0]),e.on("change",(function(){a=!0;var e=this.selectedIndex-1,i=t(this).find("option:selected").data("type");n[0].value.empty(),h(i,0,o.option[e])}))}}(),this}}(jQuery),function(t){var e=0;t.fn.dialog=function(i){var n=this,o=t(n),s=t(document.body),r=o.closest(".dialog");this.options=i;var a,l=function(){r.modal("show"),(i.onShow||function(){}).call(n)},c=function(){r.modal("hide")};if(i.constructor==Object){i=t.extend({show:!0,backdrop:!0,destroy:!1},i),0==r.size()&&(a='<div class="dialog modal"><div class="modal-dialog"><div class="modal-content">',i.title&&(a+='<div class="modal-header"><button type="button" data-dismiss="dialog" class="close">×</button><h4 class="modal-title"></h4></div>'),a+='<div class="modal-body"></div>',i.buttons.length>0&&(a+='<div class="modal-footer"></div>'),r=t(a+="</div></div></div>"),s.append(r),r.find(".modal-body").append(o),r.modal({backdrop:i.backdrop}),t(".modal-dialog").draggable({handle:".modal-header",iframeFix:!0}),function(e){var o=(e||i||{}).buttons||{},s=r.find(".modal-footer");for(var a in s.html(""),o){var l=o[a],c="btn-default";c=l.class||l.classed||c,$button=t('<button type="button" class="btn btn-sm '+c+'">'+l.text+"</button>"),$button.data("click",l.click),l.id&&$button.attr("id",l.id),s.append($button)}s.on("click",(function(e){var i=t(e.target).data("click");"function"==typeof i&&i.call(n,e)})),s.data("buttons",o)}(),r.find(".modal-title").html(i.title),i.dialogClass&&r.find(".modal-dialog").addClass(i.dialogClass),r.on("click","[data-dismiss='dialog']",(function(){(i.onClose||c).call(n)})),r.one("show.bs.modal",(function(){e++})),r.one("hidden.bs.modal",(function(){--e>0&&(r.modal("checkScrollbar"),s.addClass("modal-open"),r.modal("setScrollbar")),1==i.destroy&&r.remove()})),i.modalClass&&r.addClass(i.modalClass)),i.show&&l()}return"destroy"==i&&(i.destroy=!0,c()),"close"==i&&c(),"show"==i&&l(),n}}(jQuery),function(t){var e={text:"确定",classed:"btn-info"},i={text:"取消",classed:"btn-default"};t.messager={},t.messager.alert=function(i,n,o){arguments.length<2&&(n=i||"",i=" "),t("<div>"+n+"</div>").dialog({title:i,destroy:!0,dialogClass:"modal-sm",buttons:[{text:e.text,classed:e.classed||"btn-success",click:function(){"function"==typeof o&&o(),t(this).dialog("destroy")}}]})},t.messager.confirm=function(n,o,s){t("<div>"+o+"</div>").dialog({title:n,destroy:!0,backdrop:"static",dialogClass:"modal-sm modal-confirm",buttons:[{text:i.text,classed:i.classed||"btn-danger",click:function(){t(this).dialog("destroy"),"function"==typeof s&&s(!1)}},{text:e.text,classed:e.classed||"btn-success",click:function(){t(this).dialog("destroy"),"function"==typeof s&&s(!0)}}]})}}(jQuery),function(t){var e=0;t.dialog=function(i){var n=e,o={title:"Dialog",modalClass:"no-padder",dialogClass:"modal-md",destroy:!0,index:e,onShow:function(){var e=this;if(o=i.url){var o=o+(o.indexOf("?")<0?"?":"&")+"dialog_index="+n;t.get(o,(function(t){e.html(t)}))}i.html&&this.html(i.html)},buttons:[{text:"取消",click:function(){t(this).dialog("close")}},{text:"确定",class:"btn-primary",click:function(){t(this).dialog("close")}}]};i=t.extend(o,i);var s="gdoo-dialog-"+e,r=t("#"+s);return 0==r.length&&(r=t("<div/>",{id:s}),e++),r.dialog(i),n}}(jQuery),jQuery.toastr=function(t,e,i){toastr.options={closeButton:!0,debug:!1,progressBar:!1,positionClass:"toast-top-right",onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"},toastr[t](e,i)},function(window){var calc={rmb:function(t){var e,i,n,o,s,r,a,l,c,u,h,d,p,f,g="零",m="壹",v="贰",y="叁",b="肆",w="伍",x="陆",_="柒",C="捌",$="玖",T="拾",k="佰",S="仟",E="万",D="亿",A="元",P="角",I="分",N="整";if(""==(t=t.toString()))return"";if(null!=t.match(/[^,.\d]/))return"";if(null==t.match(/^((\d{1,3}(,\d{3})*(.((\d{3},)*\d{1,3}))?)|(\d+(.\d+)?))$/))return"";if(t=(t=t.replace(/,/g,"")).replace(/^0+/,""),Number(t)>99999999999.99)return"";if((o=t.split(".")).length>1?(e=o[0],i=(i=o[1]).substr(0,2)):(e=o[0],i=""),s=new Array(g,m,v,y,b,w,x,_,C,$),r=new Array("",T,k,S),a=new Array("",E,D),l=new Array(P,I),n="",Number(e)>0){for(c=0,u=0;u<e.length;u++)p=(h=e.length-u-1)/4,f=h%4,"0"==(d=e.substr(u,1))?c++:(c>0&&(n+=s[0]),c=0,n+=s[Number(d)]+r[f]),0==f&&c<4&&(n+=a[p]);n+=A}if(""!=i)for(u=0;u<i.length;u++)"0"!=(d=i.substr(u,1))&&(n+=s[Number(d)]+l[u]);return""==n&&(n=g+A),""==i&&(n+=N),n},max:function(){if(0!=arguments.length){for(var t=arguments[0],e=0;e<arguments.length;e++)t=Math.max(t,arguments[e]);return parseFloat(t)}},min:function(){if(0!=arguments.length){for(var t=arguments[0],e=0;e<arguments.length;e++)t=Math.min(t,arguments[e]);return parseFloat(t)}},avg:function(){for(var t=arguments,e=t.length,i=0,n=0;i<e&&(n+=parseFloat(t[i]));i++);return n/e},mod:function(){if(0!=arguments.length){var t=arguments[0],e=arguments[1],i=t%e;return i=isNaN(i)?"":parseFloat(i)}},abs:function(t){return Math.abs(parseFloat(t))},val:function(t,e){return isNaN(t)||t===1/0?0:t.toFixed(e)},day:function(t){return 0==t?0:Math.floor(t/86400)},hour:function(t){return 0==t?0:Math.floor(t/3600)},date:function(t){var e="天",i="小时",n="分",o="秒",s="日期格式无效";return t>=0?Math.floor(t/86400)+e+Math.floor(t%86400/3600)+i+Math.floor(t%3600/60)+n+Math.floor(t%60)+o:s},list:function(t,e){for(var i=0,n=document.getElementById("body_"+t),o=0;o<n.rows.length;o++)for(var s=0;s<n.rows[o].cells.length;s++)if(s==e){var r=n.rows[o].cells[s].firstChild;if(r&&r.tagName){var a=r.value||r.innerText;a=""==a||""==a.replace(/\s/g,"")?0:a,a=isNaN(a)?NaN:a,i+=parseFloat(a)}else i+=parseFloat(r.data)}return parseFloat(i)},getVal:function(t,e){var i=$("#"+t);if(0==i.length)return 0;if("listview"==e)return document.getElementById("lv_"+t);if("date"==e){var n=$("#"+t).val();return new Date(n).getTime()/1e3}return""==(n=i.val())&&(n=0),n},sum:function(){var t,e,i=[].slice.call(arguments,0),n=0;for(t=i.length;t--;)n+=(e=parseFloat(i[t]))==e?e:0;return n}},listView={calc,field:{},data:{},total:{},editor:function(t,e,i){var n=listView.field[t],o=n.type[i],s=n.size[i],r="SYS_NOT_NULL"==n.checks[i]?"input-required":"input-text",a=1!=n.writes[i],l="";listView.data[t][e]&&(l=null==listView.data[t][e][i]?"":listView.data[t][e][i]);var c=t+"["+e+"]["+i+"]",u=t+"_"+e+"_"+i;switch(o){case"empty":var h='<span tyle="width:'+s+'px;" id="'+u+'"></span>';break;case"text":h=0==a?'<input autocomplete="off" type="text" style="width:'+s+'px;" class="'+r+'" name="'+c+'" id="'+u+'" value="'+l+'">':'<span id="'+u+'">'+l+"</span>";break;case"textarea":h=0==a?'<textarea style="width:'+s+'px;" class="'+r+'" name="'+c+'" id="'+u+'">'+l+"</textarea>":'<span id="'+u+'">'+l+"</span>";break;case"calc":h=0==a?'<input type="text" style="width:'+s+'px;" class="readonly" name="'+c+'" id="'+u+'" value="'+l+'" readonly>':'<span id="'+u+'">'+l+"</span>";break;case"select":var d=n.value[i].split(",");(f=[]).push("<select style=width:"+s+'px;" name="'+c+'" id="'+u+'">');for(e=0;e<d.length;e++){var p=l==d[e]?" selected":"";f.push('<option value="'+d[e]+'"'+p+">"+d[e]+"</option>")}f.push("</select>"),h=0==a?f.join("\n"):'<span id="'+u+'">'+l+"</span>";break;case"radio":d=n.value[i].split(",");var f=[];for(e=0;e<d.length;e++){var g=l==d[e]?" checked":"";f.push('<label class="checkbox"><input type="radio" name="'+c+'" id="'+u+'"'+g+">"+d[e]+"</label>")}h=0==a?f.join("\n"):'<span id="'+u+'">'+l+"</span>";break;case"checkbox":for(d=n.value[i].split(","),f=[],e=0;e<d.length;e++){g=l==d[e]?" checked":"";f.push('<label class="checkbox"><input type="checkbox" name="'+c+'" id="'+u+'"'+g+">"+d[e]+"</label>")}h=0==a?f.join("\n"):'<span id="'+u+'">'+l+"</span>";break;case"datetime":h=0==a?'<input autocomplete="off" type="text" style=width:'+s+'px;" onfocus="datePicker({dateFmt:\'yyyy-MM-dd\'});" class="'+r+' popDate" value="'+l+'" name="'+c+'" id="'+u+'">':'<span id="'+u+'">'+l+"</span>"}return h},rowUpdate:function(t){var e=t.target.id.split("_");if(4==e.length){var i=e[0]+"_"+e[1];listView.rowSum(i,e[2]),listView.footerSum(i)}},footerSum:function(t){for(var e=document.getElementById("body_"+t),i=listView.field[t],n=i.sum,o=(i.readonly,0);o<n.length;o++)if(1==n[o]){for(var s=0,r=0;r<e.rows.length;r++){var a=e.rows[r].cells[o+1],l=0==i.readonly?$(a).find("input,select").val():$(a).find("span").text();l=parseFloat(l),s+=isNaN(l)?0:Math.round(1e4*parseFloat(l))/1e4}s=s.toFixed(2),$("#total_"+t+"_"+o).html(s)}},rowSum:function rowSum(key,j){for(var field=listView.field[key],type=field.type,value=field.value,readonly=field.readonly,calc=[],i=0;i<type.length;i++)if("calc"==type[i]){calc[i]=value[i];for(var k=0;k<type.length;k++){var n=k+1,td=$("#"+key+"_"+j+"_"+k),td_value=0==readonly?td.val():td.text();calc[i]=calc[i].replace("["+n+"]",parseFloat(td_value))}row=isNaN(eval(calc[i]))?0:Math.round(1e4*parseFloat(eval(calc[i])))/1e4,row=row.toFixed(2);var obj=$("#"+key+"_"+j+"_"+i);0==readonly?obj.val(row):obj.text(row)}},rowAdd:function(t){i=listView.total[t];var e=[];e.push('<tr><td align="center">'+(i+1)+"</td>");for(var n=0;n<listView.field[t].type.length;n++)e.push("<td>"+listView.editor(t,i,n)+"</td>");if(0==listView.field[t].readonly){var o=i>0?'<a class="option" href="javascript:;" onclick="listView.deleteRow(\''+t+"',this);\">删除</a>":'<a class="option" onclick="listView.rowAdd(\''+t+'\');" href="javascript:;">添加</a>';e.push('<td align="center" style="white-space:nowrap;">'+o+"</td></tr>")}$("#body_"+t).append(e.join("\n")),listView.total[t]++},deleteRow:function(t,e){var i=e.parentNode.parentNode;i.parentNode.removeChild(i),listView.footerSum(t)},init:function(t){listView.total[t]=0;for(var e=listView.data[t].length>0?listView.data[t].length:1,i=0;i<e;i++)listView.rowAdd(t),listView.rowSum(t,i);listView.footerSum(t)}};window.listView=listView}(window),function(t){function e(t){var e={},i=formGridList[t]||[];if(i.length)for(var n=0;n<i.length;n++){var o=i[n],s=o.api.memoryStore,r=[];o.api.stopEditing(),o.api.forEachNode((function(t){var e=t.data;isNotEmpty(e[o.dataKey])&&(0===(""+e.id).indexOf("draft_")&&(e.id=0),r.push(e))}));var a=gdoo.event.get("grid."+o.tableKey);if(a.exist("onSaveBefore"))if(!1===a.trigger("onSaveBefore",r))return!1;if(0==r.length)return toastrError(o.tableTitle+"不能为空。"),!1;e[o.tableKey]={rows:r,deleteds:s.deleted}}return e}function i(t){for(var e=top.document.getElementsByTagName("iframe"),i=0;i<e.length;i++){var n=e[i],o=n.contentWindow.gdoo;if("tab_iframe_dashboard"==n.id)Object.values(o.widgets).forEach((function(t){t.remoteData()}));else if(o&&o.grids){var s=o.grids;s[t]&&s[t].grid.remoteData()}}}t.gridListData=e;var n={bill_url:"",audit:function(t){var n=$("#"+t),o=n.find("#master_key").val(),s=n.find("#master_run_id").val(),r=n.find("#master_step_id").val(),a=n.find("#master_run_log_id").val(),l=$("#"+t).find("#master_uri").val(),c=app.url(l+"/flowAudit",{key:o,run_id:s,step_id:r,run_log_id:a});$.dialog({title:"单据审批",url:c,buttons:[{text:"取消",class:"btn-default",click:function(){$(this).dialog("close")}},{text:"提交",class:"btn-info",click:function(){var n=$("#myturn,#"+t).serialize(),o=e(t);if(!1!==o){var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(l+"/flowAudit"),n+"&"+$.param(o),(function(e){e.status?(i(t),toastrSuccess(e.data),e.url&&(location.href=e.url)):toastrError(e.data)}),"json").complete((function(){layer.close(s)}))}}}]})},draft:function(t){var n=$("#"+t).find("#master_uri").val(),o=$("#myturn,#"+t).serialize(),s=e(t);if(!1!==s){var r=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4}),a=gdoo.event.get("grid."+t);$.post(app.url(n+"/flowDraft"),o+"&"+$.param(s),(function(e){a.exist("onSaveAfter")&&(e=a.trigger("onSaveAfter",e)),e.status?(i(t),toastrSuccess(e.data),e.url&&(location.href=e.url)):toastrError(e.data)}),"json").complete((function(){layer.close(r)}))}},remove:function(t){$.messager.confirm("操作警告","确定要删除吗?",(function(e){1==e&&$.post(t,(function(t){t.status?(toastrSuccess(t.data),location.reload()):toastrError(t.data)}),"json")}))},store:function(t){var n=$("#"+t).find("#master_uri").val(),o=$("#"+t).serialize(),s=e(t);if(!1!==s){var r=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(n+"/store"),o+"&"+$.param(s),(function(e){e.status?(i(t),toastrSuccess(e.data),e.url&&(location.href=e.url)):toastrError(e.data)}),"json").complete((function(){layer.close(r)}))}},read:function(t){var e=$("#"+t).find("#master_uri").val(),n=$("#"+t).serialize(),o=layer.msg("数据提交中...",{icon:16,shade:.1});$.post(app.url(e+"/flowRead"),n,(function(e){e.status?(i(t),toastrSuccess(e.data),location.reload()):toastrError(e.data)}),"json").complete((function(){layer.close(o)}))},reset:function(t){$.messager.confirm("操作警告","确定要重置流程吗",(function(e){if(1==e){var i=$("#"+t).find("#master_uri").val(),n=$("#"+t).serialize(),o=layer.msg("数据提交中...",{icon:16,shade:.1});$.post(app.url(i+"/flowReset"),n,(function(t){t.status?location.reload():toastrError(t.data)}),"json").complete((function(){layer.close(o)}))}}))},auditLog:function(t){var e=app.url("index/workflow/flowLog",{key:t});$.dialog({title:"审批记录",dialogClass:"modal-lg",url:e,buttons:[{text:"取消",class:"btn-default",click:function(){$(this).dialog("close")}}]})},revise:function(t){formDialog({title:"流程修正",url:app.url("index/workflow/flowRevise",{key:t}),dialogClass:"modal-md",id:"revise-form",success:function(t){toastrSuccess(t.data),location.reload(),$(this).dialog("close")},error:function(t){toastrError(t.data)}})},recall:function(t){var e=$("#"+t).find("#master_key").val(),n=$("#"+t).find("#master_uri").val(),o=$("#"+t).find("#master_recall_log_id").val(),s=app.url(n+"/recall",{key:e,log_id:o});$.dialog({title:"撤回单据",url:s,buttons:[{text:"取消",class:"btn-default",click:function(){$(this).dialog("close")}},{text:"提交",class:"btn-info",click:function(){var e=$("#myrecall").serialize(),o=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(n+"/recall"),e,(function(e){e.status?(i(t),toastrSuccess(e.data),location.reload()):toastrError(e.data)}),"json").complete((function(){layer.close(o)}))}}]})},abort:function(t){var e=$("#"+t).find("#master_key").val(),n=$("#"+t).find("#master_uri").val(),o=app.url(n+"/abort",{key:e});$.dialog({title:"弃审单据",url:o,buttons:[{text:"取消",class:"btn-default",click:function(){$(this).dialog("close")}},{text:"提交",class:"btn-info",click:function(){var e=$("#myabort").serialize(),o=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(n+"/abort"),e,(function(e){e.status?(i(t),toastrSuccess(e.data),location.reload()):toastrError(e.data)}),"json").complete((function(){layer.close(o)}))}}]})},audit2:function(t){var e=$("#"+t).find("#master_key").val(),n=$("#"+t).find("#master_uri").val();$.messager.confirm("操作警告","确定要审核单据吗",(function(o){if(1==o){var s=layer.msg("数据提交中...",{icon:16,shade:.1});$.post(app.url(n+"/audit"),{key:e},(function(e){e.status?(i(t),toastrSuccess(e.data),location.reload()):toastrError(e.data)}),"json").complete((function(){layer.close(s)}))}}))},abort2:function(t){var e=$("#"+t).find("#master_key").val(),n=$("#"+t).find("#master_uri").val();$.messager.confirm("操作警告","确定要弃审单据吗",(function(o){if(1==o){var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:3e4});$.post(app.url(n+"/abort"),{key:e},(function(e){e.status?(i(t),top.$.toastr("success",e.data),location.reload()):top.$.toastr("error",e.data)}),"json").complete((function(){layer.close(s)}))}}))},createRow:function(e){var i=gdoo.forms[e],n=t[e+".onCreateRow"];if("function"==typeof n&&!1===n.call(i,e))return!1;i.api.memoryStore.create({})},deleteRow:function(e){var i=gdoo.forms[e],n=t[e+".onDeleteRow"];if("function"==typeof n&&!1===n.call(i,e))return!1;var o=i.api.getSelectedNodes();if(o&&1===o.length){var s=o[0];i.api.deleteRow(s.data),i.api.forEachNode((function(t){t.childIndex!==s.childIndex||t.setSelected(!0)}))}},quickFilter:function(t){var e=gdoo.forms[t],i=$("#"+t+"_quick_filter_text"),n=i.dialog({title:'<i class="fa fa-filter"></i> 过滤'+e.tableTitle,modalClass:"no-padder",dialogClass:"modal-sm",buttons:[{text:"确定",classed:"btn-info",click:function(){e.api.setQuickFilter(i.find("input").val()),n.dialog("close")}},{text:"取消",classed:"btn-default",click:function(){n.dialog("close")}}]}).on("keydown",(function(t){13==t.keyCode&&(e.api.setQuickFilter(i.find("input").val()),n.dialog("close"))}))},closeRow:function(t){var e=this,i=gdoo.forms[t],n=i.api.getSelectedRows();if(n.length>0){var o=n[0].id;top.$.messager.confirm("操作提醒","是否要关闭选中的行数据?",(function(n){if(1==n){var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(e.bill_url+"/closeRow"),{table:t,id:o},(function(t){t.status?(toastrSuccess(t.data),i.remoteData()):toastrError(t.data)}),"json").complete((function(){layer.close(s)}))}}))}else toastrError("最少选择一行记录。")},closeAllRow:function(t){var e=this,i=gdoo.forms[t],n=[];i.api.forEachNode((function(t){n.push(t.data.id)})),n.length>0?top.$.messager.confirm("操作提醒","是否要关闭所有行数据?",(function(o){if(1==o){var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(app.url(e.bill_url+"/closeAllRow"),{table:t,ids:n},(function(t){t.status?(toastrSuccess(t.data),i.remoteData()):toastrError(t.data)}),"json").complete((function(){layer.close(s)}))}})):toastrError("最少选择一行记录。")}};t.flow=n}(window),function(t){window.gridAction=function(e,i){this.name=i,this.table=e,this.routes={},this.dialogType="dialog",this.show=function(e,i,n){var o=this;if(1!=e.flow_form_edit){var s=app.url(o.bill_url+"/show",{id:e.master_id});"dialog"==o.dialogType?viewDialog({title:o.name,dialogClass:"modal-lg",url:s,close:function(){t(this).dialog("close")}}):(isEmpty(i)&&(i=o.bill_url.replace(/\//g,"_")+"_show"),isEmpty(n)&&(n=o.name),top.addTab(o.bill_url+"/show?id="+e.master_id,i,n))}else o.audit(e)},this.import=function(){var e=this,i=gdoo.grids[e.table].grid;formDialog({title:"数据导入",url:app.url(e.bill_url+"/import"),dialogClass:"modal-md",id:"import-dialog",onSubmit:function(){var n=new FormData;n.append("file",t("#import_file")[0].files[0]);var o=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});t.ajax({url:app.url(e.bill_url+"/import"),type:"POST",data:n,processData:!1,contentType:!1,complete:function(){layer.close(o)},success:function(e){e.status?(t("#modal-import-dialog").dialog("close"),i.remoteData(),toastrSuccess(e.data)):toastrError(e.data)}})}})},this.delete=function(){var e=this,i=gdoo.grids[e.table].grid,n=i.api.getSelectedRows(),o=[];if(t.each(n,(function(t,e){o.push(e.master_id)})),o.length>0){var s=o.length+"个"+e.name+"将被删除?";top.$.messager.confirm("删除"+e.name,s,(function(n){if(1==n){var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});t.post(app.url(e.bill_url+"/delete"),{id:o},(function(t){t.status?(toastrSuccess(t.data),i.remoteData()):toastrError(t.data)}),"json").complete((function(){layer.close(s)}))}}))}else toastrError("最少选择一行记录。")},this.created_by=function(e){var i=gdoo.grids[this.table].grid;formDialog({title:"私信",url:app.url("user/message/create",{user_id:e.id}),storeUrl:app.url("model/form/store"),id:"user_message",dialogClass:"modal-md",success:function(e){toastrSuccess(e.data),i.remoteData(),t(this).dialog("close")},error:function(t){toastrError(t.data)}})},this.create=function(){var e=this,i=gdoo.grids[e.table].grid;if("dialog"==e.dialogType)formDialog({title:"新建"+e.name,url:app.url(e.bill_url+"/create"),storeUrl:app.url(e.bill_url+"/store"),id:e.table,table:e.table,dialogClass:"modal-lg",success:function(e){toastrSuccess(e.data),i.remoteData(),t(this).dialog("close")},error:function(t){toastrError(t.data)}});else{var n=e.bill_url.replace(/\//g,"_")+"_show";top.addTab(e.bill_url+"/create",n,e.name)}},this.edit=function(e){var i=this,n=gdoo.grids[i.table].grid;if("dialog"==i.dialogType)formDialog({title:"编辑"+i.name,url:app.url(i.bill_url+"/edit",{id:e.master_id}),storeUrl:app.url(i.bill_url+"/store"),id:i.table,table:i.table,dialogClass:"modal-lg",success:function(e){toastrSuccess(e.data),n.remoteData(),t(this).dialog("close")},error:function(t){toastrError(t.data)}});else{var o=i.bill_url.replace(/\//g,"_")+"_show";top.addTab(i.bill_url+"/edit?id="+e.master_id,o,i.name)}},this.audit=function(e){var i=this,n=gdoo.grids[i.table].grid;if("dialog"==i.dialogType)formDialog({title:"审核"+i.name,url:app.url(i.bill_url+"/audit",{id:e.master_id}),storeUrl:app.url(i.bill_url+"/store"),id:i.table,table:i.table,dialogClass:"modal-lg",success:function(e){toastrSuccess(e.data),n.remoteData(),t(this).dialog("close")},error:function(t){toastrError(t.data)}});else{var o=i.bill_url.replace(/\//g,"_")+"_show";top.addTab(i.bill_url+"/audit?id="+e.master_id,o,i.name)}},this.batchEdit=function(){var e=gdoo.grids[this.table].grid,i=e.api.getSelectedRows(),n=[];t.each(i,(function(t,e){n.push(e.master_id)})),n.length>0?formDialog({title:"批量编辑",dialogClass:"modal-sm",id:"batch-edit-form",url:app.url(this.bill_url+"/batchEdit",{ids:n.join(",")}),success:function(i){toastrSuccess(i.data),e.remoteData(),t(this).dialog("close")},close:function(){t(this).dialog("close")}}):toastrError("最少选择一行记录。")},this.export=function(){LocalExport(gdoo.grids[this.table].grid,this.name)},this.filter=function(){var e=gdoo.grids[this.table],i=e.grid,n=e.search;t(n.advanced.el).dialog({title:"高级搜索",modalClass:"no-padder",buttons:[{text:"取消",class:"btn-default",click:function(){t(this).dialog("close")}},{text:"确定",class:"btn-info",click:function(){var e=n.advanced.el.serializeArray(),o={};return n.queryType="advanced",t.map(e,(function(t){o[t.name]=t.value})),o.page=1,i.remoteData(o),t(this).dialog("close"),!1}}]})}}}(jQuery);var select2List={};$((function(){var t=$(document);t.ajaxError((function(t,e){e.responseJSON&&toastrError(e.responseJSON.message)}));var e=t.find(".input-select2");e.length&&e.select2(),t.tooltip({container:"body",placement:"auto",selector:".hinted",delay:{show:200,hide:0}}),$(".select-all").on("click",(function(){var t=$(".select-row").closest("tr");$(this).prop("checked")?t.addClass("success"):t.removeClass("success"),$(".select-row").prop("checked",$(this).prop("checked"))})),t.on("click",'[data-toggle="closetab"]',(function(){if(window.name)var t=window.name.replace("iframe_","");else t=$(this).data("id");top.$.addtabs.close({id:"tab_"+t})})),$(".table tbody tr").on("click",(function(t){var e=$(this),i=e.find(".select-row"),n=i.prop("checked");function o(t){t?e.addClass("success"):e.removeClass("success"),i.prop("checked",t)}0!=i.length&&("INPUT"==t.target.tagName&&o(n),"DIV"==t.target.tagName&&o(!n),"TD"==t.target.tagName&&o(!n))})),t.on("change",'[data-toggle="redirect"]',(function(){var t=$(this).data("url"),e=$(this).attr("id"),i=$(this).find("option:selected").val();location.href=t.replace(new RegExp("("+e+"=)[^&]*","g"),"$1"+i)})),t.on("click.dialog.search",'[data-toggle="dialog-clear"]',(function(){var t=$(this).data();$("#"+t.id).val(""),$("#"+t.id+"_text").val(""),gdoo.event.get(t.id).trigger("clear",t)})),t.on("click.dialog.view",'[data-toggle="dialog-view"]',(function(){var t=$(this).data(),e={};$.each(t,(function(t,i){if("url"==t||"title"==t||"toggle"==t)return!0;e[t]=i}));var i=gdoo.formKey(t);gdoo.event.get(i.key).trigger("open",t,e);var n=t.url,o=t.title;n=app.url(n,e);$.dialog({title:o,url:n,dialogClass:"modal-lg",buttons:[{text:"确定",class:"btn-default",click:function(){var t=gdoo.dialogs[i.id]||{};"function"==typeof t.writeSelected?!0===t.writeSelected()&&$(this).dialog("close"):$(this).dialog("close")}}]})}));var i=t.find(".gdoo-dialog-input");i.length&&i.gdooDialogInput(),t.on("click.dialog.image",'[data-toggle="dialog-image"]',(function(){var t=$(this).data();$.dialog({title:t.title,html:'<img style="text-align:center;max-width:100%;" src="'+t.url+'" />',buttons:[{text:"确定",class:"btn-default",click:function(){$(this).dialog("close")}}]})})),t.on("click.dialog.form",'[data-toggle="dialog-form"]',(function(){var t=$(this).data();t.id=t.id||"myform",t.size=t.size||"md",$.dialog({title:t.title,url:t.url,dialogClass:"modal-"+t.size,buttons:[{text:"取消",class:"btn-default",click:function(){"function"==typeof error?error.call(this,res):$(this).dialog("close")}},{text:"保存",class:"btn-info",click:function(){var e=this,i=$("#"+t.id).attr("action"),n=$("#"+t.id).serialize();$.post(i,n,(function(t){"function"==typeof success?success.call(e,t):t.status?"reload"==t.data?window.location.reload():(toastrSuccess(t.data),$(e).dialog("close")):toastrError(t.data)}),"json")}}]})})),t.on("click.date",'[data-toggle="date"]',(function(){var t=$(this).data(),e={};e.dateFmt=t.format||"yyyy-MM-dd";var i=window[this.id+".onpicked"];"function"==typeof i&&(e.onpicked=i),t.dchanging&&(e.dchanging=t.dchanging),datePicker(e)})),t.on("click.datetime",'[data-toggle="datetime"]',(function(){var t=$(this).data(),e={};e.dateFmt=t.format||"yyyy-MM-dd",t.dchanging&&(e.dchanging=t.dchanging),datePicker(e)})),t.on("click.frame.close",'[data-toggle="layer-frame-close"]',(function(){layerFrameClose()})),t.on("click.frame.url",'[data-toggle="layer-frame-url"]',(function(){var t=$(this).data("url"),e=$(this).data("title")||!1,i=$(this).data("skin")||"frame",n=$(this).data("close")||!1;layer.open({skin:"layui-layer-"+i,scrollbar:!1,closeBtn:n,title:e,type:2,move:!1,area:["100%","100%"],content:t})})),t.on("click.tab.frame",'[data-toggle="tab-frame-url"]',(function(){var t=$(this).data("url"),e=$(this).data("id"),i=$(this).data("name");top.addTab(t,e,i)})),t.on("click",'[data-toggle="media-delete"]',(function(){var t=$(this).parent();$(this).closest(".media-controller").find(".media-item").length>1?t.remove():(t.find("img").attr("src",app.url("assets/images/nopic.jpg")),t.find("input").val(""))})),$("a.image-show").hover((function(t){var e=$(this).data(),i=$('<p id="image"><img src="'+e.url+'" alt="" /></p>');$("body").append(i),$(this).find("img").stop().fadeTo("slow",.5);var n=$(window),o=$(document).find("#image"),s=o.height(),r=o.width(),a=(n.scrollLeft(),n.width(),n.scrollTop()+(n.height()-s)/2+"px"),l=$(this).offset();o.css({left:l.left+100,top:a}),o.fadeIn("fast")}),(function(){$(this).find("img").stop().fadeTo("slow",1),$("#image").remove()})),$("#table-sortable tbody").sortable({delay:50,cursor:"move",axis:"y",items:"tr",handle:"td.move",helper:function(t,e){return e.children().each((function(){$(this).width($(this).width())})),e},stop:function(t,e){},start:function(t,e){e.placeholder.outerHeight(e.item.outerHeight())},update:function(){var t=$(this).parent().attr("url"),e=$(this).sortable("toArray");$.post(t,{sort:e},(function(t){toastrSuccess(t.data)}))}})}));var app={confirm:function(t,e,i){i=i||"操作警告",$.messager.confirm(i,e,(function(e){1==e&&(location.href=t)}))},alert:function(t,e){$.messager.alert(t,e)},url:function(t,e){return"/"==t?settings.public_url:(query=""==e||void 0===e?"":"?"+$.param(e),settings.public_url+"/"+t+query)},redirect:function(t,e){return window.location.href=app.url(t,e)},pinyin:function(t,e,i){i=i||"first",""==$("#"+e).val()&&$.get(app.url("index/api/pinyin?type="+i+"&id="+Math.random()),{name:$("#"+t).val()},(function(t){$("#"+e).val(t)}))}},uploader={file:function(t){var e=$("#"+t).find(".id").val();location.href=app.url("index/attachment/download",{id:e})},cancel:function(t){var e=$("#"+t).find(".id").val();if(e>0){var i=$("#"+t).find(".file-name a").text();$.messager.confirm("删除文件","确定要删除 <strong>"+i+"</strong> 此文件吗",(function(i){1==i&&$.get(app.url("index/attachment/delete"),{id:e},(function(e){1==e&&$("#"+t).remove()}))}))}else $("#"+t).remove()},insert:function(t){var e=$("#"+t).find(".id").val(),i=$("#"+t).find(".file-name a").text();if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(i))var n='<img src="'+app.url("index/attachment/show",{id:e})+'" title="'+i+'">';else n='<a href="'+app.url("index/attachment/download",{id:e})+'" title="'+i+'">'+i+"</a>";UE.getEditor("content").execCommand("insertHtml",n)}};function mediaDialog(t,e,i,n){var o={id:i,name:e,multi:n};t=app.url(t,o);$.dialog({title:"媒体管理",url:t,dialogClass:"modal-lg",buttons:[{text:'<i class="fa fa-remove"></i> 取消',class:"btn-default",click:function(){$(this).dialog("close")}},{text:'<i class="fa fa-check"></i> 确定',class:"btn-info",click:function(){window.saveMedia&&(window.saveMedia.call(this,o),$(this).dialog("close"))}}]})}function viewBox(t,e,i,n){n=n||"md",$.dialog({title:e,url:i,dialogClass:"modal-"+n,buttons:[{text:"确定",class:"btn-default",click:function(){$(this).dialog("close")}}]})}var viewDialogIndex=0;function viewDialog(t){void 0===t.id&&(t.id="view-dialog-"+viewDialogIndex,viewDialogIndex++);var e=$("#modal-"+t.id);e.length>0&&e.dialog("show");var i={title:name,url,buttons:[{text:"确定",class:"btn-default",click:function(){$(this).dialog("close")}}]},n=$.extend({},i,t);$.dialog(n)}var formDialogIndex=0;function formDialog(t){void 0===t.id&&(t.id="form-dialog-"+formDialogIndex,formDialogIndex++);var e=$("#modal-"+t.id);if(e.length>0)e.dialog("show");else{var i={title:"formDialog",backdrop:"static",buttons:[{text:"取消",class:"btn-default",click:function(){"function"==typeof error?error.call(this):$(this).dialog("close")}},{text:"保存",class:"btn-info",click:function(){var t=this,e=t.options;if("function"==typeof e.onSubmit)e.onSubmit.call(t);else{if(t.options.storeUrl)var i=t.options.storeUrl;else i=$("#"+e.id).attr("action");var n=$("#"+e.id).serialize(),o=gridListData(e.table);if(!1===o)return;var s=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});$.post(i,n+"&"+$.param(o),(function(i){i.status?"function"==typeof e.success&&e.success.call(t,i):"function"==typeof e.error&&e.error.call(t,i)}),"json").complete((function(){layer.close(s)}))}}}]},n=$.extend({},i,t);$.dialog(n)}}function niceTime(t){var e=(new Date).getTime(),i=parseInt((e-1e3*t)/1e3);return i>=0&&i<60?i+"秒前":i>=60&&i<3600?parseInt(i/60)+"分钟前":i>=3600&&i<86400?parseInt(i/3600)+"小时前":parseInt(i/86400)+"天前"}function ucfirst(t){return t?t[0].toUpperCase()+t.substr(1):t}function digitUppercase(t){var e=["角","分"],i=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],n=[["元","万","亿"],["","拾","佰","仟"]],o=t<0?"欠":"";t=Math.abs(t);for(var s="",r=0;r<e.length;r++)s+=(i[Math.floor(10*t*Math.pow(10,r))%10]+e[r]).replace(/零./,"");s=s||"整",t=Math.floor(t);for(r=0;r<n[0].length&&t>0;r++){for(var a="",l=0;l<n[1].length&&t>0;l++)a=i[t%10]+n[1][l]+a,t=Math.floor(t/10);s=a.replace(/(零.)*零$/,"").replace(/^$/,"零")+n[0][r]+s}return o+s.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")}function number_format(t,e,i,n){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+t)?+t:0,s=isFinite(+e)?Math.abs(e):0,r=void 0===n?",":n,a=void 0===i?".":i,l="";return(l=(s?function(t,e){if(-1===(""+t).indexOf("e"))return+(Math.round(t+"e+"+e)+"e-"+e);var i=(""+t).split("e"),n="";return+i[1]+e>0&&(n="+"),(+(Math.round(+i[0]+"e"+n+(+i[1]+e))+"e-"+e)).toFixed(e)}(o,s).toString():""+Math.round(o)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(l[1]||"").length<s&&(l[1]=l[1]||"",l[1]+=new Array(s-l[1].length+1).join("0")),l.join(a)}function isEmpty(t){try{if(""==t||null==t||null==t)return!0;if("number"==typeof t)return!!isNaN(t);if("boolean"==typeof t||"function"==typeof t||t instanceof Date||t instanceof RegExp)return!1;if("string"==typeof t)return 0==t.trim().length;if("object"===_typeof2(t)){if(t instanceof Array)return 0==t.length;if(t instanceof Object)return 0==Object.getOwnPropertyNames(t).length}}catch(t){return!1}}function isNotEmpty(t){return!isEmpty(t)}function delHtmlTag(t){return t.replace(/<[^>]+>/g,"")}function isWeiXin(){return"micromessenger"==window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)}function toastrSuccess(t){isWeiXin()?$.toastr("success",t):top.$.toastr("success",t)}function toastrError(t){isWeiXin()?$.toastr("error",t):top.$.toastr("error",t)}function url(t,e){return query=""==e||void 0===e?"":"?"+$.param(e),settings.public_url+"/"+t+query}function format_datetime(t){function e(t){return t<10?"0"+t:t}t=1e3*parseInt(t);var i=new Date(t),n=i.getFullYear(),o=i.getMonth()+1,s=i.getDate(),r=i.getHours(),a=i.getMinutes();i.getSeconds();return n+"-"+e(o)+"-"+e(s)+" "+e(r)+":"+e(a)}function format_date(t){function e(t){return t<10?"0"+t:t}t=1e3*parseInt(t);var i=new Date(t),n=i.getFullYear(),o=i.getMonth()+1,s=i.getDate();i.getHours(),i.getMinutes(),i.getSeconds();return n+"-"+e(o)+"-"+e(s)}function ajaxSubmit(t,e){$("#"+t+"-form-submit").on("click",(function(){var i=$("#"+t),n=i.attr("action"),o=i.serialize(),s={};if(!1!==(s=gridListData(t))){o=o+"&"+$.param(s);var r=layer.msg("数据提交中...",{icon:16,shade:.1,time:12e4});return $.post(n,o,(function(t){"function"==typeof e?e(t):t.status?(toastrSuccess(t.data),t.url&&(self.location.href=t.url)):toastrError(t.data)}),"json").complete((function(){layer.close(r)})),!1}}))}function layerFrameClose(){var t=parent.layer.getFrameIndex(window.name);parent.layer.close(t)}function fileFormatSize(t){return t<1024?t+"B":t<1048576?(t/1024).toFixed(2)+"KB":t<1073741824?(t/1048576).toFixed(2)+"MB":(t/1073741824).toFixed(2)+"GB"}function FindFile(t,e){$.post(app.url("index/attachment/draft"),{key:e},(function(e){var i=[],n="#fileDraft_"+t,o=$(n).find(".id");$.each(o,(function(t,e){i.push($(this).val())})),$.each(e,(function(t,e){if(-1==i.indexOf(e.id+"")){e.size=fileFormatSize(e.size);var o=template("uploader-item-tpl",e);$(n).append(o)}}))}))}function toNumber(t){return t=parseFloat(t),isNaN(t)?0:isFinite(t)?t:0}function StringBuilder(){this._stringArray=new Array}function LocalExport(t,e){if(0!=t.api.getDisplayedRowCount()){var i=[];$.each(t.columnDefs,(function(t,e){1!=e.checkboxSelection&&'"actionCellRenderer"'!=e.cellRenderer&&i.push(e)}));var n=function t(e){var i=[];return $.each(e,(function(e,n){if(null!=n.children){var o=n.children;$.each(t(o),(function(t,e){i.push(e)}))}else i.push(n)})),i}(i),o=function(t){var e=[];return u(t,0,e),e}(i);console.log("开始导出任务:"+e);var s=new StringBuilder,r=o.length-1;$.each(o,(function(t,e){var i=e;s.appendLine('<tr style="font-weight:bold;white-space:nowrap;">'),$.each(i,(function(e,i){var n=toNumber(i.rowspan),o=toNumber(i.colspan);r>t&&null==i.children&&(n+=t+1);var a='<td colspan="'+o+'" rowspan="'+n+'"',l=["text-align:center"];"序号"==i.headerName&&l.push("mso-number-format:'@'"),a=(a=a+' style="'+l.join(";")+'"')+">"+i.headerName+"</td>",s.appendLine(a)})),s.appendLine("</tr>")}));var a=0;t.api.forEachNode((function(t,e){var i=t.data;s.append("<tr>"),a++,$.each(n,(function(t,e){var n;n=null==e.field?"":i[e.field]||"","htmlCellRenderer"==e.cellRenderer&&(n=delHtmlTag(n)),"序号"==e.headerName&&(n=a);var o=[];if("number"==e.type){var r=e.numberOptions||{},l=null==r.places?2:r.places;n=parseFloat(n),n=isNaN(n)?0:n.toFixed(l)}else"date"==e.form_type||o.push("mso-number-format:'@'");s.appendLine('<td style="'+o.join(";")+'">'+n+"</td>")})),s.appendLine("</tr>")})),console.log("结束导出任务:"+e);var l='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>Sheet1</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body><table>'+s.toString(" ")+"</table></body></html>",c=new Date;!function(t,e){var i=document.createElement("a");i.download=e;var n=new Blob([t]);i.href=URL.createObjectURL(n),document.body.appendChild(i),i.click(),document.body.removeChild(i)}(l,e+"-"+[c.getFullYear(),c.getMonth()+1,c.getDate()].join("-")+".xls")}else toastrError("表格无数据,无法导出.");function u(t,e,i){var n=null;i.length>e?n=i[e]:(n=[],i.push(n)),$.each(t,(function(t,o){var s=o.children;null!=s&&(o.colspan=s.length,u(s,e+1,i)),o.rowspan=1,n.push(o)}))}}function LocalTableExport(t,e){var i=$("#"+t),n=!!i.hasClass("table2excel_with_colors"),o=new Date,s=[o.getFullYear(),o.getMonth()+1,o.getDate()].join("-");i.table2excel({exclude:".noExl",name:e,filename:e+s+".xls",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0,preserveColors:n})}function regionSelect(){var t=arguments,e={a1:"省",a2:"市",a3:"县"};function i(t,e,i,n){$.get(app.url("index/api/region",{layer:e,parent_id:i}),(function(e){var i="";$.map(e,(function(t){i+='<option value="'+t.id+'">'+t.name+"</option>"}));var o=$("#"+t).html(i);n>0&&o.val(n)}))}$("#"+t[0]).on("change",(function(){i(t[1],2,this.value,0),$("#"+t[1]).html('<option value="">'+e.a2+"</option>"),$("#"+t[2]).html('<option value="">'+e.a3+"</option>")})),$("#"+t[1]).on("change",(function(){i(t[2],3,this.value,0),$("#"+t[2]).html('<option value="">'+e.a3+"</option>")})),i(t[0],1,0,t[3]),t[3]&&(i(t[1],2,t[3],t[4]),t[4]&&i(t[2],3,t[4],t[5]))}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.replaceAll=function(t,e){return this.replace(new RegExp(t,"gm"),e)},StringBuilder.prototype.append=function(t){this._stringArray.push(t)},StringBuilder.prototype.appendLine=function(t){this._stringArray.push(t+"\n")},StringBuilder.prototype.toString=function(t){return this._stringArray.join(t)};
|