From 8c469899d0694d2993e2739eea0651d681679e87 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 12 Apr 2016 16:48:25 +1200 Subject: [PATCH] MINOR: Fix linting errors in tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests were previously excluded from eslint calls. This leads to messier code inside tests, and potentially errors. Now they all meet the listing rules, and so we don’t need to ignore tests in .eslintignore. --- .eslintignore | 3 - admin/javascript/dist/bundle-lib.js | 55 +++++++++---------- .../form-builder/tests/form-builder-test.js | 15 ++--- .../grid-field/tests/grid-field-test.js | 38 +++++++------ .../tests/north-header-breadcrumbs-test.js | 19 ++++--- .../north-header/tests/north-header-test.js | 2 + .../tests/text-field-component-test.js | 19 ++++--- .../tests/campaign-admin-test.js | 2 + .../src/state/records/tests/reducer-test.js | 22 ++++---- .../src/state/schema/tests/reducer-test.js | 8 +-- .../src/tests/reducer-register-test.js | 11 ++-- 11 files changed, 102 insertions(+), 92 deletions(-) diff --git a/.eslintignore b/.eslintignore index 366bc945f..497209519 100644 --- a/.eslintignore +++ b/.eslintignore @@ -32,6 +32,3 @@ admin/javascript/src/SecurityAdmin.js admin/javascript/src/leaktools.js admin/javascript/src/sspath.js admin/javascript/src/ssui.core.js - -# Ignore tests -admin/javascript/**/tests/ diff --git a/admin/javascript/dist/bundle-lib.js b/admin/javascript/dist/bundle-lib.js index 6c27a287b..8868dce74 100644 --- a/admin/javascript/dist/bundle-lib.js +++ b/admin/javascript/dist/bundle-lib.js @@ -1,29 +1,28 @@ -require=function e(t,n,i){function r(o,a){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o"),this.options.alternate.text&&this.buttonElement.append(""+this.options.alternate.text+""),this._refreshAlternate()},refresh:function(){s["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),s["default"].ui.button.prototype.destroy.call(this)}}),s["default"].widget("ssui.ssdialog",s["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){s["default"].ui.dialog.prototype._create.call(this);var e=this,t=(0,s["default"])('');t.bind("load",function(n){"about:blank"!=(0,s["default"])(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){s["default"].ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,s["default"])(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){s["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,s["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function(){var e,t,n={},i=this.element.children("iframe");this.options.widthRatio&&(e=(0,s["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&ethis.options.maxWidth?n.width=this.options.maxWidth:n.width=e),this.options.heightRatio&&(t=(0,s["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&tthis.options.maxHeight?n.height=this.options.maxHeight:n.height=t),jQuery.isEmptyObject(n)||(this._setOptions(n),i.attr("width",n.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),i.attr("height",n.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),s["default"].widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",n=s["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var i=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var r=(0,s["default"])('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){r.addClass("ui-state-hover")},function(){r.removeClass("ui-state-hover")}).focus(function(){r.addClass("ui-state-focus")}).blur(function(){r.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(i);(this.uiDialogTitlebarCloseText=(0,s["default"])("")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(r)}(0,s["default"])("").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(i);i.find("*").add(i).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),s["default"].extend(s["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})},{jQuery:"jQuery"}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]={CREATE_RECORD:"CREATE_RECORD",UPDATE_RECORD:"UPDATE_RECORD",DELETE_RECORD:"DELETE_RECORD",FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},{}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){var n=["id"];return n.reduce(function(e,n){return e.replace(":"+n,t[n])},e)}function s(e,t,n){var i={recordType:e};return function(s){return s({type:l["default"].FETCH_RECORDS_REQUEST,payload:i}),u["default"][t.toLowerCase()](r(n,i)).then(function(e){return e.json()}).then(function(t){s({type:l["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:t}})})["catch"](function(t){s({type:l["default"].FETCH_RECORDS_FAILURE,payload:{error:t,recordType:e}})})}}function o(e,t,n,i){var s={recordType:e,id:t};return function(o){return o({type:l["default"].DELETE_RECORD_REQUEST,payload:s}),u["default"][n.toLowerCase()](r(i,s)).then(function(){o({type:l["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(n){o({type:l["default"].DELETE_RECORD_FAILURE,payload:{error:n,recordType:e,id:t}})})}}Object.defineProperty(n,"__esModule",{value:!0}),n.fetchRecords=s,n.deleteRecord=o;var a=e("./action-types"),l=i(a),c=e("silverstripe-backend.js"),u=i(c)},{"./action-types":5,"silverstripe-backend.js":"silverstripe-backend"}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={SET_SCHEMA:"SET_SCHEMA"};n["default"]=i},{}],8:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:o["default"].SET_SCHEMA,payload:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.setSchema=r;var s=e("./action-types"),o=i(s)},{"./action-types":7}],9:[function(e,t,n){(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.name="SelectParser",e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,r,s,o;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[],i=0,r=s.length;r>i;i++)n=s[i],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){return"OPTION"===e.nodeName.toUpperCase()?(e.text.match(/^\s*$/g)?this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}):(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})),this.options_index+=1):void 0},e}(),e.select_to_array=function(t){var n,i,r,s,o;for(i=new e,o=t.childNodes,r=0,s=o.length;s>r;r++)n=o[r],i.add_node(n);return i.parsed},this.SelectParser=e}).call(window),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=null!=t?t:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.set_default_text(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.name="AbstractChosen",e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&this.form_field.options[0].text.match(/^\s*$/g)?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),n=""!==e.style.cssText?' style="'+e.style+'"':"",'
  • "+e.html+"
  • ")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;switch(t=null!=(n=e.which)?n:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(window),function(){var e,t,n,i,r={}.hasOwnProperty,s=function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};i=this,e=jQuery,e.fn.extend({chosen:function(n){return e.browser.msie&&("6.0"===e.browser.version||"7.0"===e.browser.version&&7===document.documentMode)?this:this.each(function(i){var r;return r=e(this),r.hasClass("chzn-done")?void 0:r.data("chosen",new t(this,n))})}}),t=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return s(r,t),r.prototype.name="Chosen",r.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},r.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},r.prototype.set_up_html=function(){var t,i,r,s,o;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,t=e("
    ",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+(this.options.width||this.f_width)+"px;"}),this.is_multiple?t.html('
      '):t.html('
      '+this.default_text+'
        '),this.form_field_jq.hide().after(t),this.container=e("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),s=this.rise_up(this.container,this.dropdown),i=s?-this.container.find(".chzn-drop").height():this.container.height(),r=this.container.width()-n(this.dropdown),this.dropdown.css({width:r+"px",top:i+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),o=r-n(this.search_container)-n(this.search_field),this.search_field.css({width:o+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},r.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},r.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},r.prototype.container_mousedown=function(t){var n;return this.is_disabled?void 0:(n=null!=t?e(t.target).hasClass("search-choice-close"):!1,t&&"mousedown"===t.type&&!this.results_showing&&t.stopPropagation(),this.pending_destroy_click||n?this.pending_destroy_click=!1:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()))},r.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},r.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},r.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},r.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},r.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){var e,t,n,r,s;for(this.parsing=!0,this.results_data=i.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data,n=0,r=s.length;r>n;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},r.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'
      • '+e("
        ").text(t.label).html()+"
      • ")},r.prototype.result_do_highlight=function(e){var t,n,i,r,s;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),r=i+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight(),t>=r)return this.search_results.scrollTop(t-i>0?t-i:0);if(s>n)return this.search_results.scrollTop(n)}},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){var e,t,i;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),t=this.container.width()-n(this.dropdown),i=this.rise_up(this.container,this.dropdown),e=i?-this.container.find(".chzn-drop").height():this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.css("width",t-n(this.search_container)-n(this.search_field)+"px"),this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},r.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},r.prototype.set_tab_index=function(e){var t;return this.form_field_jq.attr("tabindex")?(t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)):void 0},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},r.prototype.search_results_mouseup=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n.length?(this.result_highlight=n,this.result_select(t),this.search_field.focus()):void 0},r.prototype.search_results_mouseover=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n?this.result_do_highlight(n):void 0},r.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},r.prototype.choices_click=function(t){return t.preventDefault(),!this.active_field||e(t.target).hasClass("search-choice")||this.results_showing?void 0:this.results_show()},r.prototype.choice_build=function(t){var n,i,r,s=this;return n=this.container_id+"_c_"+t.array_index,this.choices+=1,i=t.disabled?'
      • '+t.html+"
      • ":'
      • '+t.html+'
      • ',this.search_container.before(i),r=e("#"+n).find("a").first(),r.click(function(e){return s.choice_destroy_link_click(e)})},r.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},r.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove()):void 0},r.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},r.prototype.results_reset_cleanup=function(){ -return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},r.prototype.result_select=function(e){var t,n,i,r;return this.result_highlight?(t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),r=n.substr(n.lastIndexOf("_")+1),i=this.results_data[r],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.is_multiple?this.choice_build(i):(this.selected_item.find("span").first().text(i.text),this.allow_single_deselect&&this.single_deselect_control_build()),e.metaKey&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()):void 0},r.prototype.result_activate=function(e){return e.addClass("active-result")},r.prototype.result_deactivate=function(e){return e.removeClass("active-result")},r.prototype.result_deselect=function(t){var n,i;return i=this.results_data[t],this.form_field.options[i.options_index].disabled?!1:(i.selected=!1,this.form_field.options[i.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[i.options_index].value}),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){return this.allow_single_deselect&&this.selected_item.find("abbr").length<1?this.selected_item.find("span").first().after(''):void 0},r.prototype.winnow_results=function(){var t,n,i,r,s,o,a,l,c,u,d,h,p,f,m,g,v,_;for(this.no_results_clear(),c=0,u=this.search_field.val()===this.default_text?"":e("
        ").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),_=this.results_data,f=0,g=_.length;g>f;f++)if(n=_[f],!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){if(t=!1,l=n.dom_id,a=e("#"+l),s.test(n.html))t=!0,c+=1;else if((n.html.indexOf(" ")>=0||0===n.html.indexOf("["))&&(r=n.html.replace(/\[|\]/g,"").split(" "),r.length))for(m=0,v=r.length;v>m;m++)i=r[m],s.test(i)&&(t=!0,c+=1);t?(u.length?(d=n.html.search(p),h=n.html.substr(0,d+u.length)+""+n.html.substr(d+u.length),h=h.substr(0,d)+""+h.substr(d)):h=n.html,a.html(h),this.result_activate(a),null!=n.group_array_index&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&l===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a))}return 1>c&&u.length?this.no_results(u):this.winnow_results_set_highlight()},r.prototype.winnow_results_clear=function(){var t,n,i,r,s;for(this.search_field.val(""),n=this.search_results.find("li"),s=[],i=0,r=n.length;r>i;i++)t=n[i],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):this.is_multiple&&t.hasClass("result-selected")?s.push(void 0):s.push(this.result_activate(t));return s},r.prototype.winnow_results_set_highlight=function(){var e,t;return this.result_highlight||(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null==e)?void 0:this.result_do_highlight(e)},r.prototype.no_results=function(t){var n;return n=e('
      • '+this.results_none_found+' ""
      • '),n.find("span").first().html(t),this.search_results.append(n)},r.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},r.prototype.keydown_arrow=function(){var t,n;return this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t))),this.results_showing?void 0:this.results_show()},r.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},r.prototype.keydown_checker=function(e){var t,n;switch(t=null!=(n=e.which)?n:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},r.prototype.search_field_scale=function(){var t,n,i,r,s,o,a,l,c,u;if(this.is_multiple){for(i=0,l=0,o="position:absolute; left: -1000px; top: -1000px; display:none;",a=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],c=0,u=a.length;u>c;c++)s=a[c],o+=s+":"+this.search_field.css(s)+";";return n=e("
        ",{style:o}),n.text(this.search_field.val()),e("body").append(n),l=n.width()+25,n.remove(),l>this.f_width-10&&(l=this.f_width-10),this.search_field.css({width:l+"px"}),r=this.rise_up(this.container,this.dropdown),t=r?-this.container.find(".chzn-drop").height():this.container.height(),this.dropdown.css({top:t+"px"})}},r.prototype.generate_random_id=function(){var t;for(t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();e("#"+t).length>0;)t+=this.generate_random_char();return t},r.prototype.rise_up=function(t,n){var i,r,s,o;return o=t.find("a.chzn-single"),o.length>0?(s=e(window).height()+e(document).scrollTop()-t.find("a").innerHeight(),r=o.offset().top,i=n.innerHeight(),r+i>s&&r-i>0?(t.addClass("chzn-with-rise"),!0):(t.removeClass("chzn-with-rise"),!1)):!1},r}(AbstractChosen),n=function(e){var t;return t=e.outerWidth()-e.width()},i.get_side_border_padding=n}.call(window)},{}],10:[function(e,t,n){!function(){window.jLayout="undefined"==typeof window.jLayout?{}:window.jLayout,jLayout.border=function(e){function t(e){return function(t){var i,c=t.insets(),u=0,d=0;return r&&r.isVisible()&&(i=r[e+"Size"](),u+=i.width+n.hgap,d=i.height),s&&s.isVisible()&&(i=s[e+"Size"](),u+=i.width+n.hgap,d=Math.max(i.height,d)),l&&l.isVisible()&&(i=l[e+"Size"](),u+=i.width,d=Math.max(i.height,d)),o&&o.isVisible()&&(i=o[e+"Size"](),u=Math.max(i.width,u),d+=i.height+n.vgap),a&&a.isVisible()&&(i=a[e+"Size"](),u=Math.max(i.width,u),d+=i.height+n.vgap),{width:u+c.left+c.right,height:d+c.top+c.bottom}}}var n={},i={},r=e.east,s=e.west,o=e.north,a=e.south,l=e.center;return n.hgap=e.hgap||0,n.vgap=e.vgap||0,i.items=function(){var e=[];return r&&e.push(r),s&&e.push(s),o&&e.push(o),a&&e.push(a),l&&e.push(l),e},i.layout=function(e){var t,i=e.bounds(),c=e.insets(),u=c.top,d=i.height-c.bottom,h=c.left,p=i.width-c.right;return o&&o.isVisible()&&(t=o.preferredSize(),o.bounds({x:h,y:u,width:p-h,height:t.height}),o.doLayout(),u+=t.height+n.vgap),a&&a.isVisible()&&(t=a.preferredSize(),a.bounds({x:h,y:d-t.height,width:p-h,height:t.height}),a.doLayout(),d-=t.height+n.vgap),r&&r.isVisible()&&(t=r.preferredSize(),r.bounds({x:p-t.width,y:u,width:t.width,height:d-u}),r.doLayout(),p-=t.width+n.hgap),s&&s.isVisible()&&(t=s.preferredSize(),s.bounds({x:h,y:u,width:t.width,height:d-u}),s.doLayout(),h+=t.width+n.hgap),l&&l.isVisible()&&(l.bounds({x:h,y:u,width:p-h,height:d-u}),l.doLayout()),e},i.preferred=t("preferred"),i.minimum=t("minimum"),i.maximum=t("maximum"),i}}()},{}],11:[function(e,t,n){var i=window.jQuery,r=window.jLayout;i&&r&&!function(e){var t=e.jLayoutWrap=function(t,n){var i={};return i.item=t,e.each(["min","max"],function(e,n){i[n+"imumSize"]=function(e){var r=t.data("jlayout");return r?r[n+"imum"](i):t[n+"Size"](e)}}),e.extend(i,{doLayout:function(){var e=t.data("jlayout");e?e.layout(i):t.is("[data-layout-type]")&&t.layout({resize:!1}),t.css({position:"absolute"})},isVisible:function(){return t.isVisible()},insets:function(){var e=t.padding(),n=t.border();return{top:e.top,bottom:e.bottom+n.bottom+n.top,left:e.left,right:e.right+n.right+n.left}},bounds:function(e){var n={};return e?("number"==typeof e.x&&(n.left=e.x),"number"==typeof e.y&&(n.top=e.y),"number"==typeof e.width&&(n.width=e.width-(t.outerWidth(!0)-t.width()),n.width=n.width>=0?n.width:0),"number"==typeof e.height&&(n.height=e.height-(t.outerHeight(!0)-t.height()),n.height=n.height>=0?n.height:0),t.css(n),t):(n=t.position(),{x:n.left,y:n.top,width:t.outerWidth(!1),height:t.outerHeight(!1)})},preferredSize:function(){var e,r,s=t.margin(),o={width:0,height:0},a=t.data("jlayout");return a&&n?(o=a.preferred(i),e=i.minimumSize(),r=i.maximumSize(),o.width+=s.left+s.right,o.height+=s.top+s.bottom,o.widthr.width||o.height>r.height)&&(o.width=Math.min(o.width,r.width),o.height=Math.min(o.height,r.height))):(o=i.bounds(),o.width+=s.left+s.right,o.height+=s.top+s.bottom),o}}),i};e.fn.layout=function(n){var i=e.extend({},e.fn.layout.defaults,n);return e.each(this,function(){var n=e(this),s=e.metadata&&n.metadata().layout?e.extend(i,n.metadata().layout):i,s=n.data("layoutType")?e.extend(s,{type:n.data("layoutType")}):s,o=t(n,s.resize);"border"===s.type&&"undefined"!=typeof r.border?(e.each(["north","south","west","east","center"],function(e,i){n.children().hasClass(i)&&(s[i]=t(n.children("."+i+":first")))}),n.data("jlayout",r.border(s))):"grid"===s.type&&"undefined"!=typeof r.grid?(s.items=[],n.children().each(function(n){e(this).hasClass("ui-resizable-handle")||(s.items[n]=t(e(this)))}),n.data("jlayout",r.grid(s))):"flexGrid"===s.type&&"undefined"!=typeof r.flexGrid?(s.items=[],n.children().each(function(n){e(this).hasClass("ui-resizable-handle")||(s.items[n]=t(e(this)))}),n.data("jlayout",r.flexGrid(s))):"column"===s.type&&"undefined"!=typeof r.column?(s.items=[],n.children().each(function(n){e(this).hasClass("ui-resizable-handle")||(s.items[n]=t(e(this)))}),n.data("jlayout",r.column(s))):"flow"===s.type&&"undefined"!=typeof r.flow&&(s.items=[],n.children().each(function(n){e(this).hasClass("ui-resizable-handle")||(s.items[n]=t(e(this)))}),n.data("jlayout",r.flow(s))),s.resize&&o.bounds(o.preferredSize()),o.doLayout(),n.css({position:"relative"}),void 0!==e.ui&&n.addClass("ui-widget")})},e.fn.layout.defaults={resize:!0,type:"grid"}}(i)},{}],12:[function(e,t,n){!function(e){e.fn.hoverIntent=function(t,n){var i={sensitivity:7,interval:100,timeout:350};i=e.extend(i,n?{over:t,out:n}:t);var r,s,o,a,l=function(e){r=e.pageX,s=e.pageY},c=function(t,n){return n.hoverIntent_t=clearTimeout(n.hoverIntent_t),Math.abs(o-r)+Math.abs(a-s)
        ").addClass("notice-wrap").appendTo("body"),i=e("
        ").addClass("notice-item-wrapper"),r=e("
        ").hide().addClass("notice-item "+t.type).appendTo(n).html("

        "+t.text+"

        ").animate(t.inEffect,t.inEffectDuration).wrap(i),s=e("
        ").addClass("notice-item-close").prependTo(r).html("x").click(function(){e.noticeRemove(r)}),r.hover(function(){a=!0},function(){a=!1}),t.stay||setTimeout(function(){var t=setInterval(function(){a||(e.noticeRemove(r),clearInterval(t))},1e3)},t.stayTime)},noticeRemove:function(e){e.animate({opacity:"0"},600,function(){e.parent().animate({height:"0px"},300,function(){e.parent().remove()})})}})}(jQuery)},{}],14:[function(e,t,n){!function(e){"use strict";var t=function(e){return parseInt(e,10)||0};e.each(["min","max"],function(n,i){e.fn[i+"Size"]=function(e){var n,r;return e?(void 0!==e.width&&this.css(i+"-width",e.width),void 0!==e.height&&this.css(i+"-height",e.height),this):(n=this.css(i+"-width"),r=this.css(i+"-height"),{width:"max"===i&&(void 0===n||"none"===n||-1===t(n))&&Number.MAX_VALUE||t(n),height:"max"===i&&(void 0===r||"none"===r||-1===t(r))&&Number.MAX_VALUE||t(r)})}}),e.fn.isVisible=function(){return this.is(":visible")},e.each(["border","margin","padding"],function(n,i){e.fn[i]=function(e){return e?(void 0!==e.top&&this.css(i+"-top"+("border"===i?"-width":""),e.top),void 0!==e.bottom&&this.css(i+"-bottom"+("border"===i?"-width":""),e.bottom),void 0!==e.left&&this.css(i+"-left"+("border"===i?"-width":""),e.left),void 0!==e.right&&this.css(i+"-right"+("border"===i?"-width":""),e.right),this):{top:t(this.css(i+"-top"+("border"===i?"-width":""))),bottom:t(this.css(i+"-bottom"+("border"===i?"-width":""))),left:t(this.css(i+"-left"+("border"===i?"-width":""))),right:t(this.css(i+"-right"+("border"===i?"-width":"")))}}})}(jQuery)},{}],15:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var r=e("./jQuery"),s=i(r);s["default"].fn.extend({ssDatepicker:function(e){return(0,s["default"])(this).each(function(){if(!(0,s["default"])(this).data("datepicker")){(0,s["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar");var t=((0,s["default"])(this).parents(".field.date:first"),s["default"].extend(e||{},(0,s["default"])(this).data(),(0,s["default"])(this).data("jqueryuiconfig"),{}));t.showcalendar&&(t.locale&&s["default"].datepicker.regional[t.locale]&&(t=s["default"].extend(t,s["default"].datepicker.regional[t.locale],{})),t.min&&(t.minDate=s["default"].datepicker.parseDate("yy-mm-dd",t.min)),t.max&&(t.maxDate=s["default"].datepicker.parseDate("yy-mm-dd",t.max)),t.dateFormat=t.jquerydateformat,(0,s["default"])(this).datepicker(t))}})}}),(0,s["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,s["default"])(this).ssDatepicker(),(0,s["default"])(this).data("datepicker")&&(0,s["default"])(this).datepicker("show")})},{"./jQuery":"jQuery"}],16:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var r=e("./jQuery"),s=i(r),o=e("./i18n"),a=i(o);s["default"].entwine("ss",function(e){e(".ss-gridfield").entwine({reload:function(t,n){var i=this,r=this.closest("form"),s=this.find(":input:focus").attr("name"),o=r.find(":input").serializeArray();t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(o),window.location.search&&(t.data=window.location.search.replace(/^\?/,"")+"&"+e.param(t.data)),r.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(o){if(i.empty().append(e(o).children()),s&&i.find(':input[name="'+s+'"]').focus(),i.find(".filter-header").length){var a;"show"==t.data[0].filter?(a='',i.addClass("show-filter").find(".filter-header").show()):(a='',i.removeClass("show-filter").find(".filter-header").hide()),i.find(".sortable-header th:last").html(a)}r.removeClass("loading"),n&&n.apply(this,arguments),i.trigger("reload",i)},error:function(e){alert(a["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),r.removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var n=this.getState();n[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(n))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),e(".ss-gridfield *").entwine({getGridField:function(){return this.closest(".ss-gridfield")}}),e(".ss-gridfield :button[name=showFilter]").entwine({onclick:function(t){e(".filter-header").show("slow").find(":input:first").focus(),this.closest(".ss-gridfield").addClass("show-filter"),this.parent().html(''),t.preventDefault()}}),e(".ss-gridfield .ss-gridfield-item").entwine({onclick:function(t){if(e(t.target).closest(".action").length)return this._super(t),!1;var n=this.find(".edit-link");n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".ss-gridfield .action").entwine({onclick:function(e){var t="show";return this.button("option","disabled")?void e.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(t="hidden"),this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:t}]}),void e.preventDefault())},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),i=this.closest("form"),r=i.find(":input.gridstate").serialize(),s=i.find('input[name="SecurityID"]').val();r+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),s&&(r+="&SecurityID="+encodeURIComponent(s)),window.location.search&&(r=window.location.search.replace(/^\?/,"")+"&"+r);var o=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+o+r,e("base").attr("href"))}}),e(".ss-gridfield .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),i=e.is(":disabled");(n&&i||!n&&!i)&&e.button("option","disabled",!i)}}),e(".ss-gridfield .col-buttons .action.gridfield-button-delete, .cms-edit-form .Actions button.action.action-delete").entwine({onclick:function(e){return confirm(a["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".ss-gridfield .action.gridfield-button-print").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus();var e=this.contentWindow||this;e.print()})},onunmatch:function(){this._super()}}),e(".ss-gridfield .action.no-ajax").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".ss-gridfield .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".ss-gridfield[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".ss-gridfield[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".ss-gridfield .filter-header :input").entwine({onmatch:function(){var e=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),t=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),n=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var i=this.closest(".filter-header").find(".ss-gridfield-button-filter"),r="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(r="hidden"),this.getGridField().reload({data:[{name:i.attr("name"),value:i.val(),filter:r}]}),!1}t.addClass("hover-alike"),n.addClass("hover-alike")}}}),e(".ss-gridfield .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var i=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},type:"GET",url:e(i).data("searchUrl"),data:encodeURIComponent(i.attr("name"))+"="+encodeURIComponent(i.val()),success:function(t){n(e.map(JSON.parse(t),function(e,t){return{label:e,value:e,id:t}}))},error:function(e){alert(a["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){e(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith('');var i=e(this).closest(".ss-gridfield").find("#action_gridfield_relationadd");i.data("button")?i.button("enable"):i.removeAttr("disabled")}})}}),e(".ss-gridfield .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){var n=parseInt(e(this).val(),10),i=e(this).getGridField();return i.setState("GridFieldPaginator",{currentPage:n}),i.reload(),!1}}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],17:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=require("./jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("./i18n"),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jQuery2["default"])(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function(){var e=this.getInstance();e.save(),(0,_jQuery2["default"])(e.getElement()).trigger("change")},create:function(){var e=this.getConfig();"undefined"!=typeof e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback;return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save(),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openDialog:function(t){var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},i=this,r=e("#cms-editor-dialogs").data("url"+n(t)+"form"),s=e(".htmleditorfield-"+t+"dialog");s.length?(s.getForm().setElement(this),s.html(""),s.addClass("loading"),s.open()):(s=e('
        '),e("body").append(s)),e.ajax({url:r,complete:function(){s.removeClass("loading")},success:function(e){s.html(e),s.getForm().setElement(i),s.trigger("ssdialogopen")}})}}),e(".htmleditorfield-dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function(){e(this).find("form").submit()}}}}),this._super()},getForm:function(){return this.find("form")},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},onscroll:function(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function(t){return this._super(e(t))},onadd:function(){var e=this.find(":header:first");this.getDialog().attr("title",e.text()),this._super()},onremove:function(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function(){return this.closest(".htmleditorfield-dialog")},fromDialog:{onssdialogopen:function(){var e=this.getEditor();this.setSelection(e.getSelectedNode()),this.setBookmark(e.createBookmark()),e.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),this.updateFromEditor()},onssdialogclose:function(){var e=this.getEditor();e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function(){return this.getElement().getEditor()},modifySelection:function(e){var t=this.getEditor();t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function(){},redraw:function(){},resetFields:function(){this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function(){this._super(),this[0].reset()},redraw:function(){this._super();var e=this.find(":input[name=LinkType]:checked").val();this.addAnchorSelector(),this.resetFileField(),this.find("div.content .field").hide(),this.find('.field[id$="LinkType"]').show(),this.find('.field[id$="'+e+'_Holder"]').show(),"internal"!=e&&"anchor"!=e||this.find('.field[id$="Anchor_Holder"]').show(),"email"==e?this.find('.field[id$="Subject_Holder"]').show():this.find('.field[id$="TargetBlank_Holder"]').show(),"anchor"==e&&this.find('.field[id$="AnchorSelector_Holder"]').show(),this.find('.field[id$="Description_Holder"]').show()},getLinkAttributes:function(){var e,t=null,n=this.find(":input[name=Subject]").val(),i=this.find(":input[name=Anchor]").val();switch(this.find(":input[name=TargetBlank]").is(":checked")&&(t="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":e="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]",i&&(e+="#"+i);break;case"anchor":e="#"+i;break;case"file":var r=this.find(".ss-uploadfield .ss-uploadfield-item").attr("data-fileid");e=r?"[file_link,id="+r+"]":"";break;case"email":e="mailto:"+this.find(":input[name=email]").val(),n&&(e+="?subject="+encodeURIComponent(n)),t=null;break;default:e=this.find(":input[name=external]").val(),-1==e.indexOf("://")&&(e="http://"+e)}return{href:e,target:t,title:this.find(":input[name=Description]").val()}},insertLink:function(){this.modifySelection(function(e){e.insertLink(this.getLinkAttributes())})},removeLink:function(){this.modifySelection(function(e){e.removeLink()}),this.resetFileField(),this.close()},resetFileField:function(){var e=this.find('.ss-uploadfield[id$="file_Holder"]'),t=e.data("fileupload"),n=e.find(".ss-uploadfield-item[data-fileid]");n.length&&(t._trigger("destroy",null,{context:n}),e.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function(){if(!this.find(":input[name=AnchorSelector]").length){var t=this,n=e('');this.find(":input[name=Anchor]").parent().append(n),this.updateAnchorSelector(),n.change(function(n){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function(){var t=this.find(":input[name=LinkType]:checked").val(),n=e.Deferred();switch(t){case"anchor":var i=[],r=this.getEditor();if(r){var s=r.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim);if(s&&s.length)for(var o=0;o'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"")),n.done(function(n){if(t.empty(),t.append(e('")),n)for(var i=0;i'+n[i]+""))}).fail(function(n){t.empty(),t.append(e('"))}),e.browser.msie&&t.hide().show()},updateFromEditor:function(){var e,t=/<\S[^><]*>/g,n=this.getCurrentLink();if(n)for(e in n){var i=this.find(":input[name="+e+"]"),r=n[e];"string"==typeof r&&(r=r.replace(t,"")),i.is(":checkbox")?i.prop("checked",r).change():i.is(":radio")?i.val([r]).change():"file"==e?(i=this.find(':input[name="'+e+'[Uploads][]"]'), -i=i.parents(".ss-uploadfield"),function s(e,t){e.getConfig()?e.attachFiles([t]):setTimeout(function(){s(e,t)},50)}(i,r)):i.val(r).change()}},getCurrentLink:function(){var e=this.getSelection(),t="",n="",i="",r="insert",s="",o=null;return e.length&&(o=e.is("a")?e:e=e.parents("a:first")),o&&o.length&&this.modifySelection(function(e){e.selectNode(o[0])}),o.attr("href")||(o=null),o&&(t=o.attr("href"),n=o.attr("target"),i=o.attr("title"),s=o.attr("class"),t=this.getEditor().cleanLink(t,o),r="update"),t.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:i}:t.match(/^(assets\/.*)$/)||t.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{LinkType:"file",file:RegExp.$1,Description:i,TargetBlank:!!n}:t.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:i,TargetBlank:!!n}:t.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:i,TargetBlank:!!n}:t?{LinkType:"external",external:t,Description:i,TargetBlank:!!n}:null}}),e("form.htmleditorfield-linkform input[name=LinkType]").entwine({onclick:function(e){this.parents("form:first").redraw(),this._super()},onchange:function(){this.parents("form:first").redraw();var e=this.parent().find(":checked").val();"anchor"!==e&&"internal"!==e||this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function(){this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function(e){return this.parents("form:first").removeLink(),this._super(),!1}}),e("form.htmleditorfield-mediaform").entwine({toggleCloseButton:function(){var e=Boolean(this.find(".ss-htmleditorfield-file").length);this.find(".overview .action-delete")[e?"hide":"show"]()},onsubmit:function(){return this.modifySelection(function(t){this.find(".ss-htmleditorfield-file").each(function(){e(this).insertHTML(t)})}),this.getDialog().close(),!1},updateFromEditor:function(){var e=this,t=this.getSelection();if(t.is("img")){var n=t.data("id")||t.data("url")||t.attr("src");this.showFileView(n).done(function(n){n.updateFromNode(t),e.toggleCloseButton(),e.redraw()})}this.redraw()},redraw:function(t){this._super();var n=this.getSelection(),i=Boolean(this.find(".ss-htmleditorfield-file").length),r=n.is("img"),s=this.hasClass("insertingURL"),o=this.find(".header-edit");o[i?"show":"hide"](),this.closest("ui-dialog").find("ui-dialog-buttonpane .media-insert").button(i?"enable":"disable").toggleClass("ui-state-disabled",!i),this.find(".htmleditorfield-default-panel")[r||s?"hide":"show"](),this.find(".htmleditorfield-web-panel")[r||!s?"hide":"show"]();var a=this.find(".htmleditorfield-mediaform-heading.insert");r?a.hide():s?(a.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTURL")).prepend(''),this.find(".htmleditorfield-web-panel input.remoteurl").focus()):a.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTFROM")).find(".back-button").remove(),this.find(".htmleditorfield-mediaform-heading.update")[r?"show":"hide"](),this.find(".ss-uploadfield-item-actions")[r?"hide":"show"](),this.find(".ss-uploadfield-item-name")[r?"hide":"show"](),this.find(".ss-uploadfield-item-preview")[r?"hide":"show"](),this.find(".Actions .media-update")[r?"show":"hide"](),this.find(".ss-uploadfield-item-editform").toggleEditForm(r),this.find(".htmleditorfield-from-cms .field.treedropdown").css("left",e(".htmleditorfield-mediaform-heading:visible").outerWidth()),this.closest(".ui-dialog").addClass("ss-uploadfield-dropzone"),this.closest(".ui-dialog").find(".ui-dialog-buttonpane .media-insert .ui-button-text").text([r?_i18n2["default"]._t("HtmlEditorField.UPDATE","Update"):_i18n2["default"]._t("HtmlEditorField.INSERT","Insert")])},resetFields:function(){this.find(".ss-htmleditorfield-file").remove(),this.find(".ss-gridfield-items .ui-selected").removeClass("ui-selected"),this.find("li.ss-uploadfield-item").remove(),this.redraw(),this._super()},getFileView:function(e){return this.find(".ss-htmleditorfield-file[data-id="+e+"]")},showFileView:function(t){var n=this,i=Number(t)==t?{ID:t}:{FileURL:t},r=e('
        ');this.find(".content-edit").prepend(r);var s=e.Deferred();return e.ajax({url:e.path.addSearchParams(this.attr("action").replace(/MediaForm/,"viewfile"),i),success:function(t,i,o){var a=e(t).filter(".ss-htmleditorfield-file");r.replaceWith(a),n.redraw(),s.resolve(a)},error:function(){r.remove(),s.reject()}}),s.promise()}}),e("form.htmleditorfield-mediaform div.ss-upload .upload-url").entwine({onclick:function(){var e=this.closest("form");e.addClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function(){var e=this.closest("form");e.removeClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function(t,n){var i=this.closest("form"),r=e(n.selected);r.is(".ss-gridfield-item")&&(i.closest("form").showFileView(r.data("id")),i.redraw(),i.parent().trigger("scroll"))},onselectableunselected:function(t,n){var i=this.closest("form"),r=e(n.unselected);r.is(".ss-gridfield-item")&&(i.getFileView(r.data("id")).remove(),i.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function(t){var n=this.closest("form"),i=[];n.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){i.push(e(this).data("id"))});var r=e(".ss-uploadfield-files",this).children(".ss-uploadfield-item");r.each(function(){var t=e(this).data("fileid");t&&-1==e.inArray(t,i)&&(e(this).remove(),n.showFileView(t))}),n.parent().trigger("scroll"),n.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function(){this._super(),this.validate()},onkeyup:function(){this.validate()},onchange:function(){this.validate()},getAddButton:function(){return this.closest(".CompositeField").find("button.add-url")},validate:function(){var t=this.val(),n=t;return t=e.trim(t),t=t.replace(/^https?:\/\//i,""),n!==t&&this.val(t),this.getAddButton().button(t?"enable":"disable"),!!t}}),e("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({getURLField:function(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function(e){var t=this.getURLField(),n=this.closest(".CompositeField"),i=this.closest("form");return t.validate()&&(n.addClass("loading"),i.showFileView("http://"+t.val()).done(function(){n.removeClass("loading"),i.parent().trigger("scroll")}),i.redraw()),!1}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({getAttributes:function(){},getExtraData:function(){},getHTML:function(){return e("
        ").append(e("").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function(e){e.replaceContent(this.getHTML())},updateFromNode:function(e){},updateDimensions:function(e,t,n){var i,r=this.find(":input[name=Width]"),s=this.find(":input[name=Height]"),o=r.val(),a=s.val();o&&a&&(e?(i=s.getOrigVal()/r.getOrigVal(),"Width"==e?(t&&o>t&&(o=t),a=Math.floor(o*i)):"Height"==e&&(n&&a>n&&(a=n),o=Math.ceil(a/i))):(t&&o>t&&(o=t),n&&a>n&&(a=n)),r.val(o),s.val(a))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),"data-id":this.find(":input[name=FileID]").val()}},getExtraData:function(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function(){},insertHTML:function(t){var n=this.closest("form"),i=n.getSelection();t||(t=n.getEditor());var r=this.getAttributes(),s=this.getExtraData(),o=i&&i.is("img")?i:null;o&&o.parent().is(".captionImage")&&(o=o.parent());var a=i&&i.is("img")?i:e("");a.attr(r);var l=a.parent(".captionImage"),c=l.find(".caption");s.CaptionText?(l.length||(l=e("
        ")),l.attr("class","captionImage "+r["class"]).css("width",r.width),c.length||(c=e('

        ').appendTo(l)),c.attr("class","caption "+r["class"]).text(s.CaptionText)):l=c=null;var u=l?l:a;o&&o.not(u).length&&o.replaceWith(u),l&&l.prepend(a),o||(t.repaint(),t.insertContent(e("
        ").append(u).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.attr("class")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=CaptionText]").val(e.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(e.data("id"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function(){var t=this.getAttributes(),n=tinyMCE.activeEditor.plugins.media.dataToImg({type:"flash",width:t.width,height:t.height,params:{src:t.src},video:{sources:[]}});return e("
        ").append(n).html()},updateFromNode:function(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function(){var t,n=this.getAttributes(),i=this.getExtraData(),r=e("").attr(n).addClass("ss-htmleditorfield-file embed");return e.each(i,function(e,t){r.attr("data-"+e,t)}),t=i.CaptionText?e('

        '+i.CaptionText+"

        ").prepend(r):r,e("
        ").append(t).html()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.data("cssclass")),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file .dimensions :input").entwine({OrigVal:null,onmatch:function(){this._super(),this.setOrigVal(parseInt(this.val(),10))},onunmatch:function(){this._super()},onfocusout:function(e){this.closest(".ss-htmleditorfield-file").updateDimensions(this.attr("name"))}}),e("form.htmleditorfield-mediaform .ss-uploadfield-item .ss-uploadfield-item-cancel").entwine({onclick:function(e){var t=this.closest("form"),n=this.closest("ss-uploadfield-item");t.find(".ss-gridfield-item[data-id="+n.data("id")+"]").removeClass("ui-selected"),this.closest(".ss-uploadfield-item").remove(),t.redraw(),e.preventDefault()}}),e("div.ss-assetuploadfield .ss-uploadfield-item-edit, div.ss-assetuploadfield .ss-uploadfield-item-name").entwine({getEditForm:function(){return this.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform")},fromEditForm:{onchange:function(t){var n=e(t.target);n.removeClass("edited"),n.addClass("edited")}},onclick:function(e){var t=this.getEditForm();return this.closest(".ss-uploadfield-item").hasClass("ss-htmleditorfield-file")?(t.parent("ss-uploadfield-item").removeClass("ui-state-warning"),t.toggleEditForm(),e.preventDefault(),!1):void this._super(e)}}),e("div.ss-assetuploadfield .ss-uploadfield-item-editform").entwine({toggleEditForm:function(e){var t=this.prev(".ss-uploadfield-item-info"),n=t.find(".ss-uploadfield-item-status"),i="";e===!0||e!==!1&&0===this.height()?(i=_i18n2["default"]._t("UploadField.Editing","Editing ..."),this.height("auto"),t.find(".toggle-details-icon").addClass("opened"),n.removeClass("ui-state-success-text").removeClass("ui-state-warning-text")):(this.height(0),t.find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?(i=_i18n2["default"]._t("UploadField.CHANGESSAVED","Changes Made"),this.removeClass("edited"),n.addClass("ui-state-success-text")):(i=_i18n2["default"]._t("UploadField.NOCHANGES","No Changes"),n.addClass("ui-state-success-text"))),n.attr("title",i).text(i)}}),e('form.htmleditorfield-mediaform .field[id$="ParentID_Holder"] .TreeDropdownField').entwine({onadd:function(){this._super();var e=this;this.bind("change",function(){var t=e.closest("form").find(".ss-gridfield");t.setState("ParentID",e.getValue()),t.reload()})}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],18:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var r=e("./jQuery"),s=i(r);s["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var e=window.location.hash;this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(t){var n;e.each(this.find(".cms-panel-link"),function(){return-1!==this.href.indexOf(t)&&1===e(t).length?(n=e(this),!1):void 0}),void 0!==n&&e(window).one("ajaxComplete",function(){n.click()})},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}})})},{"./jQuery":"jQuery"}],19:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var r=e("./jQuery"),s=i(r),o=e("./i18n"),a=i(o);s["default"].entwine("ss",function(e){var t,n;e(window).bind("resize.treedropdownfield",function(){var i=function(){e(".TreeDropdownField").closePanel()};if(e.browser.msie&&parseInt(e.browser.version,10)<9){var r=e(window).width(),s=e(window).height();r==t&&s==n||(t=r,n=s,i())}else i()});var i={openlink:a["default"]._t("TreeDropdownField.OpenLink"),fieldTitle:"("+a["default"]._t("TreeDropdownField.FieldTitle")+")",searchFieldTitle:"("+a["default"]._t("TreeDropdownField.SearchFieldTitle")+")"},r=function(t){e(t.target).parents(".TreeDropdownField").length||e(".TreeDropdownField").closePanel()};e(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function(){this.append('
        ');var e=i.openLink;e&&this.find("treedropdownfield-toggle-panel-link a").attr("title",e),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function(){return this.find(".treedropdownfield-panel")},openPanel:function(){e(".TreeDropdownField").closePanel(),e("body").bind("click",r);var t=this.getPanel(),n=this.find(".tree-holder");t.css("width",this.width()),t.show();var i=this.find(".treedropdownfield-toggle-panel-link");i.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),i.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),n.is(":empty")&&!t.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(),this.trigger("panelshow")},_riseUp:function(){var t,n,i,r=this,s=this.getPanel(),o=this.find(".treedropdownfield-toggle-panel-link"),a=o.innerHeight();o.length>0&&(i=e(window).height()+e(document).scrollTop()-o.innerHeight(),n=o.offset().top,t=s.innerHeight(),n+t>i&&n-t>0?(r.addClass("treedropdownfield-with-rise"),a=-s.outerHeight()):r.removeClass("treedropdownfield-with-rise")),s.css({top:a+"px"})},closePanel:function(){jQuery("body").unbind("click",r);var e=this.find(".treedropdownfield-toggle-panel-link");e.removeClass("treedropdownfield-open-tree"),this.removeClass("treedropdownfield-open-tree treedropdownfield-with-rise"),e.find("a").removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s"),this.getPanel().hide(),this.trigger("panelhide")},togglePanel:function(){this[this.getPanel().is(":visible")?"closePanel":"openPanel"]()},setTitle:function(e){e=e||this.data("title")||i.fieldTitle,this.find(".treedropdownfield-title").html(e),this.data("title",e)},getTitle:function(){return this.find(".treedropdownfield-title").text()},updateTitle:function(){var e=this,t=e.find(".tree-holder"),n=this.getValue(),i=function(){var n=e.getValue();if(n){var i=t.find('*[data-id="'+n+'"]'),r=i.children("a").find("span.jstree_pageicon")?i.children("a").find("span.item").html():null;r||(r=i.length>0?t.jstree("get_text",i[0]):null),r&&(e.setTitle(r),e.data("title",r)),i&&t.jstree("select_node",i)}else e.setTitle(e.data("empty-title")),e.removeData("title")};t.is(":empty")&&n?this.loadTree({forceValue:n},i):i()},setValue:function(t){this.data("metadata",e.extend(this.data("metadata"),{id:t})),this.find(":input:hidden").val(t).trigger("valueupdated").trigger("change")},getValue:function(){return this.find(":input:hidden").val()},loadTree:function(t,n){var i,r=this,s=this.getPanel(),o=e(s).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),s.addClass("loading"),i=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){s.removeClass("loading")},success:function(t,i,s){o.html(t);var a=!0;o.jstree("destroy").bind("loaded.jstree",function(e,t){var i=r.getValue(),s=o.find('*[data-id="'+i+'"]'),l=t.inst.get_selected();i&&s!=l&&t.inst.select_node(s),a=!1,n&&n.apply(r)}).jstree(r.getTreeConfig()).bind("select_node.jstree",function(t,n){var i=n.rslt.obj,s=e(i).data("id");a||r.getValue()!=s?(r.data("metadata",e.extend({id:s},e(i).getMetaData())),r.setTitle(n.inst.get_text(i)),r.setValue(s)):(r.data("metadata",null),r.setTitle(null),r.setValue(null),n.inst.deselect_node(i)),a||r.closePanel(),a=!1}),r.setCurrentXhr(null)}}),this.setCurrentXhr(i)},getTreeConfig:function(){var t=this;return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function n(i){var n=e.path.parseUrl(t.data("urlTree")).hrefNoSearch;return n+"/"+(e(i).data("id")?e(i).data("id"):0)},data:function(n){var i=e.query.load(t.data("urlTree")).keys,r=t.getRequestParams();return r=e.extend({},i,r,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{"default":{check_node:function(e){return!e.hasClass("disabled")},uncheck_node:function(e){return!e.hasClass("disabled")},select_node:function(e){return!e.hasClass("disabled")},deselect_node:function(e){return!e.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"]}},getRequestParams:function(){return{}}}),e(".TreeDropdownField .tree-holder li").entwine({getMetaData:function(){var e=this.attr("class").match(/class-([^\s]*)/i),t=e?e[1]:"";return{ClassName:t}}}),e(".TreeDropdownField *").entwine({getField:function(){return this.parents(".TreeDropdownField:first")}}),e(".TreeDropdownField").entwine({onclick:function(e){return this.togglePanel(),!1}}),e(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function(e){return!1}}),e(".TreeDropdownField.searchable").entwine({onadd:function(){this._super();var t=a["default"]._t("TreeDropdownField.ENTERTOSEARCH");this.find(".treedropdownfield-panel").prepend(e(''))},search:function(e,t){this.openPanel(),this.loadTree({search:e},t)},cancelSearch:function(){this.closePanel(),this.loadTree()}}),e(".TreeDropdownField.searchable input.search").entwine({onkeydown:function(e){var t=this.getField();return 13==e.keyCode?(t.search(this.val()),!1):void(27==e.keyCode&&t.cancelSearch())}}),e(".TreeDropdownField.multiple").entwine({getTreeConfig:function(){var e=this._super();return e.checkbox={override_ui:!0,two_state:!0},e.plugins.push("checkbox"),e.ui.select_limit=-1,e},loadTree:function(t,n){var i,r=this,s=this.getPanel(),o=e(s).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),s.addClass("loading"),i=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){s.removeClass("loading")},success:function(t,i,s){o.html(t);var a=!0;r.setCurrentXhr(null),o.jstree("destroy").bind("loaded.jstree",function(t,i){e.each(r.getValue(),function(e,t){i.inst.check_node(o.find("*[data-id="+t+"]"))}),a=!1,n&&n.apply(r)}).jstree(r.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(t,n){var i=n.inst.get_checked(null,!0);r.setValue(e.map(i,function(t,n){return e(t).data("id")})),r.setTitle(e.map(i,function(e,t){return n.inst.get_text(e)})),r.data("metadata",e.map(i,function(t,n){return{id:e(t).data("id"),metadata:e(t).getMetaData()}}))})}}),this.setCurrentXhr(i)},getValue:function(){var e=this._super();return e.split(/ *, */)},setValue:function(t){this._super(e.isArray(t)?t.join(","):t)},setTitle:function(t){this._super(e.isArray(t)?t.join(", "):t)},updateTitle:function(){}}),e(".TreeDropdownField input[type=hidden]").entwine({onadd:function(){this._super(),this.bind("change.TreeDropdownField",function(){e(this).getField().updateTitle()})},onremove:function(){this._super(),this.unbind(".TreeDropdownField")}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],20:[function(e,t,n){function i(){u=!1,a.length?c=a.concat(c):d=-1,c.length&&r()}function r(){if(!u){var e=setTimeout(i);u=!0;for(var t=c.length;t;){for(a=c,c=[];++d1)for(var n=1;ne;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}K=0}function f(){try{var t=e,n=t("vertx");return q=n.runOnLoop||n.runOnContext,c()}catch(i){return h()}}function m(e,t){var n=this,i=n._state;if(i===se&&!e||i===oe&&!t)return this;var r=new this.constructor(v),s=n._result;if(i){var o=arguments[i-1];Y(function(){M(i,r,o,s)})}else S(n,r,e,t);return r}function g(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return j(n,e),n}function v(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ae.error=t,ae}}function w(e,t,n,i){try{e.call(t,n,i)}catch(r){return r}}function x(e,t,n){Y(function(e){var i=!1,r=w(n,t,function(n){i||(i=!0,t!==n?j(e,n):T(e,n))},function(t){i||(i=!0,D(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,D(e,r))},e)}function C(e,t){t._state===se?T(e,t._result):t._state===oe?D(e,t._result):S(t,void 0,function(t){j(e,t)},function(t){D(e,t)})}function k(e,t,n){t.constructor===e.constructor&&n===ne&&constructor.resolve===ie?C(e,t):n===ae?D(e,ae.error):void 0===n?T(e,t):s(n)?x(e,t,n):T(e,t)}function j(e,t){e===t?D(e,_()):r(t)?k(e,t,b(t)):T(e,t)}function E(e){e._onerror&&e._onerror(e._result),P(e)}function T(e,t){e._state===re&&(e._result=t,e._state=se,0!==e._subscribers.length&&Y(P,e))}function D(e,t){e._state===re&&(e._state=oe,e._result=t,Y(E,e))}function S(e,t,n,i){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+se]=n,r[s+oe]=i,0===s&&e._state&&Y(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i,r,s=e._result,o=0;oo;o++)S(i.resolve(e[o]),void 0,t,n);return r}function L(e){var t=this,n=new t(v);return D(n,e),n}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&F(),this instanceof U?I(this,e):H())}function W(e,t){this._instanceConstructor=e,this.promise=new e(v),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&T(this.promise,this._result))):D(this.promise,this._validationError())}function z(){var e;if("undefined"!=typeof i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=pe)}var B;B=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,$,V,Q=B,K=0,Y=function(e,t){te[K]=e,te[K+1]=t,K+=2,2===K&&($?$(p):V())},X="undefined"!=typeof window?window:void 0,G=X||{},J=G.MutationObserver||G.WebKitMutationObserver,Z="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);V=Z?l():J?u():ee?d():void 0===X&&"function"==typeof e?f():h();var ne=m,ie=g,re=void 0,se=1,oe=2,ae=new R,le=new R,ce=N,ue=A,de=L,he=0,pe=U;U.all=ce,U.race=ue,U.resolve=ie,U.reject=de,U._setScheduler=o,U._setAsap=a,U._asap=Y,U.prototype={constructor:U,then:ne,"catch":function(e){return this.then(null,e)}};var fe=W;W.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},W.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===re&&e>n;n++)this._eachEntry(t[n],n)},W.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===ie){var r=b(e);if(r===ne&&e._state!==re)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===pe){var s=new n(v);k(s,e,r),this._willSettleAt(s,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(i(e),t)},W.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===re&&(this._remaining--,e===oe?D(i,n):this._result[t]=n),0===this._remaining&&T(i,this._result)},W.prototype._willSettleAt=function(e,t){var n=this;S(e,void 0,function(e){n._settledAt(se,t,e)},function(e){n._settledAt(oe,t,e)})};var me=z,ge={Promise:pe,polyfill:me};"function"==typeof define&&define.amd?define(function(){return ge}):"undefined"!=typeof t&&t.exports?t.exports=ge:"undefined"!=typeof this&&(this.ES6Promise=ge),me()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:20}],22:[function(e,t,n){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":211}],23:[function(require,module,exports){"function"!=typeof JSON.decycle&&(JSON.decycle=function(e){"use strict";var t=[],n=[];return function i(e,r){var s,o;if(!("object"!=typeof e||null===e||e instanceof Boolean||e instanceof Date||e instanceof Number||e instanceof RegExp||e instanceof String)){for(s=0;s-1)&&!t.target&&u(t.href)){var s=t.pathname+t.search+(t.hash||"");"undefined"!=typeof n&&s.match(/^\/[a-zA-Z]:\//)&&(s=s.replace(/^\/[a-zA-Z]:\//,"/"));var o=s;0===s.indexOf(_)&&(s=s.substr(_.length)),y&&(s=s.replace("#!","")),_&&o===s||(e.preventDefault(),i.show(o))}}}}function c(e){return e=e||window.event,null===e.which?e.button:e.which}function u(e){var t=m.protocol+"//"+m.hostname;return m.port&&(t+=":"+m.port),e&&0===e.indexOf(t)}var d=e("path-to-regexp");t.exports=i;var h,p,f="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",m="undefined"!=typeof window&&(window.history.location||window.location),g=!0,v=!0,_="",y=!1;i.callbacks=[],i.exits=[],i.current="",i.len=0,i.base=function(e){return 0===arguments.length?_:void(_=e)},i.start=function(e){if(e=e||{},!h&&(h=!0,!1===e.dispatch&&(g=!1),!1===e.decodeURLComponents&&(v=!1),!1!==e.popstate&&window.addEventListener("popstate",b,!1),!1!==e.click&&document.addEventListener(f,l,!1),!0===e.hashbang&&(y=!0),g)){var t=y&&~m.hash.indexOf("#!")?m.hash.substr(2)+m.search:m.pathname+m.search+m.hash;i.replace(t,null,!0,g)}},i.stop=function(){h&&(i.current="",i.len=0,h=!1,document.removeEventListener(f,l,!1),window.removeEventListener("popstate",b,!1))},i.show=function(e,t,n,r){var s=new o(e,t);return i.current=s.path,!1!==n&&i.dispatch(s),!1!==s.handled&&!1!==r&&s.pushState(),s},i.back=function(e,t){i.len>0?(history.back(),i.len--):e?setTimeout(function(){i.show(e,t)}):setTimeout(function(){i.show(_,t)})},i.redirect=function(e,t){"string"==typeof e&&"string"==typeof t&&i(e,function(e){setTimeout(function(){i.replace(t)},0)}),"string"==typeof e&&"undefined"==typeof t&&setTimeout(function(){i.replace(e)},0)},i.replace=function(e,t,n,r){var s=new o(e,t);return i.current=s.path,s.init=n,s.save(),!1!==r&&i.dispatch(s),s},i.dispatch=function(e){function t(){var e=i.exits[a++];return e?void e(s,t):n()}function n(){var t=i.callbacks[o++];return e.path!==i.current?void(e.handled=!1):t?void t(e,n):r(e)}var s=p,o=0,a=0;p=e,s?t():n()},i.exit=function(e,t){if("function"==typeof e)return i.exit("*",e);for(var n=new a(e),r=1;ra;++a){var c=n[a-1];if(c){var u=s(o[a]);void 0===u&&hasOwnProperty.call(t,c.name)||(t[c.name]=u)}}return!0};var b=function(){var e=!1;if("undefined"!=typeof window)return"complete"===document.readyState?e=!0:window.addEventListener("load",function(){setTimeout(function(){e=!0},0)}),function(t){if(e)if(t.state){var n=t.state.path;i.replace(n,t.state)}else i.show(m.pathname+m.hash,void 0,void 0,!1)}}();i.sameOrigin=u}).call(this,e("_process"))},{_process:20,"path-to-regexp":25}],25:[function(e,t,n){function i(e,t,n){n=n||{},t=t||[];var s,o=n.strict,a=n.end!==!1,l=n.sensitive?"":"i",c=0,u=t.length,d=0,h=0;if(e instanceof RegExp){for(;s=r.exec(e.source);)t.push({name:h++,optional:!1,offset:s.index});return e}if(Array.isArray(e))return e=e.map(function(e){return i(e,t,n).source}),new RegExp("(?:"+e.join("|")+")",l);for(e=("^"+e+(o?"":"/"===e[e.length-1]?"?":"/?")).replace(/\/\(/g,"/(?:").replace(/([\/\.])/g,"\\$1").replace(/(\\\/)?(\\\.)?:(\w+)(\(.*?\))?(\*)?(\?)?/g,function(e,n,i,r,s,o,a,l){n=n||"",i=i||"",s=s||"([^\\/"+i+"]+?)",a=a||"",t.push({name:r,optional:!!a,offset:l+c});var u=""+(a?"":n)+"(?:"+i+(a?n:"")+s+(o?"((?:[\\/"+i+"].+?)?)":"")+")"+a;return c+=u.length-e.length,u}).replace(/\*/g,function(e,n){for(var i=t.length;i-- >u&&t[i].offset>n;)t[i].offset+=3;return"(.*)"});s=r.exec(e);){for(var p=0,f=s.index;"\\"===e.charAt(--f);)p++;p%2!==1&&((u+d===t.length||t[u+d].offset>s.index)&&t.splice(u+d,0,{name:h++,optional:!1,offset:s.index}),d++)}return e+=a?"$":"/"===e[e.length-1]?"":"(?=\\/|$)",new RegExp(e,l)}t.exports=i;var r=/\((?!\?)/g},{}],26:[function(e,t,n){"use strict";var i=e("./stringify"),r=e("./parse");t.exports={stringify:i,parse:r}},{"./parse":27,"./stringify":28}],27:[function(e,t,n){"use strict";var i=e("./utils"),r={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};r.parseValues=function(e,t){for(var n={},r=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),s=0;s=0&&n.parseArrays&&a<=n.arrayLimit?(i=[],i[a]=r.parseObject(e,t,n)):i[o]=r.parseObject(e,t,n)}return i},r.parseKeys=function(e,t,n){if(e){var i=n.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,s=/^([^\[\]]*)/,o=/(\[[^\[\]]*\])/g,a=s.exec(i),l=[];if(a[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(a[1])&&!n.allowPrototypes)return;l.push(a[1])}for(var c=0;null!==(a=o.exec(i))&&ct;++t)e[t]="%"+((16>t?"0":"")+t.toString(16)).toUpperCase();return e}();n.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},i=0;i=48&&57>=s||s>=65&&90>=s||s>=97&&122>=s?n+=t.charAt(r):128>s?n+=i[s]:2048>s?n+=i[192|s>>6]+i[128|63&s]:55296>s||s>=57344?n+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(r+=1,s=65536+((1023&s)<<10|1023&t.charCodeAt(r)),n+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return n},n.compact=function(e,t){if("object"!=typeof e||null===e)return e;var i=t||[],r=i.indexOf(e);if(-1!==r)return i[r];if(i.push(e),Array.isArray(e)){for(var s=[],o=0;o does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}n.__esModule=!0,n["default"]=void 0;var l=e("react"),c=e("../utils/storeShape"),u=i(c),d=!1,h=function(e){function t(n,i){r(this,t);var o=s(this,e.call(this,n,i));return o.store=n.store,o}return o(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return l.Children.only(e)},t}(l.Component);n["default"]=h,h.prototype.componentWillReceiveProps=function(e){var t=this.store,n=e.store;t!==n&&a()},h.propTypes={store:u["default"].isRequired,children:l.PropTypes.element.isRequired},h.childContextTypes={store:u["default"].isRequired}},{"../utils/storeShape":33,react:"react"}],31:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return e.displayName||e.name||"Component"}function l(e,t){return(0,C["default"])((0,y["default"])(e),"`%sToProps` must return an object. Instead received %s.",t?"mapDispatch":"mapState",e),e}function c(e,t,n){function i(e,t,n){var i=_(e,t,n);return(0,C["default"])((0,y["default"])(i),"`mergeProps` must return an object. Instead received %s.",i),i}var c=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],h=Boolean(e),f=e||k,g=(0,y["default"])(t)?(0,v["default"])(t):t||j,_=n||E,b=_!==E,x=c.pure,D=void 0===x?!0:x,S=c.withRef,P=void 0===S?!1:S,R=T++;return function(e){var t=function(t){function n(e,i){r(this,n);var o=s(this,t.call(this,e,i));o.version=R,o.store=e.store||i.store,(0,C["default"])(o.store,'Could not find "store" in either the context or '+('props of "'+o.constructor.displayName+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+o.constructor.displayName+'".'));var a=o.store.getState();return o.state={storeState:a},o.clearCache(),o}return o(n,t),n.prototype.shouldComponentUpdate=function(){return!D||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return l(i)},n.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),i="function"==typeof n;return this.finalMapStateToProps=i?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(e,t):l(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return l(i,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=g(e.dispatch,t),i="function"==typeof n;return this.finalMapDispatchToProps=i?n:g,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(e,t):l(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,m["default"])(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,m["default"])(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=i(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&b&&(0,m["default"])(e,this.mergedProps)?!1:(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){h&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillReceiveProps=function(e){D&&(0,m["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},n.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},n.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();D&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,C["default"])(P,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},n.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,i=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var r=!0,s=!0;D&&i&&(r=n||t&&this.doStatePropsDependOnOwnProps,s=t&&this.doDispatchPropsDependOnOwnProps);var o=!1,a=!1;r&&(o=this.updateStatePropsIfNeeded()),s&&(a=this.updateDispatchPropsIfNeeded());var l=!0;return l=o||a||t?this.updateMergedPropsIfNeeded():!1,!l&&i?i:(P?this.renderedElement=(0,d.createElement)(e,u({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,d.createElement)(e,this.mergedProps),this.renderedElement)},n}(d.Component);return t.displayName="Connect("+a(e)+")",t.WrappedComponent=e,t.contextTypes={store:p["default"]},t.propTypes={store:p["default"]},t.prototype.componentWillUpdate=function(){this.version!==R&&(this.version=R,this.trySubscribe(),this.clearCache())},(0,w["default"])(t,e)}}var u=Object.assign||function(e){for(var t=1;t8&&11>=C),E=32,T=String.fromCharCode(E),D=p.topLevelTypes,S={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[D.topCompositionEnd,D.topKeyPress,D.topTextInput,D.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[D.topBlur,D.topCompositionEnd,D.topKeyDown,D.topKeyPress,D.topKeyUp,D.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[D.topBlur,D.topCompositionStart,D.topKeyDown,D.topKeyPress,D.topKeyUp,D.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[D.topBlur,D.topCompositionUpdate,D.topKeyDown,D.topKeyPress,D.topKeyUp,D.topMouseDown]}},P=!1,R=null,O={eventTypes:S,extractEvents:function(e,t,n,i,r){return[c(e,t,n,i,r),h(e,t,n,i,r)]}};t.exports=O},{"./EventConstants":54,"./EventPropagators":58,"./FallbackCompositionState":59,"./SyntheticCompositionEvent":136,"./SyntheticInputEvent":140,"fbjs/lib/ExecutionEnvironment":177,"fbjs/lib/keyOf":195}],43:[function(e,t,n){"use strict";function i(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},s=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){s.forEach(function(t){r[i(t,e)]=r[e]})});var o={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:o};t.exports=a},{}],44:[function(e,t,n){"use strict";var i=e("./CSSProperty"),r=e("fbjs/lib/ExecutionEnvironment"),s=e("./ReactPerf"),o=e("fbjs/lib/camelizeStyleName"),a=e("./dangerousStyleValue"),l=e("fbjs/lib/hyphenateStyleName"),c=e("fbjs/lib/memoizeStringOnly"),u=e("fbjs/lib/warning"),d=c(function(e){return l(e)}),h=!1,p="cssFloat";if(r.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(m){h=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var g=/^(?:webkit|moz|o)[A-Z]/,v=/;\s*$/,_={},y={},b=function(e){_.hasOwnProperty(e)&&_[e]||(_[e]=!0,u(!1,"Unsupported style property %s. Did you mean %s?",e,o(e)))},w=function(e){_.hasOwnProperty(e)&&_[e]||(_[e]=!0,u(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},x=function(e,t){y.hasOwnProperty(t)&&y[t]||(y[t]=!0,u(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(v,"")))},C=function(e,t){e.indexOf("-")>-1?b(e):g.test(e)?w(e):v.test(t)&&x(e,t)},k={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];C(n,i),null!=i&&(t+=d(n)+":",t+=a(n,i)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){C(r,t[r]);var s=a(r,t[r]);if("float"===r&&(r=p),s)n[r]=s;else{var o=h&&i.shorthandPropertyExpansions[r];if(o)for(var l in o)n[l]="";else n[r]=""}}}};s.measureMethods(k,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=k},{"./CSSProperty":43,"./ReactPerf":113,"./dangerousStyleValue":151,"fbjs/lib/ExecutionEnvironment":177,"fbjs/lib/camelizeStyleName":179,"fbjs/lib/hyphenateStyleName":190,"fbjs/lib/memoizeStringOnly":197,"fbjs/lib/warning":202}],45:[function(e,t,n){"use strict";function i(){this._callbacks=null,this._contexts=null}var r=e("./PooledClass"),s=e("./Object.assign"),o=e("fbjs/lib/invariant");s(i.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o(!1,"Mismatched list of contexts in callback queue"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var N=!1;w.canUseDOM&&(N=j("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return M.get.call(this)},set:function(e){O=""+e,M.set.call(this,e)}},L={eventTypes:S,extractEvents:function(e,t,n,r,s){var o,a;if(i(t)?I?o=l:a=c:E(t)?N?o=p:(o=m,a=f):g(t)&&(o=v),o){var u=o(e,t,n);if(u){var d=C.getPooled(S.change,u,r,s);return d.type="change",b.accumulateTwoPhaseDispatches(d),d}}a&&a(e,t,n)}};t.exports=L},{"./EventConstants":54,"./EventPluginHub":55,"./EventPropagators":58,"./ReactUpdates":129,"./SyntheticEvent":138,"./getEventTarget":160,"./isEventSupported":165,"./isTextInputElement":166,"fbjs/lib/ExecutionEnvironment":177,"fbjs/lib/keyOf":195}],47:[function(e,t,n){"use strict";var i=0,r={createReactRootIndex:function(){return i++}};t.exports=r},{}],48:[function(e,t,n){"use strict";function i(e,t,n){var i=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,i)}var r=e("./Danger"),s=e("./ReactMultiChildUpdateTypes"),o=e("./ReactPerf"),a=e("./setInnerHTML"),l=e("./setTextContent"),c=e("fbjs/lib/invariant"),u={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:l, -processUpdates:function(e,t){for(var n,o=null,u=null,d=0;d when using tables, nesting tags like
        ,

        , or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",h,f),o=o||{},o[f]=o[f]||[],o[f][h]=p,u=u||[],u.push(p)}var m;if(m=t.length&&"string"==typeof t[0]?r.dangerouslyRenderMarkup(t):t,u)for(var g=0;gt||e.hasOverloadedBooleanValue&&t===!1}var s=e("./DOMProperty"),o=e("./ReactPerf"),a=e("./quoteAttributeValueForBrowser"),l=e("fbjs/lib/warning"),c=/^[a-zA-Z_][\w\.\-]*$/,u={},d={},h={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},p={},f=function(e){if(!(h.hasOwnProperty(e)&&h[e]||p.hasOwnProperty(e)&&p[e])){p[e]=!0;var t=e.toLowerCase(),n=s.isCustomAttribute(t)?t:s.getPossibleStandardName.hasOwnProperty(t)?s.getPossibleStandardName[t]:null;l(null==n,"Unknown DOM property %s. Did you mean %s?",e,n)}},m={createMarkupForID:function(e){return s.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(s.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=s.properties.hasOwnProperty(e)?s.properties[e]:null;if(n){if(r(n,t))return"";var i=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?i+'=""':i+"="+a(t)}return s.isCustomAttribute(e)?null==t?"":e+"="+a(t):(f(e),null)},createMarkupForCustomAttribute:function(e,t){return i(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var i=s.properties.hasOwnProperty(t)?s.properties[t]:null;if(i){var o=i.mutationMethod;if(o)o(e,n);else if(r(i,n))this.deleteValueForProperty(e,t);else if(i.mustUseAttribute){var a=i.attributeName,l=i.attributeNamespace;l?e.setAttributeNS(l,a,""+n):i.hasBooleanValue||i.hasOverloadedBooleanValue&&n===!0?e.setAttribute(a,""):e.setAttribute(a,""+n)}else{var c=i.propertyName;i.hasSideEffects&&""+e[c]==""+n||(e[c]=n)}}else s.isCustomAttribute(t)?m.setValueForAttribute(e,t,n):f(t)},setValueForAttribute:function(e,t,n){i(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=s.properties.hasOwnProperty(t)?s.properties[t]:null;if(n){var i=n.mutationMethod;if(i)i(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var r=n.propertyName,o=s.getDefaultValueForProperty(e.nodeName,r);n.hasSideEffects&&""+e[r]===o||(e[r]=o)}}else s.isCustomAttribute(t)?e.removeAttribute(t):f(t)}};o.measureMethods(m,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=m},{"./DOMProperty":49,"./ReactPerf":113,"./quoteAttributeValueForBrowser":168,"fbjs/lib/warning":202}],51:[function(e,t,n){"use strict";function i(e){return e.substring(1,e.indexOf(" "))}var r=e("fbjs/lib/ExecutionEnvironment"),s=e("fbjs/lib/createNodesFromMarkup"),o=e("fbjs/lib/emptyFunction"),a=e("fbjs/lib/getMarkupWrap"),l=e("fbjs/lib/invariant"),c=/^(<[^ \/>]+)/,u="data-danger-index",d={dangerouslyRenderMarkup:function(e){r.canUseDOM?void 0:l(!1,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString for server rendering.");for(var t,n={},d=0;d node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString()."):void 0;var n;n="string"==typeof t?s(t,o)[0]:t,e.parentNode.replaceChild(n,e)}};t.exports=d},{"fbjs/lib/ExecutionEnvironment":177,"fbjs/lib/createNodesFromMarkup":182,"fbjs/lib/emptyFunction":183,"fbjs/lib/getMarkupWrap":187,"fbjs/lib/invariant":191}],52:[function(e,t,n){"use strict";var i=e("fbjs/lib/keyOf"),r=[i({ResponderEventPlugin:null}),i({SimpleEventPlugin:null}),i({TapEventPlugin:null}),i({EnterLeaveEventPlugin:null}),i({ChangeEventPlugin:null}),i({SelectEventPlugin:null}),i({BeforeInputEventPlugin:null})];t.exports=r},{"fbjs/lib/keyOf":195}],53:[function(e,t,n){"use strict";var i=e("./EventConstants"),r=e("./EventPropagators"),s=e("./SyntheticMouseEvent"),o=e("./ReactMount"),a=e("fbjs/lib/keyOf"),l=i.topLevelTypes,c=o.getFirstReactDOM,u={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]}},d=[null,null],h={eventTypes:u,extractEvents:function(e,t,n,i,a){if(e===l.topMouseOver&&(i.relatedTarget||i.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var h;if(t.window===t)h=t;else{var p=t.ownerDocument;h=p?p.defaultView||p.parentWindow:window}var f,m,g="",v="";if(e===l.topMouseOut?(f=t,g=n,m=c(i.relatedTarget||i.toElement),m?v=o.getID(m):m=h,m=m||h):(f=h,m=t,v=n),f===m)return null;var _=s.getPooled(u.mouseLeave,g,i,a);_.type="mouseleave",_.target=f,_.relatedTarget=m;var y=s.getPooled(u.mouseEnter,v,i,a);return y.type="mouseenter",y.target=m,y.relatedTarget=f,r.accumulateEnterLeaveDispatches(_,y,g,v),d[0]=_,d[1]=y,d}};t.exports=h},{"./EventConstants":54,"./EventPropagators":58,"./ReactMount":107,"./SyntheticMouseEvent":142,"fbjs/lib/keyOf":195}],54:[function(e,t,n){"use strict";var i=e("fbjs/lib/keyMirror"),r=i({bubbled:null,captured:null}),s=i({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),o={topLevelTypes:s,PropagationPhases:r};t.exports=o},{"fbjs/lib/keyMirror":194}],55:[function(e,t,n){"use strict";function i(){var e=g&&g.traverseTwoPhase&&g.traverseEnterLeave;u(e,"InstanceHandle not injected before use!")}var r=e("./EventPluginRegistry"),s=e("./EventPluginUtils"),o=e("./ReactErrorUtils"),a=e("./accumulateInto"),l=e("./forEachAccumulated"),c=e("fbjs/lib/invariant"),u=e("fbjs/lib/warning"),d={},h=null,p=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},m=function(e){return p(e,!1)},g=null,v={injection:{injectMount:s.injection.injectMount,injectInstanceHandle:function(e){g=e,i()},getInstanceHandle:function(){return i(),g},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?c(!1,"Expected %s listener to be a function, instead got type %s",t,typeof n):void 0;var i=d[t]||(d[t]={});i[e]=n;var s=r.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=d[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=d[t];i&&delete i[e]},deleteAllListeners:function(e){for(var t in d)if(d[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete d[t][e]}},extractEvents:function(e,t,n,i,s){for(var o,l=r.plugins,c=0;c-1?void 0:o(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!c.plugins[n]){t.extractEvents?void 0:o(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),c.plugins[n]=t;var i=t.eventTypes;for(var s in i)r(i[s],t,s)?void 0:o(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",s,e)}}}function r(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?o(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",n):void 0,c.eventNameDispatchConfigs[n]=e;var i=e.phasedRegistrationNames;if(i){for(var r in i)if(i.hasOwnProperty(r)){var a=i[r];s(a,t,n)}return!0}return e.registrationName?(s(e.registrationName,t,n),!0):!1}function s(e,t,n){c.registrationNameModules[e]?o(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var o=e("fbjs/lib/invariant"),a=null,l={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a?o(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):void 0,a=Array.prototype.slice.call(e),i()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];l.hasOwnProperty(n)&&l[n]===r||(l[n]?o(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",n):void 0,l[n]=r,t=!0)}t&&i()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var i=c.registrationNameModules[t.phasedRegistrationNames[n]];if(i)return i}return null},_resetEventPlugins:function(){a=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var i=c.registrationNameModules;for(var r in i)i.hasOwnProperty(r)&&delete i[r]}};t.exports=c},{"fbjs/lib/invariant":191}],57:[function(e,t,n){"use strict";function i(e){return e===_.topMouseUp||e===_.topTouchEnd||e===_.topTouchCancel}function r(e){return e===_.topMouseMove||e===_.topTouchMove}function s(e){return e===_.topMouseDown||e===_.topTouchStart}function o(e,t,n,i){var r=e.type||"unknown-event";e.currentTarget=v.Mount.getNode(i),t?f.invokeGuardedCallbackWithCatch(r,n,e,i):f.invokeGuardedCallback(r,n,e,i),e.currentTarget=null}function a(e,t){var n=e._dispatchListeners,i=e._dispatchIDs;if(h(e),Array.isArray(n))for(var r=0;re&&n[e]===r[e];e++);var o=i-e;for(t=1;o>=t&&n[i-t]===r[s-t];t++);var a=t>1?1-t:void 0;return this._fallbackText=r.slice(e,a),this._fallbackText}}),r.addPoolingTo(i),t.exports=i},{"./Object.assign":62,"./PooledClass":63,"./getTextContentAccessor":163}],60:[function(e,t,n){"use strict";var i,r=e("./DOMProperty"),s=e("fbjs/lib/ExecutionEnvironment"),o=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,l=r.injection.HAS_BOOLEAN_VALUE,c=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,d=r.injection.HAS_POSITIVE_NUMERIC_VALUE,h=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(s.canUseDOM){var p=document.implementation;i=p&&p.hasFeature&&p.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:o|l,allowTransparency:o,alt:null,async:l,autoComplete:null,autoPlay:l,capture:o|l,cellPadding:null,cellSpacing:null,charSet:o,challenge:o,checked:a|l,classID:o,className:i?o:a,cols:o|d,colSpan:null,content:null,contentEditable:null,contextMenu:o,controls:a|l,coords:null,crossOrigin:null,data:null,dateTime:o,"default":l,defer:l,dir:null,disabled:o|l,download:h,draggable:null,encType:null,form:o,formAction:o,formEncType:o,formMethod:o,formNoValidate:l,formTarget:o,frameBorder:o,headers:null,height:o,hidden:o|l,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,inputMode:o,integrity:null,is:o,keyParams:o,keyType:o,kind:null,label:null,lang:null,list:o,loop:a|l,low:null,manifest:o,marginHeight:null,marginWidth:null,max:null,maxLength:o,media:o,mediaGroup:null,method:null,min:null,minLength:o,multiple:a|l,muted:a|l,name:null,nonce:o,noValidate:l,open:l,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|l,rel:null,required:l,reversed:l,role:o,rows:o|d,rowSpan:null,sandbox:null,scope:null,scoped:l,scrolling:null,seamless:o|l,selected:a|l,shape:null,size:o|d,sizes:o,span:d,spellCheck:null,src:null,srcDoc:a,srcLang:null,srcSet:o,start:u,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|c,width:o,wmode:o,wrap:null,about:o,datatype:o,inlist:o,prefix:o,property:o,resource:o,"typeof":o,vocab:o,autoCapitalize:o,autoCorrect:o,autoSave:null,color:null,itemProp:o,itemScope:o|l,itemType:o,itemID:o,itemRef:o,results:null,security:o,unselectable:o},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{"./DOMProperty":49,"fbjs/lib/ExecutionEnvironment":177}],61:[function(e,t,n){"use strict";function i(e){null!=e.checkedLink&&null!=e.valueLink?c(!1,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa."):void 0}function r(e){i(e),null!=e.value||null!=e.onChange?c(!1,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink."):void 0}function s(e){i(e),null!=e.checked||null!=e.onChange?c(!1,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink"):void 0}function o(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var a=e("./ReactPropTypes"),l=e("./ReactPropTypeLocations"),c=e("fbjs/lib/invariant"),u=e("fbjs/lib/warning"),d={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},h={value:function(e,t,n){return!e[t]||d[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:a.func},p={},f={checkPropTypes:function(e,t,n){for(var i in h){if(h.hasOwnProperty(i))var r=h[i](t,i,e,l.prop);if(r instanceof Error&&!(r.message in p)){p[r.message]=!0;var s=o(n);u(!1,"Failed form propType: %s%s",r.message,s)}}},getValue:function(e){return e.valueLink?(r(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(s(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(r(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(s(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{"./ReactPropTypeLocations":115,"./ReactPropTypes":116,"fbjs/lib/invariant":191,"fbjs/lib/warning":202}],62:[function(e,t,n){"use strict";function i(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),i=Object.prototype.hasOwnProperty,r=1;r1?o-1:0),l=1;o>l;l++)a[l-1]=arguments[l];if(s!==e&&null!==s)C(!1,"bind(): React component methods may only be bound to the component instance. See %s",i);else if(!a.length)return C(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",i),n;var c=r.apply(n,arguments);return c.__reactBoundContext=e,c.__reactBoundMethod=t,c.__reactBoundArguments=a,c},n}function h(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=d(e,n)}}var p=e("./ReactComponent"),f=e("./ReactElement"),m=e("./ReactPropTypeLocations"),g=e("./ReactPropTypeLocationNames"),v=e("./ReactNoopUpdateQueue"),_=e("./Object.assign"),y=e("fbjs/lib/emptyObject"),b=e("fbjs/lib/invariant"),w=e("fbjs/lib/keyMirror"),x=e("fbjs/lib/keyOf"),C=e("fbjs/lib/warning"),k=x({mixins:null}),j=w({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),E=[],T=!1,D={mixins:j.DEFINE_MANY,statics:j.DEFINE_MANY,propTypes:j.DEFINE_MANY,contextTypes:j.DEFINE_MANY,childContextTypes:j.DEFINE_MANY,getDefaultProps:j.DEFINE_MANY_MERGED,getInitialState:j.DEFINE_MANY_MERGED,getChildContext:j.DEFINE_MANY_MERGED,render:j.DEFINE_ONCE,componentWillMount:j.DEFINE_MANY,componentDidMount:j.DEFINE_MANY,componentWillReceiveProps:j.DEFINE_MANY,shouldComponentUpdate:j.DEFINE_ONCE,componentWillUpdate:j.DEFINE_MANY,componentDidUpdate:j.DEFINE_MANY,componentWillUnmount:j.DEFINE_MANY,updateComponent:j.OVERRIDE_BASE},S={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)&&console.debug("Download the React DevTools for a better development experience: https://fb.me/react-devtools");var _=document.documentMode&&document.documentMode<8;f(!_,'Internet Explorer is running in compatibility mode; please add the following tag to your HTML to prevent this from happening: ');for(var y=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],b=0;b",c(e),c(t)))}}function d(e,t){t&&(ae[e._tag]&&K(null==t.children&&null==t.dangerouslySetInnerHTML,"%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.%s",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""),null!=t.dangerouslySetInnerHTML&&(null!=t.children?W(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):void 0,"object"==typeof t.dangerouslySetInnerHTML&&te in t.dangerouslySetInnerHTML?void 0:W(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.")),K(null==t.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),K(!t.contentEditable||null==t.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style?W(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",i(e)):void 0)}function h(e,t,n,i){K("onScroll"!==t||z("scroll",!0),"This browser doesn't support the `onScroll` event");var r=I.findReactContainerForID(e);if(r){var s=r.nodeType===ne?r.ownerDocument:r;X(t,s)}i.getReactMountReady().enqueue(p,{id:e,registrationName:t,listener:n})}function p(){var e=this;T.putListener(e.id,e.registrationName,e.listener); -}function f(){var e=this;e._rootNodeID?void 0:W(!1,"Must be mounted to trap events");var t=I.getNode(e._rootNodeID);switch(t?void 0:W(!1,"trapBubbledEvent(...): Requires node to be rendered."),e._tag){case"iframe":e._wrapperState.listeners=[T.trapBubbledEvent(E.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in re)re.hasOwnProperty(n)&&e._wrapperState.listeners.push(T.trapBubbledEvent(E.topLevelTypes[n],re[n],t));break;case"img":e._wrapperState.listeners=[T.trapBubbledEvent(E.topLevelTypes.topError,"error",t),T.trapBubbledEvent(E.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[T.trapBubbledEvent(E.topLevelTypes.topReset,"reset",t),T.trapBubbledEvent(E.topLevelTypes.topSubmit,"submit",t)]}}function m(){P.mountReadyWrapper(this)}function g(){O.postUpdateWrapper(this)}function v(e){ue.call(ce,e)||(le.test(e)?void 0:W(!1,"Invalid tag: %s",e),ce[e]=!0)}function _(e,t){e=F({},e);var n=e[Q.ancestorInfoContextKey];return e[Q.ancestorInfoContextKey]=Q.updatedAncestorInfo(n,t._tag,t),e}function y(e,t){return e.indexOf("-")>=0||null!=t.is}function b(e){v(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null,this._unprocessedContextDev=null,this._processedContextDev=null}var w,x=e("./AutoFocusUtils"),C=e("./CSSPropertyOperations"),k=e("./DOMProperty"),j=e("./DOMPropertyOperations"),E=e("./EventConstants"),T=e("./ReactBrowserEventEmitter"),D=e("./ReactComponentBrowserEnvironment"),S=e("./ReactDOMButton"),P=e("./ReactDOMInput"),R=e("./ReactDOMOption"),O=e("./ReactDOMSelect"),M=e("./ReactDOMTextarea"),I=e("./ReactMount"),N=e("./ReactMultiChild"),A=e("./ReactPerf"),L=e("./ReactUpdateQueue"),F=e("./Object.assign"),H=e("./canDefineProperty"),U=e("./escapeTextContentForBrowser"),W=e("fbjs/lib/invariant"),z=e("./isEventSupported"),B=e("fbjs/lib/keyOf"),q=e("./setInnerHTML"),$=e("./setTextContent"),V=e("fbjs/lib/shallowEqual"),Q=e("./validateDOMNesting"),K=e("fbjs/lib/warning"),Y=T.deleteListener,X=T.listenTo,G=T.registrationNameModules,J={string:!0,number:!0},Z=B({children:null}),ee=B({style:null}),te=B({__html:null}),ne=1;w={props:{enumerable:!1,get:function(){var e=this._reactInternalComponent;return K(!1,"ReactDOMComponent: Do not access .props of a DOM node; instead, recreate the props as `render` did originally or read the DOM properties/attributes directly from this node (e.g., this.refs.box.className).%s",i(e)),e._currentElement.props}}};var ie={},re={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},oe={listing:!0,pre:!0,textarea:!0},ae=F({menuitem:!0},se),le=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ce={},ue={}.hasOwnProperty;b.displayName="ReactDOMComponent",b.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var i=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(f,this);break;case"button":i=S.getNativeProps(this,i,n);break;case"input":P.mountWrapper(this,i,n),i=P.getNativeProps(this,i,n);break;case"option":R.mountWrapper(this,i,n),i=R.getNativeProps(this,i,n);break;case"select":O.mountWrapper(this,i,n),i=O.getNativeProps(this,i,n),n=O.processChildContext(this,i,n);break;case"textarea":M.mountWrapper(this,i,n),i=M.getNativeProps(this,i,n)}d(this,i),n[Q.ancestorInfoContextKey]&&Q(this._tag,this,n[Q.ancestorInfoContextKey]),this._unprocessedContextDev=n,this._processedContextDev=_(n,this),n=this._processedContextDev;var r;if(t.useCreateElement){var s=n[I.ownerDocumentContextKey],o=s.createElement(this._currentElement.type);j.setAttributeForID(o,this._rootNodeID),I.getID(o),this._updateDOMProperties({},i,t,o),this._createInitialChildren(t,i,n,o),r=o}else{var a=this._createOpenTagMarkupAndPutListeners(t,i),l=this._createContentMarkup(t,i,n);r=!l&&se[this._tag]?a+"/>":a+">"+l+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(m,this);case"button":case"select":case"textarea":i.autoFocus&&t.getReactMountReady().enqueue(x.focusDOMComponent,this)}return r},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];if(null!=r)if(G.hasOwnProperty(i))r&&h(this._rootNodeID,i,r,e);else{i===ee&&(r&&(this._previousStyle=r,r=this._previousStyleCopy=F({},t.style)),r=C.createMarkupForStyles(r));var s=null;null!=this._tag&&y(this._tag,t)?i!==Z&&(s=j.createMarkupForCustomAttribute(i,r)):s=j.createMarkupForProperty(i,r),s&&(n+=" "+s)}}if(e.renderToStaticMarkup)return n;var o=j.createMarkupForID(this._rootNodeID);return n+" "+o},_createContentMarkup:function(e,t,n){var i="",r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(i=r.__html);else{var s=J[typeof t.children]?t.children:null,o=null!=s?null:t.children;if(null!=s)i=U(s);else if(null!=o){var a=this.mountChildren(o,e,n);i=a.join("")}}return oe[this._tag]&&"\n"===i.charAt(0)?"\n"+i:i},_createInitialChildren:function(e,t,n,i){var r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&q(i,r.__html);else{var s=J[typeof t.children]?t.children:null,o=null!=s?null:t.children;if(null!=s)$(i,s);else if(null!=o)for(var a=this.mountChildren(o,e,n),l=0;l tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg , , and ) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this._tag)}if(this.unmountChildren(),T.deleteAllListeners(this._rootNodeID),D.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var n=this._nodeWithLegacyProperties;n._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=I.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=r,e.isMounted=s,e.setState=o,e.replaceState=o,e.forceUpdate=o,e.setProps=a,e.replaceProps=l,H?Object.defineProperties(e,w):e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},A.measureMethods(b,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),F(b.prototype,b.Mixin,N.Mixin),t.exports=b},{"./AutoFocusUtils":41,"./CSSPropertyOperations":44,"./DOMProperty":49,"./DOMPropertyOperations":50,"./EventConstants":54,"./Object.assign":62,"./ReactBrowserEventEmitter":66,"./ReactComponentBrowserEnvironment":73,"./ReactDOMButton":78,"./ReactDOMInput":83,"./ReactDOMOption":84,"./ReactDOMSelect":85,"./ReactDOMTextarea":89,"./ReactMount":107,"./ReactMultiChild":108,"./ReactPerf":113,"./ReactUpdateQueue":128,"./canDefineProperty":150,"./escapeTextContentForBrowser":153,"./isEventSupported":165,"./setInnerHTML":170,"./setTextContent":171,"./validateDOMNesting":174,"fbjs/lib/invariant":191,"fbjs/lib/keyOf":195,"fbjs/lib/shallowEqual":200,"fbjs/lib/warning":202}],80:[function(e,t,n){"use strict";function i(e){return r.createFactory(e)}var r=(e("./ReactElement"),e("./ReactElementValidator")),s=e("fbjs/lib/mapObject"),o=s({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},i);t.exports=o},{"./ReactElement":94,"./ReactElementValidator":95,"fbjs/lib/mapObject":196}],81:[function(e,t,n){"use strict";var i={useCreateElement:!1};t.exports=i},{}],82:[function(e,t,n){"use strict";var i=e("./DOMChildrenOperations"),r=e("./DOMPropertyOperations"),s=e("./ReactMount"),o=e("./ReactPerf"),a=e("fbjs/lib/invariant"),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(e,t,n){var i=s.getNode(e);l.hasOwnProperty(t)?a(!1,"updatePropertyByID(...): %s",l[t]):void 0,null!=n?r.setValueForProperty(i,t,n):r.deleteValueForProperty(i,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=s.getNode(e);i.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n instead of setting `selected` on

        ").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("
        ").find("div").css({width:"100%",height:200}),t=100-n.width(),n.parent().remove())}),e.jstree.plugin("ui",{__init:function(){this.data.ui.selected=e(),this.data.ui.last_selected=!1,this.data.ui.hovered=null,this.data.ui.to_select=this.get_settings().ui.initially_select,this.get_container().delegate("a","click.jstree",e.proxy(function(t){t.preventDefault(),t.currentTarget.blur(),e(t.currentTarget).hasClass("jstree-loading")||this.select_node(t.currentTarget,!0,t)},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.hover_node(t.target)},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.dehover_node(t.target)},this)).bind("reopen.jstree",e.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",e.proxy(function(){this.dehover_node(),this.save_selected()},this)).bind("set_rollback.jstree",e.proxy(function(){this.reselect()},this)).bind("close_node.jstree",e.proxy(function(t,n){var i=this._get_settings().ui,r=this._get_node(n.rslt.obj),s=r&&r.length?r.children("ul").find("a.jstree-clicked"):e(),o=this;i.selected_parent_close!==!1&&s.length&&s.each(function(){o.deselect_node(this),"select_parent"===i.selected_parent_close&&o.select_node(r)})},this)).bind("delete_node.jstree",e.proxy(function(e,t){var n=this._get_settings().ui.select_prev_on_delete,i=this._get_node(t.rslt.obj),r=i&&i.length?i.find("a.jstree-clicked"):[],s=this;r.each(function(){s.deselect_node(this)}),n&&r.length&&t.rslt.prev.each(function(){return this.parentNode?(s.select_node(this),!1):void 0})},this)).bind("move_node.jstree",e.proxy(function(e,t){t.rslt.cy&&t.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:!0,select_prev_on_delete:!0,disable_selecting_children:!1,initially_select:[]},_fn:{_get_node:function(t,n){if("undefined"==typeof t||null===t)return n?this.data.ui.selected:this.data.ui.last_selected;var i=e(t,this.get_container());return i.is(".jstree")||-1==t?-1:(i=i.closest("li",this.get_container()),i.length?i:!1)},_ui_notify:function(e,t){t.selected&&this.select_node(e,!1)},save_selected:function(){var e=this;this.data.ui.to_select=[],this.data.ui.selected.each(function(){this.id&&e.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(this.data.ui.to_select)},reselect:function(){var t=this,n=this.data.ui.to_select;n=e.map(e.makeArray(n),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),e.each(n,function(e,n){n&&"#"!==n&&t.select_node(n)}),this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode}),this.__callback()},refresh:function(e){return this.save_selected(),this.__call_old()},hover_node:function(e){return e=this._get_node(e),e.length?(e.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent(),this._fix_scroll(e),void this.__callback({obj:e})):!1},dehover_node:function(){var e,t=this.data.ui.hovered;return t&&t.length?(e=t.children("a").removeClass("jstree-hovered").parent(),this.data.ui.hovered[0]===e[0]&&(this.data.ui.hovered=null),void this.__callback({obj:t})):!1},select_node:function(e,t,n){if(e=this._get_node(e),-1==e||!e||!e.length)return!1;var i=this._get_settings().ui,r="on"==i.select_multiple_modifier||i.select_multiple_modifier!==!1&&n&&n[i.select_multiple_modifier+"Key"],s=i.select_range_modifier!==!1&&n&&n[i.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==e[0]&&this.data.ui.last_selected.parent()[0]===e.parent()[0],o=this.is_selected(e),a=!0,l=this;if(t){if(i.disable_selecting_children&&r&&(e.parentsUntil(".jstree","li").children("a.jstree-clicked").length||e.children("ul").find("a.jstree-clicked:eq(0)").length))return!1;switch(a=!1,!0){case s:this.data.ui.last_selected.addClass("jstree-last-selected"),e=e[e.index()0)&&(this.deselect_all(),a=!0);break;case o&&r:this.deselect_node(e);break;case!o&&r:(-1==i.select_limit||this.data.ui.selected.length+1<=i.select_limit)&&(a=!0)}}a&&!o&&(s||(this.data.ui.last_selected=e),e.children("a").addClass("jstree-clicked"),i.selected_parent_open&&e.parents(".jstree-closed").each(function(){l.open_node(this,!1,!0)}),this.data.ui.selected=this.data.ui.selected.add(e),this._fix_scroll(e.eq(0)),this.__callback({obj:e,e:n}))},_fix_scroll:function(e){var n,i=this.get_container()[0];if(i.scrollHeight>i.offsetHeight){if(e=this._get_node(e),!e||-1===e||!e.length||!e.is(":visible"))return;n=e.offset().top-this.get_container().offset().top,0>n&&(i.scrollTop=i.scrollTop+n-1),n+this.data.core.li_height+(i.scrollWidth>i.offsetWidth?t:0)>i.offsetHeight&&(i.scrollTop=i.scrollTop+(n-i.offsetHeight+this.data.core.li_height+1+(i.scrollWidth>i.offsetWidth?t:0)))}},deselect_node:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)&&(e.children("a").removeClass("jstree-clicked"),this.data.ui.selected=this.data.ui.selected.not(e),this.data.ui.last_selected.get(0)===e.get(0)&&(this.data.ui.last_selected=this.data.ui.selected.eq(0)),this.__callback({obj:e}))):!1},toggle_select:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)?this.deselect_node(e):this.select_node(e)):!1},is_selected:function(e){return this.data.ui.selected.index(this._get_node(e))>=0},get_selected:function(t){return t?e(t).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(t){var n=t?e(t).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();n.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=e([]),this.data.ui.last_selected=!1,this.__callback({obj:n})}}}),e.jstree.defaults.plugins.push("ui")}(jQuery),function(e){e.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",e.proxy(function(e,t){if(this._get_settings().crrm.move.open_onmove){var n=this;t.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){n.open_node(this,!1,!0)})}},this))},defaults:{input_width_limit:200,move:{always_copy:!1,open_onmove:!0,default_position:"last",check_move:function(e){return!0}}},_fn:{_show_input:function(t,n){t=this._get_node(t);var i=this._get_settings().core.rtl,r=this._get_settings().crrm.input_width_limit,s=t.children("ins").width(),o=t.find("> a:visible > ins").width()*t.find("> a:visible > ins").length,a=this.get_text(t),l=e("
        ",{css:{position:"absolute",top:"-200px",left:i?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),c=t.css("position","relative").append(e("",{value:a,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:i?"auto":s+o+4+"px",right:i?s+o+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:e.proxy(function(){var e=t.children(".jstree-rename-input"),i=e.val();""===i&&(i=a),l.remove(),e.remove(),this.set_text(t,a),this.rename_node(t,i),n.call(this,t,i,a),t.css("position","")},this),keyup:function(e){var t=e.keyCode||e.which;return 27==t?(this.value=a,void this.blur()):13==t?void this.blur():void c.width(Math.min(l.text("pW"+this.value).width(),r))},keypress:function(e){var t=e.keyCode||e.which;return 13==t?!1:void 0}})).children(".jstree-rename-input");this.set_text(t,""),l.css({fontFamily:c.css("fontFamily")||"",fontSize:c.css("fontSize")||"",fontWeight:c.css("fontWeight")||"",fontStyle:c.css("fontStyle")||"",fontStretch:c.css("fontStretch")||"",fontVariant:c.css("fontVariant")||"",letterSpacing:c.css("letterSpacing")||"",wordSpacing:c.css("wordSpacing")||""}),c.width(Math.min(l.text("pW"+c[0].value).width(),r))[0].select()},rename:function(e){e=this._get_node(e),this.__rollback();var t=this.__callback;this._show_input(e,function(e,n,i){t.call(this,{obj:e,new_name:n,old_name:i})})},create:function(t,n,i,r,s){var o,a=this;return t=this._get_node(t),t||(t=-1),this.__rollback(),o=this.create_node(t,n,i,function(t){var n=this._get_parent(t),i=e(t).index();r&&r.call(this,t),n.length&&n.hasClass("jstree-closed")&&this.open_node(n,!1,!0),s?a.__callback({obj:t,name:this.get_text(t),parent:n,position:i}):this._show_input(t,function(e,t,r){a.__callback({obj:e,name:t,parent:n,position:i})})})},remove:function(e){e=this._get_node(e,!0);var t=this._get_parent(e),n=this._get_prev(e);this.__rollback(),e=this.delete_node(e),e!==!1&&this.__callback({obj:e,prev:n,parent:t})},check_move:function(){if(!this.__call_old())return!1;var e=this._get_settings().crrm.move;return!!e.check_move.call(this,this._get_move())},move_node:function(e,t,n,i,r,s){var o=this._get_settings().crrm.move;return r?((o.always_copy===!0||"multitree"===o.always_copy&&e.rt.get_index()!==e.ot.get_index())&&(i=!0),void this.__call_old(!0,e,t,n,i,!0,s)):("undefined"==typeof n&&(n=o.default_position),"inside"!==n||o.default_position.match(/^(before|after)$/)||(n=o.default_position),this.__call_old(!0,e,t,n,i,!1,s))},cut:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.cp_nodes=!1,this.data.crrm.ct_nodes=e,void this.__callback({obj:e})):!1},copy:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.ct_nodes=!1,this.data.crrm.cp_nodes=e,void this.__callback({obj:e})):!1},paste:function(e){if(e=this._get_node(e),!e||!e.length)return!1;var t=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;return this.data.crrm.ct_nodes||this.data.crrm.cp_nodes?(this.data.crrm.ct_nodes&&(this.move_node(this.data.crrm.ct_nodes,e),this.data.crrm.ct_nodes=!1),this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,e,!1,!0),void this.__callback({obj:e,nodes:t})):!1}}})}(jQuery),function(e){var t=[];e.jstree._themes=!1,e.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",e.proxy(function(){var e=this._get_settings().themes;this.data.themes.dots=e.dots,this.data.themes.icons=e.icons,this.set_theme(e.theme,e.url)},this)).bind("loaded.jstree",e.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:!1,dots:!0,icons:!0},_fn:{set_theme:function(n,i){return n?(i||(i=e.jstree._themes+n+"/style.css"),-1==e.inArray(i,t)&&(e.vakata.css.add_sheet({url:i}),t.push(i)),this.data.themes.theme!=n&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=n),this.get_container().addClass("jstree-"+n),this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons(),void this.__callback()):!1},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=!0,this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=!1,this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=!0,this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=!1,this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}}),e(function(){e.jstree._themes===!1&&e("script").each(function(){return this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)?(e.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),e.jstree._themes===!1&&(e.jstree._themes="themes/")}),e.jstree.defaults.plugins.push("themes")}(jQuery),function(e){function t(t,n){var i,r=e.jstree._focused();return r&&r.data&&r.data.hotkeys&&r.data.hotkeys.enabled&&(i=r._get_settings().hotkeys[t])?i.call(r,n):void 0}var n=[];e.jstree.plugin("hotkeys",{__init:function(){if("undefined"==typeof e.hotkeys)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";e.each(this._get_settings().hotkeys,function(i,r){r!==!1&&-1==e.inArray(i,n)&&(e(document).bind("keydown",i,function(e){return t(i,e)}),n.push(i))}),this.get_container().bind("lock.jstree",e.proxy(function(){this.data.hotkeys.enabled&&(this.data.hotkeys.enabled=!1,this.data.hotkeys.revert=!0)},this)).bind("unlock.jstree",e.proxy(function(){this.data.hotkeys.revert&&(this.data.hotkeys.enabled=!0)},this)),this.enable_hotkeys()},defaults:{up:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"ctrl+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"shift+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},down:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"ctrl+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"shift+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},left:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"ctrl+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"shift+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},right:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"ctrl+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"shift+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},space:function(){return this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click(),!1},"ctrl+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},"shift+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}})}(jQuery),function(e){e.jstree.plugin("json_data",{__init:function(){var e=this._get_settings().json_data;e.progressive_unload&&this.get_container().bind("after_close.jstree",function(e,t){t.rslt.obj.children("ul").remove()})},defaults:{data:!1,ajax:!1,correct_state:!0,progressive_render:!1,progressive_unload:!1},_fn:{load_node:function(e,t,n){var i=this;this.load_node_json(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){var n=this._get_settings().json_data;return t=this._get_node(t),-1==t||!t||!n.ajax&&!n.progressive_render&&!e.isFunction(n.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").length>0},refresh:function(t){t=this._get_node(t);var n=this._get_settings().json_data;return t&&-1!==t&&n.progressive_unload&&(e.isFunction(n.data)||n.ajax)&&t.removeData("jstree_children"),this.__call_old()},load_node_json:function(t,n,i){var r,s=this.get_settings().json_data,o=function(){},a=function(){};if(t=this._get_node(t),t&&-1!==t&&(s.progressive_render||s.progressive_unload)&&!t.is(".jstree-open, .jstree-leaf")&&0===t.children("ul").children("li").length&&t.data("jstree_children"))return r=this._parse_json(t.data("jstree_children"),t),r&&(t.append(r),s.progressive_unload||t.removeData("jstree_children")),this.clean_node(t),void(n&&n.call(this));if(t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!s.data&&!s.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(s.data):s.data.call(this,t,e.proxy(function(e){e=this._parse_json(e,t),e?(-1!==t&&t?(t.append(e).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(e.children()),this.clean_node(t),n&&n.call(this)):(-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&this.correct_state(t)):s.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!t||-1===t):t&&-1!=t||(r=this._parse_json(s.data,t),r?(this.get_container().children("ul").empty().append(r.children()),this.clean_node()):s.correct_state&&this.get_container().children("ul").empty()),n&&n.call(this);break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&t&&-1!==t:o=function(e,n,r){var o=this.get_settings().json_data.ajax.error;o&&o.call(this,e,n,r),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&s.correct_state&&this.correct_state(t)):"success"===n&&s.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},a=function(i,r,a){var l=this.get_settings().json_data.ajax.success;return l&&(i=l.call(this,i,r,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")||!e.isArray(i)&&!e.isPlainObject(i)?o.call(this,a,r,""):(i=this._parse_json(i,t),void(i?(-1!==t&&t?(t.append(i).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),this.clean_node(t),n&&n.call(this)):-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(t),n&&n.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))))},s.ajax.context=this,s.ajax.error=o,s.ajax.success=a,s.ajax.dataType||(s.ajax.dataType="json"),e.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,t)),e.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,t)),e.ajax(s.ajax)}},_parse_json:function(t,n,i){var r,s,o,a,l,c=!1,u=this._get_settings(),d=u.json_data,h=u.core.html_titles;if(!t)return c;if(d.progressive_unload&&n&&-1!==n&&n.data("jstree_children",c),e.isArray(t)){if(c=e(),!t.length)return!1;for(s=0,o=t.length;o>s;s++)r=this._parse_json(t[s],n,!0),r.length&&(c=c.add(r))}else{if("string"==typeof t&&(t={data:t}),!t.data&&""!==t.data)return c;c=e("
      • "),t.attr&&c.attr(t.attr),t.metadata&&c.data(t.metadata),t.state&&c.addClass("jstree-"+t.state),e.isArray(t.data)||(r=t.data,t.data=[],t.data.push(r)),e.each(t.data,function(n,i){r=e(""),e.isFunction(i)&&(i=i.call(this,t)),"string"==typeof i?r.attr("href","#")[h?"html":"text"](i):(i.attr||(i.attr={}),i.attr.href||(i.attr.href="#"),r.attr(i.attr)[h?"html":"text"](i.title),i.language&&r.addClass(i.language)),r.prepend(" "),!i.icon&&t.icon&&(i.icon=t.icon),i.icon&&(-1===i.icon.indexOf("/")?r.children("ins").addClass(i.icon):r.children("ins").css("background","url('"+i.icon+"') center center no-repeat")),c.append(r)}),c.prepend(" "),t.children&&(d.progressive_render&&"open"!==t.state?c.addClass("jstree-closed").data("jstree_children",t.children):(d.progressive_unload&&c.data("jstree_children",t.children),e.isArray(t.children)&&t.children.length&&(r=this._parse_json(t.children,n,!0),r.length&&(l=e("