diff --git a/biz/webui/htdocs/js/index.js b/biz/webui/htdocs/js/index.js index cbbc8e1a3..35ace95b0 100644 --- a/biz/webui/htdocs/js/index.js +++ b/biz/webui/htdocs/js/index.js @@ -1,6 +1,6 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){if(/\.json$/i.test(e.name)&&O.test(e.value))try{JSON.parse(e.value)}catch(t){Q.warn("Warning: the value of "+e.name+" can`t be parsed into json. "+t.message)}}function o(e,t){e=JSON.stringify(e);var n=new FormData,r=new File([e],"data.json",{type:"application/json"});return n.append(t||"rules",r),n}function i(e){return e=e.trim(),e?/^https?:\/\/[^/]/i.test(e)?e:void Q.error("Please input the correct url."):void Q.error("The url cannot be empty.")}function a(e){return function(t,n){if(!t)return E.showSystemError(n),e(!0);if(0!==t.ec)return Q.error(t.em),e(!0);try{if(t=t.body&&JSON.parse(t.body),t&&Object.keys(t).length)return e(!1,t);Q.info("No body data.")}catch(r){Q.error(r.message)}e(!0)}}function s(e){e.stopPropagation()}function l(e){if(e.networkMode)return"network";var t=location.hash.substring(1);return t=t?t.replace(/[?#].*$/,""):location.href.replace(/[?#].*$/,"").replace(/.*\//,""),e.rulesMode?"network"===t?"rules":t:e.pluginsMode&&"plugins"!==t?"network":t}function c(e,t){var n,r=e.length;for(n=0;r>n;n++)if(-1===h.inArray(e[n],t))return!1;var o=t.length;if(r!==o)for(n=0;o>n;n++)if(-1===h.inArray(t[n],e))return!1;return!0}function u(e){if(0==e.indexOf("{")){var t=e.lastIndexOf("}");return t>1&&e.substring(1,t)}return!1}function d(e){if(0==e.indexOf("(")){var t=e.lastIndexOf(")");return-1!=t&&e.substring(1,t)||""}return!1}var p=Object.assign||function(e){for(var t=1;tn?1:-1)}).forEach(function(n){var r=e[n];t.push({name:n.slice(0,-1),icon:"checkbox",mtime:r.mtime,homepage:r.homepage,latest:r.latest,hideLongProtocol:r.hideLongProtocol,hideShortProtocol:r.hideShortProtocol})}),t},reloadRules:function(e){var t=this,n=S.get("activeRules",!0)||e.current,r=[],o={};r.push(H),o.Default={name:H,fixed:!0,value:e.defaultRules,selected:!e.defaultRulesIsDisabled,isDefault:!0,active:n===H},e.list.forEach(function(e){r.push(e.name),e=o[e.name]={name:e.name,value:e.data,selected:e.selected,active:n===e.name}}),t.state.rules.reset(r,o),t.setState({})},reloadValues:function(e){var t=this,n=S.get("activeValues",!0)||e.current,r=[],o={};e.list.forEach(function(e){r.push(e.name),o[e.name]={name:e.name,value:e.data,active:n===e.name}}),t.state.values.reset(r,o),t.setState({})},reloadData:function(){var e=this,t=h(".w-reload-data-tips").closest(".w-confirm-reload-dialog"),n=t.find(".w-reload-data-tips").attr("data-name"),r="rules"===n,o=function(t,n){return t?void(r?(e.reloadRules(t),e.triggerRulesChange("reload")):(e.reloadValues(t),e.triggerValuesChange("reload"))):void E.showSystemError(n)};r?I.rules.list(o):I.values.list(o)},showReloadRules:function(){if("rules"===this.state.name&&this.rulesChanged){this.rulesChanged=!1;var e=this.state.rules.hasChanged();this.showReloadDialog("The rules has been modified.
Do you want to reload it.",e)}},showReloadValues:function(){if("values"===this.state.name&&this.valuesChanged){this.valuesChanged=!1;var e=this.state.values.hasChanged();this.showReloadDialog("The values has been modified.
Do you want to reload it.",e)}},componentDidUpdate:function(){this.showReloadRules(),this.showReloadValues()},showReloadDialog:function(e,t){var n=this.refs.confirmReload;n.show(),t&&(e+='

Note: There are unsaved changes.

'),h(".w-reload-data-tips").html(e).attr("data-name",this.state.name)},componentDidMount:function(){function e(e){if(e=e&&e.trim()){var t=e.indexOf("://")+3;if(e=-1!=t?e.substring(t):e,0===e.indexOf("{"))return t=e.lastIndexOf("}"),t>1?e.substring(1,t):null}}var t=this,n=new m(".w-copy-text");n.on("error",function(e){alert("Copy failed.")}),n=new m(".w-copy-text-with-tips"),n.on("error",function(e){Q.error("Copy failed.")}),n.on("success",function(e){Q.success("Copied clipboard.")});var r=function(e){e.preventDefault()};L.on("rulesChanged",function(){t.rulesChanged=!0,t.showReloadRules()}),L.on("updateGlobal",function(){t.setState({})}),L.on("valuesChanged",function(){t.valuesChanged=!0,t.showReloadValues()}),L.on("disableAllPlugins",function(e){t.disableAllPlugins(e)}),L.on("showFiles",function(e,n){t.files=t.files||n,t.showFiles()}),L.on("activeRules",function(){var e=I.rulesModal;e.exists(I.activeRulesName)&&(t.setRulesActive(I.activeRulesName,e),t.setState({}))}),L.on("activeValues",function(){var e=I.valuesModal;e.exists(I.activeValuesName)&&(t.setValuesActive(I.activeValuesName,e),t.setState({}))}),h(document).on("dragleave",r).on("dragenter",r).on("dragover",r).on("drop",function(e){e.preventDefault();var n=e.originalEvent.dataTransfer.files,r=n&&n[0];if(r){if(h(".w-files-dialog.in").length)return L.trigger("uploadFile",r);var o,i=t.state.name,a=h(e.target);if("network"===i){if(a.closest(".w-frames-composer").length)return;if(/\.log$/i.test(r.name))return r.size>Y?alert("The file size cannot exceed 2m."):void E.readFileAsText(r,function(e){e=E.parseLogs(e),e&&(null!==I.uploadLogs&&(I.uploadLogs=e),L.trigger("showLog"),L.trigger("uploadLogs",{logs:e}))});o=new FormData,o.append("importSessions",n[0]),t.uploadSessionsForm(o)}a.closest(".w-divider-left").length&&("rules"===i?(o=new FormData,o.append("rules",n[0]),t.rulesForm=o,t.refs.confirmImportRules.show()):"values"===i&&(o=new FormData,o.append("values",n[0]),t.valuesForm=o,t.refs.confirmImportValues.show()))}}).on("keydown",function(e){(e.metaKey||e.ctrlKey)&&82===e.keyCode&&e.preventDefault()});var i=function(e){var n=e.target;"A"==n.nodeName&&h(n).parent().hasClass("w-list-data")&&("rules"==t.state.name?t.removeRules():t.removeValues()),e.preventDefault()};h(window).on("hashchange",function(){var e=l(t.state);e&&-1==e.indexOf("rules")?-1!=e.indexOf("values")?t.showValues():-1!=e.indexOf("plugins")?t.showPlugins():t.showNetwork():t.showRules()}).on("keyup",function(e){if(27==e.keyCode){t.setMenuOptionsState();var n=h(".modal");"function"==typeof n.modal&&n.modal("hide")}}).on("keydown",function(e){if(46==e.keyCode&&i(e),!e.ctrlKey&&!e.metaKey)return void(112===e.keyCode?(e.preventDefault(),window.open("https://avwo.github.io/whistle/webui/"+t.state.name+".html")):116===e.keyCode&&e.preventDefault());77===e.keyCode&&t.toggleLeftMenu();var n="network"===t.state.name;n&&88==e.keyCode&&(E.isFocusEditor()||h(e.target).closest(".w-frames-list").length||t.clear()),68==e.keyCode&&i(e);var r=t.state.network;if(n&&83===e.keyCode){if(e.preventDefault(),h(".modal.in").length)return void(h(f.findDOMNode(t.refs.chooseFileType)).is(":visible")&&t.exportBySave());var o=e.target.nodeName;if("INPUT"===o||"TEXTAREA"===o)return;var a=r&&r.hasSelected();return void(a&&(h(f.findDOMNode(t.refs.chooseFileType)).modal("show"),setTimeout(function(){f.findDOMNode(t.refs.sessionsName).focus()},500)))}n&&73===e.keyCode&&(t.importSessions(e),e.preventDefault())});var a=function(){var e=t.state.name;return"rules"===e||"values"===e};h(document.body).on("mouseenter",W,function(t){if(a()&&(t.ctrlKey||t.metaKey)){var n=h(this);(n.hasClass("cm-js-http-url")||n.hasClass("cm-string")||n.hasClass("cm-js-at")||e(n.text()))&&n.addClass("w-is-link")}}).on("mouseleave",W,function(e){h(this).removeClass("w-is-link")}).on("mousedown",W,function(n){if(a()&&(n.ctrlKey||n.metaKey)){var r=h(this),o=r.text();if(r.hasClass("cm-js-at"))return void(_.test(o)&&window.open((RegExp.$1||"http:")+RegExp.$2));if(r.hasClass("cm-string"))return void(X.test(o)&&window.open((RegExp.$1||"http:")+RegExp.$2));if(r.hasClass("cm-js-http-url"))return/^https?:\/\//i.test(o)||(o="http:"+("/"===o[0]?"":"//")+o),void window.open(o);var i=e(o);return i?void t.showAndActiveValues({name:i}):void 0}}),"network"==t.state.name&&t.startLoadData(),I.on("settings",function(e){var n=t.state,r=e.server;(n.interceptHttpsConnects!==e.interceptHttpsConnects||n.enableHttp2!==e.enableHttp2||n.disabledAllRules!==e.disabledAllRules||n.allowMultipleChoice!==e.allowMultipleChoice||n.disabledAllPlugins!==e.disabledAllPlugins||n.multiEnv!=r.multiEnv||n.classic!=e.classic||n.ndp!=r.ndp||n.ndr!=r.ndr)&&(n.interceptHttpsConnects=e.interceptHttpsConnects,n.enableHttp2=e.enableHttp2,n.disabledAllRules=e.disabledAllRules,n.allowMultipleChoice=e.allowMultipleChoice,n.disabledAllPlugins=e.disabledAllPlugins,n.multiEnv=r.multiEnv,n.ndp=r.ndp,n.ndr=r.ndr,n.classic=e.classic,D.setPlugins(n),t.setState({}))}),I.on("rules",function(e){var n=t.state.rules,r=e.list;e.defaultRulesIsDisabled||-1!==r.indexOf("Default")||r.unshift("Default");var o=n.getSelectedNames();c(o,r)||(t.reselectRules(e,!0),t.setState({}))}),I.on("serverInfo",function(e){t.serverInfo=e}),L.on("executeComposer",function(){t.autoRefresh&&t.autoRefresh()});var s=function(e){return e&&!e.selected?[e]:void 0};L.on("updateUI",function(){t.setState({})}),L.on("replaySessions",function(e,n,r){var o=t.state.network,i=s(n)||o&&o.getSelectedList(),a=i&&i.length;return r&&1===a?(t.replayList=i,t.refs.setReplayCount.show(),void setTimeout(function(){var e=f.findDOMNode(t.refs.replayCount);e.select(),e.focus()},300)):void t.replay(e,i)}),L.on("importSessions",t.importSessions),L.on("filterSessions",t.showSettings),L.on("exportSessions",function(e,n){t.exportData(e,s(n))}),L.on("abortRequest",function(e,n){t.abort(s(n))}),L.on("uploadSessions",function(e,n){var r=s(n&&n.curItem),o=n&&n.upload;if("function"==typeof o){if(!r){var i=t.state.network;r=i&&i.getSelectedList(),r&&r.length&&(r=h.extend(!0,[],r))}r&&o(r)}}),L.on("removeIt",function(e,n){var r=t.state.network;n&&r&&(r.remove(n),t.setState({}))}),L.on("removeOthers",function(e,n){var r=t.state.network;n&&r&&(n.selected?r.removeUnselectedItems():r.removeOthers(n),t.setState({}))}),L.on("clearAll",t.clear),L.on("removeSelected",function(){var e=t.state.network;e&&(e.removeSelectedItems(),t.setState({}))}),L.on("removeUnselected",function(){var e=t.state.network;e&&(e.removeUnselectedItems(),t.setState({}))}),L.on("removeUnmarked",function(){var e=t.state.network;e&&(e.removeUnmarkedItems(),t.setState({}))}),L.on("saveRules",function(e,n){n.changed||!n.selected?t.selectRules(n):t.unselectRules(n)}),L.on("saveValues",function(e,n){t.saveValues(n)}),L.on("renameRules",function(e,n){t.showEditRules(n)}),L.on("renameValues",function(e,n){t.showEditValues(n)}),L.on("deleteRules",function(e,n){setTimeout(function(){t.removeRules(n)},0)}),L.on("deleteValues",function(e,n){setTimeout(function(){t.removeValues(n)},0)}),L.on("createRules",t.showCreateRules),L.on("createValues",t.showCreateValues),L.on("createRuleGroup",t.showCreateRuleGroup),L.on("createValueGroup",t.showCreateValueGroup),L.on("exportRules",t.exportData),L.on("exportValues",t.exportData),L.on("importRules",t.importRules),L.on("importValues",t.importValues),L.on("uploadRules",function(e,n){var r=o(n);r.append("replaceAll","1"),t._uploadRules(r,!0)}),L.on("uploadValues",function(e,n){var r=o(n,"values");r.append("replaceAll","1"),t._uploadValues(r,!0)});var u;h(document).on("visibilitychange",function(){clearTimeout(u),document.hidden||(u=setTimeout(function(){var e=t.scrollerAtBottom&&t.scrollerAtBottom();t.setState({},function(){e&&t.autoRefresh()})},100))}),setTimeout(function(){I.checkUpdate(function(e){e&&e.showUpdate&&t.setState({version:e.version,latestVersion:e.latestVersion},function(){h(f.findDOMNode(t.refs.showUpdateTipsDialog)).modal("show")})})},1e4),I.getLogIdList=this.getLogIdListFromRules,I.importAnySessions=t.importAnySessions,I.on("plugins",function(e){var n=t.createPluginsOptions(e.plugins),r=t.state.pluginsOptions,o=t.state.disabledPlugins,i=e.disabledPlugins;if(n.length==r.length){for(var a,s=0,l=n.length;l>s;s++){var c=n[s],u=r[s];if(c.name!=u.name||c.latest!==u.latest||c.mtime!=u.mtime||o[c.name]!=i[c.name]||c.hideLongProtocol!=u.hideLongProtocol||c.hideShortProtocol!=u.hideShortProtocol){a=!0;break}}if(!a)return}var d={plugins:e.plugins,disabledPlugins:e.disabledPlugins,pluginsOptions:n};D.setPlugins(d),t.setState(d)});try{var d=window.parent.onWhistleReady;"function"==typeof d&&d({url:location.href,importSessions:t.importAnySessions,importHarSessions:t.importHarSessions,clearSessions:t.clear})}catch(p){}},importAnySessions:function(e){e&&(Array.isArray(e)?I.addNetworkList(e):this.importHarSessions(e))},donotShowAgain:function(){I.donotShowAgain()},hideUpdateTipsDialog:function(){h(f.findDOMNode(this.refs.showUpdateTipsDialog)).modal("hide")},getAllRulesText:function(){var e=" "+this.getAllRulesValue();return e.replace(/#[^\r\n]*[\r\n]/g,"\n")},getLogIdListFromRules:function(){var e=this.getAllRulesText();if(e=e.match(/\slog:\/\/(?:\{[^\s]{1,36}\}|[^/\\{}()<>\s]{1,36})\s/g)){var t={};e=e.map(function(e){return e=E.removeProtocol(e.trim()),"{"===e[0]&&(e=e.slice(1,-1)),e}).filter(function(e){return e?t[e]?!1:(t[e]=1,!0):!1})}return e},getWeinreFromRules:function(){var e=this.state.values,t=this.getAllRulesText();if(t=t.match(/\sweinre:\/\/[^\s#]+\s/g)){var n={};t=t.map(function(t){t=E.removeProtocol(t.trim());var n=d(t);if(n!==!1)return n;var r=u(t);return r!==!1?(r=e.get(r),r&&r.value):t}).filter(function(e){return e?n[e]?!1:(n[e]=1,!0):!1})}return t},getValuesFromRules:function(){var e=" "+this.getAllRulesValue();return(e=e.match(/\s(?:[\w-]+:\/\/)?\{[^\s#]+\}/g))&&(e=e.map(function(e){return u(E.removeProtocol(e.trim()))}).filter(function(e){return!!e})),e},getAllRulesValue:function(){var e=[],t=[],n=[],r=this.state.rules;return r.list.forEach(function(o){var i=r.get(o),a=i.value||"";i.active?t.push(a):i.selected?n.push(a):e.push(a)}),r=this.state.values,r.list.forEach(function(t){/\.rules$/.test(t)&&e.push(r.get(t).value)}),t.concat(n).concat(e).join("\r\n")},preventBlur:function(e){"INPUT"!=e.target.nodeName&&e.preventDefault()},startLoadData:function(){function e(o,a){o=o||r.state.network,clearTimeout(i),i=null,"network"==r.state.name&&o&&(a=a||n(),o.update(a)&&a&&(i=setTimeout(e,3e3)),document.hidden||r.setState({network:o},function(){a&&t()}))}function t(){s.scrollTop=1e7}function n(){var e=a.find(".ReactVirtualized__Grid__innerScrollContainer")[0];return e?s.scrollTop+s.offsetHeight+5>e.offsetHeight:!0}var r=this;if(r._updateNetwork)return void r._updateNetwork();var o,i,a=h(".w-req-data-list .ReactVirtualized__Grid:first").scroll(function(){var t=r.state.network;o&&clearTimeout(o),o=null,t&&n()&&(o=setTimeout(function(){e(t,!0)},1e3))}),s=a[0];this.container=a,I.on("data",e),h(document).on("dblclick",".w-network-menu-list",function(e){h(e.target).hasClass("w-network-menu-list")&&(s.scrollTop=0)}),r._updateNetwork=e,r.autoRefresh=t,r.scrollerAtBottom=n},showPlugins:function(e){"plugins"!=this.state.name?(this.setMenuOptionsState(),this.hidePluginsOptions()):e&&!this.state.showLeftMenu&&this.showPluginsOptions(),this.setState({hasPlugins:!0,name:"plugins"}),E.changePageName("plugins")},handleAction:function(e){if("top"===e)return void(this.container[0].scrollTop=0);if("bottom"===e)return this.autoRefresh();if("pause"===e)return I.pauseNetworkRecord();var t="refresh"===e;return I.stopNetworkRecord(!t),t?this.autoRefresh():void 0},showNetwork:function(e){return"network"==this.state.name?void(e&&!this.state.showLeftMenu&&this.showNetworkOptions()):(this.setMenuOptionsState(),this.setState({hasNetwork:!0,name:"network"},function(){this.startLoadData()}),void E.changePageName("network"))},handleNetwork:function(e,t){var n=this.state.network;"removeAll"==e.id?this.clear():"removeSelected"==e.id?n&&n.removeSelectedItems():"removeUnselected"==e.id?n&&n.removeUnselectedItems():"exportWhistleFile"==e.id?this.exportSessions("whistle"):"exportSazFile"==e.id?this.exportSessions("Fiddler"):"importSessions"==e.id&&this.importSessions(t),this.hideNetworkOptions()},importData:function(e){switch(this.state.name){case"network":this.importSessions(e);break;case"rules":this.importRules(e);break;case"values":this.importValues(e)}},exportData:function(e,t){switch(this.state.name){case"network":var n=this.state.network,r=Array.isArray(t)||n&&n.hasSelected();if(this.currentFoucsItem=t,r){h(f.findDOMNode(this.refs.chooseFileType)).modal("show");var o=this;setTimeout(function(){f.findDOMNode(o.refs.sessionsName).focus()},500)}else Q.info("Please select the sessions first.");break;case"rules":this.showAndActiveRules({id:"exportRules"});break;case"values":this.showAndActiveValues({id:"exportValues"})}},importSessions:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteSessions.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.sessionsRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importSessions).click()},importRemoteSessions:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.sessionsRemoteUrl),r=i(n.value);r&&(t.setState({pendingSessions:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingSessions:!1}),e||(t.refs.importRemoteSessions.hide(),t.importAnySessions(n))})))}},importRules:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteRules.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.rulesRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importRules).click()},importRemoteRules:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.rulesRemoteUrl),r=i(n.value);r&&(t.setState({pendingRules:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingRules:!1}),e||(t.refs.importRemoteRules.hide(),n&&(t.rulesForm=o(n),t.refs.confirmImportRules.show()))})))}},importValues:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteValues.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.valuesRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importValues).click()},importRemoteValues:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.valuesRemoteUrl),r=i(n.value);r&&(t.setState({pendingValues:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingValues:!1}),e||(t.refs.importRemoteValues.hide(),n&&(t.valuesForm=o(n,"values"),t.refs.confirmImportValues.show()))})))}},_uploadRules:function(e,t){var n=this;I.upload.importRules(e,function(e,r){e?0===e.ec?(n.reloadRules(e),t&&Q.success("Successful synchronization Rules.")):alert(e.em):E.showSystemError(r)})},_uploadValues:function(e,t){var n=this;I.upload.importValues(e,function(e,r){e||E.showSystemError(r),0===e.ec?(n.reloadValues(e),t&&Q.success("Successful synchronization Values.")):alert(e.em)})},uploadRules:function(e){var t=this.rulesForm;if(this.rulesForm=null,t){var n=t.get("rules");if(!n||!/\.(txt|json)$/i.test(n.name))return alert("Only supports .txt or .json file.");if(n.size>P)return alert("The file size cannot exceed 6m.");h(e.target).hasClass("btn-danger")&&t.append("replaceAll","1"),this._uploadRules(t),f.findDOMNode(this.refs.importRules).value=""}},uploadValues:function(e){var t=this.valuesForm;if(this.valuesForm=null,t){var n=t.get("values");if(!n||!/\.(txt|json)$/i.test(n.name))return alert("Only supports .txt or .json file.");if(n.size>P)return alert("The file size cannot exceed 6m.");h(e.target).hasClass("btn-danger")&&t.append("replaceAll","1"),this._uploadValues(t),f.findDOMNode(this.refs.importValues).value=""}},uploadRulesForm:function(){this.rulesForm=new FormData(f.findDOMNode(this.refs.importRulesForm)),this.refs.confirmImportRules.show()},uploadValuesForm:function(){this.valuesForm=new FormData(f.findDOMNode(this.refs.importValuesForm)),this.refs.confirmImportValues.show()},clearNetwork:function(){this.clear(),this.hideNetworkOptions()},showAndActiveRules:function(e,t){if("rules"===this.state.name)switch(e.id){case"exportRules":this.refs.selectRulesDialog.show();break;case"importRules":this.importRules(t)}else this.setRulesActive(e.name),this.showRules();this.hideRulesOptions()},showRules:function(e){"rules"!=this.state.name?(this.setMenuOptionsState(),this.hideRulesOptions()):e&&!this.state.showLeftMenu&&this.showRulesOptions(e),this.setState({hasRules:!0,name:"rules"}),E.changePageName("rules")},showAndActiveValues:function(e,t){var n=this;if("values"===n.state.name&&e.id)switch(e.id){case"exportValues":n.refs.selectValuesDialog.show();break;case"importValues":this.importValues(t)}else{var r=n.state.values,o=e.name;r.exists(o)?n.setValuesActive(o):I.values.add({name:o},function(e,t){if(e&&0===e.ec){var i=r.add(o);n.setValuesActive(o),n.setState({activeValues:i})}else E.showSystemError(t)}),this.showValues()}n.hideValuesOptions()},showValues:function(e){"values"!=this.state.name?(this.setMenuOptionsState(),this.hideValuesOptions()):e&&!this.state.showLeftMenu&&this.showValuesOptions(e),this.setState({hasValues:!0,name:"values"}),E.changePageName("values")},showNetworkOptions:function(){"network"==this.state.name&&this.setState({showNetworkOptions:!0})},hideNetworkOptions:function(){this.setState({showRemoveOptions:!1,showAbortOptions:!1,showNetworkOptions:!1})},showRemoveOptions:function(){this.setState({showRemoveOptions:!0})},showAbortOptions:function(){var e=this.state.network,t=e&&e.getSelectedList();ee[0].disabled=!t||!t.filter(E.canAbort).length,this.setState({showAbortOptions:!0})},showCreateOptions:function(){this.setState({showCreateOptions:!0})},hideCreateOptions:function(){this.setState({showCreateOptions:!1})},hideRemoveOptions:function(){this.setState({showRemoveOptions:!1})},hideAbortOptions:function(){this.setState({showAbortOptions:!1})},showHelpOptions:function(){this.setState({showHelpOptions:!0})},hideHelpOptions:function(){this.setState({showHelpOptions:!1})},showHasNewVersion:function(e){this.setState({hasNewVersion:e})},showRulesOptions:function(e){var t,n=this,r=n.state.rules,o=r.data,i=r.list;if("rules"===n.state.name){var a=i.length;K[0].disabled=2>a,K[1].disabled=1>a,t=K}else t=[],i.forEach(function(e){t.push(o[e])});n.setState({rulesOptions:t,showRulesOptions:!0})},hideRulesOptions:function(){this.setState({showRulesOptions:!1})},showValuesOptions:function(e){var t,n=this,r=this.state.values.list;if("values"===n.state.name){var o=r.length;q[0].disabled=2>o,q[1].disabled=1>o,t=q}else{t=[];var i=n.getValuesFromRules()||[];i=E.unique(r.concat(i));var a=[];i.forEach(function(e){var n=-1!=r.indexOf(e),o={name:e,icon:n?"edit":"plus"};n?t.push(o):a.push(o)}),t=a.concat(t)}n.setState({valuesOptions:t,showValuesOptions:!0})},hideValuesOptions:function(){this.setState({showValuesOptions:!1})},showAndActivePlugins:function(e){this.hidePluginsOptions(),this.showPlugins(),this.showPluginTab(e.name)},showPluginTab:function(e){var t="Home",n=this.state.tabs||[];if(e&&e!=t)for(var r=0,o=n.length;o>r;r++)if(n[r].name==e){t=e,e=null;break}if(e&&this.state.plugins[e+":"]){if(n.length>=F)return alert("You can only open "+F+" tabs."),this.showPlugins();t=e,n.push({name:e,url:"plugin."+e+"/"})}this.setState({active:t,tabs:n})},activePluginTab:function(e){this.showPluginTab(h(e.target).attr("data-name"))},closePluginTab:function(e){var t=h(e.target).attr("data-name"),n=this.state.tabs||[];if(n)for(var r=0,o=n.length;o>r;r++)if(n[r].name==t){n.splice(r,1);var i=this.state.active;if(i==t){var a=n[r]||n[r-1];this.state.active=a?a.name:null}return this.setState({tabs:n})}},showPluginsOptions:function(e){this.setState({showPluginsOptions:!0})},hidePluginsOptions:function(){this.setState({showPluginsOptions:!1})},showWeinreOptionsQuick:function(e){var t=this.getWeinreFromRules();return t&&t.length?void h(e.target).closest("div").addClass("w-menu-wrapper-show"):void this.showAnonymousWeinre()},showWeinreOptions:function(e){var t=this,n=t.state.weinreOptions=t.getWeinreFromRules()||[];t.state.weinreOptions=E.unique(n).map(function(e){return{name:e,icon:"console"}}),t.setState({showWeinreOptions:!0})},hideWeinreOptions:function(){this.setState({showWeinreOptions:!1})},setMenuOptionsState:function(e,t){var n={showCreateRules:!1,showCreateValues:!1,showCreateRuleGroup:!1,showCreateValueGroup:!1,showEditRules:!1,showEditValues:!1,showCreateOptions:!1};e&&(n[e]=!0),this.setState(n,t)},hideRulesInput:function(){this.setState({showCreateRules:!1})},hideValuesInput:function(){this.setState({showCreateValues:!1})},hideRuleGroup:function(){this.setState({showCreateRuleGroup:!1})},hideValueGroup:function(){this.setState({showCreateValueGroup:!1})},hideRenameRuleInput:function(){this.setState({showEditRules:!1})},hideRenameValueInput:function(){this.setState({showEditValues:!1})},showCreateRules:function(){var e=f.findDOMNode(this.refs.createRulesInput);this.setState({showCreateRules:!0},function(){e.focus()})},showCreateValues:function(){var e=f.findDOMNode(this.refs.createValuesInput);this.setState({showCreateValues:!0},function(){e.focus()})},showCreateRuleGroup:function(){var e=f.findDOMNode(this.refs.createRuleGroupInput);this.setState({showCreateRuleGroup:!0},function(){e.focus()})},showCreateValueGroup:function(){var e=f.findDOMNode(this.refs.createValueGroupInput);this.setState({showCreateValueGroup:!0},function(){e.focus()})},showHttpsSettingsDialog:function(){h(f.findDOMNode(this.refs.rootCADialog)).modal("show")},interceptHttpsConnects:function(e){var t=this,n=e.target.checked;I.interceptHttpsConnects({interceptHttpsConnects:n?1:0},function(e,r){e&&0===e.ec?t.state.interceptHttpsConnects=n:E.showSystemError(r),t.setState({})})},enableHttp2:function(e){if(!I.supportH2)return window.confirm("The current version of Node.js cannot support HTTP/2.\nPlease upgrade to the latest LTS version.")&&window.open("https://nodejs.org/"),void this.setState({});var t=this,n=e.target.checked;I.enableHttp2({enableHttp2:n?1:0},function(e,r){e&&0===e.ec?t.state.enableHttp2=n:E.showSystemError(r),t.setState({})})},createRules:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=f.findDOMNode(t.refs.createRulesInput),r=h.trim(n.value);if(!r)return void Q.error("The name cannot be empty.");var o=t.state.rules;return o.exists(r)?void Q.error("The name '"+r+"' already exists."):void I.rules.add({name:r},function(e,i){if(e&&0===e.ec){var a=o.add(r);t.setRulesActive(r),n.value="",n.blur(),t.setState({activeRules:a}),t.triggerRulesChange("create")}else E.showSystemError(i)})}},createValues:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=f.findDOMNode(t.refs.createValuesInput),r=h.trim(n.value);if(!r)return void Q.error("The name cannot be empty.");if(/\s/.test(r))return void Q.error("The name cannot contain spaces.");if(/#/.test(r))return void Q.error("The name cannot contain #.");var o=t.state.values;return o.exists(r)?void Q.error("The name '"+r+"' already exists."):void I.values.add({name:r},function(e,i){if(e&&0===e.ec){var a=o.add(r);t.setValuesActive(r),n.value="",n.blur(),t.setState({activeValues:a}),t.triggerValuesChange("create")}else E.showSystemError(i); -})}},showEditRules:function(e){this.currentFoucsRules=e;var t=this.state.rules,n=e||t.getActive();if(n&&!n.isDefault){var r=f.findDOMNode(this.refs.editRulesInput);r.value=n.name,this.setState({showEditRules:!0,selectedRule:n},function(){r.select(),r.focus()})}},showEditValuesByDBClick:function(e){!e.changed&&this.showEditValues()},showEditValues:function(e){this.currentFoucsValues=e;var t=this.state.values,n=e||t.getActive();if(n&&!n.isDefault){var r=f.findDOMNode(this.refs.editValuesInput);r.value=n.name,this.setState({showEditValues:!0,selectedValue:n},function(){r.select(),r.focus()})}},editRules:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=t.state.rules,r=this.currentFoucsRules||n.getActive();if(r){var o=f.findDOMNode(t.refs.editRulesInput),i=h.trim(o.value);return i?n.exists(i)?void Q.error("The name '"+i+"' already exists."):void I.rules.rename({name:r.name,newName:i},function(e,a){e&&0===e.ec?(n.rename(r.name,i),t.currentFoucsRules||t.setRulesActive(i),o.value="",o.blur(),t.setState(t.currentFoucsRules?{}:{activeValues:r}),t.triggerRulesChange("rename")):E.showSystemError(a)}):void Q.error("The name cannot be empty.")}}},editValues:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=t.state.values,o=this.currentFoucsValues||n.getActive();if(o){var i=f.findDOMNode(t.refs.editValuesInput),a=h.trim(i.value);return a?n.exists(a)?void Q.error("The name '"+a+"' already exists."):void I.values.rename({name:o.name,newName:a},function(e,s){e&&0===e.ec?(n.rename(o.name,a),t.currentFoucsValues||t.setValuesActive(a),i.value="",i.blur(),t.setState(t.currentFoucsValues?{}:{activeValues:o}),t.triggerValuesChange("rename"),r(o)):E.showSystemError(s)}):void Q.error("The name cannot be empty.")}}},showAnonymousWeinre:function(){this.openWeinre()},showWeinre:function(e){this.openWeinre(e.name)},openWeinre:function(e){window.open("weinre/client/#"+(e||"anonymous")),this.setState({showWeinreOptions:!1})},onClickRulesOption:function(e){e.selected?this.unselectRules(e):this.selectRules(e)},selectRules:function(e){var t=this;return I.rules[e.isDefault?"enableDefault":"select"](e,function(n,r){n&&0===n.ec?(t.reselectRules(n),t.state.rules.setChanged(e.name,!1),t.setState({}),t.triggerRulesChange("save"),t.state.disabledAllRules&&confirm("All rules are disabled, do you want to enable them?")&&I.rules.disableAllRules({disabledAllRules:0},function(e,n){e&&0===e.ec?(t.state.disabledAllRules=!1,t.setState({})):E.showSystemError(n)})):E.showSystemError(r)}),!1},selectRulesByOptions:function(e){var t=this.state.rules.data[h(e.target).attr("data-name")];this[e.target.checked?"selectRules":"unselectRules"](t)},unselectRules:function(e){var t=this;return I.rules[e.isDefault?"disableDefault":"unselect"](e,function(e,n){e&&0===e.ec?(t.reselectRules(e),t.setState({})):E.showSystemError(n)}),!1},reselectRules:function(e,t){var n=this;n.state.rules.clearAllSelected(),n.setSelected(n.state.rules,"Default",!e.defaultRulesIsDisabled,t),e.list.forEach(function(e){n.setSelected(n.state.rules,e,!0,t)})},saveValues:function(e){if(e.changed){var t=this;return I.values.add(e,function(n,o){n&&0===n.ec?(t.setSelected(t.state.values,e.name),t.triggerValuesChange("save"),r(e)):E.showSystemError(o)}),!1}},setSelected:function(e,t,n,r){e.setSelected(t,n)&&(r||e.setChanged(t,!1),this.setState({curSelectedName:t}))},replayCountChange:function(e){var t=e.target.value.replace(/^\s*0*|[^\d]+/,""),n=t.slice(0,2);n>G&&(n=G),this.setState({replayCount:n})},clickReplay:function(e){e.shiftKey?L.trigger("replaySessions",[null,e.shiftKey]):this.replay(e)},replay:function(e,t,n){var r=this.state.network;if(t=Array.isArray(t)?t:r&&r.getSelectedList(),t&&t.length){var o=function(e){var t=e.req;E.canReplay(e)&&I.compose2({useH2:e.useH2?1:"",url:e.url,headers:E.getOriginalReqHeaders(e),method:t.method,base64:t.base64})};if(n>1){n=Math.min(n,G);var i=t[0];if(E.canReplay(i))for(var a=0;n>a;a++)o(i)}else t.slice(0,G).forEach(o);this.autoRefresh&&this.autoRefresh()}},composer:function(){L.trigger("composer")},showFiles:function(){this.refs.filesDialog.show(this.files)},clear:function(){var e=this.state.network;e&&this.setState({network:e.clear(),showRemoveOptions:!1})},removeRules:function(e){var t=this,n=this.state.rules,r=e||n.getActive();if(r&&!r.isDefault){var o=r.name;confirm("Are you sure to delete this rule group '"+o+"'.")&&I.rules.remove({name:o},function(r,i){if(r&&0===r.ec){var a=e&&!e.active?null:n.getSibling(o);a&&t.setRulesActive(a.name),n.remove(o),t.setState(e?{}:{activeRules:a}),t.triggerRulesChange("remove")}else E.showSystemError(i)})}},removeValues:function(e){var t=this,n=this.state.values,r=e||n.getActive();if(r&&!r.isDefault){var o=r.name;confirm("Are you sure to delete this Value '"+o+"'.")&&I.values.remove({name:o},function(r,i){if(r&&0===r.ec){var a=e&&!e.active?null:n.getSibling(o);a&&t.setValuesActive(a.name),n.remove(o),t.setState(e?{}:{activeValues:a}),t.triggerValuesChange("remove")}else E.showSystemError(i)})}},setRulesActive:function(e,t){t=t||this.state.rules,S.set("activeRules",e),t.setActive(e)},setValuesActive:function(e,t){t=t||this.state.values,S.set("activeValues",e),t.setActive(e)},showRulesSettings:function(){h(f.findDOMNode(this.refs.rulesSettingsDialog)).modal("show")},showValuesSettings:function(){h(f.findDOMNode(this.refs.valuesSettingsDialog)).modal("show")},toggleLeftMenu:function(){var e=!this.state.showLeftMenu;this.setState({showLeftMenu:e}),S.set("showLeftMenu",e?1:"")},handleCreate:function(e){"rules"==this.state.name?this.showCreateRules():this.showCreateValues()},onClickMenu:function(e){var t,n=h(e.target).closest("a"),r=this,o="rules"==r.state.name;n.hasClass("w-edit-menu")?o?r.showEditRules():r.showEditValues():n.hasClass("w-delete-menu")?o?r.removeRules():r.removeValues():n.hasClass("w-save-menu")&&(o?(t=r.state.rules.getChangedList(),t.length&&(t.forEach(function(e){r.selectRules(e)}),r.setState({}))):(t=r.state.values.getChangedList(),t.length&&(t.forEach(function(e){r.saveValues(e)}),r.setState({}))))},showSettings:function(e){var t=this.state.name;return"rules"===t?void this.showRulesSettings():"values"===t?void this.showValuesSettings():void this.refs.networkSettings.showDialog()},activeRules:function(e){S.set("activeRules",e.name),this.setState({activeRules:e})},activeValues:function(e){S.set("activeValues",e.name),this.setState({activeValues:e})},onRulesThemeChange:function(e){var t=e.target.value;S.set("rulesTheme",t),this.setState({rulesTheme:t})},onValuesThemeChange:function(e){var t=e.target.value;S.set("valuesTheme",t),this.setState({valuesTheme:t})},onRulesFontSizeChange:function(e){var t=e.target.value;S.set("rulesFontSize",t),this.setState({rulesFontSize:t})},onValuesFontSizeChange:function(e){var t=e.target.value;S.set("valuesFontSize",t),this.setState({valuesFontSize:t})},onRulesLineNumberChange:function(e){var t=e.target.checked;S.set("showRulesLineNumbers",t),this.setState({showRulesLineNumbers:t})},onValuesLineNumberChange:function(e){var t=e.target.checked;S.set("showValuesLineNumbers",t),this.setState({showValuesLineNumbers:t})},onRulesLineWrappingChange:function(e){var t=e.target.checked;S.set("autoRulesLineWrapping",t?1:""),this.setState({autoRulesLineWrapping:t})},onValuesLineWrappingChange:function(e){var t=e.target.checked;S.set("autoValuesLineWrapping",t?1:""),this.setState({autoValuesLineWrapping:t})},disableAllRules:function(e){var t=e.target,n=e.target.checked,r=this;"disableAll"!==t.name&&(n=!n),I.rules.disableAllRules({disabledAllRules:n?1:0},function(e,t){if(e&&0===e.ec){var o=r.state;o.disabledAllRules=n,r.setState({})}else E.showSystemError(t)}),e.preventDefault()},disableAllPlugins:function(e){var t,n=this,r=n.state;t="INPUT"===e.target.nodeName?!e.target.checked:!r.disabledAllPlugins,I.plugins.disableAllPlugins({disabledAllPlugins:t?1:0},function(e,o){e&&0===e.ec?(r.disabledAllPlugins=t,D.setPlugins(r),n.setState({})):E.showSystemError(o)}),e.preventDefault()},disablePlugin:function(e){var t=this,n=e.target;return t.state.ndp?Q.warn("Not allowed disable plugins."):void I.plugins.disablePlugin({name:h(n).attr("data-name"),disabled:n.checked?0:1},function(e,n){e&&0===e.ec?(t.state.disabledPlugins=e.data,D.setPlugins(t.state),t.setState({})):E.showSystemError(n)})},abort:function(e){if(!Array.isArray(e)){var t=this.state.network;e=t&&t.getSelectedList()}e&&(e=e.map(function(e){return E.canAbort(e)?e.id:void 0}),e.length&&I.abort({list:e.join()})),this.hideAbortOptions()},allowMultipleChoice:function(e){var t=this,n=e.target.checked;I.rules.allowMultipleChoice({allowMultipleChoice:n?1:0},function(e,r){e&&0===e.ec?t.setState({allowMultipleChoice:n}):E.showSystemError(r)})},enableBackRulesFirst:function(e){var t=this,n=e.target.checked;I.rules.enableBackRulesFirst({backRulesFirst:n?1:0},function(e,r){e&&0===e.ec?t.setState({backRulesFirst:n}):E.showSystemError(r)})},reinstallAllPlugins:function(){L.trigger("updateAllPlugins","reinstallAllPlugins")},chooseFileType:function(e){var t=e.target.value;S.set("exportFileType",t),this.setState({exportFileType:t})},uploadSessions:function(){this.uploadSessionsForm(new FormData(f.findDOMNode(this.refs.importSessionsForm))),f.findDOMNode(this.refs.importSessions).value=""},importHarSessions:function(e){if(e&&"object"==typeof e){var t=e.log.entries,n=[];t.forEach(function(e){if(e){var t=new Date(e.startedDateTime).getTime();if(!isNaN(t)){var r=e.request||{},o=e.response||{},i=E.parseHeadersFromHar(r.headers),a=E.parseHeadersFromHar(o.headers),s=e.clientIPAddress||"127.0.0.1",l=e.serverIPAddress||"",c={method:r.method,ip:s,httpVersion:"1.1",size:r.bodySize,headers:i.headers,rawHeaderNames:i.rawHeaderNames,body:r.postData&&r.postData.text||""},u={httpVersion:"1.1",statusCode:o.status,statusMessage:o.statusText,size:o.bodySize,headers:a.headers,rawHeaderNames:a.rawHeaderNames,ip:l,body:""},d=o.content,p=d&&d.text;p&&("IMG"===E.getContentType(d.mimeType)||p.length%4===0&&/^[a-z\d+/]+={0,2}$/i.test(p)?u.base64=p:u.body=p);var h={startTime:t,url:r.url,req:c,res:u,rules:{}},g=e.timings||{},f=Math.round(t+E.getTimeFromHar(e.time));t=Math.floor(t+E.getTimeFromHar(g.dns)),h.dnsTime=t,t=Math.floor(t+E.getTimeFromHar(g.connect)+E.getTimeFromHar(g.ssl)+E.getTimeFromHar(g.send)+E.getTimeFromHar(g.blocked)+E.getTimeFromHar(g.wait)),h.requestTime=t,t=Math.floor(t+E.getTimeFromHar(g.receive)),h.responseTime=t,h.endTime=Math.max(t,f),n.push(h)}}}),I.addNetworkList(n)}},uploadSessionsForm:function(e){var t=e.get("importSessions");if(!t||!/\.(txt|json|saz|har)$/i.test(t.name))return alert("Only supports .txt, .json, .saz or .har file.");if(t.size>V)return alert("The file size cannot exceed 64m.");var n=/\.txt$/i.test(t.name);if(n||/\.har$/i.test(t.name)){var r=this;return void E.readFileAsText(t,function(e){try{e=JSON.parse(e),n?I.addNetworkList(e):r.importHarSessions(e)}catch(t){alert("Incorrect file format.")}})}I.upload.importSessions(e,I.addNetworkList)},exportSessions:function(e,t){var n=this.state.network,r=this.currentFoucsItem;if(this.currentFoucsItem=null,r&&h(f.findDOMNode(this.refs.chooseFileType)).is(":visible")||(r=n&&n.getSelectedList()),r&&r.length){var o=f.findDOMNode(this.refs.exportSessionsForm);f.findDOMNode(this.refs.exportFilename).value=t||"",f.findDOMNode(this.refs.exportFileType).value=e,f.findDOMNode(this.refs.sessions).value=JSON.stringify(r,null," "),o.submit()}},exportBySave:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=f.findDOMNode(this.refs.sessionsName),n=t.value.trim();t.value="",this.exportSessions(this.state.exportFileType,n),h(f.findDOMNode(this.refs.chooseFileType)).modal("hide")}},replayRepeat:function(e){e&&"click"!==e.type&&13!==e.keyCode||(this.refs.setReplayCount.hide(),this.replay("",this.replayList,this.state.replayCount),L.trigger("focusNetworkList"))},showAboutDialog:function(e){h(e.target).closest(".w-menu-enable").length&&this.refs.aboutDialog.showAboutInfo()},showCustomCertsInfo:function(){var e=this;e.loadingCerts||(e.loadingCerts=!0,I.getCustomCertsInfo(function(t,n){return e.loadingCerts=!1,t?void e.refs.certsInfoDialog.show(t):void E.showSystemError(n)}))},forceShowLeftMenu:function(){var e=this;clearTimeout(e.hideTimer),clearTimeout(e.showTimer),e.showTimer=setTimeout(function(){e.setState({forceShowLeftMenu:!0})},200)},forceHideLeftMenu:function(){var e=this;clearTimeout(e.hideTimer),clearTimeout(e.showTimer),e.hideTimer=setTimeout(function(){e.setState({forceShowLeftMenu:!1})},500)},render:function(){var e=this.state,t=e.networkMode,n=e.rulesMode,r=e.pluginsMode,o=e.multiEnv,i=e.name;t?i="network":n?i="network"===i?"rules":i:r&&(i="plugins"!==i?"network":i);var a=void 0===i||"network"==i,l="rules"==i,c="values"==i,u="plugins"==i,d=!0,h=!0,f=e.rulesTheme||"cobalt",m=e.valuesTheme||"cobalt",M=e.rulesFontSize||"14px",E=e.valuesFontSize||"14px",D=e.showRulesLineNumbers||!1,L=e.showValuesLineNumbers||!1,S=e.autoRulesLineWrapping,Q=e.autoValuesLineWrapping,O=e.rulesOptions,F=e.pluginsOptions,V={},P=e.showNetworkOptions,Y=e.showRulesOptions,G=e.showValuesOptions,W=e.showPluginsOptions,X=e.showWeinreOptions,_=e.showHelpOptions;O[0].name===H&&O.forEach(function(t,n){t.icon=n&&e.multiEnv?"edit":"checkbox",t.selected||(V[t.name]=1)});var K,q;if(l){q=e.rules.data;for(K in q)if(q[K].active){d=h=q[K].isDefault;break}}else if(c){q=e.values.data;for(K in q)if(q[K].active){d=h=!1;break}}if(e.network){e.network.rulesModal=e.rules,e.rules.editorTheme={theme:f,fontSize:M,lineNumbers:D};var te=e.networkOptions,ne=e.network.hasUnselected();e.network.hasSelected()?(te.forEach(function(e){e.disabled=!1,"removeUnselected"===e.id&&(e.disabled=!ne)}),$.forEach(function(e){e.disabled=!1,"removeUnselected"===e.id&&(e.disabled=!ne)})):(te.forEach(function(e){-1!==J.indexOf(e.id)?e.disabled=!0:"removeUnselected"===e.id&&(e.disabled=!ne)}),te[0].disabled=!ne,$.forEach(function(e){-1!==J.indexOf(e.id)?e.disabled=!0:"removeUnselected"===e.id&&(e.disabled=!ne)}))}var re,oe,ie=e.pendingSessions,ae=e.pendingRules,se=e.pendingValues,le=Z&&!e.forceShowLeftMenu,ce=t||e.showLeftMenu,ue=e.disabledAllPlugins;return ce&&Z&&(re=this.forceShowLeftMenu,oe=this.forceHideLeftMenu),g.createElement("div",{className:"main orient-vertical-box"+(ce?" w-show-left-menu":"")},g.createElement("div",{className:"w-menu w-"+i+"-menu-list",onMouseEnter:re,onMouseLeave:oe},g.createElement("a",{onClick:this.toggleLeftMenu,draggable:"false",className:"w-show-left-menu-btn",style:{display:t?"none":void 0},title:"Dock to "+(ce?"top":"left")+" (Ctrl[Command] + M)"},g.createElement("span",{className:"glyphicon glyphicon-chevron-"+(ce?le?"down":"up":"left")})),g.createElement("div",{style:{display:n?"none":void 0},onMouseEnter:this.showNetworkOptions,onMouseLeave:this.hideNetworkOptions,className:"w-nav-menu w-menu-wrapper"+(P?" w-menu-wrapper-show":"")},g.createElement("a",{onClick:this.showNetwork,onDoubleClick:this.clearNetwork,className:"w-network-menu",title:"Double click to remove all sessions",style:{background:"network"==i?"#ddd":null},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-globe"}),"Network"),g.createElement(T,{ref:"networkMenuItem",options:e.networkOptions,className:"w-network-menu-item",onClickOption:this.handleNetwork})),g.createElement("div",{style:{display:r?"none":void 0},onMouseEnter:this.showRulesOptions,onMouseLeave:this.hideRulesOptions,className:"w-nav-menu w-menu-wrapper"+(Y?" w-menu-wrapper-show":"")+(l?" w-menu-auto":"")},g.createElement("a",{onClick:this.showRules,className:"w-rules-menu",style:{background:"rules"==i?"#ddd":null},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-list"}),"Rules"),g.createElement(T,{ref:"rulesMenuItem",name:"rules"==i?null:"Open",options:O,checkedOptions:V,disabled:e.disabledAllRules,className:"w-rules-menu-item",onClick:this.showRules,onClickOption:this.showAndActiveRules,onChange:this.selectRulesByOptions})),g.createElement("div",{style:{display:r?"none":void 0},onMouseEnter:this.showValuesOptions,onMouseLeave:this.hideValuesOptions,className:"w-nav-menu w-menu-wrapper"+(G?" w-menu-wrapper-show":"")+(c?" w-menu-auto":"")},g.createElement("a",{onClick:this.showValues,className:"w-values-menu",style:{background:"values"==i?"#ddd":null},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-folder-close"}),"Values"),g.createElement(T,{ref:"valuesMenuItem",name:"values"==i?null:"Open",options:e.valuesOptions,className:"w-values-menu-item",onClick:this.showValues,onClickOption:this.showAndActiveValues})),g.createElement("div",{ref:"pluginsMenu",onMouseEnter:this.showPluginsOptions,onMouseLeave:this.hidePluginsOptions,className:"w-nav-menu w-menu-wrapper"+(W?" w-menu-wrapper-show":"")},g.createElement("a",{onClick:this.showPlugins,className:"w-plugins-menu",style:{background:"plugins"==i?"#ddd":null},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-list-alt"}),"Plugins"),g.createElement(T,{ref:"pluginsMenuItem",name:"plugins"==i?null:"Open",options:F,checkedOptions:e.disabledPlugins,disabled:ue,className:"w-plugins-menu-item",onClick:this.showPlugins,onChange:this.disablePlugin,onClickOption:this.showAndActivePlugins})),!e.ndp&&g.createElement("a",{onClick:this.disableAllPlugins,className:"w-enable-plugin-menu",style:{display:u?"":"none",color:ue?"#f66":void 0},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-"+(ue?"ok-circle":"ban-circle")}),ue?"EnableAll":"DisableAll"),g.createElement(z,{hide:!u}),g.createElement("a",{onClick:this.reinstallAllPlugins,className:"w-plugins-menu"+(u?"":" hide"),draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-download-alt"}),"ReinstallAll"),g.createElement("a",{onClick:this.importData,className:"w-import-menu",style:{display:u?"none":""},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-import"}),"Import"),g.createElement("a",{onClick:this.exportData,className:"w-export-menu",style:{display:u?"none":""},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-export"}),"Export"),g.createElement("div",{onMouseEnter:this.showRemoveOptions,onMouseLeave:this.hideRemoveOptions,style:{display:a?"":"none"},className:"w-menu-wrapper w-remove-menu-list w-menu-auto"+(e.showRemoveOptions?" w-menu-wrapper-show":"")},g.createElement("a",{onClick:this.clear,className:"w-remove-menu",title:"Ctrl[Command] + X",draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-remove"}),"Clear"),g.createElement(T,{options:$,className:"w-remove-menu-item",onClickOption:this.handleNetwork})),g.createElement("a",{onClick:this.onClickMenu,className:"w-save-menu",style:{display:a||u?"none":""},draggable:"false",title:"Ctrl[Command] + S"},g.createElement("span",{className:"glyphicon glyphicon-save-file"}),"Save"),g.createElement("a",{className:"w-create-menu",style:{display:a||u?"none":""},draggable:"false",onClick:this.handleCreate},g.createElement("span",{className:"glyphicon glyphicon-plus"}),"Create"),g.createElement("a",{onClick:this.onClickMenu,className:"w-edit-menu"+(d?" w-disabled":""),style:{display:a||u?"none":""},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-edit"}),"Rename"),g.createElement("div",{onMouseEnter:this.showAbortOptions,onMouseLeave:this.hideAbortOptions,style:{display:a?"":"none"},className:"w-menu-wrapper w-abort-menu-list w-menu-auto"+(e.showAbortOptions?" w-menu-wrapper-show":"")},g.createElement("a",{onClick:this.clickReplay,className:"w-replay-menu",draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-repeat"}),"Replay"),g.createElement(T,{options:ee,className:"w-remove-menu-item",onClickOption:this.abort})),g.createElement("a",{onClick:this.composer,className:"w-composer-menu",style:{display:a?"":"none"},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-edit"}),"Compose"),g.createElement(v,{hide:!a,onClick:this.handleAction}),g.createElement("a",{onClick:this.onClickMenu,className:"w-delete-menu"+(h?" w-disabled":""),style:{display:a||u?"none":""},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-trash"}),"Delete"),g.createElement(B,{onClick:this.showSettings,disabledRules:l&&e.disabledAllRules,isNetwork:a,hide:u}),g.createElement("a",{onClick:this.showFiles,className:"w-files-menu",draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-upload"}),"Files"),g.createElement("div",{onMouseEnter:this.showWeinreOptions,onMouseLeave:this.hideWeinreOptions,className:"w-menu-wrapper"+(X?" w-menu-wrapper-show":"")},g.createElement("a",{onClick:this.showWeinreOptionsQuick,onDoubleClick:this.showAnonymousWeinre,className:"w-weinre-menu",draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-console"}),"Weinre"),g.createElement(T,{ref:"weinreMenuItem",name:"anonymous",options:e.weinreOptions,className:"w-weinre-menu-item",onClick:this.showAnonymousWeinre,onClickOption:this.showWeinre})),g.createElement("a",{onClick:this.showHttpsSettingsDialog,className:"w-https-menu",draggable:"false",style:{color:I.hasInvalidCerts?"red":void 0}},g.createElement("span",{className:"glyphicon glyphicon-"+(e.interceptHttpsConnects?"ok":"lock")}),"HTTPS"),g.createElement("div",{onMouseEnter:this.showHelpOptions,onMouseLeave:this.hideHelpOptions,className:"w-menu-wrapper"+(_?" w-menu-wrapper-show":"")},g.createElement("a",{className:"w-help-menu"+(e.hasNewVersion?" w-menu-enable":""),onClick:this.showAboutDialog,title:e.hasNewVersion?"There is a new version of whistle":void 0,href:e.hasNewVersion?void 0:"https://github.com/avwo/whistle#whistle",target:e.hasNewVersion?void 0:"_blank"},g.createElement("span",{className:"glyphicon glyphicon-question-sign"}),"Help"),g.createElement(T,{ref:"helpMenuItem",options:e.helpOptions,name:g.createElement(b,{ref:"aboutDialog",onClick:this.hideHelpOptions,onCheckUpdate:this.showHasNewVersion}),className:"w-help-menu-item"})),g.createElement(y,{name:i}),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateRules?"block":"none"},className:"shadow w-input-menu-item w-create-rules-input"},g.createElement("input",{ref:"createRulesInput",onKeyDown:this.createRules,onBlur:this.hideRulesInput,type:"text",maxLength:"64",placeholder:"Input the name"}),g.createElement("button",{type:"button",onClick:this.createRules,className:"btn btn-primary"},"+Rule")),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateValues?"block":"none"},className:"shadow w-input-menu-item w-create-values-input"},g.createElement("input",{ref:"createValuesInput",onKeyDown:this.createValues,onBlur:this.hideValuesInput,type:"text",maxLength:"64",placeholder:"Input the key"}),g.createElement("button",{type:"button",onClick:this.createValues,className:"btn btn-primary"},"+Key")),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateRuleGroup?"block":"none"},className:"shadow w-input-menu-item w-create-rules-input"},g.createElement("input",{ref:"createRuleGroupInput",onKeyDown:this.createRules,onBlur:this.hideRuleGroup,type:"text",maxLength:"64",placeholder:"Input the group name"}),g.createElement("button",{type:"button",onClick:this.createRuleGroup,className:"btn btn-primary"},"+Group")),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateValueGroup?"block":"none"},className:"shadow w-input-menu-item w-create-values-input"},g.createElement("input",{ref:"createValueGroupInput",onKeyDown:this.createValues,onBlur:this.hideValueGroup,type:"text",maxLength:"64",placeholder:"Input the group name"}),g.createElement("button",{type:"button",onClick:this.createValueGroup,className:"btn btn-primary"},"+Group")),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showEditRules?"block":"none"},className:"shadow w-input-menu-item w-edit-rules-input"},g.createElement("input",{ref:"editRulesInput",onKeyDown:this.editRules,onBlur:this.hideRenameRuleInput,type:"text",maxLength:"64"}),g.createElement("button",{type:"button",onClick:this.editRules,className:"btn btn-primary"},"OK")),g.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showEditValues?"block":"none"},className:"shadow w-input-menu-item w-edit-values-input"},g.createElement("input",{ref:"editValuesInput",onKeyDown:this.editValues,onBlur:this.hideRenameValueInput,type:"text",maxLength:"64"}),g.createElement("button",{type:"button",onClick:this.editValues,className:"btn btn-primary"},"OK"))),g.createElement("div",{className:"w-container box fill"},g.createElement("div",{className:"w-left-menu"+(re?" w-hover-left-menu":""),style:{display:t||le?"none":void 0},onMouseEnter:re,onMouseLeave:oe},g.createElement("a",{onClick:this.showNetwork,onDoubleClick:this.clearNetwork,title:"Double click to remove all sessions",className:"w-network-menu",style:{background:"network"==i?"#ddd":null,display:n?"none":void 0},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-globe"}),g.createElement("i",null,"Network")),g.createElement("a",{onClick:this.showRules,className:"w-save-menu w-rules-menu",onDoubleClick:this.onClickMenu,title:"Double click to save all changed",style:{background:"rules"==i?"#ddd":null,display:r?"none":void 0},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-list"+(e.disabledAllRules?" w-disabled":"")}),g.createElement("i",null,!e.classic&&!e.ndr&&g.createElement("input",{onChange:this.disableAllRules,type:"checkbox",onClick:s,checked:!e.disabledAllRules,title:e.disabledAllRules?"Click to enable all rules":"Click to disable all rules"})," Rules"),g.createElement("i",{className:"w-menu-changed",style:{display:e.rules.hasChanged()?void 0:"none"}},"*")),g.createElement("a",{onClick:this.showValues,className:"w-save-menu w-values-menu",onDoubleClick:this.onClickMenu,title:"Double click to save all changed",style:{background:"values"==i?"#ddd":null,display:r?"none":void 0},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-folder-close"}),g.createElement("i",null,"Values"),g.createElement("i",{className:"w-menu-changed",style:{display:e.values.hasChanged()?void 0:"none"}},"*")),g.createElement("a",{onClick:this.showPlugins,className:"w-plugins-menu",style:{background:"plugins"==i?"#ddd":null},draggable:"false"},g.createElement("span",{className:"glyphicon glyphicon-list-alt"+(ue?" w-disabled":"")}),g.createElement("i",null,!e.classic&&!e.ndp&&g.createElement("input",{onChange:this.disableAllPlugins,type:"checkbox",onClick:s,checked:!ue,title:ue?"Click to enable all plugins":"Click to disable all plugins"})," Plugins"))),e.hasRules?g.createElement(A,{ref:"rules",disabled:e.disabledAllRules,theme:f,lineWrapping:S,fontSize:M,lineNumbers:D,onSelect:this.selectRules,onUnselect:this.unselectRules,onActive:this.activeRules,modal:e.rules,hide:"rules"==i?!1:!0,name:"rules"}):void 0,e.hasValues?g.createElement(A,{theme:m,onDoubleClick:this.showEditValuesByDBClick,fontSize:E,lineWrapping:Q,lineNumbers:L,onSelect:this.saveValues,onActive:this.activeValues,modal:e.values,hide:"values"==i?!1:!0,className:"w-values-list"}):void 0,e.hasNetwork?g.createElement(w,{ref:"network",hide:"rules"===i||"values"===i||"plugins"===i,modal:e.network}):void 0,e.hasPlugins?g.createElement(C,p({},e,{onOpen:this.activePluginTab,onClose:this.closePluginTab,onActive:this.activePluginTab,onChange:this.disablePlugin,ref:"plugins",hide:"plugins"==i?!1:!0})):void 0),g.createElement("div",{ref:"rulesSettingsDialog",className:"modal fade w-rules-settings-dialog"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-body"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},g.createElement("span",{"aria-hidden":"true"},"×")),g.createElement(x,{theme:f,fontSize:M,lineNumbers:D,lineWrapping:S,onLineWrappingChange:this.onRulesLineWrappingChange,onThemeChange:this.onRulesThemeChange,onFontSizeChange:this.onRulesFontSizeChange,onLineNumberChange:this.onRulesLineNumberChange}),g.createElement("p",{className:"w-editor-settings-box"},g.createElement("label",null,g.createElement("input",{type:"checkbox",checked:e.backRulesFirst,onChange:this.enableBackRulesFirst})," Back rules first")),g.createElement("p",{className:"w-editor-settings-box"},g.createElement("label",{style:{color:o?"#aaa":void 0}},g.createElement("input",{type:"checkbox",disabled:o,checked:!o&&e.allowMultipleChoice,onChange:this.allowMultipleChoice})," Use multiple rules")),!e.ndr&&g.createElement("p",{className:"w-editor-settings-box"},g.createElement("label",{style:{color:e.disabledAllRules?"#f66":void 0}},g.createElement("input",{type:"checkbox",checked:e.disabledAllRules,onChange:this.disableAllRules,name:"disableAll"})," Disable all rules"))),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),g.createElement("div",{ref:"valuesSettingsDialog",className:"modal fade w-values-settings-dialog"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-body"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},g.createElement("span",{"aria-hidden":"true"},"×")),g.createElement(x,{theme:m,fontSize:E,lineNumbers:L,lineWrapping:Q,onLineWrappingChange:this.onValuesLineWrappingChange,onThemeChange:this.onValuesThemeChange,onFontSizeChange:this.onValuesFontSizeChange,onLineNumberChange:this.onValuesLineNumberChange})),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),g.createElement(N,{ref:"networkSettings"}),g.createElement("div",{ref:"rootCADialog",className:"modal fade w-https-dialog"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-body"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},g.createElement("span",{"aria-hidden":"true"},"×")),g.createElement("div",null,g.createElement("a",{className:"w-help-menu",title:"Click here to learn how to install root ca",href:"https://avwo.github.io/whistle/webui/https.html",target:"_blank"},g.createElement("span",{className:"glyphicon glyphicon-question-sign"})),g.createElement("a",{className:"w-download-rootca",title:"http://rootca.pro/",href:"cgi-bin/rootca",target:"downloadTargetFrame"},"Download RootCA")),g.createElement("a",{title:"http://rootca.pro/",href:"cgi-bin/rootca",target:"downloadTargetFrame"},g.createElement("img",{src:"img/qrcode.png"})),g.createElement("div",{className:"w-https-settings"},g.createElement("p",null,g.createElement("label",{title:o?"Use `pattern enable://capture` in rules to replace global configuration":void 0},g.createElement("input",{disabled:o,checked:e.interceptHttpsConnects,onChange:this.interceptHttpsConnects,type:"checkbox"})," Capture TUNNEL CONNECTs")),g.createElement("p",null,g.createElement("label",null,g.createElement("input",{checked:I.supportH2&&e.enableHttp2,onChange:this.enableHttp2,type:"checkbox"})," Enable HTTP/2")),g.createElement("a",{draggable:"false",style:{color:I.hasInvalidCerts?"red":void 0},onClick:this.showCustomCertsInfo},"View custom certs info"),g.createElement(R,{ref:"certsInfoDialog"}))),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),g.createElement("div",{ref:"chooseFileType",className:"modal fade w-choose-filte-type"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-body"},g.createElement("label",{className:"w-choose-filte-type-label"},"Save as:",g.createElement("input",{ref:"sessionsName", -onKeyDown:this.exportBySave,placeholder:"Input the filename",className:"form-control",maxLength:"64"}),g.createElement("select",{ref:"fileType",className:"form-control",value:e.exportFileType,onChange:this.chooseFileType},g.createElement("option",{value:"whistle"},"*.txt"),g.createElement("option",{value:"Fiddler"},"*.saz"))),g.createElement("a",{type:"button",onKeyDown:this.exportBySave,tabIndex:"0",onMouseDown:this.preventBlur,className:"btn btn-primary",onClick:this.exportBySave},"Export"))))),g.createElement(j,{ref:"setReplayCount",wstyle:"w-replay-count-dialog"},g.createElement("div",{className:"modal-body"},g.createElement("label",null,"Count:",g.createElement("input",{ref:"replayCount",onKeyDown:this.replayRepeat,onChange:this.replayCountChange,value:e.replayCount,className:"form-control",maxLength:"2"})),g.createElement("a",{type:"button",onKeyDown:this.replayRepeat,tabIndex:"0",onMouseDown:this.preventBlur,className:"btn btn-primary",onClick:this.replayRepeat},"Replay"))),g.createElement(j,{ref:"importRemoteRules",wstyle:"w-import-remote-dialog"},g.createElement("div",{className:"modal-body"},g.createElement("input",{readOnly:ae,ref:"rulesRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteRules,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-primary",disabled:ae,onMouseDown:this.preventBlur,onClick:this.importRemoteRules},ae?"Importing rules":"Import rules"),g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),g.createElement(j,{ref:"importRemoteSessions",wstyle:"w-import-remote-dialog"},g.createElement("div",{className:"modal-body"},g.createElement("input",{readOnly:ie,ref:"sessionsRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteSessions,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-primary",disabled:ie,onMouseDown:this.preventBlur,onClick:this.importRemoteSessions},ie?"Importing sessions":"Import sessions"),g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),g.createElement(j,{ref:"importRemoteValues",wstyle:"w-import-remote-dialog"},g.createElement("div",{className:"modal-body"},g.createElement("input",{readOnly:se,ref:"valuesRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteValues,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-primary",disabled:se,onMouseDown:this.preventBlur,onClick:this.importRemoteValues},se?"Importing values":"Import values"),g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),g.createElement("div",{ref:"showUpdateTipsDialog",className:"modal fade w-show-update-tips-dialog"},g.createElement("div",{className:"modal-dialog"},g.createElement("div",{className:"modal-content"},g.createElement("div",{className:"modal-body"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},g.createElement("span",{"aria-hidden":"true"},"×")),g.createElement("p",{className:"w-show-update-tips"},"whistle has important updates, it is recommended that you update to the latest version."),g.createElement("p",null,"Current version: ",e.version),g.createElement("p",null,"The latest stable version: ",e.latestVersion),g.createElement("p",null,"View change: ",g.createElement("a",{title:"Change log",href:"https://github.com/avwo/whistle/blob/master/CHANGELOG.md",target:"_blank"},"CHANGELOG.md"))),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-default",onClick:this.donotShowAgain,"data-dismiss":"modal"},"Don't show again"),g.createElement("a",{type:"button",className:"btn btn-primary",onClick:this.hideUpdateTipsDialog,href:"https://avwo.github.io/whistle/update.html",target:"_blank"},"Update now"))))),g.createElement(j,{ref:"confirmReload",wstyle:"w-confirm-reload-dialog"},g.createElement("div",{className:"modal-body w-confirm-reload"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},g.createElement("span",{"aria-hidden":"true"},"×")),g.createElement("div",{className:"w-reload-data-tips"})),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"No"),g.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.reloadData,"data-dismiss":"modal"},"Yes"))),g.createElement(j,{ref:"confirmImportRules",wstyle:"w-confirm-import-dialog"},g.createElement("div",{className:"modal-body w-confirm-import"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},g.createElement("span",{"aria-hidden":"true"},"×")),"Whether to replace the existing rules?"),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-danger",onClick:this.uploadRules,"data-dismiss":"modal"},"Replace"),g.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.uploadRules,"data-dismiss":"modal"},"Reserve"))),g.createElement(j,{ref:"confirmImportValues",wstyle:"w-confirm-import-dialog"},g.createElement("div",{className:"modal-body w-confirm-import"},g.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},g.createElement("span",{"aria-hidden":"true"},"×")),"Whether to replace the existing values?"),g.createElement("div",{className:"modal-footer"},g.createElement("button",{type:"button",className:"btn btn-danger",onClick:this.uploadValues,"data-dismiss":"modal"},"Replace"),g.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.uploadValues,"data-dismiss":"modal"},"Reserve"))),g.createElement(U,{ref:"filesDialog"}),g.createElement(k,{ref:"selectRulesDialog",name:"rules",list:e.rules.list}),g.createElement(k,{ref:"selectValuesDialog",name:"values",list:e.values.list}),g.createElement("iframe",{name:"downloadTargetFrame",style:{display:"none"}}),g.createElement("form",{ref:"exportSessionsForm",action:"cgi-bin/sessions/export",style:{display:"none"},method:"post",target:"downloadTargetFrame"},g.createElement("input",{ref:"exportFilename",name:"exportFilename",type:"hidden"}),g.createElement("input",{ref:"exportFileType",name:"exportFileType",type:"hidden"}),g.createElement("input",{ref:"sessions",name:"sessions",type:"hidden"})),g.createElement("form",{ref:"importSessionsForm",encType:"multipart/form-data",style:{display:"none"}},g.createElement("input",{ref:"importSessions",onChange:this.uploadSessions,type:"file",name:"importSessions",accept:".txt,.json,.saz,.har"})),g.createElement("form",{ref:"importRulesForm",encType:"multipart/form-data",style:{display:"none"}},g.createElement("input",{ref:"importRules",onChange:this.uploadRulesForm,name:"rules",type:"file",accept:".txt,.json"})),g.createElement("form",{ref:"importValuesForm",encType:"multipart/form-data",style:{display:"none"}},g.createElement("input",{ref:"importValues",onChange:this.uploadValuesForm,name:"values",type:"file",accept:".txt,.json"})))}});I.getInitialData(function(e){f.render(g.createElement(te,{modal:e}),document.getElementById("container"))})},function(e,t,n){var r=n(2);"string"==typeof r&&(r=[[e.id,r,""]]);n(4)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(3)(),t.push([e.id,".w-menu{height:28px;border-top:1px solid #fcfcfc;background:#f1f3f4;padding-right:5pc;position:relative;z-index:1001}.w-menu a{text-decoration:none!important;color:#000;padding:0 5px;line-height:26px;height:26px;margin-right:5px;display:inline-block}.w-detail .glyphicon,.w-menu .glyphicon{margin-right:3px}.w-menu .glyphicon-folder-close,.w-menu .glyphicon-folder-open{margin-right:6px}.w-menu .w-online{position:absolute;right:0}.w-left-menu a:hover,.w-left-menu a:hover .w-disabled,.w-menu .w-online,.w-menu a:hover{color:#337ab7}.w-menu .w-offline{color:#ccc!important;cursor:default}.w-frames-action .w-disabled,.w-menu .w-disabled{color:#888!important;cursor:not-allowed!important}.w-left-menu .w-disabled{color:#888}.w-menu .w-menu-enable{color:#f66!important}.w-menu .w-menu-wrapper{display:inline-block;position:relative;height:30px}.w-show-update-tips{font-weight:700}.w-input-menu-item{display:block;position:absolute;background:#fff;border:1px solid #ccc;border-radius:2px;z-index:101;top:30px;display:none;white-space:nowrap}.w-input-menu-item input{width:246px;height:2pc;border:1px solid #ccc;border-radius:2px;padding:0 5px;vertical-align:middle}.w-input-menu-item .btn{height:2pc;padding:0 9pt;vertical-align:middle;border-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.w-create-rules-input{left:310px}.w-create-values-input{left:300px}.w-edit-rules-input{left:382px}.w-edit-values-input{left:372px}.w-show-left-menu .w-create-rules-input{left:210px}.w-show-left-menu .w-create-values-input{left:200px}.w-show-left-menu .w-edit-rules-input{left:282px}.w-show-left-menu .w-edit-values-input{left:17pc}.w-menu-wrapper .w-menu-item{display:none!important}.w-menu-wrapper-show .w-menu-item{display:block!important}.w-values-list .glyphicon{display:none!important}.w-values-list a{font-weight:400!important}.w-disabled .glyphicon-ok,.w-disabled .glyphicon-stop{color:#ccc!important}.w-rules-settings-dialog .modal-dialog{width:25pc}.w-values-settings-dialog .modal-dialog{width:300px}.w-show-update-tips-dialog .modal-dialog{width:21pc}.w-show-update-tips-dialog .modal-body p{margin-bottom:5px}.w-https-dialog .modal-dialog{width:340px}.w-https-help{margin-left:150px}.w-https-dialog .modal-dialog div{white-space:nowrap}.w-https-dialog a{display:inline-block}.w-download-rootca,.w-https-help{line-height:30px}.w-https-settings label{font-weight:400}.w-https-settings p{margin:10px 0}.w-is-link{cursor:pointer;text-decoration:underline}.w-choose-filte-type .modal-dialog{width:456px}.w-choose-filte-type-label{white-space:nowrap}.w-choose-filte-type-label .form-control{margin-left:10px;width:200px;display:inline-block;font-weight:400}.w-choose-filte-type-label select.form-control{margin:0 5px;width:5pc}.w-confirm-import-dialog .modal-dialog{width:20pc;font-weight:700}.w-show-left-menu-btn{padding:0 15px!important;margin-right:0!important}.w-left-menu{background:#f1f3f4;border:1px solid #ccc;border-bottom:none;display:none}.w-show-left-menu .w-left-menu{display:block;border-left:none}.w-show-left-menu .w-nav-menu{display:none}.w-left-menu a{display:block;position:relative;padding:10px 0 8px;width:45px;overflow:hidden;text-align:center;text-decoration:none!important;color:#000}.w-left-menu a span{margin-right:5px}.w-left-menu a i{display:block;font-style:normal;font-size:13px;zoom:1;transform:scale(0.7,0.7);width:66px;margin-left:-11px}.w-left-menu-tips{padding:6px 10px;display:none;left:47px;top:3px;position:absolute;z-index:1;border-radius:4px}.w-left-menu a:hover .w-left-menu-tips{display:block;color:#000;background-color:#f1f3f4;font-weight:700;border:1px solid #ccc}.w-left-menu a .w-left-menu-tips:hover,.w-menu .w-export-menu,.w-menu .w-import-menu,.w-menu .w-remove-menu-list{display:none}.w-show-left-menu .w-export-menu,.w-show-left-menu .w-import-menu,.w-show-left-menu .w-remove-menu-list{display:inline-block}.w-menu-changed{position:absolute;top:2px;left:2px;color:red}.w-replay-count-dialog .modal-content{width:236px;white-space:nowrap}.w-replay-count-dialog .modal-content label{width:auto}.w-replay-count-dialog input{display:inline-block;width:5pc;text-align:center;margin:0 10px}.w-import-remote-dialog .modal-content{width:525px}.w-import-remote-dialog input{width:500px;height:30px;line-height:30px;padding:5px}.w-https-menu .glyphicon-lock{color:#9e9e26}.w-hover-left-menu{position:absolute;z-index:1;height:auto;border-bottom:1px solid #ccc;min-height:0}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;tn;n++)if(-1===g.inArray(e[n],t))return!1;var o=t.length;if(r!==o)for(n=0;o>n;n++)if(-1===g.inArray(t[n],e))return!1;return!0}function u(e){if(0==e.indexOf("{")){var t=e.lastIndexOf("}");return t>1&&e.substring(1,t)}return!1}function d(e){if(0==e.indexOf("(")){var t=e.lastIndexOf(")");return-1!=t&&e.substring(1,t)||""}return!1}var p=Object.assign||function(e){for(var t=1;tn?1:-1)}).forEach(function(n){var r=e[n];t.push({name:n.slice(0,-1),icon:"checkbox",mtime:r.mtime,homepage:r.homepage,latest:r.latest,hideLongProtocol:r.hideLongProtocol,hideShortProtocol:r.hideShortProtocol})}),t},reloadRules:function(e){var t=this,n=S.get("activeRules",!0)||e.current,r=[],o={};r.push(H),o.Default={name:H,fixed:!0,value:e.defaultRules,selected:!e.defaultRulesIsDisabled,isDefault:!0,active:n===H},e.list.forEach(function(e){r.push(e.name),e=o[e.name]={name:e.name,value:e.data,selected:e.selected,active:n===e.name}}),t.state.rules.reset(r,o),t.setState({})},reloadValues:function(e){var t=this,n=S.get("activeValues",!0)||e.current,r=[],o={};e.list.forEach(function(e){r.push(e.name),o[e.name]={name:e.name,value:e.data,active:n===e.name}}),t.state.values.reset(r,o),t.setState({})},reloadData:function(){var e=this,t=g(".w-reload-data-tips").closest(".w-confirm-reload-dialog"),n=t.find(".w-reload-data-tips").attr("data-name"),r="rules"===n,o=function(t,n){return t?void(r?(e.reloadRules(t),e.triggerRulesChange("reload")):(e.reloadValues(t),e.triggerValuesChange("reload"))):void E.showSystemError(n)};r?I.rules.list(o):I.values.list(o)},showReloadRules:function(){if("rules"===this.state.name&&this.rulesChanged){this.rulesChanged=!1;var e=this.state.rules.hasChanged();this.showReloadDialog("The rules has been modified.
Do you want to reload it.",e)}},showReloadValues:function(){if("values"===this.state.name&&this.valuesChanged){this.valuesChanged=!1;var e=this.state.values.hasChanged();this.showReloadDialog("The values has been modified.
Do you want to reload it.",e)}},componentDidUpdate:function(){this.showReloadRules(),this.showReloadValues()},showReloadDialog:function(e,t){var n=this.refs.confirmReload;n.show(),t&&(e+='

Note: There are unsaved changes.

'),g(".w-reload-data-tips").html(e).attr("data-name",this.state.name)},componentDidMount:function(){function e(e){if(e=e&&e.trim()){var t=e.indexOf("://")+3;if(e=-1!=t?e.substring(t):e,0===e.indexOf("{"))return t=e.lastIndexOf("}"),t>1?e.substring(1,t):null}}var t=this,n=new m(".w-copy-text");n.on("error",function(e){alert("Copy failed.")}),n=new m(".w-copy-text-with-tips"),n.on("error",function(e){Q.error("Copy failed.")}),n.on("success",function(e){Q.success("Copied clipboard.")});var r=function(e){e.preventDefault()};L.on("rulesChanged",function(){t.rulesChanged=!0,t.showReloadRules()}),L.on("updateGlobal",function(){t.setState({})}),L.on("valuesChanged",function(){t.valuesChanged=!0,t.showReloadValues()}),L.on("disableAllPlugins",function(e){t.disableAllPlugins(e)}),L.on("showFiles",function(e,n){t.files=t.files||n,t.showFiles()}),L.on("activeRules",function(){var e=I.rulesModal;e.exists(I.activeRulesName)&&(t.setRulesActive(I.activeRulesName,e),t.setState({}))}),L.on("activeValues",function(){var e=I.valuesModal;e.exists(I.activeValuesName)&&(t.setValuesActive(I.activeValuesName,e),t.setState({}))}),g(document).on("dragleave",r).on("dragenter",r).on("dragover",r).on("drop",function(e){e.preventDefault();var n=e.originalEvent.dataTransfer.files,r=n&&n[0];if(r){if(g(".w-files-dialog.in").length)return L.trigger("uploadFile",r);var o,i=t.state.name,a=g(e.target);if("network"===i){if(a.closest(".w-frames-composer").length)return;if(/\.log$/i.test(r.name))return r.size>P?alert("The file size cannot exceed 2m."):void E.readFileAsText(r,function(e){e=E.parseLogs(e),e&&(null!==I.uploadLogs&&(I.uploadLogs=e),L.trigger("showLog"),L.trigger("uploadLogs",{logs:e}))});o=new FormData,o.append("importSessions",n[0]),t.uploadSessionsForm(o)}a.closest(".w-divider-left").length&&("rules"===i?(o=new FormData,o.append("rules",n[0]),t.rulesForm=o,t.refs.confirmImportRules.show()):"values"===i&&(o=new FormData,o.append("values",n[0]),t.valuesForm=o,t.refs.confirmImportValues.show()))}}).on("keydown",function(e){(e.metaKey||e.ctrlKey)&&82===e.keyCode&&e.preventDefault()});var i=function(e){var n=e.target;"A"==n.nodeName&&g(n).parent().hasClass("w-list-data")&&("rules"==t.state.name?t.removeRules():t.removeValues()),e.preventDefault()};g(window).on("hashchange",function(){var e=l(t.state);e&&-1==e.indexOf("rules")?-1!=e.indexOf("values")?t.showValues():-1!=e.indexOf("plugins")?t.showPlugins():t.showNetwork():t.showRules()}).on("keyup",function(e){if(27==e.keyCode){t.setMenuOptionsState();var n=g(".modal");"function"==typeof n.modal&&n.modal("hide")}}).on("keydown",function(e){if(46==e.keyCode&&i(e),!e.ctrlKey&&!e.metaKey)return void(112===e.keyCode?(e.preventDefault(),window.open("https://avwo.github.io/whistle/webui/"+t.state.name+".html")):116===e.keyCode&&e.preventDefault());77===e.keyCode&&t.toggleLeftMenu();var n="network"===t.state.name;n&&88==e.keyCode&&(E.isFocusEditor()||g(e.target).closest(".w-frames-list").length||t.clear()),68==e.keyCode&&i(e);var r=t.state.network;if(n&&83===e.keyCode){if(e.preventDefault(),g(".modal.in").length)return void(g(f.findDOMNode(t.refs.chooseFileType)).is(":visible")&&t.exportBySave());var o=e.target.nodeName;if("INPUT"===o||"TEXTAREA"===o)return;var a=r&&r.hasSelected();return void(a&&(g(f.findDOMNode(t.refs.chooseFileType)).modal("show"),setTimeout(function(){f.findDOMNode(t.refs.sessionsName).focus()},500)))}n&&73===e.keyCode&&(t.importSessions(e),e.preventDefault())});var a=function(){var e=t.state.name;return"rules"===e||"values"===e};g(document.body).on("mouseenter",W,function(t){if(a()&&(t.ctrlKey||t.metaKey)){var n=g(this);(n.hasClass("cm-js-http-url")||n.hasClass("cm-string")||n.hasClass("cm-js-at")||e(n.text()))&&n.addClass("w-is-link")}}).on("mouseleave",W,function(e){g(this).removeClass("w-is-link")}).on("mousedown",W,function(n){if(a()&&(n.ctrlKey||n.metaKey)){var r=g(this),o=r.text();if(r.hasClass("cm-js-at"))return void(_.test(o)&&window.open((RegExp.$1||"http:")+RegExp.$2));if(r.hasClass("cm-string"))return void(X.test(o)&&window.open((RegExp.$1||"http:")+RegExp.$2));if(r.hasClass("cm-js-http-url"))return/^https?:\/\//i.test(o)||(o="http:"+("/"===o[0]?"":"//")+o),void window.open(o);var i=e(o);return i?void t.showAndActiveValues({name:i}):void 0}}),"network"==t.state.name&&t.startLoadData(),I.on("settings",function(e){var n=t.state,r=e.server;(n.interceptHttpsConnects!==e.interceptHttpsConnects||n.enableHttp2!==e.enableHttp2||n.disabledAllRules!==e.disabledAllRules||n.allowMultipleChoice!==e.allowMultipleChoice||n.disabledAllPlugins!==e.disabledAllPlugins||n.multiEnv!=r.multiEnv||n.classic!=e.classic||n.ndp!=r.ndp||n.ndr!=r.ndr)&&(n.interceptHttpsConnects=e.interceptHttpsConnects,n.enableHttp2=e.enableHttp2,n.disabledAllRules=e.disabledAllRules,n.allowMultipleChoice=e.allowMultipleChoice,n.disabledAllPlugins=e.disabledAllPlugins,n.multiEnv=r.multiEnv,n.ndp=r.ndp,n.ndr=r.ndr,n.classic=e.classic,D.setPlugins(n),t.setState({}))}),I.on("rules",function(e){var n=t.state.rules,r=e.list;e.defaultRulesIsDisabled||-1!==r.indexOf("Default")||r.unshift("Default");var o=n.getSelectedNames();c(o,r)||(t.reselectRules(e,!0),t.setState({}))}),I.on("serverInfo",function(e){t.serverInfo=e}),L.on("executeComposer",function(){t.autoRefresh&&t.autoRefresh()});var s=function(e){return e&&!e.selected?[e]:void 0};L.on("updateUI",function(){t.setState({})}),L.on("replaySessions",function(e,n,r){var o=t.state.network,i=s(n)||o&&o.getSelectedList(),a=i&&i.length;return r&&1===a?(t.replayList=i,t.refs.setReplayCount.show(),void setTimeout(function(){var e=f.findDOMNode(t.refs.replayCount);e.select(),e.focus()},300)):void t.replay(e,i)}),L.on("importSessions",t.importSessions),L.on("filterSessions",t.showSettings),L.on("exportSessions",function(e,n){t.exportData(e,s(n))}),L.on("abortRequest",function(e,n){t.abort(s(n))}),L.on("uploadSessions",function(e,n){var r=s(n&&n.curItem),o=n&&n.upload;if("function"==typeof o){if(!r){var i=t.state.network;r=i&&i.getSelectedList(),r&&r.length&&(r=g.extend(!0,[],r))}r&&o(r)}}),L.on("removeIt",function(e,n){var r=t.state.network;n&&r&&(r.remove(n),t.setState({}))}),L.on("removeOthers",function(e,n){var r=t.state.network;n&&r&&(n.selected?r.removeUnselectedItems():r.removeOthers(n),t.setState({}))}),L.on("clearAll",t.clear),L.on("removeSelected",function(){var e=t.state.network;e&&(e.removeSelectedItems(),t.setState({}))}),L.on("removeUnselected",function(){var e=t.state.network;e&&(e.removeUnselectedItems(),t.setState({}))}),L.on("removeUnmarked",function(){var e=t.state.network;e&&(e.removeUnmarkedItems(),t.setState({}))}),L.on("saveRules",function(e,n){n.changed||!n.selected?t.selectRules(n):t.unselectRules(n)}),L.on("saveValues",function(e,n){t.saveValues(n)}),L.on("renameRules",function(e,n){t.showEditRules(n)}),L.on("renameValues",function(e,n){t.showEditValues(n)}),L.on("deleteRules",function(e,n){setTimeout(function(){t.removeRules(n)},0)}),L.on("deleteValues",function(e,n){setTimeout(function(){t.removeValues(n)},0)}),L.on("createRules",t.showCreateRules),L.on("createValues",t.showCreateValues),L.on("createRuleGroup",t.showCreateRuleGroup),L.on("createValueGroup",t.showCreateValueGroup),L.on("exportRules",t.exportData),L.on("exportValues",t.exportData),L.on("importRules",t.importRules),L.on("importValues",t.importValues),L.on("uploadRules",function(e,n){var r=o(n);r.append("replaceAll","1"),t._uploadRules(r,!0)}),L.on("uploadValues",function(e,n){var r=o(n,"values");r.append("replaceAll","1"),t._uploadValues(r,!0)});var u;g(document).on("visibilitychange",function(){clearTimeout(u),document.hidden||(u=setTimeout(function(){var e=t.scrollerAtBottom&&t.scrollerAtBottom();t.setState({},function(){e&&t.autoRefresh()})},100))}),setTimeout(function(){I.checkUpdate(function(e){e&&e.showUpdate&&t.setState({version:e.version,latestVersion:e.latestVersion},function(){g(f.findDOMNode(t.refs.showUpdateTipsDialog)).modal("show")})})},1e4),I.getLogIdList=this.getLogIdListFromRules,I.importAnySessions=t.importAnySessions,I.on("plugins",function(e){var n=t.createPluginsOptions(e.plugins),r=t.state.pluginsOptions,o=t.state.disabledPlugins,i=e.disabledPlugins;if(n.length==r.length){for(var a,s=0,l=n.length;l>s;s++){var c=n[s],u=r[s];if(c.name!=u.name||c.latest!==u.latest||c.mtime!=u.mtime||o[c.name]!=i[c.name]||c.hideLongProtocol!=u.hideLongProtocol||c.hideShortProtocol!=u.hideShortProtocol){a=!0;break}}if(!a)return}var d={plugins:e.plugins,disabledPlugins:e.disabledPlugins,pluginsOptions:n};D.setPlugins(d),t.setState(d)});try{var d=window.parent.onWhistleReady;"function"==typeof d&&d({url:location.href,importSessions:t.importAnySessions,importHarSessions:t.importHarSessions,clearSessions:t.clear})}catch(p){}},importAnySessions:function(e){e&&(Array.isArray(e)?I.addNetworkList(e):this.importHarSessions(e))},donotShowAgain:function(){I.donotShowAgain()},hideUpdateTipsDialog:function(){g(f.findDOMNode(this.refs.showUpdateTipsDialog)).modal("hide")},getAllRulesText:function(){var e=" "+this.getAllRulesValue();return e.replace(/#[^\r\n]*[\r\n]/g,"\n")},getLogIdListFromRules:function(){var e=this.getAllRulesText();if(e=e.match(/\slog:\/\/(?:\{[^\s]{1,36}\}|[^/\\{}()<>\s]{1,36})\s/g)){var t={};e=e.map(function(e){return e=E.removeProtocol(e.trim()),"{"===e[0]&&(e=e.slice(1,-1)),e}).filter(function(e){return e?t[e]?!1:(t[e]=1,!0):!1})}return e},getWeinreFromRules:function(){var e=this.state.values,t=this.getAllRulesText();if(t=t.match(/\sweinre:\/\/[^\s#]+\s/g)){var n={};t=t.map(function(t){t=E.removeProtocol(t.trim());var n=d(t);if(n!==!1)return n;var r=u(t);return r!==!1?(r=e.get(r),r&&r.value):t}).filter(function(e){return e?n[e]?!1:(n[e]=1,!0):!1})}return t},getValuesFromRules:function(){var e=" "+this.getAllRulesValue();return(e=e.match(/\s(?:[\w-]+:\/\/)?\{[^\s#]+\}/g))&&(e=e.map(function(e){return u(E.removeProtocol(e.trim()))}).filter(function(e){return!!e})),e},getAllRulesValue:function(){var e=[],t=[],n=[],r=this.state.rules;return r.list.forEach(function(o){var i=r.get(o),a=i.value||"";i.active?t.push(a):i.selected?n.push(a):e.push(a)}),r=this.state.values,r.list.forEach(function(t){/\.rules$/.test(t)&&e.push(r.get(t).value)}),t.concat(n).concat(e).join("\r\n")},preventBlur:function(e){"INPUT"!=e.target.nodeName&&e.preventDefault()},startLoadData:function(){function e(o,a){o=o||r.state.network,clearTimeout(i),i=null,"network"==r.state.name&&o&&(a=a||n(),o.update(a)&&a&&(i=setTimeout(e,3e3)),document.hidden||r.setState({network:o},function(){a&&t()}))}function t(){s.scrollTop=1e7}function n(){var e=a.find(".ReactVirtualized__Grid__innerScrollContainer")[0];return e?s.scrollTop+s.offsetHeight+5>e.offsetHeight:!0}var r=this;if(r._updateNetwork)return void r._updateNetwork();var o,i,a=g(".w-req-data-list .ReactVirtualized__Grid:first").scroll(function(){var t=r.state.network;o&&clearTimeout(o),o=null,t&&n()&&(o=setTimeout(function(){e(t,!0)},1e3))}),s=a[0];this.container=a,I.on("data",e),g(document).on("dblclick",".w-network-menu-list",function(e){g(e.target).hasClass("w-network-menu-list")&&(s.scrollTop=0)}),r._updateNetwork=e,r.autoRefresh=t,r.scrollerAtBottom=n},showPlugins:function(e){"plugins"!=this.state.name?(this.setMenuOptionsState(),this.hidePluginsOptions()):e&&!this.state.showLeftMenu&&this.showPluginsOptions(),this.setState({hasPlugins:!0,name:"plugins"}),E.changePageName("plugins")},handleAction:function(e){if("top"===e)return void(this.container[0].scrollTop=0);if("bottom"===e)return this.autoRefresh();if("pause"===e)return I.pauseNetworkRecord();var t="refresh"===e;return I.stopNetworkRecord(!t),t?this.autoRefresh():void 0},showNetwork:function(e){return"network"==this.state.name?void(e&&!this.state.showLeftMenu&&this.showNetworkOptions()):(this.setMenuOptionsState(),this.setState({hasNetwork:!0,name:"network"},function(){this.startLoadData()}),void E.changePageName("network"))},handleNetwork:function(e,t){var n=this.state.network;"removeAll"==e.id?this.clear():"removeSelected"==e.id?n&&n.removeSelectedItems():"removeUnselected"==e.id?n&&n.removeUnselectedItems():"exportWhistleFile"==e.id?this.exportSessions("whistle"):"exportSazFile"==e.id?this.exportSessions("Fiddler"):"importSessions"==e.id&&this.importSessions(t),this.hideNetworkOptions()},importData:function(e){switch(this.state.name){case"network":this.importSessions(e);break;case"rules":this.importRules(e);break;case"values":this.importValues(e)}},exportData:function(e,t){switch(this.state.name){case"network":var n=this.state.network,r=Array.isArray(t)||n&&n.hasSelected();if(this.currentFoucsItem=t,r){g(f.findDOMNode(this.refs.chooseFileType)).modal("show");var o=this;setTimeout(function(){f.findDOMNode(o.refs.sessionsName).focus()},500)}else Q.info("Please select the sessions first.");break;case"rules":this.showAndActiveRules({id:"exportRules"});break;case"values":this.showAndActiveValues({id:"exportValues"})}},importSessions:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteSessions.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.sessionsRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importSessions).click()},importRemoteSessions:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.sessionsRemoteUrl),r=i(n.value);r&&(t.setState({pendingSessions:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingSessions:!1}),e||(t.refs.importRemoteSessions.hide(),t.importAnySessions(n))})))}},importRules:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteRules.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.rulesRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importRules).click()},importRemoteRules:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.rulesRemoteUrl),r=i(n.value);r&&(t.setState({pendingRules:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingRules:!1}),e||(t.refs.importRemoteRules.hide(),n&&(t.rulesForm=o(n),t.refs.confirmImportRules.show()))})))}},importValues:function(e,t){var n=this,r=e&&e.shiftKey||t&&t.shiftKey;return r?(n.refs.importRemoteValues.show(),void setTimeout(function(){var e=f.findDOMNode(n.refs.valuesRemoteUrl);e.focus(),e.select()},500)):void f.findDOMNode(n.refs.importValues).click()},importRemoteValues:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=this,n=f.findDOMNode(t.refs.valuesRemoteUrl),r=i(n.value);r&&(t.setState({pendingValues:!0}),I.importRemote({url:r},a(function(e,n){t.setState({pendingValues:!1}),e||(t.refs.importRemoteValues.hide(),n&&(t.valuesForm=o(n,"values"),t.refs.confirmImportValues.show()))})))}},_uploadRules:function(e,t){var n=this;I.upload.importRules(e,function(e,r){e?0===e.ec?(n.reloadRules(e),t&&Q.success("Successful synchronization Rules.")):alert(e.em):E.showSystemError(r)})},_uploadValues:function(e,t){var n=this;I.upload.importValues(e,function(e,r){e||E.showSystemError(r),0===e.ec?(n.reloadValues(e),t&&Q.success("Successful synchronization Values.")):alert(e.em)})},uploadRules:function(e){var t=this.rulesForm;if(this.rulesForm=null,t){var n=t.get("rules");if(!n||!/\.(txt|json)$/i.test(n.name))return alert("Only supports .txt or .json file.");if(n.size>Y)return alert("The file size cannot exceed 6m.");g(e.target).hasClass("btn-danger")&&t.append("replaceAll","1"),this._uploadRules(t),f.findDOMNode(this.refs.importRules).value=""}},uploadValues:function(e){var t=this.valuesForm;if(this.valuesForm=null,t){var n=t.get("values");if(!n||!/\.(txt|json)$/i.test(n.name))return alert("Only supports .txt or .json file.");if(n.size>Y)return alert("The file size cannot exceed 6m.");g(e.target).hasClass("btn-danger")&&t.append("replaceAll","1"),this._uploadValues(t),f.findDOMNode(this.refs.importValues).value=""}},uploadRulesForm:function(){this.rulesForm=new FormData(f.findDOMNode(this.refs.importRulesForm)),this.refs.confirmImportRules.show()},uploadValuesForm:function(){this.valuesForm=new FormData(f.findDOMNode(this.refs.importValuesForm)),this.refs.confirmImportValues.show()},clearNetwork:function(){this.clear(),this.hideNetworkOptions()},showAndActiveRules:function(e,t){if("rules"===this.state.name)switch(e.id){case"exportRules":this.refs.selectRulesDialog.show();break;case"importRules":this.importRules(t)}else this.setRulesActive(e.name),this.showRules();this.hideRulesOptions()},showRules:function(e){"rules"!=this.state.name?(this.setMenuOptionsState(),this.hideRulesOptions()):e&&!this.state.showLeftMenu&&this.showRulesOptions(e),this.setState({hasRules:!0,name:"rules"}),E.changePageName("rules")},showAndActiveValues:function(e,t){var n=this;if("values"===n.state.name&&e.id)switch(e.id){case"exportValues":n.refs.selectValuesDialog.show();break;case"importValues":this.importValues(t)}else{var r=n.state.values,o=e.name;r.exists(o)?n.setValuesActive(o):I.values.add({name:o},function(e,t){if(e&&0===e.ec){var i=r.add(o);n.setValuesActive(o),n.setState({activeValues:i})}else E.showSystemError(t)}),this.showValues()}n.hideValuesOptions()},showValues:function(e){"values"!=this.state.name?(this.setMenuOptionsState(),this.hideValuesOptions()):e&&!this.state.showLeftMenu&&this.showValuesOptions(e),this.setState({hasValues:!0,name:"values"}),E.changePageName("values")},showNetworkOptions:function(){"network"==this.state.name&&this.setState({showNetworkOptions:!0})},hideNetworkOptions:function(){this.setState({showRemoveOptions:!1,showAbortOptions:!1,showNetworkOptions:!1})},showRemoveOptions:function(){this.setState({showRemoveOptions:!0})},showAbortOptions:function(){var e=this.state.network,t=e&&e.getSelectedList();ee[0].disabled=!t||!t.filter(E.canAbort).length,this.setState({showAbortOptions:!0})},showCreateOptions:function(){this.setState({showCreateOptions:!0})},hideCreateOptions:function(){this.setState({showCreateOptions:!1})},hideRemoveOptions:function(){this.setState({showRemoveOptions:!1})},hideAbortOptions:function(){this.setState({showAbortOptions:!1})},showHelpOptions:function(){this.setState({showHelpOptions:!0})},hideHelpOptions:function(){this.setState({showHelpOptions:!1})},showHasNewVersion:function(e){this.setState({hasNewVersion:e})},showRulesOptions:function(e){var t,n=this,r=n.state.rules,o=r.data,i=r.list;if("rules"===n.state.name){var a=i.length;K[0].disabled=2>a,K[1].disabled=1>a,t=K}else t=[],i.forEach(function(e){t.push(o[e])});n.setState({rulesOptions:t,showRulesOptions:!0})},hideRulesOptions:function(){this.setState({showRulesOptions:!1})},showValuesOptions:function(e){var t,n=this,r=this.state.values.list;if("values"===n.state.name){var o=r.length;q[0].disabled=2>o,q[1].disabled=1>o,t=q}else{t=[];var i=n.getValuesFromRules()||[];i=E.unique(r.concat(i));var a=[];i.forEach(function(e){var n=-1!=r.indexOf(e),o={name:e,icon:n?"edit":"plus"};n?t.push(o):a.push(o)}),t=a.concat(t)}n.setState({valuesOptions:t,showValuesOptions:!0})},hideValuesOptions:function(){this.setState({showValuesOptions:!1})},showAndActivePlugins:function(e){this.hidePluginsOptions(),this.showPlugins(),this.showPluginTab(e.name)},showPluginTab:function(e){var t="Home",n=this.state.tabs||[];if(e&&e!=t)for(var r=0,o=n.length;o>r;r++)if(n[r].name==e){t=e,e=null;break}if(e&&this.state.plugins[e+":"]){if(n.length>=F)return alert("You can only open "+F+" tabs."),this.showPlugins();t=e,n.push({name:e,url:"plugin."+e+"/"})}this.setState({active:t,tabs:n})},activePluginTab:function(e){this.showPluginTab(g(e.target).attr("data-name"))},closePluginTab:function(e){var t=g(e.target).attr("data-name"),n=this.state.tabs||[];if(n)for(var r=0,o=n.length;o>r;r++)if(n[r].name==t){n.splice(r,1);var i=this.state.active;if(i==t){var a=n[r]||n[r-1];this.state.active=a?a.name:null}return this.setState({tabs:n})}},showPluginsOptions:function(e){this.setState({showPluginsOptions:!0})},hidePluginsOptions:function(){this.setState({showPluginsOptions:!1})},showWeinreOptionsQuick:function(e){var t=this.getWeinreFromRules();return t&&t.length?void g(e.target).closest("div").addClass("w-menu-wrapper-show"):void this.showAnonymousWeinre()},showWeinreOptions:function(e){var t=this,n=t.state.weinreOptions=t.getWeinreFromRules()||[];t.state.weinreOptions=E.unique(n).map(function(e){return{name:e,icon:"console"}}),t.setState({showWeinreOptions:!0})},hideWeinreOptions:function(){this.setState({showWeinreOptions:!1})},setMenuOptionsState:function(e,t){var n={showCreateRules:!1,showCreateValues:!1,showCreateRuleGroup:!1,showCreateValueGroup:!1,showEditRules:!1,showEditValues:!1,showCreateOptions:!1};e&&(n[e]=!0),this.setState(n,t)},hideRulesInput:function(){this.setState({showCreateRules:!1})},hideValuesInput:function(){this.setState({showCreateValues:!1})},hideRuleGroup:function(){this.setState({showCreateRuleGroup:!1})},hideValueGroup:function(){this.setState({showCreateValueGroup:!1})},hideRenameRuleInput:function(){this.setState({showEditRules:!1})},hideRenameValueInput:function(){this.setState({showEditValues:!1})},showCreateRules:function(){var e=f.findDOMNode(this.refs.createRulesInput);this.setState({showCreateRules:!0},function(){e.focus()})},showCreateValues:function(){var e=f.findDOMNode(this.refs.createValuesInput);this.setState({showCreateValues:!0},function(){e.focus()})},showCreateRuleGroup:function(){var e=f.findDOMNode(this.refs.createRuleGroupInput);this.setState({showCreateRuleGroup:!0},function(){e.focus()})},showCreateValueGroup:function(){var e=f.findDOMNode(this.refs.createValueGroupInput);this.setState({showCreateValueGroup:!0},function(){e.focus()})},showHttpsSettingsDialog:function(){g(f.findDOMNode(this.refs.rootCADialog)).modal("show")},interceptHttpsConnects:function(e){var t=this,n=e.target.checked;I.interceptHttpsConnects({interceptHttpsConnects:n?1:0},function(e,r){e&&0===e.ec?t.state.interceptHttpsConnects=n:E.showSystemError(r),t.setState({})})},enableHttp2:function(e){if(!I.supportH2)return window.confirm("The current version of Node.js cannot support HTTP/2.\nPlease upgrade to the latest LTS version.")&&window.open("https://nodejs.org/"),void this.setState({});var t=this,n=e.target.checked;I.enableHttp2({enableHttp2:n?1:0},function(e,r){e&&0===e.ec?t.state.enableHttp2=n:E.showSystemError(r),t.setState({})})},createRules:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=f.findDOMNode(t.refs.createRulesInput),r=g.trim(n.value);if(!r)return void Q.error("The name cannot be empty.");var o=t.state.rules;return o.exists(r)?void Q.error("The name '"+r+"' already exists."):void I.rules.add({name:r},function(e,i){if(e&&0===e.ec){var a=o.add(r);t.setRulesActive(r),n.value="",n.blur(),t.setState({activeRules:a}),t.triggerRulesChange("create")}else E.showSystemError(i)})}},createValues:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=f.findDOMNode(t.refs.createValuesInput),r=g.trim(n.value);if(!r)return void Q.error("The name cannot be empty.");if(/\s/.test(r))return void Q.error("The name cannot contain spaces.");if(/#/.test(r))return void Q.error("The name cannot contain #.");var o=t.state.values;return o.exists(r)?void Q.error("The name '"+r+"' already exists."):void I.values.add({name:r},function(e,i){if(e&&0===e.ec){var a=o.add(r);t.setValuesActive(r),n.value="",n.blur(),t.setState({activeValues:a}),t.triggerValuesChange("create")}else E.showSystemError(i); +})}},showEditRules:function(e){this.currentFoucsRules=e;var t=this.state.rules,n=e||t.getActive();if(n&&!n.isDefault){var r=f.findDOMNode(this.refs.editRulesInput);r.value=n.name,this.setState({showEditRules:!0,selectedRule:n},function(){r.select(),r.focus()})}},showEditValuesByDBClick:function(e){!e.changed&&this.showEditValues()},showEditValues:function(e){this.currentFoucsValues=e;var t=this.state.values,n=e||t.getActive();if(n&&!n.isDefault){var r=f.findDOMNode(this.refs.editValuesInput);r.value=n.name,this.setState({showEditValues:!0,selectedValue:n},function(){r.select(),r.focus()})}},editRules:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=t.state.rules,r=this.currentFoucsRules||n.getActive();if(r){var o=f.findDOMNode(t.refs.editRulesInput),i=g.trim(o.value);return i?n.exists(i)?void Q.error("The name '"+i+"' already exists."):void I.rules.rename({name:r.name,newName:i},function(e,a){e&&0===e.ec?(n.rename(r.name,i),t.currentFoucsRules||t.setRulesActive(i),o.value="",o.blur(),t.setState(t.currentFoucsRules?{}:{activeValues:r}),t.triggerRulesChange("rename")):E.showSystemError(a)}):void Q.error("The name cannot be empty.")}}},editValues:function(e){if(13==e.keyCode||"click"==e.type){var t=this,n=t.state.values,o=this.currentFoucsValues||n.getActive();if(o){var i=f.findDOMNode(t.refs.editValuesInput),a=g.trim(i.value);return a?n.exists(a)?void Q.error("The name '"+a+"' already exists."):void I.values.rename({name:o.name,newName:a},function(e,s){e&&0===e.ec?(n.rename(o.name,a),t.currentFoucsValues||t.setValuesActive(a),i.value="",i.blur(),t.setState(t.currentFoucsValues?{}:{activeValues:o}),t.triggerValuesChange("rename"),r(o)):E.showSystemError(s)}):void Q.error("The name cannot be empty.")}}},showAnonymousWeinre:function(){this.openWeinre()},showWeinre:function(e){this.openWeinre(e.name)},openWeinre:function(e){window.open("weinre/client/#"+(e||"anonymous")),this.setState({showWeinreOptions:!1})},onClickRulesOption:function(e){e.selected?this.unselectRules(e):this.selectRules(e)},selectRules:function(e){var t=this;return I.rules[e.isDefault?"enableDefault":"select"](e,function(n,r){n&&0===n.ec?(t.reselectRules(n),t.state.rules.setChanged(e.name,!1),t.setState({}),t.triggerRulesChange("save"),t.state.disabledAllRules&&confirm("All rules are disabled, do you want to enable them?")&&I.rules.disableAllRules({disabledAllRules:0},function(e,n){e&&0===e.ec?(t.state.disabledAllRules=!1,t.setState({})):E.showSystemError(n)})):E.showSystemError(r)}),!1},selectRulesByOptions:function(e){var t=this.state.rules.data[g(e.target).attr("data-name")];this[e.target.checked?"selectRules":"unselectRules"](t)},unselectRules:function(e){var t=this;return I.rules[e.isDefault?"disableDefault":"unselect"](e,function(e,n){e&&0===e.ec?(t.reselectRules(e),t.setState({})):E.showSystemError(n)}),!1},reselectRules:function(e,t){var n=this;n.state.rules.clearAllSelected(),n.setSelected(n.state.rules,"Default",!e.defaultRulesIsDisabled,t),e.list.forEach(function(e){n.setSelected(n.state.rules,e,!0,t)})},saveValues:function(e){if(e.changed){var t=this;return I.values.add(e,function(n,o){n&&0===n.ec?(t.setSelected(t.state.values,e.name),t.triggerValuesChange("save"),r(e)):E.showSystemError(o)}),!1}},setSelected:function(e,t,n,r){e.setSelected(t,n)&&(r||e.setChanged(t,!1),this.setState({curSelectedName:t}))},replayCountChange:function(e){var t=e.target.value.replace(/^\s*0*|[^\d]+/,""),n=t.slice(0,2);n>G&&(n=G),this.setState({replayCount:n})},clickReplay:function(e){e.shiftKey?L.trigger("replaySessions",[null,e.shiftKey]):this.replay(e)},replay:function(e,t,n){var r=this.state.network;if(t=Array.isArray(t)?t:r&&r.getSelectedList(),t&&t.length){var o=function(e){var t=e.req;E.canReplay(e)&&I.compose2({useH2:e.useH2?1:"",url:e.url,headers:E.getOriginalReqHeaders(e),method:t.method,base64:t.base64})};if(n>1){n=Math.min(n,G);var i=t[0];if(E.canReplay(i))for(var a=0;n>a;a++)o(i)}else t.slice(0,G).forEach(o);this.autoRefresh&&this.autoRefresh()}},composer:function(){L.trigger("composer")},showFiles:function(){this.refs.filesDialog.show(this.files)},clear:function(){var e=this.state.network;e&&this.setState({network:e.clear(),showRemoveOptions:!1})},removeRules:function(e){var t=this,n=this.state.rules,r=e||n.getActive();if(r&&!r.isDefault){var o=r.name;confirm("Are you sure to delete this rule group '"+o+"'.")&&I.rules.remove({name:o},function(r,i){if(r&&0===r.ec){var a=e&&!e.active?null:n.getSibling(o);a&&t.setRulesActive(a.name),n.remove(o),t.setState(e?{}:{activeRules:a}),t.triggerRulesChange("remove")}else E.showSystemError(i)})}},removeValues:function(e){var t=this,n=this.state.values,r=e||n.getActive();if(r&&!r.isDefault){var o=r.name;confirm("Are you sure to delete this Value '"+o+"'.")&&I.values.remove({name:o},function(r,i){if(r&&0===r.ec){var a=e&&!e.active?null:n.getSibling(o);a&&t.setValuesActive(a.name),n.remove(o),t.setState(e?{}:{activeValues:a}),t.triggerValuesChange("remove")}else E.showSystemError(i)})}},setRulesActive:function(e,t){t=t||this.state.rules,S.set("activeRules",e),t.setActive(e)},setValuesActive:function(e,t){t=t||this.state.values,S.set("activeValues",e),t.setActive(e)},showRulesSettings:function(){g(f.findDOMNode(this.refs.rulesSettingsDialog)).modal("show")},showValuesSettings:function(){g(f.findDOMNode(this.refs.valuesSettingsDialog)).modal("show")},toggleLeftMenu:function(){var e=!this.state.showLeftMenu;this.setState({showLeftMenu:e}),S.set("showLeftMenu",e?1:"")},handleCreate:function(e){"rules"==this.state.name?this.showCreateRules():this.showCreateValues()},onClickMenu:function(e){var t,n=g(e.target).closest("a"),r=this,o="rules"==r.state.name;n.hasClass("w-edit-menu")?o?r.showEditRules():r.showEditValues():n.hasClass("w-delete-menu")?o?r.removeRules():r.removeValues():n.hasClass("w-save-menu")&&(o?(t=r.state.rules.getChangedList(),t.length&&(t.forEach(function(e){r.selectRules(e)}),r.setState({}))):(t=r.state.values.getChangedList(),t.length&&(t.forEach(function(e){r.saveValues(e)}),r.setState({}))))},showSettings:function(e){var t=this.state.name;return"rules"===t?void this.showRulesSettings():"values"===t?void this.showValuesSettings():void this.refs.networkSettings.showDialog()},activeRules:function(e){S.set("activeRules",e.name),this.setState({activeRules:e})},activeValues:function(e){S.set("activeValues",e.name),this.setState({activeValues:e})},onRulesThemeChange:function(e){var t=e.target.value;S.set("rulesTheme",t),this.setState({rulesTheme:t})},onValuesThemeChange:function(e){var t=e.target.value;S.set("valuesTheme",t),this.setState({valuesTheme:t})},onRulesFontSizeChange:function(e){var t=e.target.value;S.set("rulesFontSize",t),this.setState({rulesFontSize:t})},onValuesFontSizeChange:function(e){var t=e.target.value;S.set("valuesFontSize",t),this.setState({valuesFontSize:t})},onRulesLineNumberChange:function(e){var t=e.target.checked;S.set("showRulesLineNumbers",t),this.setState({showRulesLineNumbers:t})},onValuesLineNumberChange:function(e){var t=e.target.checked;S.set("showValuesLineNumbers",t),this.setState({showValuesLineNumbers:t})},onRulesLineWrappingChange:function(e){var t=e.target.checked;S.set("autoRulesLineWrapping",t?1:""),this.setState({autoRulesLineWrapping:t})},onValuesLineWrappingChange:function(e){var t=e.target.checked;S.set("autoValuesLineWrapping",t?1:""),this.setState({autoValuesLineWrapping:t})},disableAllRules:function(e){var t=e.target,n=e.target.checked,r=this;"disableAll"!==t.name&&(n=!n),I.rules.disableAllRules({disabledAllRules:n?1:0},function(e,t){if(e&&0===e.ec){var o=r.state;o.disabledAllRules=n,r.setState({})}else E.showSystemError(t)}),e.preventDefault()},disableAllPlugins:function(e){var t,n=this,r=n.state;t="INPUT"===e.target.nodeName?!e.target.checked:!r.disabledAllPlugins,I.plugins.disableAllPlugins({disabledAllPlugins:t?1:0},function(e,o){e&&0===e.ec?(r.disabledAllPlugins=t,D.setPlugins(r),n.setState({})):E.showSystemError(o)}),e.preventDefault()},disablePlugin:function(e){var t=this,n=e.target;return t.state.ndp?Q.warn("Not allowed disable plugins."):void I.plugins.disablePlugin({name:g(n).attr("data-name"),disabled:n.checked?0:1},function(e,n){e&&0===e.ec?(t.state.disabledPlugins=e.data,D.setPlugins(t.state),t.setState({})):E.showSystemError(n)})},abort:function(e){if(!Array.isArray(e)){var t=this.state.network;e=t&&t.getSelectedList()}e&&(e=e.map(function(e){return E.canAbort(e)?e.id:void 0}),e.length&&I.abort({list:e.join()})),this.hideAbortOptions()},allowMultipleChoice:function(e){var t=this,n=e.target.checked;I.rules.allowMultipleChoice({allowMultipleChoice:n?1:0},function(e,r){e&&0===e.ec?t.setState({allowMultipleChoice:n}):E.showSystemError(r)})},enableBackRulesFirst:function(e){var t=this,n=e.target.checked;I.rules.enableBackRulesFirst({backRulesFirst:n?1:0},function(e,r){e&&0===e.ec?t.setState({backRulesFirst:n}):E.showSystemError(r)})},reinstallAllPlugins:function(){L.trigger("updateAllPlugins","reinstallAllPlugins")},chooseFileType:function(e){var t=e.target.value;S.set("exportFileType",t),this.setState({exportFileType:t})},uploadSessions:function(){this.uploadSessionsForm(new FormData(f.findDOMNode(this.refs.importSessionsForm))),f.findDOMNode(this.refs.importSessions).value=""},importHarSessions:function(e){if(e&&"object"==typeof e){var t=e.log.entries,n=[];t.forEach(function(e){if(e){var t=new Date(e.startedDateTime).getTime();if(!isNaN(t)){var r=e.request||{},o=e.response||{},i=E.parseHeadersFromHar(r.headers),a=E.parseHeadersFromHar(o.headers),s=e.clientIPAddress||"127.0.0.1",l=e.serverIPAddress||"",c={method:r.method,ip:s,httpVersion:"1.1",size:r.bodySize,headers:i.headers,rawHeaderNames:i.rawHeaderNames,body:r.postData&&r.postData.text||""},u={httpVersion:"1.1",statusCode:o.status,statusMessage:o.statusText,size:o.bodySize,headers:a.headers,rawHeaderNames:a.rawHeaderNames,ip:l,body:""},d=o.content,p=d&&d.text;p&&("IMG"===E.getContentType(d.mimeType)||p.length%4===0&&/^[a-z\d+/]+={0,2}$/i.test(p)?u.base64=p:u.body=p);var g={startTime:t,url:r.url,req:c,res:u,rules:{}},h=e.timings||{},f=Math.round(t+E.getTimeFromHar(e.time));t=Math.floor(t+E.getTimeFromHar(h.dns)),g.dnsTime=t,t=Math.floor(t+E.getTimeFromHar(h.connect)+E.getTimeFromHar(h.ssl)+E.getTimeFromHar(h.send)+E.getTimeFromHar(h.blocked)+E.getTimeFromHar(h.wait)),g.requestTime=t,t=Math.floor(t+E.getTimeFromHar(h.receive)),g.responseTime=t,g.endTime=Math.max(t,f),n.push(g)}}}),I.addNetworkList(n)}},uploadSessionsForm:function(e){var t=e.get("importSessions");if(!t||!/\.(txt|json|saz|har)$/i.test(t.name))return alert("Only supports .txt, .json, .saz or .har file.");if(t.size>V)return alert("The file size cannot exceed 64m.");var n=/\.txt$/i.test(t.name);if(n||/\.har$/i.test(t.name)){var r=this;return void E.readFileAsText(t,function(e){try{e=JSON.parse(e),n?I.addNetworkList(e):r.importHarSessions(e)}catch(t){alert("Incorrect file format.")}})}I.upload.importSessions(e,I.addNetworkList)},exportSessions:function(e,t){var n=this.state.network,r=this.currentFoucsItem;if(this.currentFoucsItem=null,r&&g(f.findDOMNode(this.refs.chooseFileType)).is(":visible")||(r=n&&n.getSelectedList()),r&&r.length){var o=f.findDOMNode(this.refs.exportSessionsForm);f.findDOMNode(this.refs.exportFilename).value=t||"",f.findDOMNode(this.refs.exportFileType).value=e,f.findDOMNode(this.refs.sessions).value=JSON.stringify(r,null," "),o.submit()}},exportBySave:function(e){if(!e||"click"===e.type||13===e.keyCode){var t=f.findDOMNode(this.refs.sessionsName),n=t.value.trim();t.value="",this.exportSessions(this.state.exportFileType,n),g(f.findDOMNode(this.refs.chooseFileType)).modal("hide")}},replayRepeat:function(e){e&&"click"!==e.type&&13!==e.keyCode||(this.refs.setReplayCount.hide(),this.replay("",this.replayList,this.state.replayCount),L.trigger("focusNetworkList"))},showAboutDialog:function(e){g(e.target).closest(".w-menu-enable").length&&this.refs.aboutDialog.showAboutInfo()},showCustomCertsInfo:function(){var e=this;e.loadingCerts||(e.loadingCerts=!0,I.getCustomCertsInfo(function(t,n){return e.loadingCerts=!1,t?void e.refs.certsInfoDialog.show(t):void E.showSystemError(n)}))},forceShowLeftMenu:function(){var e=this;clearTimeout(e.hideTimer),clearTimeout(e.showTimer),e.showTimer=setTimeout(function(){e.setState({forceShowLeftMenu:!0})},200)},forceHideLeftMenu:function(){var e=this;clearTimeout(e.hideTimer),clearTimeout(e.showTimer),e.hideTimer=setTimeout(function(){e.setState({forceShowLeftMenu:!1})},500)},render:function(){var e=this.state,t=e.networkMode,n=e.rulesMode,r=e.pluginsMode,o=e.multiEnv,i=e.name;t?i="network":n?i="network"===i?"rules":i:r&&(i="plugins"!==i?"network":i);var a=void 0===i||"network"==i,l="rules"==i,c="values"==i,u="plugins"==i,d=!0,g=!0,f=e.rulesTheme||"cobalt",m=e.valuesTheme||"cobalt",M=e.rulesFontSize||"14px",E=e.valuesFontSize||"14px",D=e.showRulesLineNumbers||!1,L=e.showValuesLineNumbers||!1,S=e.autoRulesLineWrapping,Q=e.autoValuesLineWrapping,O=e.rulesOptions,F=e.pluginsOptions,V={},Y=e.showNetworkOptions,P=e.showRulesOptions,G=e.showValuesOptions,W=e.showPluginsOptions,X=e.showWeinreOptions,_=e.showHelpOptions;O[0].name===H&&O.forEach(function(t,n){t.icon=n&&e.multiEnv?"edit":"checkbox",t.selected||(V[t.name]=1)});var K,q;if(l){q=e.rules.data;for(K in q)if(q[K].active){d=g=q[K].isDefault;break}}else if(c){q=e.values.data;for(K in q)if(q[K].active){d=g=!1;break}}if(e.network){e.network.rulesModal=e.rules,e.rules.editorTheme={theme:f,fontSize:M,lineNumbers:D};var te=e.networkOptions,ne=e.network.hasUnselected();e.network.hasSelected()?(te.forEach(function(e){e.disabled=!1,"removeUnselected"===e.id&&(e.disabled=!ne)}),$.forEach(function(e){e.disabled=!1,"removeUnselected"===e.id&&(e.disabled=!ne)})):(te.forEach(function(e){-1!==J.indexOf(e.id)?e.disabled=!0:"removeUnselected"===e.id&&(e.disabled=!ne)}),te[0].disabled=!ne,$.forEach(function(e){-1!==J.indexOf(e.id)?e.disabled=!0:"removeUnselected"===e.id&&(e.disabled=!ne)}))}var re,oe,ie=e.pendingSessions,ae=e.pendingRules,se=e.pendingValues,le=Z&&!e.forceShowLeftMenu,ce=t||e.showLeftMenu,ue=e.disabledAllPlugins;return ce&&Z&&(re=this.forceShowLeftMenu,oe=this.forceHideLeftMenu),h.createElement("div",{className:"main orient-vertical-box"+(ce?" w-show-left-menu":"")},h.createElement("div",{className:"w-menu w-"+i+"-menu-list",onMouseEnter:re,onMouseLeave:oe},h.createElement("a",{onClick:this.toggleLeftMenu,draggable:"false",className:"w-show-left-menu-btn",style:{display:t?"none":void 0},title:"Dock to "+(ce?"top":"left")+" (Ctrl[Command] + M)"},h.createElement("span",{className:"glyphicon glyphicon-chevron-"+(ce?le?"down":"up":"left")})),h.createElement("div",{style:{display:n?"none":void 0},onMouseEnter:this.showNetworkOptions,onMouseLeave:this.hideNetworkOptions,className:"w-nav-menu w-menu-wrapper"+(Y?" w-menu-wrapper-show":"")},h.createElement("a",{onClick:this.showNetwork,onDoubleClick:this.clearNetwork,className:"w-network-menu",title:"Double click to remove all sessions",style:{background:"network"==i?"#ddd":null},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-globe"}),"Network"),h.createElement(T,{ref:"networkMenuItem",options:e.networkOptions,className:"w-network-menu-item",onClickOption:this.handleNetwork})),h.createElement("div",{style:{display:r?"none":void 0},onMouseEnter:this.showRulesOptions,onMouseLeave:this.hideRulesOptions,className:"w-nav-menu w-menu-wrapper"+(P?" w-menu-wrapper-show":"")+(l?" w-menu-auto":"")},h.createElement("a",{onClick:this.showRules,className:"w-rules-menu",style:{background:"rules"==i?"#ddd":null},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-list"}),"Rules"),h.createElement(T,{ref:"rulesMenuItem",name:"rules"==i?null:"Open",options:O,checkedOptions:V,disabled:e.disabledAllRules,className:"w-rules-menu-item",onClick:this.showRules,onClickOption:this.showAndActiveRules,onChange:this.selectRulesByOptions})),h.createElement("div",{style:{display:r?"none":void 0},onMouseEnter:this.showValuesOptions,onMouseLeave:this.hideValuesOptions,className:"w-nav-menu w-menu-wrapper"+(G?" w-menu-wrapper-show":"")+(c?" w-menu-auto":"")},h.createElement("a",{onClick:this.showValues,className:"w-values-menu",style:{background:"values"==i?"#ddd":null},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-folder-close"}),"Values"),h.createElement(T,{ref:"valuesMenuItem",name:"values"==i?null:"Open",options:e.valuesOptions,className:"w-values-menu-item",onClick:this.showValues,onClickOption:this.showAndActiveValues})),h.createElement("div",{ref:"pluginsMenu",onMouseEnter:this.showPluginsOptions,onMouseLeave:this.hidePluginsOptions,className:"w-nav-menu w-menu-wrapper"+(W?" w-menu-wrapper-show":"")},h.createElement("a",{onClick:this.showPlugins,className:"w-plugins-menu",style:{background:"plugins"==i?"#ddd":null},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-list-alt"}),"Plugins"),h.createElement(T,{ref:"pluginsMenuItem",name:"plugins"==i?null:"Open",options:F,checkedOptions:e.disabledPlugins,disabled:ue,className:"w-plugins-menu-item",onClick:this.showPlugins,onChange:this.disablePlugin,onClickOption:this.showAndActivePlugins})),!e.ndp&&h.createElement("a",{onClick:this.disableAllPlugins,className:"w-enable-plugin-menu",style:{display:u?"":"none",color:ue?"#f66":void 0},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-"+(ue?"ok-circle":"ban-circle")}),ue?"EnableAll":"DisableAll"),h.createElement(z,{hide:!u}),h.createElement("a",{onClick:this.reinstallAllPlugins,className:"w-plugins-menu"+(u?"":" hide"),draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-download-alt"}),"ReinstallAll"),h.createElement("a",{onClick:this.importData,className:"w-import-menu",style:{display:u?"none":""},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-import"}),"Import"),h.createElement("a",{onClick:this.exportData,className:"w-export-menu",style:{display:u?"none":""},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-export"}),"Export"),h.createElement("div",{onMouseEnter:this.showRemoveOptions,onMouseLeave:this.hideRemoveOptions,style:{display:a?"":"none"},className:"w-menu-wrapper w-remove-menu-list w-menu-auto"+(e.showRemoveOptions?" w-menu-wrapper-show":"")},h.createElement("a",{onClick:this.clear,className:"w-remove-menu",title:"Ctrl[Command] + X",draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-remove"}),"Clear"),h.createElement(T,{options:$,className:"w-remove-menu-item",onClickOption:this.handleNetwork})),h.createElement("a",{onClick:this.onClickMenu,className:"w-save-menu",style:{display:a||u?"none":""},draggable:"false",title:"Ctrl[Command] + S"},h.createElement("span",{className:"glyphicon glyphicon-save-file"}),"Save"),h.createElement("a",{className:"w-create-menu",style:{display:a||u?"none":""},draggable:"false",onClick:this.handleCreate},h.createElement("span",{className:"glyphicon glyphicon-plus"}),"Create"),h.createElement("a",{onClick:this.onClickMenu,className:"w-edit-menu"+(d?" w-disabled":""),style:{display:a||u?"none":""},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-edit"}),"Rename"),h.createElement("div",{onMouseEnter:this.showAbortOptions,onMouseLeave:this.hideAbortOptions,style:{display:a?"":"none"},className:"w-menu-wrapper w-abort-menu-list w-menu-auto"+(e.showAbortOptions?" w-menu-wrapper-show":"")},h.createElement("a",{onClick:this.clickReplay,className:"w-replay-menu",draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-repeat"}),"Replay"),h.createElement(T,{options:ee,className:"w-remove-menu-item",onClickOption:this.abort})),h.createElement("a",{onClick:this.composer,className:"w-composer-menu",style:{display:a?"":"none"},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-edit"}),"Compose"),h.createElement(v,{hide:!a,onClick:this.handleAction}),h.createElement("a",{onClick:this.onClickMenu,className:"w-delete-menu"+(g?" w-disabled":""),style:{display:a||u?"none":""},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-trash"}),"Delete"),h.createElement(B,{onClick:this.showSettings,disabledRules:l&&e.disabledAllRules,isNetwork:a,hide:u}),h.createElement("a",{onClick:this.showFiles,className:"w-files-menu",draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-upload"}),"Files"),h.createElement("div",{onMouseEnter:this.showWeinreOptions,onMouseLeave:this.hideWeinreOptions,className:"w-menu-wrapper"+(X?" w-menu-wrapper-show":"")},h.createElement("a",{onClick:this.showWeinreOptionsQuick,onDoubleClick:this.showAnonymousWeinre,className:"w-weinre-menu",draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-console"}),"Weinre"),h.createElement(T,{ref:"weinreMenuItem",name:"anonymous",options:e.weinreOptions,className:"w-weinre-menu-item",onClick:this.showAnonymousWeinre,onClickOption:this.showWeinre})),h.createElement("a",{onClick:this.showHttpsSettingsDialog,className:"w-https-menu",draggable:"false",style:{color:I.hasInvalidCerts?"red":void 0}},h.createElement("span",{className:"glyphicon glyphicon-"+(e.interceptHttpsConnects?"ok":"lock")}),"HTTPS"),h.createElement("div",{onMouseEnter:this.showHelpOptions,onMouseLeave:this.hideHelpOptions,className:"w-menu-wrapper"+(_?" w-menu-wrapper-show":"")},h.createElement("a",{className:"w-help-menu"+(e.hasNewVersion?" w-menu-enable":""),onClick:this.showAboutDialog,title:e.hasNewVersion?"There is a new version of whistle":void 0,href:e.hasNewVersion?void 0:"https://github.com/avwo/whistle#whistle",target:e.hasNewVersion?void 0:"_blank"},h.createElement("span",{className:"glyphicon glyphicon-question-sign"}),"Help"),h.createElement(T,{ref:"helpMenuItem",options:e.helpOptions,name:h.createElement(b,{ref:"aboutDialog",onClick:this.hideHelpOptions,onCheckUpdate:this.showHasNewVersion}),className:"w-help-menu-item"})),h.createElement(y,{name:i}),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateRules?"block":"none"},className:"shadow w-input-menu-item w-create-rules-input"},h.createElement("input",{ref:"createRulesInput",onKeyDown:this.createRules,onBlur:this.hideRulesInput,type:"text",maxLength:"64",placeholder:"Input the name"}),h.createElement("button",{type:"button",onClick:this.createRules,className:"btn btn-primary"},"+Rule")),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateValues?"block":"none"},className:"shadow w-input-menu-item w-create-values-input"},h.createElement("input",{ref:"createValuesInput",onKeyDown:this.createValues,onBlur:this.hideValuesInput,type:"text",maxLength:"64",placeholder:"Input the key"}),h.createElement("button",{type:"button",onClick:this.createValues,className:"btn btn-primary"},"+Key")),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateRuleGroup?"block":"none"},className:"shadow w-input-menu-item w-create-rules-input"},h.createElement("input",{ref:"createRuleGroupInput",onKeyDown:this.createRules,onBlur:this.hideRuleGroup,type:"text",maxLength:"64",placeholder:"Input the group name"}),h.createElement("button",{type:"button",onClick:this.createRuleGroup,className:"btn btn-primary"},"+Group")),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showCreateValueGroup?"block":"none"},className:"shadow w-input-menu-item w-create-values-input"},h.createElement("input",{ref:"createValueGroupInput",onKeyDown:this.createValues,onBlur:this.hideValueGroup,type:"text",maxLength:"64",placeholder:"Input the group name"}),h.createElement("button",{type:"button",onClick:this.createValueGroup,className:"btn btn-primary"},"+Group")),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showEditRules?"block":"none"},className:"shadow w-input-menu-item w-edit-rules-input"},h.createElement("input",{ref:"editRulesInput",onKeyDown:this.editRules,onBlur:this.hideRenameRuleInput,type:"text",maxLength:"64"}),h.createElement("button",{type:"button",onClick:this.editRules,className:"btn btn-primary"},"OK")),h.createElement("div",{onMouseDown:this.preventBlur,style:{display:e.showEditValues?"block":"none"},className:"shadow w-input-menu-item w-edit-values-input"},h.createElement("input",{ref:"editValuesInput",onKeyDown:this.editValues,onBlur:this.hideRenameValueInput,type:"text",maxLength:"64"}),h.createElement("button",{type:"button",onClick:this.editValues,className:"btn btn-primary"},"OK"))),h.createElement("div",{className:"w-container box fill"},h.createElement("div",{className:"w-left-menu"+(re?" w-hover-left-menu":""),style:{display:t||le?"none":void 0},onMouseEnter:re,onMouseLeave:oe},h.createElement("a",{onClick:this.showNetwork,onDoubleClick:this.clearNetwork,title:"Double click to remove all sessions",className:"w-network-menu",style:{background:"network"==i?"#ddd":null,display:n?"none":void 0},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-globe"}),h.createElement("i",null,"Network")),h.createElement("a",{onClick:this.showRules,className:"w-save-menu w-rules-menu",onDoubleClick:this.onClickMenu,title:"Double click to save all changed",style:{background:"rules"==i?"#ddd":null,display:r?"none":void 0},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-list"+(e.disabledAllRules?" w-disabled":"")}),h.createElement("i",null,!e.classic&&!e.ndr&&h.createElement("input",{onChange:this.disableAllRules,type:"checkbox",onClick:s,checked:!e.disabledAllRules,title:e.disabledAllRules?"Click to enable all rules":"Click to disable all rules"})," Rules"),h.createElement("i",{className:"w-menu-changed",style:{display:e.rules.hasChanged()?void 0:"none"}},"*")),h.createElement("a",{onClick:this.showValues,className:"w-save-menu w-values-menu",onDoubleClick:this.onClickMenu,title:"Double click to save all changed",style:{background:"values"==i?"#ddd":null,display:r?"none":void 0},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-folder-close"}),h.createElement("i",null,"Values"),h.createElement("i",{className:"w-menu-changed",style:{display:e.values.hasChanged()?void 0:"none"}},"*")),h.createElement("a",{onClick:this.showPlugins,className:"w-plugins-menu",style:{background:"plugins"==i?"#ddd":null},draggable:"false"},h.createElement("span",{className:"glyphicon glyphicon-list-alt"+(ue?" w-disabled":"")}),h.createElement("i",null,!e.classic&&!e.ndp&&h.createElement("input",{onChange:this.disableAllPlugins,type:"checkbox",onClick:s,checked:!ue,title:ue?"Click to enable all plugins":"Click to disable all plugins"})," Plugins"))),e.hasRules?h.createElement(A,{ref:"rules",disabled:e.disabledAllRules,theme:f,lineWrapping:S,fontSize:M,lineNumbers:D,onSelect:this.selectRules,onUnselect:this.unselectRules,onActive:this.activeRules,modal:e.rules,hide:"rules"==i?!1:!0,name:"rules"}):void 0,e.hasValues?h.createElement(A,{theme:m,onDoubleClick:this.showEditValuesByDBClick,fontSize:E,lineWrapping:Q,lineNumbers:L,onSelect:this.saveValues,onActive:this.activeValues,modal:e.values,hide:"values"==i?!1:!0,className:"w-values-list"}):void 0,e.hasNetwork?h.createElement(w,{ref:"network",hide:"rules"===i||"values"===i||"plugins"===i,modal:e.network}):void 0,e.hasPlugins?h.createElement(C,p({},e,{onOpen:this.activePluginTab,onClose:this.closePluginTab,onActive:this.activePluginTab,onChange:this.disablePlugin,ref:"plugins",hide:"plugins"==i?!1:!0})):void 0),h.createElement("div",{ref:"rulesSettingsDialog",className:"modal fade w-rules-settings-dialog"},h.createElement("div",{className:"modal-dialog"},h.createElement("div",{className:"modal-content"},h.createElement("div",{className:"modal-body"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},h.createElement("span",{"aria-hidden":"true"},"×")),h.createElement(N,{theme:f,fontSize:M,lineNumbers:D,lineWrapping:S,onLineWrappingChange:this.onRulesLineWrappingChange,onThemeChange:this.onRulesThemeChange,onFontSizeChange:this.onRulesFontSizeChange,onLineNumberChange:this.onRulesLineNumberChange}),h.createElement("p",{className:"w-editor-settings-box"},h.createElement("label",null,h.createElement("input",{type:"checkbox",checked:e.backRulesFirst,onChange:this.enableBackRulesFirst})," Back rules first")),h.createElement("p",{className:"w-editor-settings-box"},h.createElement("label",{style:{color:o?"#aaa":void 0}},h.createElement("input",{type:"checkbox",disabled:o,checked:!o&&e.allowMultipleChoice,onChange:this.allowMultipleChoice})," Use multiple rules")),!e.ndr&&h.createElement("p",{className:"w-editor-settings-box"},h.createElement("label",{style:{color:e.disabledAllRules?"#f66":void 0}},h.createElement("input",{type:"checkbox",checked:e.disabledAllRules,onChange:this.disableAllRules,name:"disableAll"})," Disable all rules"))),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),h.createElement("div",{ref:"valuesSettingsDialog",className:"modal fade w-values-settings-dialog"},h.createElement("div",{className:"modal-dialog"},h.createElement("div",{className:"modal-content"},h.createElement("div",{className:"modal-body"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},h.createElement("span",{"aria-hidden":"true"},"×")),h.createElement(N,{theme:m,fontSize:E,lineNumbers:L,lineWrapping:Q,onLineWrappingChange:this.onValuesLineWrappingChange,onThemeChange:this.onValuesThemeChange,onFontSizeChange:this.onValuesFontSizeChange,onLineNumberChange:this.onValuesLineNumberChange})),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),h.createElement(x,{ref:"networkSettings"}),h.createElement("div",{ref:"rootCADialog",className:"modal fade w-https-dialog"},h.createElement("div",{className:"modal-dialog"},h.createElement("div",{className:"modal-content"},h.createElement("div",{className:"modal-body"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},h.createElement("span",{"aria-hidden":"true"},"×")),h.createElement("div",null,h.createElement("a",{className:"w-help-menu",title:"Click here to learn how to install root ca",href:"https://avwo.github.io/whistle/webui/https.html",target:"_blank"},h.createElement("span",{className:"glyphicon glyphicon-question-sign"})),h.createElement("a",{className:"w-download-rootca",title:"http://rootca.pro/",href:"cgi-bin/rootca",target:"downloadTargetFrame"},"Download RootCA")),h.createElement("a",{title:"http://rootca.pro/",href:"cgi-bin/rootca",target:"downloadTargetFrame"},h.createElement("img",{src:"img/qrcode.png"})),h.createElement("div",{className:"w-https-settings"},h.createElement("p",null,h.createElement("label",{title:o?"Use `pattern enable://capture` in rules to replace global configuration":void 0},h.createElement("input",{disabled:o,checked:e.interceptHttpsConnects,onChange:this.interceptHttpsConnects,type:"checkbox"})," Capture TUNNEL CONNECTs")),h.createElement("p",null,h.createElement("label",null,h.createElement("input",{checked:I.supportH2&&e.enableHttp2,onChange:this.enableHttp2,type:"checkbox"})," Enable HTTP/2")),h.createElement("a",{draggable:"false",style:{color:I.hasInvalidCerts?"red":void 0},onClick:this.showCustomCertsInfo},"View custom certs info"),h.createElement(R,{ref:"certsInfoDialog"}))),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))))),h.createElement("div",{ref:"chooseFileType",className:"modal fade w-choose-filte-type"},h.createElement("div",{className:"modal-dialog"},h.createElement("div",{className:"modal-content"},h.createElement("div",{className:"modal-body"},h.createElement("label",{className:"w-choose-filte-type-label"},"Save as:",h.createElement("input",{ref:"sessionsName", +onKeyDown:this.exportBySave,placeholder:"Input the filename",className:"form-control",maxLength:"64"}),h.createElement("select",{ref:"fileType",className:"form-control",value:e.exportFileType,onChange:this.chooseFileType},h.createElement("option",{value:"whistle"},"*.txt"),h.createElement("option",{value:"Fiddler"},"*.saz"))),h.createElement("a",{type:"button",onKeyDown:this.exportBySave,tabIndex:"0",onMouseDown:this.preventBlur,className:"btn btn-primary",onClick:this.exportBySave},"Export"))))),h.createElement(j,{ref:"setReplayCount",wstyle:"w-replay-count-dialog"},h.createElement("div",{className:"modal-body"},h.createElement("label",null,"Count:",h.createElement("input",{ref:"replayCount",onKeyDown:this.replayRepeat,onChange:this.replayCountChange,value:e.replayCount,className:"form-control",maxLength:"2"})),h.createElement("a",{type:"button",onKeyDown:this.replayRepeat,tabIndex:"0",onMouseDown:this.preventBlur,className:"btn btn-primary",onClick:this.replayRepeat},"Replay"))),h.createElement(j,{ref:"importRemoteRules",wstyle:"w-import-remote-dialog"},h.createElement("div",{className:"modal-body"},h.createElement("input",{readOnly:ae,ref:"rulesRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteRules,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-primary",disabled:ae,onMouseDown:this.preventBlur,onClick:this.importRemoteRules},ae?"Importing rules":"Import rules"),h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),h.createElement(j,{ref:"importRemoteSessions",wstyle:"w-import-remote-dialog"},h.createElement("div",{className:"modal-body"},h.createElement("input",{readOnly:ie,ref:"sessionsRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteSessions,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-primary",disabled:ie,onMouseDown:this.preventBlur,onClick:this.importRemoteSessions},ie?"Importing sessions":"Import sessions"),h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),h.createElement(j,{ref:"importRemoteValues",wstyle:"w-import-remote-dialog"},h.createElement("div",{className:"modal-body"},h.createElement("input",{readOnly:se,ref:"valuesRemoteUrl",maxLength:"2048",onKeyDown:this.importRemoteValues,placeholder:"Input the url",style:{"ime-mode":"disabled"}})),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-primary",disabled:se,onMouseDown:this.preventBlur,onClick:this.importRemoteValues},se?"Importing values":"Import values"),h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),h.createElement("div",{ref:"showUpdateTipsDialog",className:"modal fade w-show-update-tips-dialog"},h.createElement("div",{className:"modal-dialog"},h.createElement("div",{className:"modal-content"},h.createElement("div",{className:"modal-body"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close"},h.createElement("span",{"aria-hidden":"true"},"×")),h.createElement("p",{className:"w-show-update-tips"},"whistle has important updates, it is recommended that you update to the latest version."),h.createElement("p",null,"Current version: ",e.version),h.createElement("p",null,"The latest stable version: ",e.latestVersion),h.createElement("p",null,"View change: ",h.createElement("a",{title:"Change log",href:"https://github.com/avwo/whistle/blob/master/CHANGELOG.md",target:"_blank"},"CHANGELOG.md"))),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-default",onClick:this.donotShowAgain,"data-dismiss":"modal"},"Don't show again"),h.createElement("a",{type:"button",className:"btn btn-primary",onClick:this.hideUpdateTipsDialog,href:"https://avwo.github.io/whistle/update.html",target:"_blank"},"Update now"))))),h.createElement(j,{ref:"confirmReload",wstyle:"w-confirm-reload-dialog"},h.createElement("div",{className:"modal-body w-confirm-reload"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},h.createElement("span",{"aria-hidden":"true"},"×")),h.createElement("div",{className:"w-reload-data-tips"})),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"No"),h.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.reloadData,"data-dismiss":"modal"},"Yes"))),h.createElement(j,{ref:"confirmImportRules",wstyle:"w-confirm-import-dialog"},h.createElement("div",{className:"modal-body w-confirm-import"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},h.createElement("span",{"aria-hidden":"true"},"×")),"Whether to replace the existing rules?"),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-danger",onClick:this.uploadRules,"data-dismiss":"modal"},"Replace"),h.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.uploadRules,"data-dismiss":"modal"},"Reserve"))),h.createElement(j,{ref:"confirmImportValues",wstyle:"w-confirm-import-dialog"},h.createElement("div",{className:"modal-body w-confirm-import"},h.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},h.createElement("span",{"aria-hidden":"true"},"×")),"Whether to replace the existing values?"),h.createElement("div",{className:"modal-footer"},h.createElement("button",{type:"button",className:"btn btn-danger",onClick:this.uploadValues,"data-dismiss":"modal"},"Replace"),h.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.uploadValues,"data-dismiss":"modal"},"Reserve"))),h.createElement(U,{ref:"filesDialog"}),h.createElement(k,{ref:"selectRulesDialog",name:"rules",list:e.rules.list}),h.createElement(k,{ref:"selectValuesDialog",name:"values",list:e.values.list}),h.createElement("iframe",{name:"downloadTargetFrame",style:{display:"none"}}),h.createElement("form",{ref:"exportSessionsForm",action:"cgi-bin/sessions/export",style:{display:"none"},method:"post",target:"downloadTargetFrame"},h.createElement("input",{ref:"exportFilename",name:"exportFilename",type:"hidden"}),h.createElement("input",{ref:"exportFileType",name:"exportFileType",type:"hidden"}),h.createElement("input",{ref:"sessions",name:"sessions",type:"hidden"})),h.createElement("form",{ref:"importSessionsForm",encType:"multipart/form-data",style:{display:"none"}},h.createElement("input",{ref:"importSessions",onChange:this.uploadSessions,type:"file",name:"importSessions",accept:".txt,.json,.saz,.har"})),h.createElement("form",{ref:"importRulesForm",encType:"multipart/form-data",style:{display:"none"}},h.createElement("input",{ref:"importRules",onChange:this.uploadRulesForm,name:"rules",type:"file",accept:".txt,.json"})),h.createElement("form",{ref:"importValuesForm",encType:"multipart/form-data",style:{display:"none"}},h.createElement("input",{ref:"importValues",onChange:this.uploadValuesForm,name:"values",type:"file",accept:".txt,.json"})))}});I.getInitialData(function(e){f.render(h.createElement(te,{modal:e}),document.getElementById("container"))})},function(e,t,n){var r=n(2);"string"==typeof r&&(r=[[e.id,r,""]]);n(4)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(3)(),t.push([e.id,".w-menu{height:28px;border-top:1px solid #fcfcfc;background:#f1f3f4;padding-right:5pc;position:relative;z-index:1001}.w-menu a{text-decoration:none!important;color:#000;padding:0 5px;line-height:26px;height:26px;margin-right:5px;display:inline-block}.w-detail .glyphicon,.w-menu .glyphicon{margin-right:3px}.w-menu .glyphicon-folder-close,.w-menu .glyphicon-folder-open{margin-right:6px}.w-menu .w-online{position:absolute;right:0}.w-left-menu a:hover,.w-left-menu a:hover .w-disabled,.w-menu .w-online,.w-menu a:hover{color:#337ab7}.w-menu .w-offline{color:#ccc!important;cursor:default}.w-frames-action .w-disabled,.w-menu .w-disabled{color:#888!important;cursor:not-allowed!important}.w-left-menu .w-disabled{color:#888}.w-menu .w-menu-enable{color:#f66!important}.w-menu .w-menu-wrapper{display:inline-block;position:relative;height:30px}.w-show-update-tips{font-weight:700}.w-input-menu-item{display:block;position:absolute;background:#fff;border:1px solid #ccc;border-radius:2px;z-index:101;top:30px;display:none;white-space:nowrap}.w-input-menu-item input{width:246px;height:2pc;border:1px solid #ccc;border-radius:2px;padding:0 5px;vertical-align:middle}.w-input-menu-item .btn{height:2pc;padding:0 9pt;vertical-align:middle;border-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.w-create-rules-input{left:310px}.w-create-values-input{left:300px}.w-edit-rules-input{left:382px}.w-edit-values-input{left:372px}.w-show-left-menu .w-create-rules-input{left:210px}.w-show-left-menu .w-create-values-input{left:200px}.w-show-left-menu .w-edit-rules-input{left:282px}.w-show-left-menu .w-edit-values-input{left:17pc}.w-menu-wrapper .w-menu-item{display:none!important}.w-menu-wrapper-show .w-menu-item{display:block!important}.w-values-list .glyphicon{display:none!important}.w-values-list a{font-weight:400!important}.w-disabled .glyphicon-ok,.w-disabled .glyphicon-stop{color:#ccc!important}.w-rules-settings-dialog .modal-dialog{width:25pc}.w-values-settings-dialog .modal-dialog{width:300px}.w-show-update-tips-dialog .modal-dialog{width:21pc}.w-show-update-tips-dialog .modal-body p{margin-bottom:5px}.w-https-dialog .modal-dialog{width:340px}.w-https-help{margin-left:150px}.w-https-dialog .modal-dialog div{white-space:nowrap}.w-https-dialog a{display:inline-block}.w-download-rootca,.w-https-help{line-height:30px}.w-https-settings label{font-weight:400}.w-https-settings p{margin:10px 0}.w-is-link{cursor:pointer;text-decoration:underline}.w-choose-filte-type .modal-dialog{width:456px}.w-choose-filte-type-label{white-space:nowrap}.w-choose-filte-type-label .form-control{margin-left:10px;width:200px;display:inline-block;font-weight:400}.w-choose-filte-type-label select.form-control{margin:0 5px;width:5pc}.w-confirm-import-dialog .modal-dialog{width:20pc;font-weight:700}.w-show-left-menu-btn{padding:0 15px!important;margin-right:0!important}.w-left-menu{background:#f1f3f4;border:1px solid #ccc;border-bottom:none;display:none}.w-show-left-menu .w-left-menu{display:block;border-left:none}.w-show-left-menu .w-nav-menu{display:none}.w-left-menu a{display:block;position:relative;padding:10px 0 8px;width:45px;overflow:hidden;text-align:center;text-decoration:none!important;color:#000}.w-left-menu a span{margin-right:5px}.w-left-menu a i{display:block;font-style:normal;font-size:13px;zoom:1;transform:scale(0.7,0.7);width:66px;margin-left:-11px}.w-left-menu-tips{padding:6px 10px;display:none;left:47px;top:3px;position:absolute;z-index:1;border-radius:4px}.w-left-menu a:hover .w-left-menu-tips{display:block;color:#000;background-color:#f1f3f4;font-weight:700;border:1px solid #ccc}.w-left-menu a .w-left-menu-tips:hover,.w-menu .w-export-menu,.w-menu .w-import-menu,.w-menu .w-remove-menu-list{display:none}.w-show-left-menu .w-export-menu,.w-show-left-menu .w-import-menu,.w-show-left-menu .w-remove-menu-list{display:inline-block}.w-menu-changed{position:absolute;top:2px;left:2px;color:red}.w-replay-count-dialog .modal-content{width:236px;white-space:nowrap}.w-replay-count-dialog .modal-content label{width:auto}.w-replay-count-dialog input{display:inline-block;width:5pc;text-align:center;margin:0 10px}.w-import-remote-dialog .modal-content{width:525px}.w-import-remote-dialog input{width:500px;height:30px;line-height:30px;padding:5px}.w-https-menu .glyphicon-lock{color:#9e9e26}.w-hover-left-menu{position:absolute;z-index:1;height:auto;border-bottom:1px solid #ccc;min-height:0}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t0&&t-1 in e}function c(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function u(e,t,n){return Te(t)?Ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?Ce.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Ce.grep(e,function(e){return fe.call(t,e)>-1!==n}):Ce.filter(t,e,n)}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function p(e){var t={};return Ce.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function h(e){return e}function g(e){throw e}function f(e,t,n,r){var o;try{e&&Te(o=e.promise)?o.call(e).done(t).fail(n):e&&Te(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){ue.removeEventListener("DOMContentLoaded",m),n.removeEventListener("load",m),Ce.ready()}function A(e,t){return t.toUpperCase()}function M(e){return e.replace(Ve,"ms-").replace(Pe,A)}function w(){this.expando=Ce.expando+w.uid++}function b(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Xe.test(e)?JSON.parse(e):e}function y(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(_e,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=b(n)}catch(o){}We.set(e,t,n)}else n=void 0;return n}function T(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return Ce.css(e,t,"")},l=s(),c=n&&n[3]||(Ce.cssNumber[t]?"":"px"),u=(Ce.cssNumber[t]||"px"!==c&&+l)&&Ze.exec(Ce.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)Ce.style(e,t,u+c),(1-i)*(1-(i=s()/l||.5))<=0&&(a=0),u/=i;u=2*u,Ce.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=o)),o}function v(e){var t,n=e.ownerDocument,r=e.nodeName,o=et[r];return o?o:(t=n.body.appendChild(n.createElement(r)),o=Ce.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),et[r]=o,o)}function x(e,t){for(var n,r,o=[],i=0,a=e.length;a>i;i++)r=e[i],r.style&&(n=r.style.display,t?("none"===n&&(o[i]=Ge.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&qe(r)&&(o[i]=v(r))):"none"!==n&&(o[i]="none",Ge.set(r,"display",n)));for(i=0;a>i;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}function N(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&c(e,t)?Ce.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;r>n;n++)Ge.set(e[n],"globalEval",!t||Ge.get(t[n],"globalEval"))}function I(e,t,n,r,o){for(var i,a,l,c,u,d,p=t.createDocumentFragment(),h=[],g=0,f=e.length;f>g;g++)if(i=e[g],i||0===i)if("object"===s(i))Ce.merge(h,i.nodeType?[i]:i);else if(it.test(i)){for(a=a||p.appendChild(t.createElement("div")),l=(nt.exec(i)||["",""])[1].toLowerCase(),c=ot[l]||ot._default,a.innerHTML=c[1]+Ce.htmlPrefilter(i)+c[2],d=c[0];d--;)a=a.lastChild;Ce.merge(h,a.childNodes),a=p.firstChild,a.textContent=""}else h.push(t.createTextNode(i));for(p.textContent="",g=0;i=h[g++];)if(r&&Ce.inArray(i,r)>-1)o&&o.push(i);else if(u=Ce.contains(i.ownerDocument,i),a=N(p.appendChild(i),"script"),u&&C(a),n)for(d=0;i=a[d++];)rt.test(i.type||"")&&n.push(i);return p}function E(){return!0}function D(){return!1}function L(){try{return ue.activeElement}catch(e){}}function S(e,t,n,r,o,i){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)S(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=D;else if(!o)return e;return 1===i&&(a=o,o=function(e){return Ce().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=Ce.guid++)),e.each(function(){Ce.event.add(this,t,o,r,n)})}function j(e,t){return c(e,"table")&&c(11!==t.nodeType?t:t.firstChild,"tr")?Ce(e).children("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function B(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function U(e,t){var n,r,o,i,a,s,l,c;if(1===t.nodeType){if(Ge.hasData(e)&&(i=Ge.access(e),a=Ge.set(t,i),c=i.events)){delete a.handle,a.events={};for(o in c)for(n=0,r=c[o].length;r>n;n++)Ce.event.add(t,o,c[o][n])}We.hasData(e)&&(s=We.access(e),l=Ce.extend({},s),We.set(t,l))}}function Q(e,t){var n=t.nodeName.toLowerCase();"input"===n&&tt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function z(e,t,n,r){t=he.apply([],t);var o,i,s,l,c,u,d=0,p=e.length,h=p-1,g=t[0],f=Te(g);if(f||p>1&&"string"==typeof g&&!ye.checkClone&&pt.test(g))return e.each(function(o){var i=e.eq(o);f&&(t[0]=g.call(this,o,i.html())),z(i,t,n,r)});if(p&&(o=I(t,e[0].ownerDocument,!1,e,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=Ce.map(N(o,"script"),k),l=s.length;p>d;d++)c=o,d!==h&&(c=Ce.clone(c,!0,!0),l&&Ce.merge(s,N(c,"script"))),n.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,Ce.map(s,B),d=0;l>d;d++)c=s[d],rt.test(c.type||"")&&!Ge.access(c,"globalEval")&&Ce.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?Ce._evalUrl&&Ce._evalUrl(c.src):a(c.textContent.replace(ht,""),u,c))}return e}function R(e,t,n){for(var r,o=t?Ce.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||Ce.cleanData(N(r)),r.parentNode&&(n&&Ce.contains(r.ownerDocument,r)&&C(N(r,"script")),r.parentNode.removeChild(r));return e}function O(e,t,n){var r,o,i,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||Ce.contains(e.ownerDocument,e)||(a=Ce.style(e,t)),!ye.pixelBoxStyles()&>.test(a)&&mt.test(t)&&(r=s.width,o=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=o,s.maxWidth=i)),void 0!==a?a+"":a}function H(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function F(e){if(e in Tt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=yt.length;n--;)if(e=yt[n]+t,e in Tt)return e}function V(e){var t=Ce.cssProps[e];return t||(t=Ce.cssProps[e]=F(e)||e),t}function P(e,t,n){var r=Ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Y(e,t,n,r,o,i){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;4>a;a+=2)"margin"===n&&(l+=Ce.css(e,n+Ke[a],!0,o)),r?("content"===n&&(l-=Ce.css(e,"padding"+Ke[a],!0,o)),"margin"!==n&&(l-=Ce.css(e,"border"+Ke[a]+"Width",!0,o))):(l+=Ce.css(e,"padding"+Ke[a],!0,o),"padding"!==n?l+=Ce.css(e,"border"+Ke[a]+"Width",!0,o):s+=Ce.css(e,"border"+Ke[a]+"Width",!0,o));return!r&&i>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))),l}function G(e,t,n){var r=ft(e),o=O(e,t,r),i="border-box"===Ce.css(e,"boxSizing",!1,r),a=i;if(gt.test(o)){if(!n)return o;o="auto"}return a=a&&(ye.boxSizingReliable()||o===e.style[t]),("auto"===o||!parseFloat(o)&&"inline"===Ce.css(e,"display",!1,r))&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),o=parseFloat(o)||0,o+Y(e,t,n||(i?"border":"content"),a,r,o)+"px"}function W(e,t,n,r,o){return new W.prototype.init(e,t,n,r,o)}function X(){xt&&(ue.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(X):n.setTimeout(X,Ce.fx.interval),Ce.fx.tick())}function _(){return n.setTimeout(function(){vt=void 0}),vt=Date.now()}function J(e,t){var n,r=0,o={height:e};for(t=t?1:0;4>r;r+=2-t)n=Ke[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function Z(e,t,n){for(var r,o=($.tweeners[t]||[]).concat($.tweeners["*"]),i=0,a=o.length;a>i;i++)if(r=o[i].call(n,t,e))return r}function K(e,t,n){var r,o,i,a,s,l,c,u,d="width"in t||"height"in t,p=this,h={},g=e.style,f=e.nodeType&&qe(e),m=Ge.get(e,"fxshow");n.queue||(a=Ce._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,Ce.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(o=t[r],Nt.test(o)){if(delete t[r],i=i||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;f=!0}h[r]=m&&m[r]||Ce.style(e,r)}if(l=!Ce.isEmptyObject(t),l||!Ce.isEmptyObject(h)){d&&1===e.nodeType&&(n.overflow=[g.overflow,g.overflowX,g.overflowY],c=m&&m.display,null==c&&(c=Ge.get(e,"display")),u=Ce.css(e,"display"),"none"===u&&(c?u=c:(x([e],!0),c=e.style.display||c,u=Ce.css(e,"display"),x([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===Ce.css(e,"float")&&(l||(p.done(function(){g.display=c}),null==c&&(u=g.display,c="none"===u?"":u)),g.display="inline-block")),n.overflow&&(g.overflow="hidden",p.always(function(){g.overflow=n.overflow[0],g.overflowX=n.overflow[1],g.overflowY=n.overflow[2]})),l=!1;for(r in h)l||(m?"hidden"in m&&(f=m.hidden):m=Ge.access(e,"fxshow",{display:c}),i&&(m.hidden=!f),f&&x([e],!0),p.done(function(){f||x([e]),Ge.remove(e,"fxshow");for(r in h)Ce.style(e,r,h[r])})),l=Z(f?m[r]:0,r,p),r in m||(m[r]=l.start,f&&(l.end=l.start,l.start=0))}}function q(e,t){var n,r,o,i,a;for(n in e)if(r=M(n),o=t[r],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),a=Ce.cssHooks[r],a&&"expand"in a){i=a.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=o)}else t[r]=o}function $(e,t,n){var r,o,i=0,a=$.prefilters.length,s=Ce.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=vt||_(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,i=1-r,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(i);return s.notifyWith(e,[c,i,n]),1>i&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:Ce.extend({},t),opts:Ce.extend(!0,{specialEasing:{},easing:Ce.easing._default},n),originalProperties:t,originalOptions:n,startTime:vt||_(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Ce.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(o)return this;for(o=!0;r>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(q(u,c.opts.specialEasing);a>i;i++)if(r=$.prefilters[i].call(c,e,u,c.opts))return Te(r.stop)&&(Ce._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return Ce.map(u,Z,c),Te(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),Ce.fx.timer(Ce.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function ee(e){var t=e.match(Re)||[];return t.join(" ")}function te(e){return e.getAttribute&&e.getAttribute("class")||""}function ne(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Re)||[]:[]}function re(e,t,n,r){var o;if(Array.isArray(t))Ce.each(t,function(t,o){n||zt.test(e)?r(e,o):re(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==s(t))r(e,t);else for(o in t)re(e+"["+o+"]",t[o],n,r)}function oe(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(Re)||[];if(Te(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ie(e,t,n,r){function o(s){var l;return i[s]=!0,Ce.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||a||i[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var i={},a=e===Jt;return o(t.dataTypes[0])||!i["*"]&&o("*")}function ae(e,t){var n,r,o=Ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&Ce.extend(!0,e,r),e}function se(e,t,n){for(var r,o,i,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){l.unshift(o);break}if(l[0]in n)i=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){i=o;break}a||(a=o)}i=i||a}return i?(i!==l[0]&&l.unshift(i),n[i]):void 0}function le(e,t,n,r){var o,i,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(a=c[l+" "+i]||c["* "+i],!a)for(o in c)if(s=o.split(" "),s[1]===i&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[o]:c[o]!==!0&&(i=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}var ce=[],ue=n.document,de=Object.getPrototypeOf,pe=ce.slice,he=ce.concat,ge=ce.push,fe=ce.indexOf,me={},Ae=me.toString,Me=me.hasOwnProperty,we=Me.toString,be=we.call(Object),ye={},Te=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ve=function(e){return null!=e&&e===e.window},xe={type:!0,src:!0,noModule:!0},Ne="3.3.1",Ce=function(e,t){return new Ce.fn.init(e,t)},Ie=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ce.fn=Ce.prototype={jquery:Ne,constructor:Ce,length:0,toArray:function(){return pe.call(this)},get:function(e){return null==e?pe.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=Ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Ce.each(this,e)},map:function(e){return this.pushStack(Ce.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(pe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ge,sort:ce.sort,splice:ce.splice},Ce.extend=Ce.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||Te(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(c&&r&&(Ce.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,i=n&&Array.isArray(n)?n:[]):i=n&&Ce.isPlainObject(n)?n:{},a[t]=Ce.extend(c,i,r)):void 0!==r&&(a[t]=r));return a},Ce.extend({expando:"jQuery"+(Ne+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return e&&"[object Object]"===Ae.call(e)?(t=de(e))?(n=Me.call(t,"constructor")&&t.constructor,"function"==typeof n&&we.call(n)===be):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){a(e)},each:function(e,t){var n,r=0;if(l(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(Ie,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(l(Object(e))?Ce.merge(n,"string"==typeof e?[e]:e):ge.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:fe.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;n>r;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r,o=[],i=0,a=e.length,s=!n;a>i;i++)r=!t(e[i],i),r!==s&&o.push(e[i]);return o},map:function(e,t,n){var r,o,i=0,a=[];if(l(e))for(r=e.length;r>i;i++)o=t(e[i],i,n),null!=o&&a.push(o);else for(i in e)o=t(e[i],i,n),null!=o&&a.push(o);return he.apply([],a)},guid:1,support:ye}),"function"==typeof Symbol&&(Ce.fn[Symbol.iterator]=ce[Symbol.iterator]),Ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){me["[object "+t+"]"]=t.toLowerCase()});var Ee=/*! +!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";function a(e,t,n){t=t||ue;var r,o=t.createElement("script");if(o.text=e,n)for(r in Ne)n[r]&&(o[r]=n[r]);t.head.appendChild(o).parentNode.removeChild(o)}function s(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?me[Ae.call(e)]||"object":typeof e}function l(e){var t=!!e&&"length"in e&&e.length,n=s(e);return Te(e)||ve(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function c(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function u(e,t,n){return Te(t)?Ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?Ce.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Ce.grep(e,function(e){return fe.call(t,e)>-1!==n}):Ce.filter(t,e,n)}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function p(e){var t={};return Ce.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function g(e){return e}function h(e){throw e}function f(e,t,n,r){var o;try{e&&Te(o=e.promise)?o.call(e).done(t).fail(n):e&&Te(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){ue.removeEventListener("DOMContentLoaded",m),n.removeEventListener("load",m),Ce.ready()}function A(e,t){return t.toUpperCase()}function M(e){return e.replace(Ve,"ms-").replace(Ye,A)}function w(){this.expando=Ce.expando+w.uid++}function b(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Xe.test(e)?JSON.parse(e):e}function y(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(_e,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=b(n)}catch(o){}We.set(e,t,n)}else n=void 0;return n}function T(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return Ce.css(e,t,"")},l=s(),c=n&&n[3]||(Ce.cssNumber[t]?"":"px"),u=(Ce.cssNumber[t]||"px"!==c&&+l)&&Ze.exec(Ce.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)Ce.style(e,t,u+c),(1-i)*(1-(i=s()/l||.5))<=0&&(a=0),u/=i;u=2*u,Ce.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=o)),o}function v(e){var t,n=e.ownerDocument,r=e.nodeName,o=et[r];return o?o:(t=n.body.appendChild(n.createElement(r)),o=Ce.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),et[r]=o,o)}function N(e,t){for(var n,r,o=[],i=0,a=e.length;a>i;i++)r=e[i],r.style&&(n=r.style.display,t?("none"===n&&(o[i]=Ge.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&qe(r)&&(o[i]=v(r))):"none"!==n&&(o[i]="none",Ge.set(r,"display",n)));for(i=0;a>i;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}function x(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&c(e,t)?Ce.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;r>n;n++)Ge.set(e[n],"globalEval",!t||Ge.get(t[n],"globalEval"))}function I(e,t,n,r,o){for(var i,a,l,c,u,d,p=t.createDocumentFragment(),g=[],h=0,f=e.length;f>h;h++)if(i=e[h],i||0===i)if("object"===s(i))Ce.merge(g,i.nodeType?[i]:i);else if(it.test(i)){for(a=a||p.appendChild(t.createElement("div")),l=(nt.exec(i)||["",""])[1].toLowerCase(),c=ot[l]||ot._default,a.innerHTML=c[1]+Ce.htmlPrefilter(i)+c[2],d=c[0];d--;)a=a.lastChild;Ce.merge(g,a.childNodes),a=p.firstChild,a.textContent=""}else g.push(t.createTextNode(i));for(p.textContent="",h=0;i=g[h++];)if(r&&Ce.inArray(i,r)>-1)o&&o.push(i);else if(u=Ce.contains(i.ownerDocument,i),a=x(p.appendChild(i),"script"),u&&C(a),n)for(d=0;i=a[d++];)rt.test(i.type||"")&&n.push(i);return p}function E(){return!0}function D(){return!1}function L(){try{return ue.activeElement}catch(e){}}function S(e,t,n,r,o,i){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)S(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=D;else if(!o)return e;return 1===i&&(a=o,o=function(e){return Ce().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=Ce.guid++)),e.each(function(){Ce.event.add(this,t,o,r,n)})}function j(e,t){return c(e,"table")&&c(11!==t.nodeType?t:t.firstChild,"tr")?Ce(e).children("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function B(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function U(e,t){var n,r,o,i,a,s,l,c;if(1===t.nodeType){if(Ge.hasData(e)&&(i=Ge.access(e),a=Ge.set(t,i),c=i.events)){delete a.handle,a.events={};for(o in c)for(n=0,r=c[o].length;r>n;n++)Ce.event.add(t,o,c[o][n])}We.hasData(e)&&(s=We.access(e),l=Ce.extend({},s),We.set(t,l))}}function Q(e,t){var n=t.nodeName.toLowerCase();"input"===n&&tt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function z(e,t,n,r){t=ge.apply([],t);var o,i,s,l,c,u,d=0,p=e.length,g=p-1,h=t[0],f=Te(h);if(f||p>1&&"string"==typeof h&&!ye.checkClone&&pt.test(h))return e.each(function(o){var i=e.eq(o);f&&(t[0]=h.call(this,o,i.html())),z(i,t,n,r)});if(p&&(o=I(t,e[0].ownerDocument,!1,e,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=Ce.map(x(o,"script"),k),l=s.length;p>d;d++)c=o,d!==g&&(c=Ce.clone(c,!0,!0),l&&Ce.merge(s,x(c,"script"))),n.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,Ce.map(s,B),d=0;l>d;d++)c=s[d],rt.test(c.type||"")&&!Ge.access(c,"globalEval")&&Ce.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?Ce._evalUrl&&Ce._evalUrl(c.src):a(c.textContent.replace(gt,""),u,c))}return e}function R(e,t,n){for(var r,o=t?Ce.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||Ce.cleanData(x(r)),r.parentNode&&(n&&Ce.contains(r.ownerDocument,r)&&C(x(r,"script")),r.parentNode.removeChild(r));return e}function O(e,t,n){var r,o,i,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||Ce.contains(e.ownerDocument,e)||(a=Ce.style(e,t)),!ye.pixelBoxStyles()&&ht.test(a)&&mt.test(t)&&(r=s.width,o=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=o,s.maxWidth=i)),void 0!==a?a+"":a}function H(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function F(e){if(e in Tt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=yt.length;n--;)if(e=yt[n]+t,e in Tt)return e}function V(e){var t=Ce.cssProps[e];return t||(t=Ce.cssProps[e]=F(e)||e),t}function Y(e,t,n){var r=Ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function P(e,t,n,r,o,i){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;4>a;a+=2)"margin"===n&&(l+=Ce.css(e,n+Ke[a],!0,o)),r?("content"===n&&(l-=Ce.css(e,"padding"+Ke[a],!0,o)),"margin"!==n&&(l-=Ce.css(e,"border"+Ke[a]+"Width",!0,o))):(l+=Ce.css(e,"padding"+Ke[a],!0,o),"padding"!==n?l+=Ce.css(e,"border"+Ke[a]+"Width",!0,o):s+=Ce.css(e,"border"+Ke[a]+"Width",!0,o));return!r&&i>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))),l}function G(e,t,n){var r=ft(e),o=O(e,t,r),i="border-box"===Ce.css(e,"boxSizing",!1,r),a=i;if(ht.test(o)){if(!n)return o;o="auto"}return a=a&&(ye.boxSizingReliable()||o===e.style[t]),("auto"===o||!parseFloat(o)&&"inline"===Ce.css(e,"display",!1,r))&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),o=parseFloat(o)||0,o+P(e,t,n||(i?"border":"content"),a,r,o)+"px"}function W(e,t,n,r,o){return new W.prototype.init(e,t,n,r,o)}function X(){Nt&&(ue.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(X):n.setTimeout(X,Ce.fx.interval),Ce.fx.tick())}function _(){return n.setTimeout(function(){vt=void 0}),vt=Date.now()}function J(e,t){var n,r=0,o={height:e};for(t=t?1:0;4>r;r+=2-t)n=Ke[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function Z(e,t,n){for(var r,o=($.tweeners[t]||[]).concat($.tweeners["*"]),i=0,a=o.length;a>i;i++)if(r=o[i].call(n,t,e))return r}function K(e,t,n){var r,o,i,a,s,l,c,u,d="width"in t||"height"in t,p=this,g={},h=e.style,f=e.nodeType&&qe(e),m=Ge.get(e,"fxshow");n.queue||(a=Ce._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,Ce.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(o=t[r],xt.test(o)){if(delete t[r],i=i||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;f=!0}g[r]=m&&m[r]||Ce.style(e,r)}if(l=!Ce.isEmptyObject(t),l||!Ce.isEmptyObject(g)){d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=m&&m.display,null==c&&(c=Ge.get(e,"display")),u=Ce.css(e,"display"),"none"===u&&(c?u=c:(N([e],!0),c=e.style.display||c,u=Ce.css(e,"display"),N([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===Ce.css(e,"float")&&(l||(p.done(function(){h.display=c}),null==c&&(u=h.display,c="none"===u?"":u)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1;for(r in g)l||(m?"hidden"in m&&(f=m.hidden):m=Ge.access(e,"fxshow",{display:c}),i&&(m.hidden=!f),f&&N([e],!0),p.done(function(){f||N([e]),Ge.remove(e,"fxshow");for(r in g)Ce.style(e,r,g[r])})),l=Z(f?m[r]:0,r,p),r in m||(m[r]=l.start,f&&(l.end=l.start,l.start=0))}}function q(e,t){var n,r,o,i,a;for(n in e)if(r=M(n),o=t[r],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),a=Ce.cssHooks[r],a&&"expand"in a){i=a.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=o)}else t[r]=o}function $(e,t,n){var r,o,i=0,a=$.prefilters.length,s=Ce.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=vt||_(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,i=1-r,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(i);return s.notifyWith(e,[c,i,n]),1>i&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:Ce.extend({},t),opts:Ce.extend(!0,{specialEasing:{},easing:Ce.easing._default},n),originalProperties:t,originalOptions:n,startTime:vt||_(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Ce.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(o)return this;for(o=!0;r>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(q(u,c.opts.specialEasing);a>i;i++)if(r=$.prefilters[i].call(c,e,u,c.opts))return Te(r.stop)&&(Ce._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return Ce.map(u,Z,c),Te(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),Ce.fx.timer(Ce.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function ee(e){var t=e.match(Re)||[];return t.join(" ")}function te(e){return e.getAttribute&&e.getAttribute("class")||""}function ne(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Re)||[]:[]}function re(e,t,n,r){var o;if(Array.isArray(t))Ce.each(t,function(t,o){n||zt.test(e)?r(e,o):re(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==s(t))r(e,t);else for(o in t)re(e+"["+o+"]",t[o],n,r)}function oe(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(Re)||[];if(Te(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ie(e,t,n,r){function o(s){var l;return i[s]=!0,Ce.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||a||i[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var i={},a=e===Jt;return o(t.dataTypes[0])||!i["*"]&&o("*")}function ae(e,t){var n,r,o=Ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&Ce.extend(!0,e,r),e}function se(e,t,n){for(var r,o,i,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){l.unshift(o);break}if(l[0]in n)i=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){i=o;break}a||(a=o)}i=i||a}return i?(i!==l[0]&&l.unshift(i),n[i]):void 0}function le(e,t,n,r){var o,i,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(a=c[l+" "+i]||c["* "+i],!a)for(o in c)if(s=o.split(" "),s[1]===i&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[o]:c[o]!==!0&&(i=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}var ce=[],ue=n.document,de=Object.getPrototypeOf,pe=ce.slice,ge=ce.concat,he=ce.push,fe=ce.indexOf,me={},Ae=me.toString,Me=me.hasOwnProperty,we=Me.toString,be=we.call(Object),ye={},Te=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ve=function(e){return null!=e&&e===e.window},Ne={type:!0,src:!0,noModule:!0},xe="3.3.1",Ce=function(e,t){return new Ce.fn.init(e,t)},Ie=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ce.fn=Ce.prototype={jquery:xe,constructor:Ce,length:0,toArray:function(){return pe.call(this)},get:function(e){return null==e?pe.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=Ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Ce.each(this,e)},map:function(e){return this.pushStack(Ce.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(pe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:he,sort:ce.sort,splice:ce.splice},Ce.extend=Ce.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||Te(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(c&&r&&(Ce.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,i=n&&Array.isArray(n)?n:[]):i=n&&Ce.isPlainObject(n)?n:{},a[t]=Ce.extend(c,i,r)):void 0!==r&&(a[t]=r));return a},Ce.extend({expando:"jQuery"+(xe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return e&&"[object Object]"===Ae.call(e)?(t=de(e))?(n=Me.call(t,"constructor")&&t.constructor,"function"==typeof n&&we.call(n)===be):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){a(e)},each:function(e,t){var n,r=0;if(l(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(Ie,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(l(Object(e))?Ce.merge(n,"string"==typeof e?[e]:e):he.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:fe.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;n>r;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r,o=[],i=0,a=e.length,s=!n;a>i;i++)r=!t(e[i],i),r!==s&&o.push(e[i]);return o},map:function(e,t,n){var r,o,i=0,a=[];if(l(e))for(r=e.length;r>i;i++)o=t(e[i],i,n),null!=o&&a.push(o);else for(i in e)o=t(e[i],i,n),null!=o&&a.push(o);return ge.apply([],a)},guid:1,support:ye}),"function"==typeof Symbol&&(Ce.fn[Symbol.iterator]=ce[Symbol.iterator]),Ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){me["[object "+t+"]"]=t.toLowerCase()});var Ee=/*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * @@ -23,14 +23,14 @@ onKeyDown:this.exportBySave,placeholder:"Input the filename",className:"form-con * * Date: 2016-08-08 */ -function(e){function t(e,t,n,r){var o,i,a,s,l,c,u,p=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&((t?t.ownerDocument||t:F)!==k&&j(t),t=t||k,U)){if(11!==g&&(l=Ae.exec(e)))if(o=l[1]){if(9===g){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(p&&(a=p.getElementById(o))&&O(t,a)&&a.id===o)return n.push(a),n}else{if(l[2])return q.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&T.getElementsByClassName&&t.getElementsByClassName)return q.apply(n,t.getElementsByClassName(o)),n}if(T.qsa&&!W[e+" "]&&(!Q||!Q.test(e))){if(1!==g)p=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ye,Te):t.setAttribute("id",s=H),c=C(e),i=c.length;i--;)c[i]="#"+s+" "+h(c[i]);u=c.join(","),p=Me.test(e)&&d(t.parentNode)||t}if(u)try{return q.apply(n,p.querySelectorAll(u)),n}catch(f){}finally{s===H&&t.removeAttribute("id")}}}return E(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>v.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[H]=!0,e}function o(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)v.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t?t.disabled===e:!1}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function d(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function h(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function g(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=P++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,l){var c,u,d,p=[V,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(d=t[H]||(t[H]={}),u=d[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=u[i])&&c[0]===V&&c[1]===s)return p[2]=c[2];if(u[i]=p,p[2]=e(t,n,l))return!0}return!1}}function f(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;i>o;o++)t(e,n[o],r);return r}function A(e,t,n,r,o){for(var i,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(i=e[s])&&(!n||n(i,r,o))&&(a.push(i),c&&t.push(s));return a}function M(e,t,n,o,i,a){return o&&!o[H]&&(o=M(o)),i&&!i[H]&&(i=M(i,a)),r(function(r,a,s,l){var c,u,d,p=[],h=[],g=a.length,f=r||m(t||"*",s.nodeType?[s]:s,[]),M=!e||!r&&t?f:A(f,p,e,s,l),w=n?i||(r?e:g||o)?[]:a:M;if(n&&n(M,w,s,l),o)for(c=A(w,h),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(w[h[u]]=!(M[h[u]]=d));if(r){if(i||e){if(i){for(c=[],u=w.length;u--;)(d=w[u])&&c.push(M[u]=d);i(null,w=[],c,l)}for(u=w.length;u--;)(d=w[u])&&(c=i?ee(r,d):p[u])>-1&&(r[c]=!(a[c]=d))}}else w=A(w===a?w.splice(g,w.length):w),i?i(null,a,w,l):q.apply(a,w)})}function w(e){for(var t,n,r,o=e.length,i=v.relative[e[0].type],a=i||v.relative[" "],s=i?1:0,l=g(function(e){return e===t},a,!0),c=g(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,r){var o=!i&&(r||n!==D)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,o}];o>s;s++)if(n=v.relative[e[s].type])u=[g(f(u),n)];else{if(n=v.filter[e[s].type].apply(null,e[s].matches),n[H]){for(r=++s;o>r&&!v.relative[e[r].type];r++);return M(s>1&&f(u),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&w(e.slice(s,r)),o>r&&w(e=e.slice(r)),o>r&&h(e))}u.push(n)}return f(u)}function b(e,n){var o=n.length>0,i=e.length>0,a=function(r,a,s,l,c){var u,d,p,h=0,g="0",f=r&&[],m=[],M=D,w=r||i&&v.find.TAG("*",c),b=V+=null==M?1:Math.random()||.1,y=w.length;for(c&&(D=a===k||a||c);g!==y&&null!=(u=w[g]);g++){if(i&&u){for(d=0,a||u.ownerDocument===k||(j(u),s=!U);p=e[d++];)if(p(u,a||k,s)){l.push(u);break}c&&(V=b)}o&&((u=!p&&u)&&h--,r&&f.push(u))}if(h+=g,o&&g!==h){for(d=0;p=n[d++];)p(f,m,a,s);if(r){if(h>0)for(;g--;)f[g]||m[g]||(m[g]=Z.call(l));m=A(m)}q.apply(l,m),c&&!r&&m.length>0&&h+n.length>1&&t.uniqueSort(l)}return c&&(V=b,D=M),f};return o?r(a):a}var y,T,v,x,N,C,I,E,D,L,S,j,k,B,U,Q,z,R,O,H="sizzle"+1*new Date,F=e.document,V=0,P=0,Y=n(),G=n(),W=n(),X=function(e,t){return e===t&&(S=!0),0},_={}.hasOwnProperty,J=[],Z=J.pop,K=J.push,q=J.push,$=J.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",oe="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ie=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(ie),pe=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,Ae=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Me=/[+~]/,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ye=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ve=function(){j()},xe=g(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{q.apply(J=$.call(F.childNodes),F.childNodes),J[F.childNodes.length].nodeType}catch(Ne){q={apply:J.length?function(e,t){K.apply(e,$.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},N=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:F;return r!==k&&9===r.nodeType&&r.documentElement?(k=r,B=k.documentElement,U=!N(k),F!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ve,!1):n.attachEvent&&n.attachEvent("onunload",ve)),T.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=o(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=me.test(k.getElementsByClassName),T.getById=o(function(e){return B.appendChild(e).id=H,!k.getElementsByName||!k.getElementsByName(H).length}),T.getById?(v.filter.ID=function(e){var t=e.replace(we,be);return function(e){return e.getAttribute("id")===t}},v.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&U){var n=t.getElementById(e);return n?[n]:[]}}):(v.filter.ID=function(e){var t=e.replace(we,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},v.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&U){var n,r,o,i=t.getElementById(e);if(i){if(n=i.getAttributeNode("id"),n&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if(n=i.getAttributeNode("id"),n&&n.value===e)return[i]}return[]}}),v.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},v.find.CLASS=T.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&U?t.getElementsByClassName(e):void 0},z=[],Q=[],(T.qsa=me.test(k.querySelectorAll))&&(o(function(e){B.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&Q.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||Q.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||Q.push("~="),e.querySelectorAll(":checked").length||Q.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||Q.push(".#.+[+~]")}),o(function(e){e.innerHTML="";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&Q.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&Q.push(":enabled",":disabled"),B.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&Q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),Q.push(",.*:")})),(T.matchesSelector=me.test(R=B.matches||B.webkitMatchesSelector||B.mozMatchesSelector||B.oMatchesSelector||B.msMatchesSelector))&&o(function(e){T.disconnectedMatch=R.call(e,"*"),R.call(e,"[s!='']:x"),z.push("!=",ie)}),Q=Q.length&&new RegExp(Q.join("|")),z=z.length&&new RegExp(z.join("|")),t=me.test(B.compareDocumentPosition),O=t||me.test(B.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return S=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===k||e.ownerDocument===F&&O(F,e)?-1:t===k||t.ownerDocument===F&&O(F,t)?1:L?ee(L,e)-ee(L,t):0:4&n?-1:1)}:function(e,t){if(e===t)return S=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,s=[e],l=[t];if(!o||!i)return e===k?-1:t===k?1:o?-1:i?1:L?ee(L,e)-ee(L,t):0;if(o===i)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===F?-1:l[r]===F?1:0},k):k},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==k&&j(e),n=n.replace(ue,"='$1']"),T.matchesSelector&&U&&!W[n+" "]&&(!z||!z.test(n))&&(!Q||!Q.test(n)))try{var r=R.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,k,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==k&&j(e),O(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==k&&j(e);var n=v.attrHandle[t.toLowerCase()],r=n&&_.call(v.attrHandle,t.toLowerCase())?n(e,t,!U):void 0;return void 0!==r?r:T.attributes||!U?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(ye,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(S=!T.detectDuplicates,L=!T.sortStable&&e.slice(0),e.sort(X),S){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return L=null,e},x=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=x(t);return n},v=t.selectors={cacheLength:50,createPseudo:r,match:he,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(we,be),e[3]=(e[3]||e[4]||e[5]||"").replace(we,be),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=C(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(we,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Y[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&Y(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,p,h,g,f=i!==a?"nextSibling":"previousSibling",m=t.parentNode,A=s&&t.nodeName.toLowerCase(),M=!l&&!s,w=!1;if(m){if(i){for(;f;){for(p=t;p=p[f];)if(s?p.nodeName.toLowerCase()===A:1===p.nodeType)return!1;g=f="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?m.firstChild:m.lastChild],a&&M){for(p=m,d=p[H]||(p[H]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),c=u[e]||[],h=c[0]===V&&c[1],w=h&&c[2],p=h&&m.childNodes[h];p=++h&&p&&p[f]||(w=h=0)||g.pop();)if(1===p.nodeType&&++w&&p===t){u[e]=[V,h,w];break}}else if(M&&(p=t,d=p[H]||(p[H]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),c=u[e]||[],h=c[0]===V&&c[1],w=h),w===!1)for(;(p=++h&&p&&p[f]||(w=h=0)||g.pop())&&((s?p.nodeName.toLowerCase()!==A:1!==p.nodeType)||!++w||(M&&(d=p[H]||(p[H]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),u[e]=[V,w]),p!==t)););return w-=o,w===r||w%r===0&&w/r>=0}}},PSEUDO:function(e,n){var o,i=v.pseudos[e]||v.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[H]?i(n):i.length>1?(o=[e,e,"",n],v.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),a=o.length;a--;)r=ee(e,o[a]),e[r]=!(t[r]=o[a])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=I(e.replace(se,"$1"));return o[H]?r(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:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,be),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,be).toLowerCase(),function(t){var n;do if(n=U?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===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===B},focus:function(e){return e===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!v.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return ge.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=i[0]).type&&9===t.nodeType&&U&&v.relative[i[1].type]){if(t=(v.find.ID(a.matches[0].replace(we,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=he.needsContext.test(e)?0:i.length;o--&&(a=i[o],!v.relative[s=a.type]);)if((l=v.find[s])&&(r=l(a.matches[0].replace(we,be),Me.test(i[0].type)&&d(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&h(i),!e)return q.apply(n,r),n;break}}return(c||I(e,u))(r,t,!U,n,!t||Me.test(e)&&d(t.parentNode)||t),n},T.sortStable=H.split("").sort(X).join("")===H,T.detectDuplicates=!!S,j(),T.sortDetached=o(function(e){return 1&e.compareDocumentPosition(k.createElement("fieldset"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);Ce.find=Ee,Ce.expr=Ee.selectors,Ce.expr[":"]=Ce.expr.pseudos,Ce.uniqueSort=Ce.unique=Ee.uniqueSort,Ce.text=Ee.getText,Ce.isXMLDoc=Ee.isXML,Ce.contains=Ee.contains,Ce.escapeSelector=Ee.escape;var De=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&Ce(e).is(n))break;r.push(e)}return r},Le=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Se=Ce.expr.match.needsContext,je=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Ce.find.matchesSelector(r,e)?[r]:[]:Ce.find.matches(e,Ce.grep(t,function(e){return 1===e.nodeType}))},Ce.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(Ce(e).filter(function(){for(t=0;r>t;t++)if(Ce.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;r>t;t++)Ce.find(e,o[t],n);return r>1?Ce.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&Se.test(e)?Ce(e):e||[],!1).length}});var ke,Be=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ue=Ce.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Be.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Ce?t[0]:t,Ce.merge(this,Ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ue,!0)),je.test(r[1])&&Ce.isPlainObject(t))for(r in t)Te(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=ue.getElementById(r[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):Te(e)?void 0!==n.ready?n.ready(e):e(Ce):Ce.makeArray(e,this)};Ue.prototype=Ce.fn,ke=Ce(ue);var Qe=/^(?:parents|prev(?:Until|All))/,ze={children:!0,contents:!0,next:!0,prev:!0};Ce.fn.extend({has:function(e){var t=Ce(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&Ce(e);if(!Se.test(e))for(;o>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Ce.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?Ce.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?fe.call(Ce(e),this[0]):fe.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Ce.uniqueSort(Ce.merge(this.get(),Ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return De(e,"parentNode")},parentsUntil:function(e,t,n){return De(e,"parentNode",n)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return De(e,"nextSibling")},prevAll:function(e){return De(e,"previousSibling")},nextUntil:function(e,t,n){return De(e,"nextSibling",n)},prevUntil:function(e,t,n){return De(e,"previousSibling",n)},siblings:function(e){return Le((e.parentNode||{}).firstChild,e)},children:function(e){return Le(e.firstChild)},contents:function(e){return c(e,"iframe")?e.contentDocument:(c(e,"template")&&(e=e.content||e),Ce.merge([],e.childNodes))}},function(e,t){Ce.fn[e]=function(n,r){var o=Ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=Ce.filter(r,o)),this.length>1&&(ze[e]||Ce.uniqueSort(o),Qe.test(e)&&o.reverse()),this.pushStack(o)}});var Re=/[^\x20\t\r\n\f]+/g;Ce.Callbacks=function(e){e="string"==typeof e?p(e):Ce.extend({},e);var t,n,r,o,i=[],a=[],l=-1,c=function(){for(o=o||e.once,r=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)i.splice(n,1),l>=n&&l--}),this},has:function(e){return e?Ce.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},Ce.extend({Deferred:function(e){var t=[["notify","progress",Ce.Callbacks("memory"),Ce.Callbacks("memory"),2],["resolve","done",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),0,"resolved"],["reject","fail",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},"catch":function(e){return o.then(null,e)},pipe:function(){var e=arguments;return Ce.Deferred(function(n){Ce.each(t,function(t,r){var o=Te(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=o&&o.apply(this,arguments);e&&Te(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,r,o){function i(e,t,r,o){return function(){var s=this,l=arguments,c=function(){var n,c;if(!(a>e)){if(n=r.apply(s,l),n===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,Te(c)?o?c.call(n,i(a,t,h,o),i(a,t,g,o)):(a++,c.call(n,i(a,t,h,o),i(a,t,g,o),i(a,t,h,t.notifyWith))):(r!==h&&(s=void 0,l=[n]),(o||t.resolveWith)(s,l))}},u=o?c:function(){try{c()}catch(n){Ce.Deferred.exceptionHook&&Ce.Deferred.exceptionHook(n,u.stackTrace),e+1>=a&&(r!==g&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?u():(Ce.Deferred.getStackHook&&(u.stackTrace=Ce.Deferred.getStackHook()),n.setTimeout(u))}}var a=0;return Ce.Deferred(function(n){t[0][3].add(i(0,n,Te(o)?o:h,n.notifyWith)),t[1][3].add(i(0,n,Te(e)?e:h)),t[2][3].add(i(0,n,Te(r)?r:g))}).promise()},promise:function(e){return null!=e?Ce.extend(e,o):o}},i={};return Ce.each(t,function(e,n){var a=n[2],s=n[5];o[n[1]]=a.add,s&&a.add(function(){r=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].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}),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=pe.call(arguments),i=Ce.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?pe.call(arguments):n,--t||i.resolveWith(r,o)}};if(1>=t&&(f(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||Te(o[n]&&o[n].then)))return i.then();for(;n--;)f(o[n],a(n),i.reject);return i.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ce.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Oe.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Ce.readyException=function(e){n.setTimeout(function(){throw e})};var He=Ce.Deferred();Ce.fn.ready=function(e){return He.then(e)["catch"](function(e){Ce.readyException(e)}),this},Ce.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--Ce.readyWait:Ce.isReady)||(Ce.isReady=!0,e!==!0&&--Ce.readyWait>0||He.resolveWith(ue,[Ce]))}}),Ce.ready.then=He.then,"complete"===ue.readyState||"loading"!==ue.readyState&&!ue.documentElement.doScroll?n.setTimeout(Ce.ready):(ue.addEventListener("DOMContentLoaded",m),n.addEventListener("load",m));var Fe=function(e,t,n,r,o,i,a){var l=0,c=e.length,u=null==n;if("object"===s(n)){o=!0;for(l in n)Fe(e,t,l,n[l],!0,i,a)}else if(void 0!==r&&(o=!0,Te(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(Ce(e),n)})),t))for(;c>l;l++)t(e[l],n,a?r:r.call(e[l],l,t(e[l],n)));return o?e:u?t.call(e):c?t(e[0],n):i},Ve=/^-ms-/,Pe=/-([a-z])/g,Ye=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};w.uid=1,w.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Ye(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[M(t)]=n;else for(r in t)o[M(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][M(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(M):(t=M(t),t=t in r?[t]:t.match(Re)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||Ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Ce.isEmptyObject(t)}};var Ge=new w,We=new w,Xe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/[A-Z]/g;Ce.extend({hasData:function(e){return We.hasData(e)||Ge.hasData(e)},data:function(e,t,n){return We.access(e,t,n)},removeData:function(e,t){We.remove(e,t)},_data:function(e,t,n){return Ge.access(e,t,n)},_removeData:function(e,t){Ge.remove(e,t)}}),Ce.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=We.get(i),1===i.nodeType&&!Ge.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=M(r.slice(5)),y(i,r,o[r])));Ge.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){We.set(this,e)}):Fe(this,function(t){var n;if(i&&void 0===t){if(n=We.get(i,e),void 0!==n)return n;if(n=y(i,e),void 0!==n)return n}else this.each(function(){We.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){We.remove(this,e)})}}),Ce.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=Ge.get(e,t),n&&(!r||Array.isArray(n)?r=Ge.access(e,t,Ce.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Ce.queue(e,t),r=n.length,o=n.shift(),i=Ce._queueHooks(e,t),a=function(){Ce.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,a,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ge.get(e,n)||Ge.access(e,n,{empty:Ce.Callbacks("once memory").add(function(){Ge.remove(e,[t+"queue",n])})})}}),Ce.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,rt=/^$|^module$|\/(?:java|ecma)script/i,ot={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ot.optgroup=ot.option,ot.tbody=ot.tfoot=ot.colgroup=ot.caption=ot.thead,ot.th=ot.td;var it=/<|&#?\w+;/;!function(){var e=ue.createDocumentFragment(),t=e.appendChild(ue.createElement("div")),n=ue.createElement("input"); -n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var at=ue.documentElement,st=/^key/,lt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ct=/^([^.]*)(?:\.(.+)|)/;Ce.event={global:{},add:function(e,t,n,r,o){var i,a,s,l,c,u,d,p,h,g,f,m=Ge.get(e);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),o&&Ce.find.matchesSelector(at,o),n.guid||(n.guid=Ce.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof Ce&&Ce.event.triggered!==t.type?Ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Re)||[""],c=t.length;c--;)s=ct.exec(t[c])||[],h=f=s[1],g=(s[2]||"").split(".").sort(),h&&(d=Ce.event.special[h]||{},h=(o?d.delegateType:d.bindType)||h,d=Ce.event.special[h]||{},u=Ce.extend({type:h,origType:f,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&Ce.expr.match.needsContext.test(o),namespace:g.join(".")},i),(p=l[h])||(p=l[h]=[],p.delegateCount=0,d.setup&&d.setup.call(e,r,g,a)!==!1||e.addEventListener&&e.addEventListener(h,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,u):p.push(u),Ce.event.global[h]=!0)},remove:function(e,t,n,r,o){var i,a,s,l,c,u,d,p,h,g,f,m=Ge.hasData(e)&&Ge.get(e);if(m&&(l=m.events)){for(t=(t||"").match(Re)||[""],c=t.length;c--;)if(s=ct.exec(t[c])||[],h=f=s[1],g=(s[2]||"").split(".").sort(),h){for(d=Ce.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,p=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;)u=p[i],!o&&f!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(p.splice(i,1),u.selector&&p.delegateCount--,d.remove&&d.remove.call(e,u));a&&!p.length&&(d.teardown&&d.teardown.call(e,g,m.handle)!==!1||Ce.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)Ce.event.remove(e,h+t[c],n,r,!0);Ce.isEmptyObject(l)&&Ge.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=Ce.event.fix(e),l=new Array(arguments.length),c=(Ge.get(this,"events")||{})[s.type]||[],u=Ce.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(i=[],a={},n=0;l>n;n++)r=t[n],o=r.selector+" ",void 0===a[o]&&(a[o]=r.needsContext?Ce(o,this).index(c)>-1:Ce.find(o,this,null,[c]).length),a[o]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,dt=/\s*$/g;Ce.extend({htmlPrefilter:function(e){return e.replace(ut,"<$1>")},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),l=Ce.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ce.isXMLDoc(e)))for(a=N(s),i=N(e),r=0,o=i.length;o>r;r++)Q(i[r],a[r]);if(t)if(n)for(i=i||N(e),a=a||N(s),r=0,o=i.length;o>r;r++)U(i[r],a[r]);else U(e,s);return a=N(s,"script"),a.length>0&&C(a,!l&&N(e,"script")),s},cleanData:function(e){for(var t,n,r,o=Ce.event.special,i=0;void 0!==(n=e[i]);i++)if(Ye(n)){if(t=n[Ge.expando]){if(t.events)for(r in t.events)o[r]?Ce.event.remove(n,r):Ce.removeEvent(n,r,t.handle);n[Ge.expando]=void 0}n[We.expando]&&(n[We.expando]=void 0)}}}),Ce.fn.extend({detach:function(e){return R(this,e,!0)},remove:function(e){return R(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?Ce.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return z(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=j(this,e);t.appendChild(e)}})},prepend:function(){return z(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=j(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return z(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return z(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Ce.cleanData(N(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Ce.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!dt.test(e)&&!ot[(nt.exec(e)||["",""])[1].toLowerCase()]){e=Ce.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(Ce.cleanData(N(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return z(this,arguments,function(t){var n=this.parentNode;Ce.inArray(this,e)<0&&(Ce.cleanData(N(this)),n&&n.replaceChild(t,this))},e)}}),Ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Ce.fn[e]=function(e){for(var n,r=[],o=Ce(e),i=o.length-1,a=0;i>=a;a++)n=a===i?this:this.clone(!0),Ce(o[a])[t](n),ge.apply(r,n.get());return this.pushStack(r)}});var gt=new RegExp("^("+Je+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},mt=new RegExp(Ke.join("|"),"i");!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(l).appendChild(c);var e=n.getComputedStyle(c);r="1%"!==e.top,s=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),o=36===t(e.width),c.style.position="absolute",i=36===c.offsetWidth||"absolute",at.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var r,o,i,a,s,l=ue.createElement("div"),c=ue.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===c.style.backgroundClip,Ce.extend(ye,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i}}))}();var At=/^(none|table(?!-c[ea]).+)/,Mt=/^--/,wt={position:"absolute",visibility:"hidden",display:"block"},bt={letterSpacing:"0",fontWeight:"400"},yt=["Webkit","Moz","ms"],Tt=ue.createElement("div").style;Ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=O(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,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:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=M(t),l=Mt.test(t),c=e.style;return l||(t=V(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:c[t]:(i=typeof n,"string"===i&&(o=Ze.exec(n))&&o[1]&&(n=T(e,t,o),i="number"),null!=n&&n===n&&("number"===i&&(n+=o&&o[3]||(Ce.cssNumber[s]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n)),void 0)}},css:function(e,t,n,r){var o,i,a,s=M(t),l=Mt.test(t);return l||(t=V(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=O(e,t,r)),"normal"===o&&t in bt&&(o=bt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),Ce.each(["height","width"],function(e,t){Ce.cssHooks[t]={get:function(e,n,r){return n?!At.test(Ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?G(e,t,r):$e(e,wt,function(){return G(e,t,r)}):void 0},set:function(e,n,r){var o,i=ft(e),a="border-box"===Ce.css(e,"boxSizing",!1,i),s=r&&Y(e,t,r,a,i);return a&&ye.scrollboxSize()===i.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-Y(e,t,"border",!1,i)-.5)),s&&(o=Ze.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=Ce.css(e,t)),P(e,n,s)}}}),Ce.cssHooks.marginLeft=H(ye.reliableMarginLeft,function(e,t){return t?(parseFloat(O(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),Ce.each({margin:"",padding:"",border:"Width"},function(e,t){Ce.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[e+Ke[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(Ce.cssHooks[e+t].set=P)}),Ce.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=ft(e),o=t.length;o>a;a++)i[t[a]]=Ce.css(e,t[a],!1,r);return i}return void 0!==n?Ce.style(e,t,n):Ce.css(e,t)},e,t,arguments.length>1)}}),Ce.Tween=W,W.prototype={constructor:W,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||Ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(Ce.cssNumber[n]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=Ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Ce.fx.step[e.prop]?Ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Ce.cssProps[e.prop]]&&!Ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:Ce.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Ce.fx=W.prototype.init,Ce.fx.step={};var vt,xt,Nt=/^(?:toggle|show|hide)$/,Ct=/queueHooks$/;Ce.Animation=Ce.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return T(n.elem,e,Ze.exec(t),n),n}]},tweener:function(e,t){Te(e)?(t=e,e=["*"]):e=e.match(Re);for(var n,r=0,o=e.length;o>r;r++)n=e[r],$.tweeners[n]=$.tweeners[n]||[],$.tweeners[n].unshift(t)},prefilters:[K],prefilter:function(e,t){t?$.prefilters.unshift(e):$.prefilters.push(e)}}),Ce.speed=function(e,t,n){var r=e&&"object"==typeof e?Ce.extend({},e):{complete:n||!n&&t||Te(e)&&e,duration:e,easing:n&&t||t&&!Te(t)&&t};return Ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Ce.fx.speeds?r.duration=Ce.fx.speeds[r.duration]:r.duration=Ce.fx.speeds._default),(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){Te(r.old)&&r.old.call(this),r.queue&&Ce.dequeue(this,r.queue)},r},Ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(qe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=Ce.isEmptyObject(e),i=Ce.speed(t,n,r),a=function(){var t=$(this,Ce.extend({},e),i);(o||Ge.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||i.queue===!1?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=Ce.timers,a=Ge.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&Ct.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));(t||!n)&&Ce.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Ge.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=Ce.timers,a=r?r.length:0;for(n.finish=!0,Ce.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Ce.each(["toggle","show","hide"],function(e,t){var n=Ce.fn[t];Ce.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(J(t,!0),e,r,o)}}),Ce.each({slideDown:J("show"),slideUp:J("hide"),slideToggle:J("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Ce.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Ce.timers=[],Ce.fx.tick=function(){var e,t=0,n=Ce.timers;for(vt=Date.now();t1)},removeAttr:function(e){return this.each(function(){Ce.removeAttr(this,e)})}}),Ce.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?Ce.prop(e,t,n):(1===i&&Ce.isXMLDoc(e)||(o=Ce.attrHooks[t.toLowerCase()]||(Ce.expr.match.bool.test(t)?It:void 0)),void 0!==n?null===n?void Ce.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=Ce.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&c(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(Re);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),It={set:function(e,t,n){return t===!1?Ce.removeAttr(e,n):e.setAttribute(n,n),n}},Ce.each(Ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Et[t]||Ce.find.attr;Et[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=Et[a],Et[a]=o,o=null!=n(e,t,r)?a:null,Et[a]=i),o}});var Dt=/^(?:input|select|textarea|button)$/i,Lt=/^(?:a|area)$/i;Ce.fn.extend({prop:function(e,t){return Fe(this,Ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Ce.propFix[e]||e]})}}),Ce.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&Ce.isXMLDoc(e)||(t=Ce.propFix[t]||t,o=Ce.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Ce.find.attr(e,"tabindex");return t?parseInt(t,10):Dt.test(e.nodeName)||Lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ye.optSelected||(Ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ce.propFix[this.toLowerCase()]=this}),Ce.fn.extend({addClass:function(e){var t,n,r,o,i,a,s,l=0;if(Te(e))return this.each(function(t){Ce(this).addClass(e.call(this,t,te(this)))});if(t=ne(e),t.length)for(;n=this[l++];)if(o=te(n),r=1===n.nodeType&&" "+ee(o)+" "){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=ee(r),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,o,i,a,s,l=0;if(Te(e))return this.each(function(t){Ce(this).removeClass(e.call(this,t,te(this)))});if(!arguments.length)return this.attr("class","");if(t=ne(e),t.length)for(;n=this[l++];)if(o=te(n),r=1===n.nodeType&&" "+ee(o)+" "){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");s=ee(r),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):Te(e)?this.each(function(n){Ce(this).toggleClass(e.call(this,n,te(this),t),t)}):this.each(function(){var t,o,i,a;if(r)for(o=0,i=Ce(this),a=ne(e);t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(void 0===e||"boolean"===n)&&(t=te(this),t&&Ge.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ge.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+ee(te(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;Ce.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=Te(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,Ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=Ce.map(o,function(e){return null==e?"":e+""})),t=Ce.valHooks[this.type]||Ce.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=Ce.valHooks[o.type]||Ce.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),Ce.extend({valHooks:{option:{get:function(e){var t=Ce.find.attr(e,"value");return null!=t?t:ee(Ce.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?i+1:o.length;for(r=0>i?l:a?i:0;l>r;r++)if(n=o[r],(n.selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!c(n.parentNode,"optgroup"))){if(t=Ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=Ce.makeArray(t),a=o.length;a--;)r=o[a],(r.selected=Ce.inArray(Ce.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),Ce.each(["radio","checkbox"],function(){Ce.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=Ce.inArray(Ce(e).val(),t)>-1:void 0}},ye.checkOn||(Ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ye.focusin="onfocusin"in n;var jt=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};Ce.extend(Ce.event,{trigger:function(e,t,r,o){var i,a,s,l,c,u,d,p,h=[r||ue],g=Me.call(e,"type")?e.type:e,f=Me.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=r=r||ue,3!==r.nodeType&&8!==r.nodeType&&!jt.test(g+Ce.event.triggered)&&(g.indexOf(".")>-1&&(f=g.split("."),g=f.shift(),f.sort()),c=g.indexOf(":")<0&&"on"+g,e=e[Ce.expando]?e:new Ce.Event(g,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:Ce.makeArray(t,[e]),d=Ce.event.special[g]||{},o||!d.trigger||d.trigger.apply(r,t)!==!1)){if(!o&&!d.noBubble&&!ve(r)){for(l=d.delegateType||g,jt.test(l+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||ue)&&h.push(s.defaultView||s.parentWindow||n)}for(i=0;(a=h[i++])&&!e.isPropagationStopped();)p=a,e.type=i>1?l:d.bindType||g,u=(Ge.get(a,"events")||{})[e.type]&&Ge.get(a,"handle"),u&&u.apply(a,t),u=c&&a[c],u&&u.apply&&Ye(a)&&(e.result=u.apply(a,t),e.result===!1&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),t)!==!1||!Ye(r)||c&&Te(r[g])&&!ve(r)&&(s=r[c],s&&(r[c]=null),Ce.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,kt),r[g](),e.isPropagationStopped()&&p.removeEventListener(g,kt),Ce.event.triggered=void 0,s&&(r[c]=s)),e.result}},simulate:function(e,t,n){var r=Ce.extend(new Ce.Event,n,{type:e,isSimulated:!0});Ce.event.trigger(r,null,t)}}),Ce.fn.extend({trigger:function(e,t){return this.each(function(){Ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Ce.event.trigger(e,t,n,!0):void 0}}),ye.focusin||Ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Ce.event.simulate(t,e.target,Ce.event.fix(e))};Ce.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Ge.access(r,t);o||r.addEventListener(e,n,!0),Ge.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Ge.access(r,t)-1;o?Ge.access(r,t,o):(r.removeEventListener(e,n,!0),Ge.remove(r,t))}}});var Bt=n.location,Ut=Date.now(),Qt=/\?/;Ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Ce.error("Invalid XML: "+e),t};var zt=/\[\]$/,Rt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;Ce.param=function(e,t){var n,r=[],o=function(e,t){var n=Te(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!Ce.isPlainObject(e))Ce.each(e,function(){o(this.name,this.value)});else for(n in e)re(n,e[n],t,o);return r.join("&")},Ce.fn.extend({serialize:function(){return Ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ce.prop(this,"elements");return e?Ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ce(this).is(":disabled")&&Ht.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!tt.test(e))}).map(function(e,t){var n=Ce(this).val();return null==n?null:Array.isArray(n)?Ce.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ft=/%20/g,Vt=/#.*$/,Pt=/([?&])_=[^&]*/,Yt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Gt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wt=/^(?:GET|HEAD)$/,Xt=/^\/\//,_t={},Jt={},Zt="*/".concat("*"),Kt=ue.createElement("a");Kt.href=Bt.href,Ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Bt.href,type:"GET",isLocal:Gt.test(Bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ae(ae(e,Ce.ajaxSettings),t):ae(Ce.ajaxSettings,e)},ajaxPrefilter:oe(_t),ajaxTransport:oe(Jt),ajax:function(e,t){function r(e,t,r,s){var c,p,h,b,y,T=t;u||(u=!0,l&&n.clearTimeout(l),o=void 0,a=s||"",v.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(b=se(g,v,r)),b=le(g,b,v,c),c?(g.ifModified&&(y=v.getResponseHeader("Last-Modified"),y&&(Ce.lastModified[i]=y),y=v.getResponseHeader("etag"),y&&(Ce.etag[i]=y)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,h=b.error,c=!h)):(h=T,(e||!T)&&(T="error",0>e&&(e=0))),v.status=e,v.statusText=(t||T)+"",c?A.resolveWith(f,[p,T,v]):A.rejectWith(f,[v,T,h]),v.statusCode(w),w=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[v,g,c?p:h]),M.fireWith(f,[v,T]),d&&(m.trigger("ajaxComplete",[v,g]),--Ce.active||Ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,a,s,l,c,u,d,p,h,g=Ce.ajaxSetup({},t),f=g.context||g,m=g.context&&(f.nodeType||f.jquery)?Ce(f):Ce.event,A=Ce.Deferred(),M=Ce.Callbacks("once memory"),w=g.statusCode||{},b={},y={},T="canceled",v={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Yt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=y[e.toLowerCase()]=y[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)v.always(e[v.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||T;return o&&o.abort(t),r(0,t),this}};if(A.promise(v),g.url=((e||g.url||Bt.href)+"").replace(Xt,Bt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Re)||[""],null==g.crossDomain){c=ue.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Kt.protocol+"//"+Kt.host!=c.protocol+"//"+c.host}catch(x){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=Ce.param(g.data,g.traditional)),ie(_t,g,t,v),u)return v;d=Ce.event&&g.global,d&&0===Ce.active++&&Ce.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Wt.test(g.type),i=g.url.replace(Vt,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ft,"+")):(h=g.url.slice(i.length),g.data&&(g.processData||"string"==typeof g.data)&&(i+=(Qt.test(i)?"&":"?")+g.data,delete g.data),g.cache===!1&&(i=i.replace(Pt,"$1"),h=(Qt.test(i)?"&":"?")+"_="+Ut++ +h),g.url=i+h),g.ifModified&&(Ce.lastModified[i]&&v.setRequestHeader("If-Modified-Since",Ce.lastModified[i]),Ce.etag[i]&&v.setRequestHeader("If-None-Match",Ce.etag[i])),(g.data&&g.hasContent&&g.contentType!==!1||t.contentType)&&v.setRequestHeader("Content-Type",g.contentType),v.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)v.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(g.beforeSend.call(f,v,g)===!1||u))return v.abort();if(T="abort",M.add(g.complete),v.done(g.success),v.fail(g.error),o=ie(Jt,g,t,v)){if(v.readyState=1,d&&m.trigger("ajaxSend",[v,g]),u)return v;g.async&&g.timeout>0&&(l=n.setTimeout(function(){v.abort("timeout")},g.timeout));try{u=!1,o.send(b,r)}catch(x){if(u)throw x;r(-1,x)}}else r(-1,"No Transport");return v},getJSON:function(e,t,n){return Ce.get(e,t,n,"json")},getScript:function(e,t){return Ce.get(e,void 0,t,"script")}}),Ce.each(["get","post"],function(e,t){Ce[t]=function(e,n,r,o){return Te(n)&&(o=o||r,r=n,n=void 0),Ce.ajax(Ce.extend({url:e,type:t,dataType:o,data:n,success:r},Ce.isPlainObject(e)&&e))}}),Ce._evalUrl=function(e){return Ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},Ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(Te(e)&&(e=e.call(this[0])),t=Ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return Te(e)?this.each(function(t){Ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Te(e);return this.each(function(n){Ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Ce(this).replaceWith(this.childNodes)}),this}}),Ce.expr.pseudos.hidden=function(e){return!Ce.expr.pseudos.visible(e)},Ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Ce.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var qt={0:200,1223:204},$t=Ce.ajaxSettings.xhr();ye.cors=!!$t&&"withCredentials"in $t,ye.ajax=$t=!!$t,Ce.ajaxTransport(function(e){ -var t,r;return ye.cors||$t&&!e.crossDomain?{send:function(o,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];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(qt[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(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}:void 0}),Ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Ce.globalEval(e),e}}}),Ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=Ce("