diff --git a/examples/dist/floweditor.js b/examples/dist/floweditor.js index 2359a5bc6..d28ebe00b 100644 --- a/examples/dist/floweditor.js +++ b/examples/dist/floweditor.js @@ -1 +1 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=488)}([function(e,t,n){"use strict";e.exports=n(469)},function(e,t,n){"use strict";n.d(t,"g",function(){return a}),n.d(t,"h",function(){return s}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return l}),n.d(t,"d",function(){return c}),n.d(t,"b",function(){return p}),n.d(t,"c",function(){return d}),n.d(t,"f",function(){return f}),n.d(t,"a",function(){return h});var o=n(24),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=/\s+(?=\S)/g,a=function(e){return e.reduce(function(e,t){return Object.assign({},e,(!0,(o=t)in(n={})?Object.defineProperty(n,o,{value:!0,enumerable:!0,configurable:!0,writable:!0}):n[o]=!0,n));var n,o},{})},s=function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},u=function(e){return e.toLowerCase().trim().replace(i,"_")},l=function(e){return e.replace(/\b\w+/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},c=function(e){return 0===e?"":"select-invalid"},p=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},d=function(e,t,i){if(!n.i(o.a)(e))return[];var a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1)return!0}}catch(e){l=!0,c=e}finally{try{!u&&d.return&&d.return()}finally{if(l)throw c}}}}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return!1},h=function(){return!0}},function(e,t,n){"use strict";var o=n(126),r=n(241),i=n(240);n.d(t,"a",function(){return o.a}),n.d(t,"g",function(){return r.a}),n.d(t,"c",function(){return o.b}),n.d(t,"b",function(){return o.c}),n.d(t,"h",function(){return r.b}),n.d(t,"e",function(){return i.a}),n.d(t,"f",function(){return r.c}),n.d(t,"d",function(){return i.b})},function(e,t,n){e.exports=n(385)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=t.distance=t.patch=t.absolute=t.negate=t.isEqual=t.subtract=t.add=void 0;var o=i(n(75)),r=i(n(42));function i(e){return e&&e.__esModule?e:{default:e}}t.add=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},t.subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},t.isEqual=function(e,t){return e.x===t.x&&e.y===t.y},t.negate=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},t.absolute=function(e){return{x:Math.abs(e.x),y:Math.abs(e.y)}},t.patch=function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n={},(0,r.default)(n,e,t),(0,r.default)(n,"x"===e?"y":"x",o),n};var a=t.distance=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};t.closest=function(e,t){return Math.min.apply(Math,(0,o.default)(t.map(function(t){return a(e,t)})))}},function(e,t,n){"use strict";var o=n(132),r=n(375),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,o=e.length;n1&&void 0!==arguments[1]?arguments[1]:o,n=void 0,r=[],i=void 0,a=!1,s=function(e,n){return t(e,r[n])};return function(){for(var t=arguments.length,o=Array(t),u=0;u{t=Object.assign({},t);const n=e=>{const n=t=>"string"==typeof t?e===t:t.test(e);return t.include?t.include.some(n):!t.exclude||!t.exclude.some(n)};for(const t of Object.getOwnPropertyNames(e.constructor.prototype)){const o=e[t];"constructor"!==t&&"function"==typeof o&&n(t)&&(e[t]=o.bind(e))}return e});const o=["componentWillMount","render","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","setState","forceUpdate"];e.exports.react=((t,n)=>((n=Object.assign({},n)).exclude=(n.exclude||[]).concat(o),e.exports(t,n)))},function(e,t,n){var o=n(87)("wks"),r=n(56),i=n(21).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){var o=n(484),r=n(485),i=r;i.v1=o,i.v4=r,e.exports=i},function(e,t,n){"use strict";var o=n(0),r=(n.n(o),n(77)),i=(n.n(r),n(169)),a=(n.n(i),function(){function e(e,t){for(var n=0;n0}),u=function(e){return a(e)&&function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&(t+=1);return t}(e)>0}},function(e,t,n){e.exports={default:n(278),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=(o=n(265))&&o.__esModule?o:{default:o};t.default=r.default||function(e){for(var t=1;t-1)return!1;if(o.filterOption)return o.filterOption.call(r,e,t);if(!t)return!0;var i=String(e[o.valueKey]),a=String(e[o.labelKey]);return o.ignoreAccents&&("label"!==o.matchProp&&(i=h(i)),"value"!==o.matchProp&&(a=h(a))),o.ignoreCase&&("label"!==o.matchProp&&(i=i.toLowerCase()),"value"!==o.matchProp&&(a=a.toLowerCase())),"start"===o.matchPos?"label"!==o.matchProp&&i.substr(0,t.length)===t||"value"!==o.matchProp&&a.substr(0,t.length)===t:"label"!==o.matchProp&&i.indexOf(t)>=0||"value"!==o.matchProp&&a.indexOf(t)>=0})}function m(e){var t=e.focusedOption,n=e.focusOption,o=e.inputValue,i=e.instancePrefix,a=(e.labelKey,e.onFocus),s=e.onOptionRef,u=e.onSelect,l=e.optionClassName,c=e.optionComponent,d=e.optionRenderer,f=e.options,h=e.removeValue,g=e.selectValue,m=e.valueArray,v=e.valueKey,y=c;return f.map(function(e,c){var f=m&&m.some(function(t){return t[v]==e[v]}),b=e===t,A=p()(l,{"Select-option":!0,"is-selected":f,"is-focused":b,"is-disabled":e.disabled});return r.a.createElement(y,{className:A,focusOption:n,inputValue:o,instancePrefix:i,isDisabled:e.disabled,isFocused:b,isSelected:f,key:"option-"+c+"-"+e[v],onFocus:a,onSelect:u,option:e,optionIndex:c,ref:function(e){s(e,b)},removeValue:h,selectValue:g},d(e,c,o))})}var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=(function(){function e(e){var t,n;function o(t,n){try{var i=e[t](n),a=i.value;a instanceof function(e){this.value=e}?Promise.resolve(a.value).then(function(e){o("next",e)},function(e){o("throw",e)}):r(i.done?"return":"normal",i.value)}catch(e){r("throw",e)}}function r(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?o(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(i,a){var s={key:e,arg:r,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,o(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(e){return this._invoke("next",e)},e.prototype.throw=function(e){return this._invoke("throw",e)},e.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),b=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},C=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},x=function(e){function t(e){y(this,t);var n=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return E(t,e),b(t,[{key:"blockEvent",value:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,o=e.optionIndex,i=p()(this.props.className,t.className);return t.disabled?r.a.createElement("div",{className:i,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):r.a.createElement("div",{className:i,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+o,title:t.title},this.props.children)}}]),t}(r.a.Component);x.propTypes={children:a.a.node,className:a.a.string,instancePrefix:a.a.string.isRequired,isDisabled:a.a.bool,isFocused:a.a.bool,isSelected:a.a.bool,onFocus:a.a.func,onSelect:a.a.func,onUnfocus:a.a.func,option:a.a.object.isRequired,optionIndex:a.a.number};var k=function(e){function t(e){y(this,t);var n=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return E(t,e),b(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return r.a.createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){return this.props.onClick||this.props.value.href?r.a.createElement("a",{className:"Select-value-label",href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):r.a.createElement("span",{className:"Select-value-label",role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return r.a.createElement("div",{className:p()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(r.a.Component);k.propTypes={children:a.a.node,disabled:a.a.bool,id:a.a.string,onClick:a.a.func,onRemove:a.a.func,value:a.a.object.isRequired};var O=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},S=a.a.oneOfType([a.a.string,a.a.node]),T=a.a.oneOfType([a.a.string,a.a.number]),P=1,D=function(e){function t(e){y(this,t);var n=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleRequired","handleTouchOutside","handleTouchMove","handleTouchStart","handleTouchEnd","handleTouchEndClearValue","handleValueClick","getOptionLabel","onOptionRef","removeValue","selectValue"].forEach(function(e){return n[e]=n[e].bind(n)}),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return E(t,e),b(t,[{key:"componentWillMount",value:function(){this._instancePrefix="react-select-"+(this.props.instanceId||++P)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:this.handleRequired(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){var t=this.getValueArray(e.value,e);e.required?this.setState({required:this.handleRequired(t[0],e.multi)}):this.props.required&&this.setState({required:!1})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var o=n.i(s.findDOMNode)(this.focused),r=n.i(s.findDOMNode)(this.menu),i=r.scrollTop,a=i+r.offsetHeight,u=o.offsetTop,l=u+o.offsetHeight;(i>u||af.bottom?p.scrollTop=c.offsetTop+c.clientHeight-p.offsetHeight:d.topt.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"handleRequired",value:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e,t){var n=this,o="object"===(void 0===t?"undefined":v(t))?t:this.props;if(o.multi){if("string"==typeof e&&(e=e.split(o.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,o)}).filter(function(e){return e})}var r=this.expandValue(e,o);return r?[r]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":v(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var o=t.options,r=t.valueKey;if(o)for(var i=0;io&&this.focusOption(n[o+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter(function(n){return n[t.props.valueKey]!==e[t.props.valueKey]})),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:this.handleInputValueChange("")},this.focus))}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,this.state.isOpen){if(t.length){for(var n=-1,o=0;o0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e)n=(r=n-this.props.pageSize)<0?0:r;else if("page_down"===e){var r;n=(r=n+this.props.pageSize)>t.length-1?t.length-1:r}-1===n&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}}else this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null)})}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return r.a.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},r.a.createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,o=this.props.valueRenderer||this.getOptionLabel,i=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:r.a.createElement("div",{className:"Select-placeholder"},this.props.placeholder);var a=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return r.a.createElement(i,{id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,disabled:n.props.disabled||!1===e.clearableValue,key:"value-"+t+"-"+e[n.props.valueKey],onClick:a,onRemove:n.removeValue,value:e},o(e,t),r.a.createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(a=null),r.a.createElement(i,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:a,value:e[0]},o(e[0])))}},{key:"renderInput",value:function(e,t){var n,o=this,i=p()("Select-input",this.props.inputProps.className),a=!!this.state.isOpen,s=p()((A(n={},this._instancePrefix+"-list",a),A(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),u=_({},this.props.inputProps,{role:"combobox","aria-expanded":""+a,"aria-owns":s,"aria-haspopup":""+a,"aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return o.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.inputRenderer)return this.props.inputRenderer(u);if(this.props.disabled||!this.props.searchable){var c=this.props.inputProps,d=(c.inputClassName,w(c,["inputClassName"])),f=p()(A({},this._instancePrefix+"-list",a));return r.a.createElement("div",_({},d,{role:"combobox","aria-expanded":a,"aria-owns":f,"aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return o.input=e},"aria-disabled":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?r.a.createElement(l.a,_({id:this.props.id},u,{minWidth:"5"})):r.a.createElement("div",{className:i,key:"input-wrap"},r.a.createElement("input",_({id:this.props.id},u)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.clearRenderer();return r.a.createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},t)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?r.a.createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterOptions",value:function(e){var t=this.state.inputValue,n=this.props.options||[];return this.props.filterOptions?("function"==typeof this.props.filterOptions?this.props.filterOptions:g)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey,trimFilter:this.props.trimFilter}):n}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,removeValue:this.removeValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?r.a.createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return O(e[t.props.valueKey])}).join(this.props.delimiter);return r.a.createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return r.a.createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:O(e[t.props.valueKey]),disabled:t.props.disabled})})}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,o=this.state.focusedOption||e;if(o&&!o.disabled){var r=-1;if(t.some(function(e,t){var i=e[n]===o[n];return i&&(r=t),i}),-1!==r)return r}for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:o,n=null,r=null;return function(){return function(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var o=t.length,r=0;r1?t-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:a;if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),o=0;o1&&void 0!==arguments[1]?arguments[1]:[],n=[].concat(c(t));if(this.props.localSearchOptions){var o=!0,r=!1,i=void 0;try{for(var a,s=this.props.localSearchOptions[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var u=a.value;(!e||u.name.toLowerCase().indexOf(e.toLowerCase())>-1)&&(n=this.addSearchResult(n,u))}}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}}return{options:n.sort(this.sortResults),complete:!0}}},{key:"loadOptions",value:function(e,t){var n=this;if(this.props.url)a.a.get(this.context.assetHost+this.props.url).then(function(o){var r=o.data.results.map(function(e){return{name:e.name,id:e.uuid,type:e.type}}),i=n.search(e,r);t(null,i)});else{var o=this.search(e);t(o)}}},{key:"onChange",value:function(e){var t=this;if(e){var o;o=e.constructor===Array?e:[e],n.i(s.b)(this.state.selections,o)||(this.props.onChange&&this.props.onChange(o),this.setState({selections:o},function(){return t.select.focus()}))}}},{key:"filterOption",value:function(e,t){return e.name.toLowerCase().indexOf(t.toLowerCase())>-1}},{key:"render",value:function(){var e=this,t=void 0;if(this.props.multi&&(t=[]),this.state.selections.length){var n=!0,i=!1,a=void 0;try{for(var s,u=this.state.selections[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value;if(l){var c=l.extraResult||this.props.multi?l:l.id;this.props.multi?t.push(c):t=c}}}catch(e){i=!0,a=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw a}}}var p={};return this.props.createPrompt&&(p.promptTextCreator=function(t){return e.props.createPrompt+t}),this.props.createNewOption&&(p.newOptionCreator=this.props.createNewOption),this.props.isValidNewOption&&(p.isValidNewOption=this.props.isValidNewOption),this.props.createNewOption?o.createElement(r.a,Object.assign({ref:this.selectRef,className:this.props.className,name:this.props.name,placeholder:this.props.placeholder,loadOptions:this.loadOptions,closeOnSelect:this.props.closeOnSelect,ignoreCase:!1,ignoreAccents:!1,value:t,openOnFocus:!0,cache:!1,valueKey:"id",labelKey:"name",multi:this.props.multi,clearable:this.props.multi,searchable:!0,onCloseResetsInput:!0,onBlurResetsInput:!0,filterOption:this.filterOption,onChange:this.onChange,searchPromptText:this.props.searchPromptText},p)):o.createElement(r.b,Object.assign({ref:this.selectRef,className:this.props.className,name:this.props.name,placeholder:this.props.placeholder,loadOptions:this.loadOptions,closeOnSelect:this.props.closeOnSelect,ignoreCase:!1,ignoreAccents:!1,value:t,openOnFocus:!0,cache:!1,valueKey:"id",labelKey:"name",multi:this.props.multi,clearable:this.props.multi,searchable:!0,onCloseResetsInput:!0,onBlurResetsInput:!0,filterOption:this.filterOption,onChange:this.onChange,searchPromptText:this.props.searchPromptText},p))}}]),t}();t.a=p,p.contextTypes={assetHost:u.d}},function(e,t,n){"use strict";var o=n(0),r=(n.n(o),n(24)),i=n(11),a=(n.n(i),n(70)),s=n(12),u=n(1),l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{label:""}).label;if(!e)return!1;var t=e.toLowerCase();return t.length>0&&t.length<=36&&/^[a-z0-9-][a-z0-9- ]*$/.test(t)},p=function(e){var t=e.label;return{id:n.i(i.v4)(),name:t,extraResult:!0}},d=function(e){var t=e.groups,o=e.localGroups;return n.i(r.a)(t)?t:n.i(r.a)(o)?o:[]},f=function(e){function t(e){!function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=d(e);return n.state={groups:o,errors:[]},n.onChange=n.onChange.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Component),l(t,[{key:"componentWillReceiveProps",value:function(e){n.i(r.a)(e.groups)&&!n.i(u.b)(e.groups,this.props.groups)&&this.setState({groups:e.groups})}},{key:"onChange",value:function(e){var t=this;n.i(u.b)(e,this.state.groups)||this.setState({groups:e},function(){return t.props.onChange&&t.props.onChange(e)})}},{key:"validate",value:function(){var e=[];return this.props.required&&!n.i(r.a)(this.state.groups)&&e.push(this.props.name+" is required"),this.setState({errors:e}),0===e.length}},{key:"render",value:function(){var e={};this.props.add&&(e.isValidNewOption=c,e.createNewOption=p,e.createPrompt="New group: ");var t=n.i(u.d)(this.state.errors.length),r=this.props.placeholder||"Enter the name of an existing group...",i=this.props.searchPromptText||"Enter the name of an existing group";return o.createElement(s.a,{name:this.props.name,errors:this.state.errors},o.createElement(a.a,Object.assign({className:t,onChange:this.onChange,name:this.props.name,url:this.props.endpoint,resultType:"group",localSearchOptions:this.props.localGroups,multi:!0,initial:this.state.groups,closeOnSelect:!1,placeholder:r,searchPromptText:i},e)))}}]),t}(),h=f;t.a=h,"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"isValidNewOption","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register(p,"createNewOption","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register(d,"getInitialGroups","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register("New group: ","GROUP_PROMPT","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register("Enter the name of an existing group...","GROUP_PLACEHOLDER","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register("Enter the name of an existing group","GROUP_NOT_FOUND","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register(f,"GroupElement","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"),__REACT_HOT_LOADER__.register(h,"default","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/lib/component/form/GroupElement.tsx"))},function(e,t,n){"use strict";var o,r;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r}),function(e){e.exp="exp",e.group="group",e.msg="msg",e.flow="flow"}(o||(o={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT"}(r||(r={})),"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(o,"WaitType","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/flowTypes.ts"),__REACT_HOT_LOADER__.register(r,"Methods","/Users/ycleptkellan/Code/Nyaruka/Forks/floweditor/src/flowTypes.ts"))},function(e,t,n){e.exports=n(247)},function(e,t,n){"use strict";(function(t){var o=n(5),r=n(261),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:("undefined"!=typeof XMLHttpRequest?s=n(128):void 0!==t&&(s=n(128)),s),transformRequest:[function(e,t){return r(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],function(e){u.headers[e]={}}),o.forEach(["post","put","patch"],function(e){u.headers[e]=o.merge(i)}),e.exports=u}).call(t,n(103))},function(e,t,n){"use strict";t.__esModule=!0;var o,r=(o=n(264))&&o.__esModule?o:{default:o};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tdocument.F=Object<\/script>"),e.close(),u=e.F;o--;)delete u.prototype[i[o]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:r(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(22).f,r=n(28),i=n(10)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(87)("keys"),r=n(56);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(21),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(43);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(21),r=n(6),i=n(82),a=n(91),s=n(22).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(10)},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var o=n(326),r=n(153),i=n(41),a=n(39),s=n(30),u=n(49),l=n(324),c=n(95),p=n(329),d=n(8)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,g,m,v,y){l(n,t,g);var b,A,_,E=function(e){if(!f&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",C="values"==m,x=!1,k=e.prototype,O=k[d]||k["@@iterator"]||m&&k[m],S=O||E(m),T=m?C?E("entries"):S:void 0,P="Array"==t&&k.entries||O;if(P&&(_=p(P.call(new e)))!==Object.prototype&&_.next&&(c(_,w,!0),o||s(_,d)||a(_,d,h)),C&&O&&"values"!==O.name&&(x=!0,S=function(){return O.call(this)}),o&&!y||!f&&!x&&k[d]||a(k,d,S),u[t]=S,u[w]=h,m)if(b={values:C?S:E("values"),keys:v?S:E("keys"),entries:T},y)for(A in b)A in k||i(k,A,b[A]);else r(r.P+r.F*(f||x),t,b);return b}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(40).f,r=n(30),i=n(8)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(161)("keys"),r=n(60);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(23);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){e.exports={title:"NodeEditor__title___3f3Qu",instructions:"NodeEditor__instructions___3pZ-N",intro:"NodeEditor__intro___22n4O",node_editor:"NodeEditor__node_editor___2JCFF",nodeEditor:"NodeEditor__node_editor___2JCFF",type_chooser:"NodeEditor__type_chooser___2QWkC",typeChooser:"NodeEditor__type_chooser___2QWkC",type_chooser_switch:"NodeEditor__type_chooser_switch___1bVf6",typeChooserSwitch:"NodeEditor__type_chooser_switch___1bVf6",advanced:"NodeEditor__advanced___30ZfR",header:"NodeEditor__header___1BKq4",translating_exits:"NodeEditor__translating_exits___36ukX",translatingExits:"NodeEditor__translating_exits___36ukX",translating_exit:"NodeEditor__translating_exit___20uFF",translatingExit:"NodeEditor__translating_exit___20uFF",translating_from:"NodeEditor__translating_from___1LEc4",translatingFrom:"NodeEditor__translating_from___1LEc4",translating_to:"NodeEditor__translating_to___2nf7y",translatingTo:"NodeEditor__translating_to___2nf7y"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t0&&t-1 in e)}b.fn=b.prototype={jquery:"3.1.1",constructor:b,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+M+")"+M+"*"),W=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),G=new RegExp(B),q=new RegExp("^"+F+"$"),Q={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var o="0x"+t-65536;return o!=o||n?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{j.apply(T=R.call(_.childNodes),_.childNodes),T[_.childNodes.length].nodeType}catch(e){j={apply:T.length?function(e,t){D.apply(e,R.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function ie(e,t,o,r){var i,s,l,c,p,h,v,y=t&&t.ownerDocument,E=t?t.nodeType:9;if(o=o||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return o;if(!r&&((t?t.ownerDocument||t:_)!==f&&d(t),t=t||f,g)){if(11!==E&&(p=$.exec(e)))if(i=p[1]){if(9===E){if(!(l=t.getElementById(i)))return o;if(l.id===i)return o.push(l),o}else if(y&&(l=y.getElementById(i))&&b(t,l)&&l.id===i)return o.push(l),o}else{if(p[2])return j.apply(o,t.getElementsByTagName(e)),o;if((i=p[3])&&n.getElementsByClassName&&t.getElementsByClassName)return j.apply(o,t.getElementsByClassName(i)),o}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))){if(1!==E)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=A),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),y=J.test(e)&&ge(t.parentNode)||t}if(v)try{return j.apply(o,y.querySelectorAll(v)),o}catch(e){}finally{c===A&&t.removeAttribute("id")}}}return u(e.replace(H,"$1"),t,o,r)}function ae(){var e=[];return function t(n,r){return e.push(n+" ")>o.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function se(e){return e[A]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)o.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,o){for(var r,i=e([],n.length,t),a=i.length;a--;)n[r=i[a]]&&(n[r]=!(o[r]=n[r]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ie.support={},i=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=ie.setDocument=function(e){var t,r,a=e?e.ownerDocument||e:_;return a!==f&&9===a.nodeType&&a.documentElement?(h=(f=a).documentElement,g=!i(f),_!==f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=A,!f.getElementsByName||!f.getElementsByName(A).length}),n.getById?(o.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(o.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,o,r,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),o.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[r++];)1===n.nodeType&&o.push(n);return o}return i},o.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=X.test(f.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+A+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+A+"+*").length||m.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=X.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(h.compareDocumentPosition),b=t||X.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},O=t?function(e,t){if(e===t)return p=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===o?e===f||e.ownerDocument===_&&b(_,e)?-1:t===f||t.ownerDocument===_&&b(_,t)?1:c?N(c,e)-N(c,t):0:4&o?-1:1)}:function(e,t){if(e===t)return p=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!r||!i)return e===f?-1:t===f?1:r?-1:i?1:c?N(c,e)-N(c,t):0;if(r===i)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[o]===s[o];)o++;return o?ce(a[o],s[o]):a[o]===_?-1:s[o]===_?1:0},f):f},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&d(e),t=t.replace(W,"='$1']"),n.matchesSelector&&g&&!k[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var o=y.call(e,t);if(o||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(e){}return ie(t,f,null,[e]).length>0},ie.contains=function(e,t){return(e.ownerDocument||e)!==f&&d(e),b(e,t)},ie.attr=function(e,t){(e.ownerDocument||e)!==f&&d(e);var r=o.attrHandle[t.toLowerCase()],i=r&&S.call(o.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==i?i:n.attributes||!g?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},ie.escape=function(e){return(e+"").replace(te,ne)},ie.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ie.uniqueSort=function(e){var t,o=[],r=0,i=0;if(p=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(O),p){for(;t=e[i++];)t===e[i]&&(r=o.push(i));for(;r--;)e.splice(o[r],1)}return c=null,e},r=ie.getText=function(e){var t,n="",o=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[o++];)n+=r(t);return n},(o=ie.selectors={cacheLength:50,createPseudo:se,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ie.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ie.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(o){var r=ie.attr(o,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,o,r){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===o&&0===r?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,d,f,h,g=i!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(m){if(i){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(f=(l=(c=(p=(d=m)[A]||(d[A]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===E&&l[1])&&l[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(b=f=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[E,f,b];break}}else if(y&&(b=f=(l=(c=(p=(d=t)[A]||(d[A]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===E&&l[1]),!1===b)for(;(d=++f&&d&&d[g]||(b=f=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((c=(p=d[A]||(d[A]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]=[E,b]),d!==t)););return(b-=r)===o||b%o==0&&b/o>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||ie.error("unsupported pseudo: "+e);return r[A]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=N(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:se(function(e){var t=[],n=[],o=s(e.replace(H,"$1"));return o[A]?se(function(e,t,n,r){for(var i,a=o(e,null,r,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return ie(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||r(t)).indexOf(e)>-1}}),lang:se(function(e){return q.test(e||"")||ie.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(o);return e}),gt:he(function(e,t,n){for(var o=n<0?n+t:n;++o1?function(t,n,o){for(var r=e.length;r--;)if(!e[r](t,n,o))return!1;return!0}:e[0]}function Ae(e,t,n,o,r){for(var i,a=[],s=0,u=e.length,l=null!=t;s-1&&(i[l]=!(a[l]=p))}}else v=Ae(v===a?v.splice(h,v.length):v),r?r(null,a,v,u):j.apply(a,v)})}function Ee(e){for(var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],u=a?1:0,c=ye(function(e){return e===t},s,!0),p=ye(function(e){return N(t,e)>-1},s,!0),d=[function(e,n,o){var r=!a&&(o||n!==l)||((t=n).nodeType?c(e,n,o):p(e,n,o));return t=null,r}];u1&&be(d),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(H,"$1"),n,u0,r=e.length>0,i=function(i,a,s,u,c){var p,h,m,v=0,y="0",b=i&&[],A=[],_=l,w=i||r&&o.find.TAG("*",c),C=E+=null==_?1:Math.random()||.1,x=w.length;for(c&&(l=a===f||a||c);y!==x&&null!=(p=w[y]);y++){if(r&&p){for(h=0,a||p.ownerDocument===f||(d(p),s=!g);m=e[h++];)if(m(p,a||f,s)){u.push(p);break}c&&(E=C)}n&&((p=!m&&p)&&v--,i&&b.push(p))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(b,A,a,s);if(i){if(v>0)for(;y--;)b[y]||A[y]||(A[y]=P.call(u));A=Ae(A)}j.apply(u,A),c&&!i&&A.length>0&&v+t.length>1&&ie.uniqueSort(u)}return c&&(E=C,l=_),b};return n?se(i):i}(i,r))).selector=e}return s},u=ie.select=function(e,t,n,r){var i,u,l,c,p,d="function"==typeof e&&e,f=!r&&a(e=d.selector||e);if(n=n||[],1===f.length){if((u=f[0]=f[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&o.relative[u[1].type]){if(!(t=(o.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(i=Q.needsContext.test(e)?0:u.length;i--&&(l=u[i],!o.relative[c=l.type]);)if((p=o.find[c])&&(r=p(l.matches[0].replace(Z,ee),J.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(i,1),!(e=r.length&&ve(u)))return j.apply(n,r),n;break}}return(d||s(e,f))(r,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=A.split("").sort(O).join("")===A,n.detectDuplicates=!!p,d(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(I,function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),ie}(n);b.find=x,b.expr=x.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=x.uniqueSort,b.text=x.getText,b.isXMLDoc=x.isXML,b.contains=x.contains,b.escapeSelector=x.escape;var k=function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&b(e).is(n))break;o.push(e)}return o},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},S=b.expr.match.needsContext,T=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,P=/^.[^:#\[\.,]*$/;function D(e,t,n){return b.isFunction(t)?b.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?b.grep(e,function(e){return e===t!==n}):"string"!=typeof t?b.grep(e,function(e){return p.call(t,e)>-1!==n}):P.test(t)?b.filter(t,e,n):(t=b.filter(t,e),b.grep(e,function(e){return p.call(t,e)>-1!==n&&1===e.nodeType}))}b.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?b.find.matchesSelector(o,e)?[o]:[]:b.find.matches(e,b.grep(t,function(e){return 1===e.nodeType}))},b.fn.extend({find:function(e){var t,n,o=this.length,r=this;if("string"!=typeof e)return this.pushStack(b(e).filter(function(){for(t=0;t1?b.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&S.test(e)?b(e):e||[],!1).length}});var j,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var o,r;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(o="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),T.test(o[1])&&b.isPlainObject(t))for(o in t)b.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(r=a.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b.isFunction(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,j=b(a);var N=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function M(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&b.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?b.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?p.call(b(e),this[0]):p.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return M(e,"nextSibling")},prev:function(e){return M(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return e.contentDocument||b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,o){var r=b.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(r=b.filter(o,r)),this.length>1&&(I[e]||b.uniqueSort(r),N.test(e)&&r.reverse()),this.pushStack(r)}});var F=/[^\x20\t\r\n\f]+/g;function L(e){return e}function B(e){throw e}function U(e,t,n){var o;try{e&&b.isFunction(o=e.promise)?o.call(e).done(t).fail(n):e&&b.isFunction(o=e.then)?o.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}b.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return b.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):b.extend({},e);var t,n,o,r,i=[],a=[],s=-1,u=function(){for(r=e.once,o=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?b.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return r=a=[],n||t||(i=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!o}};return l},b.extend({Deferred:function(e){var t=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],o="pending",r={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var r=b.isFunction(e[o[4]])&&e[o[4]];i[o[1]](function(){var e=r&&r.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,o,r){var i=0;function a(e,t,o,r){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(e=i&&(o!==B&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),n.setTimeout(c))}}return b.Deferred(function(n){t[0][3].add(a(0,n,b.isFunction(r)?r:L,n.notifyWith)),t[1][3].add(a(0,n,b.isFunction(e)?e:L)),t[2][3].add(a(0,n,b.isFunction(o)?o:B))}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return b.each(t,function(e,n){var a=n[2],s=n[5];r[n[1]]=a.add,s&&a.add(function(){o=s},t[3-e][2].disable,t[0][2].lock),a.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,o=Array(n),r=u.call(arguments),i=b.Deferred(),a=function(e){return function(n){o[e]=this,r[e]=arguments.length>1?u.call(arguments):n,--t||i.resolveWith(o,r)}};if(t<=1&&(U(e,i.done(a(n)).resolve,i.reject),"pending"===i.state()||b.isFunction(r[n]&&r[n].then)))return i.then();for(;n--;)U(r[n],a(n),i.reject);return i.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&H.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},b.readyException=function(e){n.setTimeout(function(){throw e})};var z=b.Deferred();function V(){a.removeEventListener("DOMContentLoaded",V),n.removeEventListener("load",V),b.ready()}b.fn.ready=function(e){return z.then(e).catch(function(e){b.readyException(e)}),this},b.extend({isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||z.resolveWith(a,[b]))}}),b.ready.then=z.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(b.ready):(a.addEventListener("DOMContentLoaded",V),n.addEventListener("load",V));var W=function(e,t,n,o,r,i,a){var s=0,u=e.length,l=null==n;if("object"===b.type(n))for(s in r=!0,n)W(e,t,s,n[s],!0,i,a);else if(void 0!==o&&(r=!0,b.isFunction(o)||(a=!0),l&&(a?(t.call(e,o),t=null):(l=t,t=function(e,t,n){return l.call(b(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),b.extend({queue:function(e,t,n){var o;if(e)return t=(t||"fx")+"queue",o=Q.get(e,t),n&&(!o||b.isArray(n)?o=Q.access(e,t,b.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),o=n.length,r=n.shift(),i=b._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,function(){b.dequeue(e,t)},i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:b.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,le=/^$|\/(?:java|ecma)script/i,ce={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function pe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&b.nodeName(e,t)?b.merge([e],n):n}function de(e,t){for(var n=0,o=e.length;n-1)r&&r.push(i);else if(l=b.contains(i.ownerDocument,i),a=pe(p.appendChild(i),"script"),l&&de(a),n)for(c=0;i=a[c++];)le.test(i.type||"")&&n.push(i);return p}fe=a.createDocumentFragment().appendChild(a.createElement("div")),(he=a.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),fe.appendChild(he),v.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="",v.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue;var ve=a.documentElement,ye=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function _e(){return!0}function Ee(){return!1}function we(){try{return a.activeElement}catch(e){}}function Ce(e,t,n,o,r,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(o=o||n,n=void 0),t)Ce(e,s,n,o,t[s],i);return e}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&("string"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),!1===r)r=Ee;else if(!r)return e;return 1===i&&(a=r,(r=function(e){return b().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=b.guid++)),e.each(function(){b.event.add(this,t,r,o,n)})}b.event={global:{},add:function(e,t,n,o,r){var i,a,s,u,l,c,p,d,f,h,g,m=Q.get(e);if(m)for(n.handler&&(n=(i=n).handler,r=i.selector),r&&b.find.matchesSelector(ve,r),n.guid||(n.guid=b.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(F)||[""]).length;l--;)f=g=(s=Ae.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),f&&(p=b.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=b.event.special[f]||{},c=b.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&b.expr.match.needsContext.test(r),namespace:h.join(".")},i),(d=u[f])||((d=u[f]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,o,h,a)||e.addEventListener&&e.addEventListener(f,a)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),b.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,a,s,u,l,c,p,d,f,h,g,m=Q.hasData(e)&&Q.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(F)||[""]).length;l--;)if(f=g=(s=Ae.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),f){for(p=b.event.special[f]||{},d=u[f=(o?p.delegateType:p.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)c=d[i],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(d.splice(i,1),c.selector&&d.delegateCount--,p.remove&&p.remove.call(e,c));a&&!d.length&&(p.teardown&&!1!==p.teardown.call(e,h,m.handle)||b.removeEvent(e,f,m.handle),delete u[f])}else for(f in u)b.event.remove(e,f+t[l],n,o,!0);b.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,o,r,i,a,s=b.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=b.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n-1:b.find(r,this,null,[l]).length),a[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,ke=/\s*$/g;function Pe(e,t){return b.nodeName(e,"table")&&b.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){var t=Se.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Re(e,t){var n,o,r,i,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(i=Q.access(e),a=Q.set(t,i),l=i.events))for(r in delete a.handle,a.events={},l)for(n=0,o=l[r].length;n1&&"string"==typeof h&&!v.checkClone&&Oe.test(h))return e.each(function(r){var i=e.eq(r);g&&(t[0]=h.call(this,r,i.html())),Ne(i,t,n,o)});if(d&&(i=(r=me(t,e[0].ownerDocument,!1,e,o)).firstChild,1===r.childNodes.length&&(r=i),i||o)){for(s=(a=b.map(pe(r,"script"),De)).length;p")},clone:function(e,t,n){var o,r,i,a,s,u,l,c=e.cloneNode(!0),p=b.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(a=pe(c),o=0,r=(i=pe(e)).length;o0&&de(a,!p&&pe(e,"script")),c},cleanData:function(e){for(var t,n,o,r=b.event.special,i=0;void 0!==(n=e[i]);i++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(o in t.events)r[o]?b.event.remove(n,o):b.removeEvent(n,o,t.handle);n[Q.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return W(this,function(e){return void 0===e?b.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ne(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)})},prepend:function(){return Ne(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ne(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ne(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(pe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return W(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ce[(ue.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n1)}}),b.Tween=Xe,Xe.prototype={constructor:Xe,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(b.cssNumber[n]?"":"px")},cur:function(){var e=Xe.propHooks[this.prop];return e&&e.get?e.get(this):Xe.propHooks._default.get(this)},run:function(e){var t,n=Xe.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Xe.propHooks._default.set(this),this}},Xe.prototype.init.prototype=Xe.prototype,Xe.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[b.cssProps[e.prop]]&&!b.cssHooks[e.prop]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},Xe.propHooks.scrollTop=Xe.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=Xe.prototype.init,b.fx.step={};var $e,Je,Ze=/^(?:toggle|show|hide)$/,et=/queueHooks$/;function tt(){Je&&(n.requestAnimationFrame(tt),b.fx.tick())}function nt(){return n.setTimeout(function(){$e=void 0}),$e=b.now()}function ot(e,t){var n,o=0,r={height:e};for(t=t?1:0;o<4;o+=2-t)r["margin"+(n=ee[o])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function rt(e,t,n){for(var o,r=(it.tweeners[t]||[]).concat(it.tweeners["*"]),i=0,a=r.length;i1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})}}),b.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?b.prop(e,t,n):(1===i&&b.isXMLDoc(e)||(r=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?at:void 0)),void 0!==n?null===n?void b.removeAttr(e,t):r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(o=r.get(e,t))?o:null==(o=b.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,r=t&&t.match(F);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),at={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),function(e,t){var n=st[t]||b.find.attr;st[t]=function(e,t,o){var r,i,a=t.toLowerCase();return o||(i=st[a],st[a]=r,r=null!=n(e,t,o)?a:null,st[a]=i),r}});var ut=/^(?:input|select|textarea|button)$/i,lt=/^(?:a|area)$/i;function ct(e){return(e.match(F)||[]).join(" ")}function pt(e){return e.getAttribute&&e.getAttribute("class")||""}b.fn.extend({prop:function(e,t){return W(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[b.propFix[e]||e]})}}),b.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&b.isXMLDoc(e)||(t=b.propFix[t]||t,r=b.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:e[t]=n:r&&"get"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):ut.test(e.nodeName)||lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){b.propFix[this.toLowerCase()]=this}),b.fn.extend({addClass:function(e){var t,n,o,r,i,a,s,u=0;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,pt(this)))});if("string"==typeof e&&e)for(t=e.match(F)||[];n=this[u++];)if(r=pt(n),o=1===n.nodeType&&" "+ct(r)+" "){for(a=0;i=t[a++];)o.indexOf(" "+i+" ")<0&&(o+=i+" ");r!==(s=ct(o))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,o,r,i,a,s,u=0;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,pt(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(F)||[];n=this[u++];)if(r=pt(n),o=1===n.nodeType&&" "+ct(r)+" "){for(a=0;i=t[a++];)for(;o.indexOf(" "+i+" ")>-1;)o=o.replace(" "+i+" "," ");r!==(s=ct(o))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,pt(this),t),t)}):this.each(function(){var t,o,r,i;if("string"===n)for(o=0,r=b(this),i=e.match(F)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=pt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,o=0;for(t=" "+e+" ";n=this[o++];)if(1===n.nodeType&&(" "+ct(pt(n))+" ").indexOf(t)>-1)return!0;return!1}});var dt=/\r/g;b.fn.extend({val:function(e){var t,n,o,r=this[0];return arguments.length?(o=b.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=o?e.call(this,n,b(this).val()):e)?r="":"number"==typeof r?r+="":b.isArray(r)&&(r=b.map(r,function(e){return null==e?"":e+""})),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=b.valHooks[r.type]||b.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(dt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:ct(b.text(e))}},select:{get:function(e){var t,n,o,r=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?i+1:r.length;for(o=i<0?u:a?i:0;o-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]={set:function(e,t){if(b.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},v.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ft=/^(?:focusinfocus|focusoutblur)$/;b.extend(b.event,{trigger:function(e,t,o,r){var i,s,u,l,c,p,d,f=[o||a],g=h.call(e,"type")?e.type:e,m=h.call(e,"namespace")?e.namespace.split("."):[];if(s=u=o=o||a,3!==o.nodeType&&8!==o.nodeType&&!ft.test(g+b.event.triggered)&&(g.indexOf(".")>-1&&(g=(m=g.split(".")).shift(),m.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[b.expando]?e:new b.Event(g,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),t=null==t?[e]:b.makeArray(t,[e]),d=b.event.special[g]||{},r||!d.trigger||!1!==d.trigger.apply(o,t))){if(!r&&!d.noBubble&&!b.isWindow(o)){for(l=d.delegateType||g,ft.test(l+g)||(s=s.parentNode);s;s=s.parentNode)f.push(s),u=s;u===(o.ownerDocument||a)&&f.push(u.defaultView||u.parentWindow||n)}for(i=0;(s=f[i++])&&!e.isPropagationStopped();)e.type=i>1?l:d.bindType||g,(p=(Q.get(s,"events")||{})[e.type]&&Q.get(s,"handle"))&&p.apply(s,t),(p=c&&s[c])&&p.apply&&G(s)&&(e.result=p.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!G(o)||c&&b.isFunction(o[g])&&!b.isWindow(o)&&((u=o[c])&&(o[c]=null),b.event.triggered=g,o[g](),b.event.triggered=void 0,u&&(o[c]=u)),e.result}},simulate:function(e,t,n){var o=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(o,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.focusin="onfocusin"in n,v.focusin||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=Q.access(o,t);r||o.addEventListener(e,n,!0),Q.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=Q.access(o,t)-1;r?Q.access(o,t,r):(o.removeEventListener(e,n,!0),Q.remove(o,t))}}});var ht=n.location,gt=b.now(),mt=/\?/;b.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+e),t};var vt=/\[\]$/,yt=/\r?\n/g,bt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function _t(e,t,n,o){var r;if(b.isArray(t))b.each(t,function(t,r){n||vt.test(e)?o(e,r):_t(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,o)});else if(n||"object"!==b.type(t))o(e,t);else for(r in t)_t(e+"["+r+"]",t[r],n,o)}b.param=function(e,t){var n,o=[],r=function(e,t){var n=b.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){r(this.name,this.value)});else for(n in e)_t(n,e[n],t,r);return o.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&At.test(this.nodeName)&&!bt.test(e)&&(this.checked||!se.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(yt,"\r\n")}}):{name:t.name,value:n.replace(yt,"\r\n")}}).get()}});var Et=/%20/g,wt=/#.*$/,Ct=/([?&])_=[^&]*/,xt=/^(.*?):[ \t]*([^\r\n]*)$/gm,kt=/^(?:GET|HEAD)$/,Ot=/^\/\//,St={},Tt={},Pt="*/".concat("*"),Dt=a.createElement("a");function jt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,r=0,i=t.toLowerCase().match(F)||[];if(b.isFunction(n))for(;o=i[r++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function Rt(e,t,n,o){var r={},i=e===Tt;function a(s){var u;return r[s]=!0,b.each(e[s]||[],function(e,s){var l=s(t,n,o);return"string"!=typeof l||i||r[l]?i?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!r["*"]&&a("*")}function Nt(e,t){var n,o,r=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:o||(o={}))[n]=t[n]);return o&&b.extend(!0,e,o),e}Dt.href=ht.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Nt(Nt(e,b.ajaxSettings),t):Nt(b.ajaxSettings,e)},ajaxPrefilter:jt(St),ajaxTransport:jt(Tt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,r,i,s,u,l,c,p,d,f,h=b.ajaxSetup({},t),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?b(g):b.event,v=b.Deferred(),y=b.Callbacks("once memory"),A=h.statusCode||{},_={},E={},w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=xt.exec(i);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(e,t){return null==c&&(e=E[e.toLowerCase()]=E[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)A[t]=[A[t],e[t]];return this},abort:function(e){var t=e||w;return o&&o.abort(t),x(0,t),this}};if(v.promise(C),h.url=((e||h.url||ht.href)+"").replace(Ot,ht.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(F)||[""],null==h.crossDomain){l=a.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Dt.protocol+"//"+Dt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=b.param(h.data,h.traditional)),Rt(St,h,t,C),c)return C;for(d in(p=b.event&&h.global)&&0==b.active++&&b.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!kt.test(h.type),r=h.url.replace(wt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Et,"+")):(f=h.url.slice(r.length),h.data&&(r+=(mt.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(Ct,"$1"),f=(mt.test(r)?"&":"?")+"_="+gt+++f),h.url=r+f),h.ifModified&&(b.lastModified[r]&&C.setRequestHeader("If-Modified-Since",b.lastModified[r]),b.etag[r]&&C.setRequestHeader("If-None-Match",b.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Pt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(w="abort",y.add(h.complete),C.done(h.success),C.fail(h.error),o=Rt(Tt,h,t,C)){if(C.readyState=1,p&&m.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(u=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{c=!1,o.send(_,x)}catch(e){if(c)throw e;x(-1,e)}}else x(-1,"No Transport");function x(e,t,a,s){var l,d,f,_,E,w=t;c||(c=!0,u&&n.clearTimeout(u),o=void 0,i=s||"",C.readyState=e>0?4:0,l=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var o,r,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(r in s)if(s[r]&&s[r].test(o)){u.unshift(r);break}if(u[0]in n)i=u[0];else{for(r in n){if(!u[0]||e.converters[r+" "+u[0]]){i=r;break}a||(a=r)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(h,C,a)),_=function(e,t,n,o){var r,i,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(r in l)if((s=r.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[r]:!0!==l[r]&&(i=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}(h,_,C,l),l?(h.ifModified&&((E=C.getResponseHeader("Last-Modified"))&&(b.lastModified[r]=E),(E=C.getResponseHeader("etag"))&&(b.etag[r]=E)),204===e||"HEAD"===h.type?w="nocontent":304===e?w="notmodified":(w=_.state,d=_.data,l=!(f=_.error))):(f=w,!e&&w||(w="error",e<0&&(e=0))),C.status=e,C.statusText=(t||w)+"",l?v.resolveWith(g,[d,w,C]):v.rejectWith(g,[C,w,f]),C.statusCode(A),A=void 0,p&&m.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?d:f]),y.fireWith(g,[C,w]),p&&(m.trigger("ajaxComplete",[C,h]),--b.active||b.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],function(e,t){b[t]=function(e,n,o,r){return b.isFunction(n)&&(r=r||o,o=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:r,data:n,success:o},b.isPlainObject(e)&&e))}}),b._evalUrl=function(e){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(b.isFunction(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){b(this).replaceWith(this.childNodes)}),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},Mt=b.ajaxSettings.xhr();v.cors=!!Mt&&"withCredentials"in Mt,v.ajax=Mt=!!Mt,b.ajaxTransport(function(e){var t,o;if(v.cors||Mt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=o=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(It[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),o=s.onerror=t("error"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&o()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),b.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),b.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(o,r){t=b("