/*! This minified app bundle contains open source software from several third party developers. Please review CREDITS.md in the root directory or LICENSE.md in the current directory for complete licensing, copyright and patent information. This bundle.js file and the included code may not be redistributed without the attributions listed in LICENSE.md, including associate copyright notices and licensing information. */ webpackJsonp([0],Array(630).concat([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n.n(s),u=n(2),c=n.n(u),d=n(6),p=n.n(d),f=n(7),h=n.n(f),m=n(24),g=(n.n(m),n(75)),v=n.n(g),b=n(30),y=n.n(b),_=n(3),w=n.n(_),k=n(89),C=n.n(k),x=n(20),E=n.n(x),S=n(13),T=n.n(S),O=n(38),M=n.n(O),L=n(59),N=n.n(L),A=n(51),P=n.n(A),D=n(18),I=n.n(D),F=n(4),R=n.n(F),j=n(34),B=n.n(j),U=n(12),H=n.n(U),z=n(866),W=n(875),V=n(27),G=n(19),q=n(22),Y=n(876),K=n(877),$=n(11),Q=n(878),X=n(1),J=n(880),Z=(n.n(J),n(278)),ee=n(25),te=n(653),ne=n(109),re=(n(646),n(190)),oe=Object.assign||function(e){for(var t=1;tr||o.style.top<0)||"absolute"===o.style.position&&o.style.top<0&&Math.abs(o.style.top)>t.top){var i=50;"absolute"===o.style.position&&o.style.top<0&&Math.abs(o.style.top)>t.top&&(i+=o.style.top+(Math.abs(o.style.top)-t.top)),o.style.top=o.style.top<0?i:r-400}if("absolute"!==o.style.position&&o.style.left<0||o.style.left+400>n||"absolute"===o.style.position&&o.style.left<0&&Math.abs(o.style.left)>t.left){var a=50;"absolute"===o.style.position&&o.style.left<0&&Math.abs(o.style.left)>t.left&&(a+=o.style.left+(Math.abs(o.style.left)-t.left)),o.style.left=o.style.left<0?a:n-400}if(this.state.move)return this.setState({move:!1,modalPositionData:o})}},{key:"_onProductTourElementChange",value:function(){this.setState({currentTourElement:$.a.getActiveProductTourElement()})}},{key:"_onModuleItemMouseEnter",value:function(e){this.setState({selectedItemIndex:e})}},{key:"_onModuleItemMouseLeave",value:function(){this.setState({selectedItemIndex:0})}},{key:"setMaxItemIndex",value:function(e,t){this.maxItemIndex[t]=e}},{key:"tabNavClassName",value:function(e){var t={};return t["et-fb-settings-options_tab_"+e]=!0,t["et-fb-settings-tabs-nav-item"]=!0,e===this.state.active_tab&&(t["et-fb-settings-tabs-nav-item--active"]=!0),p()(t)}},{key:"centerizeSelectedItem",value:function(){var e=jQuery(h.a.findDOMNode(this)),t=e.find(".et-fb-settings-options-wrap"),n=e.find(".et-fb-settings-options-tab:visible .et-fb-selected-item");if(n.length){var r=n.offset(),o=n.parent().offset();t.stop().animate({scrollTop:r.top-o.top})}}},{key:"_onKeyDownEvent",value:function(e){if(!$.a.isProductTourActive()){var t=this,n=jQuery(h.a.findDOMNode(this)),r=this.state.selectedItemIndex,o=e.keyCode;if(13===o&&(n.find(".et-fb-selected-item:visible").trigger("click"),"change_structure"===this.props.actionType&&G.a.cancelTooltip()),I()([38,39,40,37],o)){I()([38,40],o)&&e.preventDefault();var i=void 0,a=void 0;if("change_structure"===this.props.actionType?(n.find(".et-fb-module-settings"),i=n.find(".et-fb-columns-layout"),a=i.find(".et-fb-selected-item")):(n.find(".et-fb-settings-options-wrap"),i=n.find(".et-fb-settings-options-tab:visible"),a=i.find(".et-fb-selected-item")),a.length){var s=i.width(),l=a.width(),u=Math.floor(s/l),c=0;switch(o){case 38:c=r-u;break;case 39:c=r+1;break;case 40:c=r+u;break;case 37:c=r-1}c>0&&c<=this.maxItemIndex[this.state.active_tab]&&this.setState({selectedItemIndex:c,selectedItemUpdated:!0})}else this.setState({selectedItemIndex:1,selectedItemUpdated:!0})}if(27===o&&G.a.cancelTooltip(),9===o&&!n.closest(".et-fb-modal-settings--library")&&!jQuery(e.target).is("input:focus, button:focus")){var d="modules_all"===this.state.active_tab?"modules_library":"modules_all",p=n.find(".et-fb-columns-layout");if(this.setState({active_tab:d}),p.length&&"change_structure"===this.props.actionType){var f=p.find(".et-fb-column-layout--selected"),m=f;m=e.shiftKey?f.prev().length?f.prev():p.find("li").last():f.next().length?f.next():p.find("li").first(),m.trigger("click"),setTimeout(function(){t.setState({selectedItemIndex:m.index()+1})},0)}return e.preventDefault(),!1}}}},{key:"getModuleType",value:function(){if("load_layout"===this.props.actionType)return"layout";var e=$.a.getModuleAddAfter(),t=e.type,n=["et_pb_section","et_pb_row","et_pb_row_inner"];if(e.is_parent)switch(t){case"et_pb_section":t="yes"===e.fullwidth?"et_pb_module":"et_pb_row";break;case"et_pb_column":t=e.is_inner_row?"et_pb_row_inner":"et_pb_module"}return I()(n,t)||(t="et_pb_module"),t}},{key:"isAddingIntoGlobal",value:function(){return $.a.getModuleAddAfter().is_global}},{key:"_preventRightClick",value:function(e){this.props.enableContextMenu||jQuery(e.target).is("input:focus")||e.preventDefault()}},{key:"getLibraryCategoriesList",value:function(){var e=ETBuilderBackend.saveModuleLibraryCategories,t={};return t.all=ETBuilderBackend.i18n.saveModuleLibraryAttrs.allCategoriesText,T()(e)||E()(e,function(e){t[e.slug]=e.name}),t}},{key:"generateAddModuleContent",value:function(){var e=C()(ETBuilderBackend.modules,{is_parent:"on"}),t="",n=this,r=$.a.getModuleAddAfter(),o=r.type,i=this.props.specialtyModal,a={allModulesList:{},mainTabTitle:"",modalTitle:"",moduleType:"",settingsModalClass:[]};if(this.maxItemIndex.modules_all=0,a.mainTabTitle=ae.newModule,a.modalTitle=ae.insertModule,!0===i){var s=[["1_2,1_2","1,0"],["1_2,1_2","0,1"],["1_4,3_4","0,1"],["3_4,1_4","1,0"],["1_4,1_2,1_4","0,1,0"],["1_2,1_4,1_4","1,0,0"],["1_4,1_4,1_2","0,0,1"],["1_3,2_3","0,1"],["2_3,1_3","1,0"]],u=0;a.modalTitle=ae.insertColumn,this.maxItemIndex.modules_all=0,t=y()(s,function(e,t){var r=e[0].split(","),o=I()(["3_4,1_4","1_4,3_4"],e[0])?3:2,i={layoutType:e[1],layoutFormat:e[0],columns:r,specialtyColumns:o};return u++,n.maxItemIndex.modules_all++,l.a.createElement(Y.a,{label:e[0],title:e[0],key:u,specialtyLayout:i,itemIndex:n.maxItemIndex.modules_all,selectedItemIndex:n.state.selectedItemIndex,onMouseEnter:n._onModuleItemMouseEnter})}),a.allModulesList=l.a.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},t)}else if("et_pb_section"!==o&&"et_pb_row"!==o&&"et_pb_row_inner"!==o&&!r.is_inner_row||"et_pb_section"===o&&"yes"===r.fullwidth&&r.is_parent)t=y()(e,function(e){if(!I()(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],e.label)){var t=void 0!==e.fullwidth_only&&"on"===e.fullwidth_only,r=$.a.getModuleAddAfter(),o=$.a.getProductTourModuleName(),i=r.fullwidth,a={};if(!("yes"===i&&!t||"no"===i&&t||""!==n.state.filterByTitle&&-1===e.title.toLowerCase().indexOf(n.state.filterByTitle.toLowerCase())))return"selectModule"===n.state.currentTourElement&&o===e.label&&(a["et-fb-product-tour-element"]=!0),n.maxItemIndex.modules_all++,l.a.createElement(Y.a,{label:e.label,title:e.title,fbSupport:e.fb_support,key:e.label,itemIndex:n.maxItemIndex.modules_all,selectedItemIndex:n.state.selectedItemIndex,onMouseEnter:n._onModuleItemMouseEnter,classnames:a})}}),a.allModulesList=l.a.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},t),a.moduleType="module";else if("et_pb_section"!==o||r.is_parent){if(("et_pb_row"===o||"et_pb_row_inner"===o)&&!r.is_parent||r.is_inner_row||"et_pb_section"===o&&r.is_parent){var c=($.a.getLastAddedModuleData(),{}),d="regular",p="et_pb_column"===o?"et_pb_row_inner":o;a.settingsModalClass.et_fb_add_row_modal=!0,c.props={},"et_pb_row_inner"===p&&(d="specialty"),"on"===r.fullwidth&&(d="fullwidth"),c.props.section_parent=d,c.props.specialty_layout=r.specialty_layout,a.modalTitle=ae.insertRow,a.mainTabTitle=ae.newRow,a.allModulesList=l.a.createElement(Q.a,oe({active:"true",_onClick:this.addRow,row:c,selectedItemIndex:n.state.selectedItemIndex,setMaxItemIndex:n.setMaxItemIndex,currentTourElement:n.state.currentTourElement},this.props))}}else{var f=["et_fb_regular","et_fb_specialty","et_fb_fullwidth"],h={et_fb_regular:ae.regular,et_fb_fullwidth:ae.fullwidth,et_fb_specialty:ae.specialty};this.maxItemIndex.modules_all=0,a.modalTitle=ae.insertSection,a.mainTabTitle=ae.newSection,a.settingsModalClass.et_fb_add_section_modal=!0,t=y()(f,function(e){var t={};return n.maxItemIndex.modules_all++,"selectSectionType"===n.state.currentTourElement&&"et_fb_regular"===e&&(t["et-fb-product-tour-element"]=!0),l.a.createElement(Y.a,{label:e,title:h[e],key:e,itemIndex:n.maxItemIndex.modules_all,selectedItemIndex:n.state.selectedItemIndex,onMouseEnter:n._onModuleItemMouseEnter,classnames:t})}),a.allModulesList=l.a.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},t)}return a}},{key:"handle_tab_click",value:function(e){e.preventDefault(),"load_layout"===this.props.actionType&&this.state.library_loading||this.setState({active_tab:e.target.className,libraryBackToLayouts:!0})}},{key:"getSavedModulesList",value:function(){var e=this.getModuleType(),t=this.getSavedModulesArray(),n="";if(this.maxItemIndex.modules_library=0,!T()(t))if("string"==typeof t)n=t;else{var r=this,o="",i=[];if("et_pb_row_inner"===e){var a=$.a.getModuleAddAfter();o=a.saved_specialty_column_type;var s="3_4"===o?3:2;i=3===s?["4_4","1_2,1_2","1_3,1_3,1_3"]:["4_4","1_2,1_2"]}n=y()(t,function(t,n){if((""===o||I()(i,t.row_layout))&&("all"===r.state.library_category||I()(t.categories,r.state.library_category))){var a="global"===t.is_global?t.ID:"",s={};return s.et_fb_global="global"===t.is_global,""!==r.state.filterByTitle&&-1===t.title.toLowerCase().indexOf(r.state.filterByTitle.toLowerCase())?!1:(r.maxItemIndex.modules_library++,l.a.createElement(Y.a,{label:""!==t.module_type?t.module_type:e,title:t.title,key:n,savedShortcode:t.shortcode,globalID:a,onClickAction:"",itemIndex:r.maxItemIndex.modules_library,selectedItemIndex:r.state.selectedItemIndex,onMouseEnter:r._onModuleItemMouseEnter,classnames:s,isAddingIntoGlobal:r.isAddingIntoGlobal()}))}})}return n}},{key:"insertLayout",value:function(e){var t="on"===this.state.replace_layout;G.a.insertSavedModule(e,!0,t),G.a.cancelTooltip()}},{key:"loadLibraryModules",value:function(){var e=this.getModuleType(),t="et_pb_row_inner"===e?"et_pb_row":e,n=$.a.getModuleAddAfter(),r="yes"===n.fullwidth&&"et_pb_module"===e?"fullwidth":"regular";!1===$.a.getLibraryModules(t,r)&&G.a.getLibraryModules(t,r)}},{key:"getSavedModulesArray",value:function(){var e=this.getModuleType();"et_pb_row_inner"===e&&(e="et_pb_row");var t=$.a.getModuleAddAfter(),n="yes"===t.fullwidth&&"et_pb_module"===e?"fullwidth":"regular";return $.a.getLibraryModules(e,n)}},{key:"_onLibraryLoaded",value:function(){var e=this.getModuleType();"et_pb_row_inner"===e&&(e="et_pb_row");var t=$.a.getModuleAddAfter(),n="yes"===t.fullwidth&&"et_pb_module"===e?"fullwidth":"regular";this.setState({library_modules_updated:n+e,currentTourElement:$.a.getActiveProductTourElement()})}},{key:"setModalPosition",value:function(e){if(this.props.ignorePosition)return{};var t={},n=$.a.getModuleAddAfter(),r=n.type,o=this.props.specialtyModal,i=this.props.modalPosition,a=!w()(i)&&i,s=!1,l=!1;a&&!1!==i.element&&"rightClickMenu"!==i.element&&(s=!w()(i)&&jQuery(i.element).length?jQuery(i.element):jQuery(".et-fb-page-settings-bar .et-fb-button--toggle-portability"),l=s.hasClass("et-fb-page-settings--tools"),(s.hasClass("et-fb-button-group")||l)&&(s=jQuery(s.context)));var u=s?s.offset():i,c=s?s.innerHeight()/2:0,d=s?s.innerWidth()/2:0,p=jQuery(window).width(),f=jQuery(window).scrollTop(),h=jQuery(window).height();if(t.class={},p<=502&&"load_layout"===this.props.actionType)return t.style={top:0,left:0,right:!1,width:p,height:h,position:"fixed"},t;0===u.top&&0===u.left&&(u.top=i.top,u.left=i.left);var m=w()(this.props.modalHeight)||""===this.props.modalHeight?400:this.props.modalHeight,g=p<493?p-20:400,v=w()(this.props.modalWidth)||""===this.props.modalWidth?g:this.props.modalWidth,b=u.left-v/2+d;if(b>0){var y=u.left+v/2+d;b=y>p?b-(y-p)-10:b}if("custom_content"!==this.props.actionType)"et_pb_section"!==r||n.is_parent||o?"et_pb_row_inner"===r||n.is_inner_row?m=194:("et_pb_row"===r||"et_pb_section"===r&&n.is_parent&&!X.a.isOn(n.specialty)&&"yes"!==n.fullwidth)&&(m=362):m=205,"modules_library"!==this.state.active_tab&&"save_to_library"!==this.props.actionType&&"portability"!==this.props.actionType||(m=400),l&&(m=290),"change_structure"===this.props.actionType&&(m=300),"clear_layout"===this.props.actionType&&(m=200);else{this.windowScrolled=!0;var _=e||this.state.autoHeight;if(w()(_))return{};m=w()(this.props.modalHeight)||""===this.props.modalHeight?_+60:m}if(s&&s.closest(".et-fb-page-settings-bar").length>0){var k=s.closest(".et-fb-page-settings-bar"),C=k.hasClass("et-fb-page-settings-bar--vertical"),x=k.hasClass("et-fb-page-settings-bar--corner"),E=x&&k.hasClass("et-fb-page-settings-bar--right-corner"),S=x&&k.hasClass("et-fb-page-settings-bar--left-corner"),T=k.position().top,O=122,M=b<0,L=S?95:M?C?80:10:C?b-70:b,N="load_layout"===this.props.actionType;if(("modules_library"===this.state.active_tab||I()(["save_to_library","portability","load_layout"],this.props.actionType))&&p<493&&(v=p<493?p-100-30:400),N){var A=C?50:parseInt(k.height());m=h-32-A-50,C||x?(O=82,(b=(p-v-95)/2)<15&&(b=15)):b=(p-v)/2}return(C||x||this.props.helpModalActive&&!this.state.helpModalMoved)&&(t.class["et-fb-tooltip--no-arrow"]=!0),32===T?t.class={"et-fb-modal-settings--inversed":!0,"et-fb-tooltip--no-arrow":C||x||this.props.helpModalActive&&!this.state.helpModalMoved,"et-fb-tooltip--vertical-center":C}:(O=T-m,("save_to_library"===this.props.actionType||"clear_layout"===this.props.actionType||"portability"===this.props.actionType&&!this.props.preloadingItems)&&(t.class["et-fb-modal-settings--blue-bottom"]=!0)),"load_layout"===this.props.actionType&&this.props.helpModalActive&&"library"===this.props.helpModalTrigger&&!this.state.helpModalMoved&&(window.innerWidth<1639&&window.innerWidth>960?v-=this.props.helpModal.width:window.innerWidth>960&&(b-=this.props.helpModal.width/2)),t.style={top:O,left:N?b:!E&&L,right:!!E&&95,width:v,height:m,position:"fixed"},t}var P=jQuery("#et-fb-app"),D=P.closest(".has-post-thumbnail"),F=P.offset(),R="rightClickMenu"===i.element||this.props.forceFixedPosition?0:F.top;this.props.forceFixedPosition||(b-=F.left),t.style={top:u.top-m-R,left:0>b&&(this.props.forceFixedPosition||Math.abs(b)>F.left)?10:b,width:v,height:m,position:this.props.forceFixedPosition?"fixed":"absolute"};var j=0;if(D.length>0&&(j=F.top-D.offset().top),this.props.forceFixedPosition&&"custom_content"===this.props.actionType)return(t.style.top<0||t.style.top+m>h)&&(t.style.top=t.style.top<0?50:h-m-100),(t.style.left<0||t.style.left+v>p)&&(t.style.left=t.style.left<0?50:p-v-100),t;if("save_to_library"===this.props.actionType&&(t.class["et-fb-modal-settings--blue-bottom"]=!0),u.top-f+15t.style.top&&(jQuery("html,body").animate({scrollTop:t.style.top+j+50},500,"swing"),this.windowScrolled=!0),!this.windowScrolled&&(t.style.topf+h)){var B=t.style.top-c+j;jQuery("html,body").animate({scrollTop:B},500,"swing")}return 0>b&&(t.class["et-fb-modal-settings--left-side"]=!0),this.windowScrolled=!0,t}},{key:"addRow",value:function(e,t){t=w()(t)?"et_pb_row":t,G.a.insertNewModule(t,e)}},{key:"_onClearLayout",value:function(e){e.preventDefault(),$.a.abIsMode("off")&&(G.a.performLayoutClearing(),G.a.cancelTooltip())}},{key:"_onClose",value:function(){B.a!==this.props._closeFunction?this.props._closeFunction():G.a.cancelTooltip()}},{key:"_onInput",value:function(e,t){var n=r({},e,t);"filterByTitle"===e&&X.a.hasValue(this.state.filterByTitle)&&(n.selectedItemIndex=1,n.selectedItemUpdated=!0),this.setState(n)}},{key:"isPreloadingItems",value:function(e){return!!this.props.preloadingItems&&$.a.isPreloadingItem(e)}},{key:"render",value:function(){var e,t=this;if(!this.props.active)return!1;var n=$.a.getAppPreference("builder_animation"),o=R()((e={"et-fb-settings":!0,"et-fb-tooltip-modal":!0,"et-fb-modal-settings--container":!0},r(e,"et-fb-modal-settings--"+this.state.active_tab,!0),r(e,"et-fb-modal-add-module-container",!0),r(e,"et-fb-moving",this.state.move),r(e,"et-fb-movable-modal",this.props.movable),e),this.props.classNames),i=w()(this.state.modalPositionData)||T()(this.state.modalPositionData)?this.setModalPosition():this.state.modalPositionData,a=i.style,s="",u="";w()(i.class)||R()(o,i.class);var c="";switch(this.props.actionType){case"add_module":var d=this.generateAddModuleContent(),f=d.allModulesList,h=d.mainTabTitle;s=d.modalTitle,R()(o,d.settingsModalClass);var g="module"===d.moduleType?l.a.createElement("div",{className:"et-fb-modules-filters et-fb-module-single-filter"},l.a.createElement(re.a,{type:"text",value:this.state.filterByTitle,name:"filterByTitle",_onChange:this._onInput,onKeyDown:this._onKeyDownEvent,additional_attrs:{placeholder:ae.search}})):"",v=$.a.isAllowedAction("add_library")&&$.a.isAllowedAction("divi_library")?l.a.createElement("li",{className:this.tabNavClassName("modules_library")},l.a.createElement("a",{href:"#",className:"modules_library",onClick:this.handle_tab_click},ae.addFromLibrary)):"",b=$.a.isAllowedAction("add_library")&&$.a.isAllowedAction("divi_library")?l.a.createElement("div",{className:this.tabClassName("modules_library")},l.a.createElement("div",{className:"et-fb-modules-filters"},l.a.createElement(te.a,{options:this.getLibraryCategoriesList(),value:this.state.library_category,name:"library_category",_onChange:this._onInput}),l.a.createElement(re.a,{type:"text",value:this.state.filterByTitle,name:"filterByTitle",_onChange:this._onInput,additional_attrs:{placeholder:ae.search}})),l.a.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},this.getSavedModulesList()),l.a.createElement(ne.a,{isLoading:this.isPreloadingItems("module")},l.a.createElement(Z.a,{videoListId:"et_pb_save_to_library",trigger:"tooltip"}))):"";c=l.a.createElement("div",{className:"et-fb-main-settings et-fb-main-settings--add_new_module"},l.a.createElement("ul",{className:"et-fb-settings-tabs-nav",ref:"settingsTabsNav"},l.a.createElement("li",{className:this.tabNavClassName("modules_all")},l.a.createElement("a",{href:"#",className:"modules_all",onClick:this.handle_tab_click},h)),v),l.a.createElement("div",{className:"et-fb-settings-options-wrap"},l.a.createElement("div",{className:"et-fb-settings-options"},l.a.createElement("div",{className:this.tabClassName("modules_all")},g,f),b)));break;case"load_layout":var y="et-fb-modal-settings--library";if(o[y]=!0,this.state.hasBackButton){o[y+"__layout"]=!0;var _={position:-40,opacity:0},k={position:Object(m.spring)(-12,{stiffness:100,damping:10}),opacity:Object(m.spring)(1,{stiffness:100,damping:10})};s=l.a.createElement(m.Motion,{defaultStyle:_,style:k},function(e){return l.a.createElement("div",null,l.a.createElement(ee.a,{className:"et-fb-settings-button--back",buttonName:V.a.LIBRARY_MODAL_BACK_BUTTON,_onClick:t._onClickLibraryBackButton,primary:!0,style:{opacity:e.opacity,transform:"translateX( "+e.position+"% )"}},l.a.createElement(q.a,{size:"14",icon:"back",color:"#FFFFFF"})),ae.layoutDetails)})}else s=ae.loadLayout;c=l.a.createElement(z.a,{isLoading:this.state.library_loading,_renderTabs:this._renderTabs,doneLoading:this._onLibraryDoneLoading,pageChanged:this._onLibraryPageChanged,backToLayouts:this.state.libraryBackToLayouts,tabClassName:this.tabClassName,active_tab:this.state.active_tab,type:"layout",isProductTour:$.a.isProductTourActive(),productTourElement:this.state.currentTourElement,modalMoving:this.props.modalMoving,width:a.width,height:a.height});break;case"save_to_library":o.et_fb_save_module_modal=!0,s=ae.addToLibrary,c=l.a.createElement(K.a,null);break;case"change_structure":var C=$.a.getStructurallyChangedRow();s=ae.changeRow,c=l.a.createElement(Q.a,{row:C,selectedItemIndex:this.state.selectedItemIndex,setMaxItemIndex:this.setMaxItemIndex});break;case"clear_layout":s=ae.clearLayout,c=l.a.createElement("div",{className:"et_fb_save_module_modal et_fb_clear_layout"},l.a.createElement("div",{className:"et-fb-settings-options"},ae.clearLayoutText),l.a.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:this._onClearLayout},ae.yes));break;case"portability":s=ae.portability,c=l.a.createElement(W.a,{_renderTabs:this._renderTabs,preloadingItems:this.props.preloadingItems,tabClassName:this.tabClassName,active_tab:this.state.active_tab});break;case"custom_content":s=this.props.tooltipTitle,u=w()(this.props.buttons)?"":this.props.buttons,c=l.a.createElement("div",{className:"et-fb-main-settings"},this.props.children)}return l.a.createElement(m.Motion,{defaultStyle:{size:.5,opacity:0},style:{size:n?Object(m.spring)(1,{stiffness:300,damping:20}):1,opacity:n?Object(m.spring)(1,{stiffness:300,damping:20}):1}},function(e){return l.a.createElement("div",{id:"et-fb-settings-column",ref:"settingsModal",className:p()(o),onContextMenu:t._preventRightClick,onKeyDown:t._onKeyDownEvent,tabIndex:"0",style:P()(R()(a,{opacity:e.opacity,transform:"scale( "+e.size+" )"}))},l.a.createElement("div",{className:"et-fb-module-settings"},l.a.createElement("h3",{className:"et-fb-settings-heading",onMouseDown:t._handleMove},s,l.a.createElement(ee.a,{className:"et-fb-settings-button--close",buttonName:V.a.MODAL_SETTINGS_BUTTON_CLOSE,_onClick:t._onClose,primary:!0},l.a.createElement(q.a,{size:"14",icon:"close",color:"#FFFFFF"}))),c,u))})}}]),t}(l.a.Component);ce.propTypes=le,ce.defaultProps=ue,t.default=ce},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 s(e,t){return t[e]?"#5C6978":"#BEC9D6"}function l(e,t){if(t)switch(e){case"hover":return 0;case"click":return 1;case"grid":return 2;default:return 0}else switch(parseInt(e)){case 0:return"hover";case 1:return"click";case 2:return"grid";default:return"hover"}}function u(e,t){if(t)switch(parseInt(e)){case 1:return 0;case 10:return 1;case 20:return 2;case 30:return 3;case 40:return 4;default:return 0}else switch(parseInt(e)){case 0:return 1;case 1:return 10;case 2:return 20;case 3:return 30;case 4:return 40;default:return 1}}function c(e,t){if(t)switch(e){case"default":return 0;case"minimum":return 1;case"fullscreen":return 2;case"left":return 3;case"right":return 4;case"top":return 5;case"bottom":return 6;default:return 0}else switch(parseInt(e)){case 0:return"default";case 1:return"minimum";case 2:return"fullscreen";case 3:return"left";case 4:return"right";case 5:return"bottom";case 6:return"top";default:return"default"}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(0),p=n.n(d),f=n(18),h=n.n(f),m=n(705),g=(n.n(m),n(1)),v=n(19),b=n(27),y=n(88),_=n(25),w=n(52),k=n(143),C=n(280),x=n(22),E=n(279),S=n(653),T=n(644),O=Object.assign||function(e){for(var t=1;twindow.innerWidth,l=s?0:y.a.pageSettingsBar,u=s?0:30;return"top"===e?i||o?y.a.topbar.desktop+u:r?l+y.a.topbar.desktop:n?l+y.a.topbar.desktop:"auto":"bottom"===e?r||n||i||o?"auto":l:"right"===e?a||o?l:i?"auto":!!g.a.condition("is_rtl")&&u:"left"===e?i?l:a||o?"auto":n?l:!(!r&&g.a.condition("is_rtl"))&&u:void 0}},{key:"_handleResize",value:function(){window.innerHeight<853?window.innerHeight<200?this.setState({height:100}):this.setState({height:window.innerHeight-218}):this.setState({height:635})}},{key:"_handleAnimationChange",value:function(){var e=this.props.builderAnimation;v.a.preferencesChange({builder_animation:!e})}},{key:"_handleDisabledModules",value:function(){var e=this.props.builderHideDisabledModules;v.a.preferencesChange({hide_disabled_modules:!e})}},{key:"_handleAllModalSettings",value:function(){var e=this.props.builderDisplayModalSettings;v.a.preferencesChange({builder_display_modal_settings:!e})}},{key:"_handleEventModeChange",value:function(e,t){v.a.preferencesChange({event_mode:l(t)})}},{key:"_handleHistoryChange",value:function(e,t){v.a.preferencesChange({history_intervals:u(t)})}},{key:"_handleModalChange",value:function(e,t){v.a.preferencesChange({modal_preference:c(t)})}},{key:"_handleReset",value:function(e,t,n){return e!==t&&p.a.createElement(_.a,{__onClick:n},p.a.createElement(x.a,{icon:"reset"}))}},{key:"render",value:function(){var e=this.props,t=e.builderAnimation,n=e.builderDisplayModalSettings,o=e.builderEventMode,i=e.builderHideDisabledModules,a=e.builderModalPreference,d=e.historyIntervals,f=e.toolbarButtons,h=r(e,["builderAnimation","builderDisplayModalSettings","builderEventMode","builderHideDisabledModules","builderModalPreference","historyIntervals","toolbarButtons"]),m=this.state,v=m.height,y=m.width;return p.a.createElement(E.a,O({className:"et-fb-modal--app",forceUpdate:!0,headerButtons:[p.a.createElement(_.a,{buttonName:b.a.MODAL_APP_BUTTON_CLOSE,inverse:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},p.a.createElement(x.a,{icon:"exit",color:"#FFFFFF"}))],label:N.title,measurement:{height:v,width:y},style:{top:this._getPosition("top"),bottom:this._getPosition("bottom"),left:this._getPosition("left"),right:this._getPosition("right")}},h),p.a.createElement(C.c,{selected:!0},p.a.createElement("div",{className:"et-fb-form"},p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.toolbar),p.a.createElement(w.a,null,p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"wireframe"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("wireframe",f),icon:"wireframe"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"zoom"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("zoom",f),icon:"zoom-in"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"desktop"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("desktop",f),icon:"desktop"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"tablet"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("tablet",f),icon:"tablet"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"phone"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("phone",f),icon:"phone"}))),p.a.createElement(w.a,{style:g.a.condition("is_rtl")?{marginRight:6}:{marginLeft:6}},p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"hover"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("hover",f),icon:"hover"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"click"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("click",f),icon:"click"})),p.a.createElement(_.a,{additionalAttrs:{toolbarButton:"grid"},buttonName:b.a.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},p.a.createElement(x.a,{color:s("grid",f),icon:"grid"})))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.view_mode),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(S.a,{value:l(o,!0),options:N.view_mode_select,_onChange:this._handleEventModeChange}),"hover"!==o&&""!==o&&p.a.createElement(_.a,{className:"et-fb-button--reset",__onClick:this._handleEventModeChange,small:!0},p.a.createElement(x.a,{icon:"reset"}))))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.history),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(S.a,{value:u(d,!0),options:N.history_intervals_select,_onChange:this._handleHistoryChange}),1!==d&&p.a.createElement(_.a,{className:"et-fb-button--reset",__onClick:this._handleHistoryChange,small:!0},p.a.createElement(x.a,{icon:"reset"}))))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.modal_position),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(S.a,{value:c(a,!0),options:this._getModalOptions(),_onChange:this._handleModalChange}),"default"!==a&&p.a.createElement(_.a,{className:"et-fb-button--reset",__onClick:this._handleModalChange,small:!0},p.a.createElement(x.a,{icon:"reset"}))))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.animation),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(T.a,{onClick:this._handleAnimationChange,options:{on:N.builder_animation_toggle.on,off:N.builder_animation_toggle.off},value:t?"on":"off"})))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.disabled_modules),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(T.a,{onClick:this._handleDisabledModules,options:{on:N.hide_disabled_module_toggle.on,off:N.hide_disabled_module_toggle.off},value:i?"off":"on"})))),p.a.createElement(k.b,null,p.a.createElement(k.c,null,N.labels.group_settings),p.a.createElement("div",{className:"et-fb-settings-option"},p.a.createElement("div",{className:"et-fb-settings-option-container"},p.a.createElement(T.a,{onClick:this._handleAllModalSettings,options:{on:N.display_modal_settings.on,off:N.display_modal_settings.off},value:n?"off":"on"})))))))}}]),t}(d.Component);I.propTypes=A,I.defaultProps=P,t.default=I},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 i(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,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){if(Be.has(e,"general_fields"))return Be.get(e,"general_fields");var t=ke.a.filterUserFields(Ce.a.getComponentFields(e));return Be.set(e,"general_fields",t),t}function l(e){if(Be.has(e,"advanced_fields"))return Be.get(e,"advanced_fields");var t=ke.a.filterUserFields(Ce.a.getComponentAdvancedFields(e));return Be.set(e,"advanced_fields",t),t}function u(e){if(Be.has(e,"css_fields"))return Be.get(e,"css_fields");var t=ke.a.filterUserFields(Ce.a.getComponentCSSFields(e));return Be.set(e,"css_fields",t),t}function c(){return ke.a.getAppPreference("modal_dimension_width")}function d(){return ke.a.getAppPreference("modal_snap")}function p(){return ke.a.getAppPreference("modal_snap_location")}Object.defineProperty(t,"__esModule",{value:!0});var f=n(0),h=n.n(f),m=n(2),g=n.n(m),v=n(7),b=(n.n(v),n(6)),y=n.n(b),_=n(57),w=n.n(_),k=n(30),C=n.n(k),x=n(116),E=n.n(x),S=n(33),T=n.n(S),O=n(51),M=n.n(O),L=n(41),N=n.n(L),A=n(20),P=n.n(A),D=n(13),I=n.n(D),F=n(38),R=n.n(F),j=n(191),B=n.n(j),U=n(18),H=n.n(U),z=n(3),W=n.n(z),V=n(17),G=n.n(V),q=n(23),Y=n.n(q),K=n(31),$=n.n(K),Q=n(77),X=n.n(Q),J=n(48),Z=n.n(J),ee=n(12),te=n.n(ee),ne=n(4),re=n.n(ne),oe=n(29),ie=n.n(oe),ae=n(47),se=n.n(ae),le=n(112),ue=n.n(le),ce=n(21),de=n.n(ce),pe=n(55),fe=n.n(pe),he=n(63),me=n.n(he),ge=n(87),ve=n.n(ge),be=n(1),ye=n(27),_e=n(88),we=n(19),ke=n(11),Ce=n(26),xe=n(278),Ee=n(279),Se=n(22),Te=n(25),Oe=n(280),Me=n(143),Le=n(710),Ne=n(712),Ae=n(680),Pe=n(56),De=n(24),Ie=(n.n(De),n(700)),Fe=Object.assign||function(e){for(var t=1;t1200||s>1200)&&!u;if(t&&f){if(n)return this.state.openedGeneralGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedCSSGroup===e}return this.state.openedToggle===e}},{key:"_hasColumnsFields",value:function(){var e=this.props.module.props.type,t=this.props.module.props.attrs,n=["et_pb_row","et_pb_row_inner"],r=be.a.isOn(t.specialty)&&"et_pb_section"===e;return H()(n,e)||r}},{key:"_hasModuleItem",value:function(){return!$()(this.props.module.props.child_slug)&&!W()(this.props.module.props.child_slug)}},{key:"_autoEditRecentlyAddedModuleItem",value:function(){if(this._hasModuleItem()){var e=ke.a.getRecentlyAddedModuleProps(),t=this.props.module.props.content,n=X()(t);R()(e,n)&&setTimeout(function(){we.a.moduleSetRecentlyAddedProps(!1),we.a.moduleItemAutoEdit(n)},0)}}},{key:"_onChange",value:function(e,t,n,r,o){if("raw_content"===e)return void we.a.moduleContentChange(this.props.module,t);var i=e.split("_"),a="padding_mobile"!==e&&"padding"===i[0]&&2===i.length;if(r)return void(!W()(this.props.module)&&this.props.module&&we.a.moduleContentChange(this.props.module,t));if(W()(this.props.module)||W()(this.props.module.props)||"et_pb_social_media_follow_network"!==this.props.module.props.type||"social_network"!==e||we.a.moduleContentChange(this.props.module,t),a){var s=i[1],l=t.split("|"),u=W()(l[0])?"":l[0],c=W()(l[1])?"":l[1],d=W()(l[2])?"":l[2],p=W()(l[3])?"":l[3];we.a.moduleSettingsChange(this.props.module,"padding_top_"+s,u,null,n),we.a.moduleSettingsChange(this.props.module,"padding_right_"+s,c,null,n),we.a.moduleSettingsChange(this.props.module,"padding_bottom_"+s,d,null,n),we.a.moduleSettingsChange(this.props.module,"padding_left_"+s,p,null,n)}else we.a.moduleSettingsChange(this.props.module,e,t,null,n,o)}},{key:"_resetOption",value:function(e){W()(e)||""===e||we.a.moduleSettingsChange(this.props.module,e,"")}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(e){this.state.hoveredGroup===e&&this.setState({hoveredGroup:null})}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_onClickToggle",value:function(e,t,n){if(!ke.a.getAppPreference("builder_display_modal_settings")){var r=p(),o=d(),i=c(),a=H()(["top","bottom"],r),s=window.innerWidth<_e.a.responsive.phone,l=(o&&a&&window.innerWidth>1200||i>1200)&&!s,u=l?_e.a.topbar.mobile:10,f="general"===n,h="design"===n,m="css"===n;if(this._isToggleOpened(e,n)){if(f)return this.setState({openedGeneralGroup:"",openedToggle:""});if(h)return this.setState({openedDesignGroup:"",openedToggle:""});if(m)return this.setState({openedCSSGroup:"",openedToggle:""})}if(this._isToggleOpened(e))return void this.setState({openedToggle:""});var g=1===t?0:61*t-u;l?jQuery(Object(v.findDOMNode)(this)).find(".et-fb-tabs__panel--"+n).animate({scrollTop:g},300):jQuery(Object(v.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:g},300),this.setState({openedToggle:e,openedGeneralGroup:"general"===n?e:this.state.openedGeneralGroup,openedDesignGroup:"design"===n?e:this.state.openedDesignGroup,openedCSSGroup:"css"===n?e:this.state.openedCSSGroup})}}},{key:"_unsyncGlobalContent",value:function(){this._unsyncGlobalSetting("et_pb_content_field",!0)}},{key:"_unsyncGlobalSetting",value:function(e,t){we.a.unsyncGlobalSetting(e,this.props.module,t)}},{key:"_handleFormSubmission",value:function(e){if(e.preventDefault(),(W()(te()(this,"props.module.props.loading"))||!this.props.module.props.loading)&&!jQuery(Object(v.findDOMNode)(this)).find(":focus").hasClass("wp-color-picker")){var t=this,n=this.props.module;P()(this.state.generalFields,function(e){"text"===e.type&&(W()(e.name)||-1===e.name.indexOf("url")&&-1===e.name.indexOf("alt")&&-1===e.name.indexOf("link")&&W()(e.renderer)&&t._onChange(e.name,be.a.decodeHtmlEntities(n.props.attrs[e.name])))}),we.a.closeSettings(this._isModuleItemSettings())}}},{key:"_handleFieldConditionalDefaults",value:function(e,t){return G()(e.default)&&!I()(e.default)?Fe({},e,{conditionalDefaults:e.default,default:be.a.getConditionalDefault(e.default,t)}):Fe({},e)}},{key:"isGlobalModuleOpened",value:function(e){var t=this.props.module;return!e&&!W()(t.props.attrs.global_parent)&&""!==t.props.attrs.global_parent||(!W()(t.props.attrs.global_module)&&""!==t.props.attrs.global_module||!W()(t.props.libraryModuleScope)&&"global"===t.props.libraryModuleScope)}},{key:"getGlobalTabClass",value:function(){if(this.isGlobalModuleOpened())return"et-fb-tabs__item__global"}},{key:"getGlobalModalClass",value:function(e){var t=W()(e)?"":e;if(this.isGlobalModuleOpened())return t+"__global"}},{key:"isGlobalOptionSynced",value:function(e){if(!this.isGlobalModuleOpened())return!0;var t=te()(this.props.module,"props.unsyncedGlobalSettings",[]);return!H()(t,e)}},{key:"isSelectiveSyncAvailable",value:function(e){return!te()(e,"hide_sync",!1)&&(this.isGlobalModuleOpened(!0)&&!H()(["et_pb_section","et_pb_row","et_pb_row_inner"],this.props.module.props.type))}},{key:"_onFilterInput",value:function(e,t){this.setState({filterOptions:t})}},{key:"_setSearchFocus",value:function(){var e=this;clearTimeout(this.focusTimer),this.focusTimer=setTimeout(function(){var t=jQuery(Object(v.findDOMNode)(e)).find(".et-fb-options-filter input");t.length>0&&t.focus()},200)}},{key:"_getNonEmptyToggles",value:function(e,t,n){var r=t+"_"+n+"_toggles";if(Be.has(e,r))return Be.get(e,r);var o=te()(Ce.a.getOptionsToggles(e),t,{}),i=this._getOptionsFields(n),a=this.getBackgroundFieldsNames(),s={},l={};P()(i,function(e){var t=e.toggle_slug,n=e.name,r=e.depends_to;t=W()(t)?"unclassified":t,me()(s,t,!0),r||H()(a,n)||me()(l,t,!0)});var u={toggles:ve()(o,function(e,t){return T()(s,t)||"unclassified"===t}),safe:l};return Be.set(e,r,u),u}},{key:"_getFilteredFields",value:function(e){var t=this,n=this._getOptionsFields(e),r=this.state.filterOptions;if(""===r)return n;var o=this.props.module.props.type,i=e+"_filter";if(Be.has(o,i)){var a=Be.get(o,i);if(a.search===r)return a.filtered}var s=te()(this,"props.module.props.attrs",{}),l=te()(this,"props.module.props.content"),u={};P()(n,function(e){var t=e.type,n=e.name,r=e.is_fb_content;if("codemirror"===t||n&&0===n.indexOf("custom_css_")){var o=r?l:s[n];o&&(u[n]=o)}});var c=ve()(n,function(e){var n=e.type,r=e.label,o=e.description,i=e.name;return"composite"===n||t._isOptionMatchesFilter(r,o,u[i])});return Be.set(o,i,{search:r,filtered:c}),c}},{key:"_getFilteredToggleFields",value:function(e,t,n){return""===this.state.filterOptions?t:this._isOptionMatchesFilter(e)?this._getOptionsFields(n):t}},{key:"_isOptionMatchesFilter",value:function(){for(var e=this.state.filterOptions.toLowerCase(),t=!1,n=arguments.length,r=Array(n),o=0;on&&ke.a.setMaxListeners(r)}}},{key:"_renderModuleItems",value:function(){var e=this;if(""!==this.state.filterOptions)return!1;var t="";this._hasModuleItem()&&G()(this.props.module.props.content)&&!I()(this.props.module.props.content)&&(t=h.a.createElement(Ne.a,{module:this.props.module,_v:this.props.module.props._v}));var n="";if(this._hasModuleItem()){this._autoEditRecentlyAddedModuleItem();var r=!1;if(this.isSelectiveSyncAvailable()){var o=this.isGlobalOptionSynced("et_pb_content_field")?"#97D000":"#EF5555";r=h.a.createElement("div",{className:"et-fb-form__global-sync",onClick:this._unsyncGlobalContent},h.a.createElement(Se.a,{icon:"sync",color:o}))}var i=!!ke.a.getModuleItemDragEndWaiting()&&h.a.createElement("div",{className:"et-fb-settings-module-items--waiting"});n=this._isModuleItemSettings()?"":h.a.createElement("div",{className:"et-fb-settings-module-items-wrap"},t,r,h.a.createElement("span",{className:"et-fb-item-button-wrap--add"},h.a.createElement(De.Motion,{defaultStyle:{size:0,opacity:0},style:{size:this.props.options.animate?Object(De.spring)(1,{stiffness:300,damping:20}):1,opacity:this.props.options.animate?Object(De.spring)(1,{stiffness:300,damping:20}):1}},function(t){return h.a.createElement(Te.a,{buttonName:ye.a.MODULE_ITEM_ADD,editingModule:e,round:!0,style:{opacity:t.opacity,transform:"scale( "+t.size+" )"},tooltip:ETBuilderBackend.i18n.controls.moduleItem.addNew},h.a.createElement(Se.a,{size:"14",icon:"add",color:"#FFFFFF"}))})),i)}return n}},{key:"renderToggleFields",value:function(e,t){return!!ke.a.isProductTourActive()||(!!this.builder_display_modal_settings||(""!==this.state.filterOptions||this._isToggleOpened(e,t)))}},{key:"_renderGeneralOptionsPanel",value:function(e){var t=this;if(!ke.a.isAllowedAction("general_settings"))return!1;var n=this.props.module,r=this,o=!(!n.isModuleItem||W()(n.parentModule.props.type))&&n.parentModule.props.type,i=this._getFilteredFields("general"),a=this._getAllOptionsFields(),s=[],l=r.getBackgroundFieldsNames(),u=this.getModuleFields(n.props.type),c=ie()(u),d=H()(c,"background_color"),p=this._getNonEmptyToggles(n.props.type,"general.toggles","general"),m=p.toggles,g=p.safe;m.unclassified="";var v=0,b="general"!==e;return h.a.createElement(Oe.c,{className:"et-fb-tabs__panel--general",slug:"general",isModuleItemSettings:this._isModuleItemSettings(),displayFilter:!0,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput},h.a.createElement(Me.e,{onSubmit:this._handleFormSubmission},h.a.createElement("input",{type:"submit",className:"et-fb-hide"}),this._renderModuleItems(),C()(m,function(e,c){v++;var p=Y()(e)?e.title:e,_=Y()(e)?e.sub_toggles:{},k=t._getFilteredToggleFields(p,i,"general"),x=T()(g,c),S=!x||t.renderToggleFields(c,"general");return h.a.createElement(Me.d,{key:c,title:p,toggleId:c,toggleGroupId:"general",_onClickToggle:r._onClickToggle,isToggleOpened:r._isToggleOpened(c,"general")||!b||t.productTourOptionToggle===c,toggleOrder:v,isLastToggle:se()(m)-1===v,isFilterActive:""!==t.state.filterOptions,isGroupActive:!t.builder_display_modal_settings,showEmpty:x,subToggles:_},!!S&&C()(k,function(e,i){if(c="unclassified"===c?"":c,te()(e,"toggle_slug","")!==c)return!1;var p=n.props.attrs,m=n.props.attrs.content_new||n.props.content,g=e.type,v="";if(W()(e.renderer)||("et_builder_include_categories_option"!==e.renderer&&"et_builder_include_categories_shop_option"!==e.renderer||(g="et_cat_select",e.categories_list={},e.taxonomy_name=W()(e.taxonomy_name)?"category":e.taxonomy_name),"et_builder_get_widget_areas"===e.renderer&&(g="et_sidebar_select",e.sidebars_list={}),H()(["et_pb_get_font_icon_list","et_pb_get_font_down_icon_list","et_pb_get_font_icon_list"],e.renderer)&&(g="et_font_icon_select"),"et_builder_get_gallery_settings"===e.renderer&&(g="et_gallery_upload"),"et_builder_generate_center_map_setting"===e.renderer&&(g="et_center_map")),"text"===g&&"et_pb_signup"===n.props.type&&H()(e.option_class,"--last-field")&&(g="text_api_key"),"background_color"===e.name)e=N()(e),e.name="background",e.label=ETBuilderBackend.i18n.modules.background.label,e.type="background",g="background",e._onChange=r._onChange,e._unsyncGlobalSetting=r._unsyncGlobalSetting,e.backgroundFields={},W()(e.is_toggleable)&&delete e.depends_to,delete e.additional_code,delete e.depends_show_if,delete e.description,P()(l,function(t){var n=te()(u,t,!1);n&&(e.backgroundFields[t]=n,e.backgroundFields[t]._unsyncGlobalSetting=r._unsyncGlobalSetting,e.backgroundFields[t].isGlobalOptionSynced=r.isGlobalOptionSynced(t),e.backgroundFields[t].isSelectiveSyncAvailable=r.isSelectiveSyncAvailable(),e.backgroundFields[t].isGlobalOptionSynced=r.isGlobalOptionSynced(t))});else if(d&&H()(l,e.name))return!1;if("background-field"===e.type&&(e.background_fields=E()(e.background_fields,function(e,t){return e._unsyncGlobalSetting=r._unsyncGlobalSetting,e.isGlobalOptionSynced=r.isGlobalOptionSynced(t),e.isSelectiveSyncAvailable=r.isSelectiveSyncAvailable(),e.isGlobalOptionSynced=r.isGlobalOptionSynced(t),e})),"warning"===e.type&&e.display_if!==e.value)return!1;if(W()(Ae.a.getControl(g)))return!1;if(!W()(e.depends_to)&&!t._isVisible(e,a))return s.push(e.name),!1;if(!(W()(e.show_if)&&W()(e.show_if_not)||t._canShowField(e,a)))return s.push(e.name),!1;if(!W()(e.depends_to)&&R()(e.depends_to,B()(e.depends_to,s)))return!1;if(o&&ze(e)&&(e=We(e,n)),H()(["range","custom_margin","custom_padding","text","number"],g)&&e.mobile_options){var _=p[e.name+"_last_edited"],k=W()(_)?["off","desktop"]:_.split("|"),C=be.a.hasValue(p[e.name])?p[e.name]:e.default,x=!W()(k[0])&&"on"===k[0];v=ke.a.getPreviewMode(),p={desktop:C,tablet:p[e.name+"_tablet"],phone:p[e.name+"_phone"],isResponsive:x,activeTab:k[1]}}else"et_pb_counter"===t.props.module.props.type&&"content_new"===e.name?p=W()(n.props.attrs.content_new)?n.props.content:n.props.attrs.content_new:(e=t._handleFieldConditionalDefaults(e,p),p=be.a.hasValue(p[e.name])?p[e.name]:e.default);"select_with_option_groups"===g&&be.a.hasValue(p)&&-1!==p.indexOf("|")&&(p=p.split("|")[1]);var S=g.replace(/_/g,"-"),T=y()("et-fb-settings-options","et-fb-option--"+S);W()(e.depends_default)&&W()(e.depends_show_if)&&W()(e.depends_show_if_not)||(T=y()("et-fb-option--depends-to",T)),"select_with_option_groups"===g&&e.groups&&(T=y()("et-fb-option--select-with-option-groups",T));var O=void 0;"text"===g&&(O=y()("et-fb-settings-option-input--block",O));var M=!W()(e.description)&&""!==e.description,L=W()(e.additional_button_type)?"":h.a.createElement(Le.a,{type:e.additional_button_type,name:e.name,attrs:e.additional_button_attrs,module:n,_onChange:t._onChange});if("color-alpha"===g&&"et_pb_section"===te()(n,"props.type")&&"background_color"===te()(e,"name")&&(e.default=ke.a.getPageSetting("et_pb_section_background_color")||ke.a.getPageSettingField("et_pb_section_background_color").default),"admin_label"===i){var A=["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column"],D="";if(H()(A,n.props.type))D=w()(ETBuilderBackend.structureModules,{slug:n.props.type}).name;else{var I=w()(ETBuilderBackend.modules,{label:n.props.type});W()(I.title)||(D=I.title)}e.default=D}var F=H()(["content_new","raw_content"],i)||!W()(e.is_fb_content)&&e.is_fb_content,j=F?"et_pb_content_field":e.name,U="background"===e.name&&"background"===g,z={};"codemirror"===g&&(z.search=t.state.filterOptions);var V=U||W()(e.label)||""===e.label?"":h.a.createElement(Me.c,{name:e.name,activeHelp:r._isDescriptionVisible(e.name),hoveredGroup:r._isHoveredGroup(e.name),key:"general-form-label-"+i,onClickHelp:!!M&&r._onClickHelp},e.label),G=M?h.a.createElement(Me.a,{active:r._isDescriptionVisible(e.name),key:"general-form-description-"+i},e.description):"",q="";b||(q="et-fb-product-tour-element","text"===g?q+=" et-fb-product-tour-element-text":"background"===g&&(q+=" et-fb-product-tour-element-background")),b||(t.productTourOptionToggle=c,b=!0);var Y=W()(e.priority)?10:e.priority;return h.a.createElement(Me.b,{name:e.name,key:"general-form-group-"+i,_onMouseEnterGroup:r._onMouseEnterGroup,_onMouseLeaveGroup:r._onMouseLeaveGroup,isSelectiveSyncAvailable:r.isSelectiveSyncAvailable(e),isGlobalOptionSynced:r.isGlobalOptionSynced(j),isContentField:F,_unsyncGlobalSetting:r._unsyncGlobalSetting,globalName:j,optionSubToggle:e.sub_toggle,className:q,priority:Y},V,G,h.a.createElement("div",{className:T,key:"et-fb-option-advanced_"+i},h.a.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-"+i},h.a.createElement(Pe.a,null,Object(f.createElement)(Ae.a.getControl(g),re()({key:i,value:p,className:O,module:r,name:i,content:m,resetValue:!1,previewMode:v,_onChange:t._onChange},z,e))),L)))}))}),!this.state.filterOptions&&h.a.createElement(xe.a,{videoListId:o||n.props.type})))}},{key:"_renderAdvancedOptionsPanel",value:function(e){var t=this;if(!ke.a.isAllowedAction("advanced_settings"))return!1;var n=this.props.module,r=this,o=!(!n.isModuleItem||W()(n.parentModule.props.type))&&n.parentModule.props.type,i=this._getFilteredFields("advanced"),a=this._getAllOptionsFields(),s=[],l=this._getNonEmptyToggles(n.props.type,"advanced.toggles","advanced"),u=l.toggles,c=l.safe;u.unclassified="";var d=0,p=r.getBackgroundFieldsNames(),m=this.getModuleFields(n.props.type),g=ie()(m),v=H()(g,"background_color"),b="advanced"!==e;return h.a.createElement(Oe.c,{className:"et-fb-tabs__panel--design",slug:"advanced",isModuleItemSettings:this._isModuleItemSettings(),displayFilter:!0,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput},h.a.createElement(Me.e,{onSubmit:this._handleFormSubmission},h.a.createElement("input",{type:"submit",className:"et-fb-hide"}),C()(u,function(e,l){d++;var g=Y()(e)?e.title:e,_=Y()(e)?e.sub_toggles:{},w=!I()(_)&&te()(e,"tabbed_subtoggles",!1),k=t._getFilteredToggleFields(g,i,"advanced"),x=T()(c,l),S=!x||t.renderToggleFields(l,"design");return h.a.createElement(Me.d,{key:l,title:g,toggleId:l,toggleGroupId:"design",_onClickToggle:r._onClickToggle,isToggleOpened:r._isToggleOpened(l,"design")||!b||t.productTourOptionToggle===l,toggleOrder:d,isLastToggle:se()(u)-1===d,isFilterActive:""!==t.state.filterOptions,isGroupActive:!t.builder_display_modal_settings,showEmpty:x,subToggles:_,tabbedSubtoggles:w},!!S&&C()(k,function(e,i){if(e="composite"===e.type?N()(e):re()({},e),!W()(e.specialty_only)&&"yes"===e.specialty_only&&(W()(n.props.attrs.specialty)||"on"!==n.props.attrs.specialty))return!1;if(l="unclassified"===l?"":l,te()(e,"toggle_slug","")!==l)return!1;var u=n.props.attrs,c=e.type,d={},g="";if(W()(e.renderer)||("et_builder_include_categories_option"!==e.renderer&&"et_builder_include_categories_shop_option"!==e.renderer||(c="et_cat_select",e.categories_list={},e.taxonomy_name=W()(e.taxonomy_name)?"category":e.taxonomy_name),"et_builder_get_widget_areas"===e.renderer&&(c="et_sidebar_select",e.sidebars_list={}),H()(["et_pb_get_font_icon_list","et_pb_get_font_down_icon_list","et_pb_get_font_icon_list"],e.renderer)&&(c="et_font_icon_select")),"background_color"===e.name)e=N()(e),e.name="background",e.label=ETBuilderBackend.i18n.modules.background.label,e.type="background",c="background",e._onChange=r._onChange,e.backgroundFields={},delete e.depends_to,delete e.additional_code,delete e.depends_show_if,delete e.description,P()(p,function(t){var n=te()(m,t,!1);n&&(e.backgroundFields[t]=n)});else if(v&&H()(p,e.name))return!1;if("background-field"===e.type&&(e.background_fields=E()(e.background_fields,function(e,t){return e._unsyncGlobalSetting=r._unsyncGlobalSetting,e.isGlobalOptionSynced=r.isGlobalOptionSynced(t),e.isSelectiveSyncAvailable=r.isSelectiveSyncAvailable(),e.isGlobalOptionSynced=r.isGlobalOptionSynced(t),e})),W()(c)||W()(Ae.a.getControl(c)))return!1;if(!W()(e.depends_to)&&!t._isVisible(e,a))return s.push(e.name),!1;if(!(W()(e.show_if)&&W()(e.show_if_not)||t._canShowField(e,a)))return s.push(e.name),!1;if(!W()(e.depends_to)&&R()(e.depends_to,B()(e.depends_to,s)))return!1;var _=y()("et-fb-settings-options","et-fb-option--"+c.replace("_","-"));W()(e.depends_default)&&W()(e.depends_show_if)&&W()(e.depends_show_if_not)||(_=y()("et-fb-option--depends-to",_));var w=o?i+"_child":i;if(o&&ze(e)&&(e=We(e,n,"advanced")),"composite"===c)return Ie.a.createControl(e,{uniqueKey:w,module:r,_onChange:r._onChange.bind(r),_onClickHelp:r._onClickHelp.bind(r),_isDescriptionVisible:r._isDescriptionVisible.bind(r),_isHoveredGroup:r._isHoveredGroup.bind(r),_onMouseEnterGroup:r._onMouseEnterGroup.bind(r),_onMouseLeaveGroup:r._onMouseLeaveGroup.bind(r),isSelectiveSyncAvailable:r.isSelectiveSyncAvailable.bind(r),isGlobalOptionSynced:r.isGlobalOptionSynced.bind(r),_unsyncGlobalSetting:r._unsyncGlobalSetting.bind(r)});var k="",C=e.default;if("custom_padding"===c&&t._hasColumnsFields()&&"custom_padding"!==te()(e,"name")){var x=e.name.replace("padding_",""),S=be.a.hasValue(u["padding_"+x+"_last_edited"])?u["padding_"+x+"_last_edited"].split("|"):[],T=te()(u,"padding_top_"+x,"").trim(),O=te()(u,"padding_right_"+x,"").trim(),M=te()(u,"padding_bottom_"+x,"").trim(),L=te()(u,"padding_left_"+x,"").trim(),A=T+"|"+O+"|"+M+"|"+L;u={desktop:A,tablet:te()(u,"padding_"+x+"_tablet",""),phone:te()(u,"padding_"+x+"_phone",""),isResponsive:!W()(S[0])&&"on"===S[0],activeTab:W()(S[1])?"desktop":S[1]},k=A}else if(H()(["range","custom_margin","custom_padding","text","number"],c)&&e.mobile_options){var D=u[e.name+"_last_edited"],F=W()(D)?["off","desktop"]:D.split("|"),j=be.a.hasValue(u[e.name])?u[e.name]:e.default,U=!W()(F[0])&&"on"===F[0];if(g=ke.a.getPreviewMode(),te()(e,"default_value_depends",!1)){var z=e.default_value_depends,V=e.default_values_mapping;d.getDefaultFrom=te()(n.props.attrs,z,!1),j=be.a.hasValue(u[e.name])?u[e.name]:te()(V,d.getDefaultFrom,e.default)}u={desktop:j,tablet:te()(u,e.name+"_tablet",""),phone:te()(u,e.name+"_phone",""),isResponsive:U,activeTab:F[1]},k=j}else e=t._handleFieldConditionalDefaults(e,u),u=be.a.hasValue(u[e.name])?u[e.name]:e.default,k=u;"font"===c&&(k=W()(k)||I()(fe()(k.split("|")))?"":k,C=W()(C)?"":C);var G=void 0;"text"===c&&(G=y()("et-fb-settings-option-input--block",G));var q=!W()(e.description)&&""!==e.description;if(te()(e,"attributes.data-old-option-ref",!1)){var Y=e.attributes["data-old-option-ref"];d.oldOptionValue=te()(n.props.attrs,Y,!1)}var K=W()(e.label)||""===e.label?"":h.a.createElement(Me.c,{name:e.name,activeHelp:r._isDescriptionVisible(e.name),hoveredGroup:r._isHoveredGroup(e.name),key:"advanced-form-label-"+i,onClickHelp:!!q&&r._onClickHelp},e.label),$=q?h.a.createElement(Me.a,{active:r._isDescriptionVisible(e.name),key:"advanced-form-description-"+i},e.description):"",Q=b?"":"et-fb-product-tour-element";b||(t.productTourOptionToggle=l,b=!0);var X=W()(e.priority)?10:e.priority,J=C===k;return h.a.createElement(Me.b,{name:e.name,key:"advanced-form-group-"+w,_onMouseEnterGroup:r._onMouseEnterGroup,_onMouseLeaveGroup:r._onMouseLeaveGroup,isSelectiveSyncAvailable:r.isSelectiveSyncAvailable(e),isGlobalOptionSynced:r.isGlobalOptionSynced(e.name),optionSubToggle:e.sub_toggle,_unsyncGlobalSetting:r._unsyncGlobalSetting,className:Q,priority:X,isDefaultValue:J},K,$,h.a.createElement("div",{className:_,key:"et-fb-option-advanced_"+w},h.a.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-"+w},h.a.createElement(Pe.a,null,Object(f.createElement)(Ae.a.getControl(c),re()({processedKey:w,value:u,className:G,module:r,name:e.name,resetValue:!1,_onChange:t._onChange,_resetOption:t._resetOption,visible:!0,previewMode:g,additionalAttrs:d},e))))))}))}),!this.state.filterOptions&&h.a.createElement(xe.a,{videoListId:o||n.props.type})))}},{key:"_renderCustomCSSOptionsPanel",value:function(e){var t=this;if(!ke.a.isAllowedAction("custom_css_settings"))return!1;var n=this,r=this.props.module,o=!(!r.isModuleItem||W()(r.parentModule.props.type))&&r.parentModule.props.type,i=this._getAllOptionsFields(),a=[],s=this._getFilteredFields("css"),l=this._getNonEmptyToggles(r.props.type,"custom_css.toggles","css"),u=l.safe,c=l.toggles;c.unclassified="";var d=0,p="css"!==e;return h.a.createElement(Oe.c,{className:"et-fb-tabs__panel--css",slug:"css",isModuleItemSettings:this._isModuleItemSettings(),displayFilter:!0,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput},h.a.createElement(Me.e,{onSubmit:this._handleFormSubmission},h.a.createElement("input",{type:"submit",className:"et-fb-hide"}),C()(c,function(e,o){d++;var l=Y()(e)?e.title:e,m=Y()(e)?e.sub_toggles:{},g=t._getFilteredToggleFields(l,s,"css"),v=T()(u,o),b=!v||t.renderToggleFields(o,"css");return h.a.createElement(Me.d,{key:o,title:l,toggleId:o,toggleGroupId:"css",_onClickToggle:t._onClickToggle,isToggleOpened:t._isToggleOpened(o,"css")||!p||t.productTourOptionToggle===o,toggleOrder:d,isLastToggle:se()(c)-1===d,isFilterActive:""!==t.state.filterOptions,isGroupActive:!t.builder_display_modal_settings,showEmpty:v,subToggles:m},!!b&&C()(g,function(e,s){if(o="unclassified"===o?"":o,te()(e,"toggle_slug","")!==o)return!1;if(!W()(e.depends_to)&&!t._isVisible(e,i))return a.push(e.name),!1;if(!(W()(e.show_if)&&W()(e.show_if_not)||t._canShowField(e,i)))return a.push(e.name),!1;if(!W()(e.depends_to)&&R()(e.depends_to,B()(e.depends_to,a)))return!1;var l=y()("et-fb-option"),u="disabled_on"===s?te()(r,["props","attrs",e.name],""):te()(r,["props","attrs",e.name],"").split("||").join("\n"),c=W()(e.type)?"codemirror":e.type,d={};"codemirror"===c&&(d.search=t.state.filterOptions);var m="."+r.props.type+"_"+r.props.shortcode_index,g=!W()(e.description)&&""!==e.description,v=!W()(e.selector)&&!g&&e.selector;if(!1!==v)if(-1!==v.indexOf("%%order_class%%"))v=v.replace(/%%order_class%%/g,m);else{var b=!W()(e.no_space_before_selector)&&e.no_space_before_selector?"":" ";v=m+b+v}var _=g?e.description:v,w=""!==t.state.filterOptions&&v?e.label+" "+ETBuilderBackend.i18n.controls.cssText:e.label;W()(e.depends_default)&&W()(e.depends_show_if)&&W()(e.depends_show_if_not)||(l=y()("et-fb-option--depends-to",l));var k=!1===_?"":h.a.createElement(Me.a,{active:t._isDescriptionVisible(e.name),key:"general-form-description-"+s},_),C=p?"":"et-fb-product-tour-element";p||(t.productTourOptionToggle=o,p=!0);var x=W()(e.priority)?10:e.priority;return h.a.createElement(Me.b,{name:e.name,key:"custom-css-form-group-"+e.name,_onMouseEnterGroup:!!_&&t._onMouseEnterGroup,_onMouseLeaveGroup:!!_&&t._onMouseLeaveGroup,isSelectiveSyncAvailable:t.isSelectiveSyncAvailable(e),isGlobalOptionSynced:t.isGlobalOptionSynced(e.name),_unsyncGlobalSetting:t._unsyncGlobalSetting,optionSubToggle:e.sub_toggle,className:C,priority:x},h.a.createElement(Me.c,{name:e.name,htmlFor:"et-fb-custom_css_"+e.name,activeHelp:t._isDescriptionVisible(e.name),hoveredGroup:t._isHoveredGroup(e.name),key:"custom-css-form-label-"+e.name,onClickHelp:!!_&&t._onClickHelp},w),k,h.a.createElement("div",{className:l,key:"et-fb-option-advanced_"+e.name},h.a.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-"+e.name},h.a.createElement(Pe.a,null,Object(f.createElement)(Ae.a.getControl(c),re()({value:u,key:e.name,module:n,name:e.name,_onChange:t._onChange},d,e))))))}))}),h.a.createElement(xe.a,{videoListId:o||r.props.type})))}},{key:"render",value:function(){var e=this.props,t=e.isVisible,n=e.module;if(!t)return!1;if(W()(n.props))return!1;var r=["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column"],o="";if(H()(r,n.props.type))o=w()(ETBuilderBackend.structureModules,{slug:n.props.type}).name;else{var i=w()(ETBuilderBackend.modules,{label:n.props.type});W()(i.title)||(o=i.title)}var a=te()(this.props,"module.props.loading",!1),c={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement},d={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement||"saveRow"===this.props.currentTourElement},p="saveModule"===this.props.currentTourElement?n:{},f=[h.a.createElement(Te.a,{block:!0,danger:!0,buttonName:ye.a.MODAL_SETTINGS_BUTTON_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,disableClick:a,className:c,editingModule:p},h.a.createElement(Se.a,{icon:"exit",color:"#FFFFFF"})),h.a.createElement(Te.a,{block:!0,primary:!0,alt:!0,buttonName:ye.a.MODAL_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo,disableClick:a},h.a.createElement(Se.a,{icon:"undo",color:"#FFFFFF"})),h.a.createElement(Te.a,{block:!0,info:!0,buttonName:ye.a.MODAL_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo,disableClick:a},h.a.createElement(Se.a,{icon:"redo",color:"#FFFFFF"})),h.a.createElement(Te.a,{block:!0,success:!0,buttonName:this._isModuleItemSettings()?ye.a.MODULE_ITEM_BACK_TO_PARENT:ye.a.MODAL_SETTINGS_BUTTON_SAVE,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,disableClick:a,className:d,editingModule:p},h.a.createElement(Se.a,{icon:"check",color:"#FFFFFF"}))],m=!W()(l(n.props.type))&&!I()(l(n.props.type)),g=!I()(u(n.props.type)),v=!I()(s(n.props.type)),b=!!ke.a.isAllowedAction("general_settings")&&h.a.createElement(Oe.a,{className:this.getGlobalTabClass()},ETBuilderBackend.i18n.controls.tabs.general),_=!(!ke.a.isAllowedAction("advanced_settings")||!m)&&h.a.createElement(Oe.a,{className:this.getGlobalTabClass()},ETBuilderBackend.i18n.controls.tabs.design),k=!(!ke.a.isAllowedAction("custom_css_settings")||!g)&&h.a.createElement(Oe.a,{className:this.getGlobalTabClass()},ETBuilderBackend.i18n.controls.tabs.css),C=y()({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":""!==this.state.filterOptions,"et-fb-modal__selective-sync":this.isSelectiveSyncAvailable()},this.getGlobalModalClass("et-fb-modal")),x="configureModule"===this.props.currentTourElement&&ke.a.getProductTourModuleName()===n.props.type||"editRow"===this.props.currentTourElement&&"et_pb_row"===n.props.type,E=x?"general":"";return!x||v&&b||(E=m&&_?"advanced":"css"),h.a.createElement(Ee.a,Fe({className:C,disableEscShortcut:""!==this.state.filterOptions,footerButtons:f,fullscreen:ke.a.getAppPreference("modal_fullscreen"),globalUpdate:!0,isModuleItemSettings:this._isModuleItemSettings(),label:ETBuilderBackend.i18n.modals.moduleSettings.title.replace("%s",o),measurement:{height:ke.a.getAppPreference("modal_dimension_height"),width:ke.a.getAppPreference("modal_dimension_width")},onModalChange:this.props.onModalChange,position:{x:ke.a.getAppPreference("modal_position_x"),y:ke.a.getAppPreference("modal_position_y")},snapLocation:ke.a.getAppPreference("modal_snap_location")},this.props),h.a.createElement(Oe.d,{selectedIndex:0,module:this.props.module,onSelect:this._setSearchFocus},h.a.createElement(Oe.b,{className:this.getGlobalModalClass("et-fb-tabs__list")},b,_,k),this._renderGeneralOptionsPanel(E),!!m&&this._renderAdvancedOptionsPanel(E),!!g&&this._renderCustomCSSOptionsPanel(E)))}}]),t}(f.Component);Ve.propTypes=Ue,Ve.defaultProps=He,t.default=Ve},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 s(){return te.a.getAppPreference("modal_dimension_width")}function l(){return te.a.getAppPreference("modal_snap")}function u(){return te.a.getAppPreference("modal_snap_location")}Object.defineProperty(t,"__esModule",{value:!0});var c=n(0),d=n.n(c),p=n(7),f=(n.n(p),n(6)),h=n.n(f),m=n(2),g=n.n(m),v=n(3),b=n.n(v),y=n(20),_=n.n(y),w=n(13),k=n.n(w),C=n(18),x=n.n(C),E=n(38),S=n.n(E),T=n(191),O=n.n(T),M=n(30),L=n.n(M),N=n(33),A=n.n(N),P=n(63),D=n.n(P),I=n(73),F=n.n(I),R=n(4),j=n.n(R),B=n(195),U=n.n(B),H=n(87),z=n.n(H),W=n(23),V=n.n(W),G=n(47),q=n.n(G),Y=n(26),K=n(27),$=n(88),Q=n(19),X=n(25),J=n(278),Z=n(22),ee=n(279),te=n(11),ne=n(280),re=n(143),oe=n(1),ie=n(643),ae=n(190),se=n(681),le=n(682),ue=n(281),ce=n(859),de=n(644),pe=n(650),fe=Object.assign||function(e){for(var t=1;t1200||c>1200)&&!p;if(t&&f){if(n)return this.state.openedContentGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedAdvancedGroup===e}return this.state.openedToggle===e}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(e){this.state.hoveredGroup===e&&this.setState({hoveredGroup:null})}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_onClickToggle",value:function(e,t,n){var r=u(),o=l(),i=s(),a=x()(["top","bottom"],r),c=window.innerWidth<$.a.responsive.phone,d=(o&&a&&window.innerWidth>1200||i>1200)&&!c,f="content"===n,h="design"===n,m="advanced"===n;if(this._isToggleOpened(e,n)&&d){if(f)return this.setState({openedContentGroup:"",openedToggle:""});if(h)return this.setState({openedDesignGroup:"",openedToggle:""});if(m)return this.setState({openedAdvancedGroup:"",openedToggle:""})}if(this._isToggleOpened(e))return void this.setState({openedToggle:""});var g=1===t?0:61*t-10;d?jQuery(Object(p.findDOMNode)(this)).find(".et-fb-tabs__panel--"+n).animate({scrollTop:g},300):jQuery(Object(p.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:g},300),this.setState({openedToggle:e,openedContentGroup:"content"===n?e:this.state.openedContentGroup,openedDesignGroup:"design"===n?e:this.state.openedDesignGroup,openedAdvancedGroup:"advanced"===n?e:this.state.openedAdvancedGroup})}},{key:"_onFilterInput",value:function(e,t){this.setState({filterOptions:t})}},{key:"_setSearchFocus",value:function(){var e=this;setTimeout(function(){var t=jQuery(Object(p.findDOMNode)(e)).find(".et-fb-options-filter input");t.length>0&&t.focus()},200)}},{key:"_isOptionMatchesFilter",value:function(e,t,n,r){var o=this.state.filterOptions,i=[e,t,n,r];if(""===o)return!0;var a=!1;return _()(i,function(e){b()(e)||-1===e.toLowerCase().indexOf(o.toLowerCase())||(a=!0)}),a}},{key:"renderToggleFields",value:function(e,t){return!!this.builder_display_modal_settings||(""!==this.state.filterOptions||this._isToggleOpened(e,t))}},{key:"_getTogglesForTab",value:function(e){var t={};return _()(this.fields,function(n){var r=n.tab_slug,o=n.toggle_slug,i=n.hide_on_fb,a=n.type;r!==e||i||"hidden"===a||D()(t,o,!0)}),z()(this.toggles,function(e,n){return A()(t,n)||"unclassified"===n})}},{key:"_renderTab",value:function(e){var t=this,n=[],r=0,o=this._getTogglesForTab(e);return L()(o,function(o,i){r++;var a=V()(o)?o.title:o,s=V()(o)?o.sub_toggles:{};return d.a.createElement(re.d,{key:i,title:a,toggleId:i,toggleGroupId:e,_onClickToggle:t._onClickToggle,isToggleOpened:t._isToggleOpened(i,e),toggleOrder:r,isLastToggle:q()(t.toggles)-1===r,isFilterActive:""!==t.state.filterOptions,subToggles:s},!!t.renderToggleFields(i,e)&&L()(U()(F()(t.fields),["index"]),function(r,o){o=r.id;var s=void 0;if(r.name&&r.name.indexOf("custom_css")>=0&&(s=te.a.getPageSetting(r.id)),!t._isOptionMatchesFilter(r.label,r.description,a,s))return!1;if(r.tab_slug!==e)return"";if(r.toggle_slug!==i)return!1;if(r.hide_on_fb)return"";var l=te.a.getPageSetting(r.id);if(b()(r.name)&&(r.name=r.id),b()(r.renderer)||("et_builder_include_categories_option"===r.renderer&&(r.type="et_cat_select",r.categories_list={},r.taxonomy_name=b()(r.taxonomy_name)?"category":r.taxonomy_name),"et_builder_get_widget_areas"===r.renderer&&(r.type="et_sidebar_select",r.sidebars_list={}),x()(["et_pb_get_font_icon_list","et_pb_get_font_down_icon_list"],r.renderer)&&(r.type="et_font_icon_select")),b()(ge[r.type]))return!1;var u={};if("codemirror"===r.type&&(u.search=t.state.filterOptions),!b()(r.depends_to)&&!t.isVisible(r,t.fields))return n.push(r.name),!1;if(!b()(r.depends_to)&&S()(r.depends_to,O()(r.depends_to,n)))return!1;var c={};c["et-fb-settings-option"]=!0,c["et-fb-settings-option--"+r.type.replace("_","-")]=!0,b()(r.depends_default)&&b()(r.depends_show_if)||(c[" et-fb-settings-option--depends-to"]=!0);var p="",f="",m=!b()(r.description)&&""!==r.description;return b()(r.label)||""===r.label||(p=d.a.createElement(re.c,{name:r.name,activeHelp:t._isDescriptionVisible(r.name),hoveredGroup:t._isHoveredGroup(r.name),key:"et-fb-settings-option-label-"+o,onClickHelp:!!m&&t._onClickHelp},r.label)),m&&(f=d.a.createElement(re.a,{active:t._isDescriptionVisible(r.name),key:"et-fb-settings-option-description-"+o},r.description)),d.a.createElement(re.b,{name:r.name,key:"et-fb-settings-option-form-group-"+o,_onMouseEnterGroup:t._onMouseEnterGroup,_onMouseLeaveGroup:t._onMouseLeaveGroup},p,f,d.a.createElement("div",{className:h()(c),key:"et-fb-settings-option-"+o},d.a.createElement("div",{className:"et-fb-settings-option-container",key:"et-fb-settings-option-container-"+o},d.a.createElement(ge[r.type],j()({key:r.id,value:l,name:r.id,content:l,_onChange:t._onChange},u,r)))))}))})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this._handleShortcuts)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this._handleClose)}},{key:"_handleClose",value:function(e){if(27!==e.keyCode)return!1;Q.a.pageSettingsClose()}},{key:"_handleFormSubmission",value:function(e){e.preventDefault(),Q.a.pageSettingsClose()}},{key:"_renderPageSettingsPanel",value:function(e){return d.a.createElement(ne.c,{className:"et-fb-tabs__panel--"+e,key:"et-fb-tabs__panel--"+e,displayFilter:!0,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput},d.a.createElement(re.e,{onSubmit:this._handleFormSubmission},d.a.createElement("input",{type:"submit",className:"et-fb-hide"}),this._renderTab(e),(!this.state.filterOptions||"content"!==e&&"design"!==e)&&d.a.createElement(J.a,{id:"et_pb_default"})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.onModalChange,o=r(t,["onModalChange"]),i=ETBuilderBackend.i18n.modals.pageSettings.tabs,a=[d.a.createElement(X.a,{block:!0,danger:!0,buttonName:K.a.PAGE_SETTINGS_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},d.a.createElement(Z.a,{icon:"exit",color:"#FFFFFF"})),d.a.createElement(X.a,{block:!0,primary:!0,alt:!0,buttonName:K.a.PAGE_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo},d.a.createElement(Z.a,{icon:"undo",color:"#FFFFFF"})),d.a.createElement(X.a,{block:!0,info:!0,buttonName:K.a.PAGE_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo},d.a.createElement(Z.a,{icon:"redo",color:"#FFFFFF"})),d.a.createElement(X.a,{block:!0,success:!0,buttonName:K.a.PAGE_SETTINGS_EDIT,tooltip:ETBuilderBackend.i18n.tooltip.modal.save},d.a.createElement(Z.a,{icon:"check",color:"#FFFFFF"}))],s=h()({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":""!==this.state.filterOptions});return d.a.createElement(ee.a,fe({className:s,footerButtons:a,fullscreen:te.a.getAppPreference("modal_fullscreen"),globalUpdate:!0,label:ETBuilderBackend.i18n.modals.pageSettings.title,measurement:{height:te.a.getAppPreference("modal_dimension_height"),width:te.a.getAppPreference("modal_dimension_width")},onModalChange:n,position:{x:te.a.getAppPreference("modal_position_x"),y:te.a.getAppPreference("modal_position_y")},snapLocation:te.a.getAppPreference("modal_snap_location")},o),d.a.createElement(ne.d,{selectedIndex:0},d.a.createElement(ne.b,null,L()(i,function(e,t){return d.a.createElement(ne.a,{key:"et-fb-modal--builder-settings-"+t},e)})),L()(i,function(t,n){return e._renderPageSettingsPanel(n)})))}},{key:"_onChange",value:function(e,t){if("et_pb_enable_ab_testing"===e&&oe.a.isOff(t)&&te.a.abIsMode("on"))return void Q.a.abDisable();Q.a.pageSettingsChange(e,t)}}]),t}(d.a.Component);ve.propTypes=me,t.default=ve},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n.n(a),l=n(2),u=n.n(l),c=n(6),d=n.n(c),p=n(11),f=n(296),h=n.n(f),m=n(1),g=n(861),v=(n.n(g),function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 s(e){return e*I}Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),u=n.n(l),c=n(2),d=n.n(c),p=n(20),f=n.n(p),h=n(17),m=n.n(h),g=n(46),v=n.n(g),b=n(3),y=n.n(b),_=n(73),w=n.n(_),k=(n(11),n(27)),C=n(19),x=n(862),E=n(25),S=n(22),T=n(279),O=n(280),M=n(56),L=n(864),N=(n.n(L),Object.assign||function(e){for(var t=1;t<%=label%><%}%>"}));var i=this.getLineChartData(),a=e.find("#et-fb-ab-testing-report-chart-"+t);S()(b()(this,["renderedLineChart",t,"destroy"]))&&this.renderedLineChart[t].destroy(),_()(i,"datasets")&&x()(i.datasets)&&(i.datasets=[{}]),L()(a.get(0))||(this.renderedLineChart[t]=new Chart(a.get(0).getContext("2d")).Line(i,{scaleFontSize:13,scaleFontColor:"#a1a9b1",scaleLabel:"<%=value%>%",scaleGridLineWidth:2,scaleLineWidth:2,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>%",multiTooltipTemplate:"<%= value %>%",datasetStrokeWidth:4,pointDotStrokeWidth:2,pointDotRadius:7}))}},{key:"_handleTabSwitch",value:function(e){var t=this,n=h()(A()(this.tabList,function(e){return!("conversions"===e&&!t.hasConversion)&&(!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&e)}));_()(n,e)&&this.setState({tab:b()(n,e)})}},{key:"_handleFilterSubjectChange",value:function(e){e.preventDefault();var t=b()(this,"state.excludedSubjects",{}),n=e.target.getAttribute("data-tab-name"),o=e.target.getAttribute("data-subject-id");_()(t,[n,o])?delete t[n][o]:O()(b()(t,[n]))?t[n][o]=o:t[n]=r({},o,o),this.setState({excludedSubjects:t})}},{key:"_handleFilterTimeChange",value:function(e){e.preventDefault();var t=b()(this,["state","tab"]),n=b()(this,["state","durations"]),r=e.target.getAttribute("data-time");n[t]=r,this.setState({durations:n})}},{key:"_onABTestingChange",value:function(){var e=this.getCurrentDuration(),t=b()(this,"state.reportData");t[e]=H.a.abGetReportData(e),this.unmounted||this.setState({reportData:t})}},{key:"isSubjectDisabled",value:function(e,t){var n=j()(b()(this.state,["excludedSubjects",e],[]));return _()(t,"attrs.ab_subject_id")&&k()(n,b()(t,"attrs.ab_subject_id"))}},{key:"getCurrentTab",value:function(){return b()(this,"state.tab")}},{key:"getCurrentDuration",value:function(){return b()(this,["state","durations",this.getCurrentTab()])}},{key:"getCurrentData",value:function(){return b()(this,["state","reportData",b()(this,["state","durations",this.getCurrentTab()])])}},{key:"getReportData",value:function(e){if(_()(this,["state","reportData",e]))return b()(this,["state","reportData",e]);var t=b()(this,"state.reportData");return t[e]=H.a.abGetReportData(e),this.setState({reportData:t}),H.a.abGetReportData(e)}},{key:"getRenderedSubjects",value:function(){var e=this,t=b()(e,"state.tab");return g()(this.subjects,function(n){return!e.isSubjectDisabled(t,n)})}},{key:"getLineChartData",value:function(){var e=this,t=e.getCurrentTab(),n=e.getReportData(e.getCurrentDuration()),r=b()(n,"dates");return!L()(r)&&{labels:r,datasets:A()(this.getRenderedSubjects(),function(e){var r=b()(e,"attrs.ab_subject_id"),o=b()(n,["subjects_totals","subject_"+r,"color"]),i=H.a.abGetSubjectLabel(e);return{data:j()(b()(n,["subjects_analysis","subject_"+r,t])),fillColor:"transparent",label:i,pointColor:o,pointStrokeColor:"#fff",strokeColor:o,subject_id:r}})}}},{key:"getPieChartData",value:function(){var e=this,t=b()(this,["state","reportData",e.getCurrentDuration(),"subjects_totals"]),n=b()(this,"state.tab");return L()(t)?[]:h()(A()(this.getRenderedSubjects(),function(e){var r=b()(e,"attrs.ab_subject_id"),o="subject_"+r;return{value:b()(t,[o,n]),color:b()(t,[o,"color"]),label:H.a.abGetSubjectLabel(e)}}))}},{key:"headerButtons",value:function(){return[l.a.createElement(V.a,{block:!0,buttonName:G.a.AB_CLOSE_REPORT,_onClick:function(){W.a.abCloseReport()}},l.a.createElement(q.a,{icon:"close",color:"#FFFFFF"}))]}},{key:"renderSubjectFilter",value:function(e){var t=this;return A()(this.subjects,function(n,r){var o="tab-"+e+"-filter-subject-"+r,i=t.isSubjectDisabled(e,n),a=i?Q.a.disabledSubject:H.a.abGetSubjectRank(n,"color");return l.a.createElement("li",{key:o},l.a.createElement("button",{"data-subject-id":b()(n,"attrs.ab_subject_id"),"data-tab-name":e,style:{backgroundColor:a},className:p()({"et-fb-ab-testing-filter-item-subject":!0,"et-fb-ab-testing-filter-item-subject--disabled":i}),onClick:t._handleFilterSubjectChange},H.a.abGetSubjectLabel(n)))})}},{key:"renderTimeFilter",value:function(e){var t=this;return A()(t.timeFilterList,function(n,r){var o="tab-"+e+"-filter-time-"+r,i=n===b()(t,["state","durations",e]);return l.a.createElement("li",{key:o},l.a.createElement("button",{className:p()({"et-fb-ab-testing-filter-item-time":!0,"et-fb-ab-testing-filter-item-time--active":i}),"data-time":n,onClick:t._handleFilterTimeChange},b()(Z,["abTesting","reportFilterTime",n])))})}},{key:"renderTabPanel",value:function(e){var t=this.getCurrentData(),n="isFetchingData"===t,r=!t||x()(b()(t,"subjects_totals")),o=b()(this,["state","durations",e]),i=l.a.createElement("canvas",{id:"et-fb-ab-testing-report-chart-"+e,className:"et-fb-ab-testing-report-chart"});return l.a.createElement($.c,{key:"abTesting-report-panel-"+e},l.a.createElement("div",{className:"et-fb-form"},l.a.createElement(K.a,{isLoading:n},r?l.a.createElement("div",{className:"et-fb-ab-testing-no-report"},l.a.createElement("object",{type:"image/svg+xml",data:ETBuilderBackend.images_uri+"/stats-no-data.svg"}),l.a.createElement("h2",null,b()(Z,"abTesting.no_report.title")),l.a.createElement("p",null,b()(Z,"abTesting.no_report.desc"))):l.a.createElement("div",null,l.a.createElement("ul",{className:"et-fb-ab-testing-filter--time"},this.renderTimeFilter(e),l.a.createElement("li",null,l.a.createElement(V.a,{className:"et-fb-ab-testing-report-refresh",buttonName:G.a.AB_REFRESH_REPORT,_onClick:function(){W.a.abRefreshReport(o)},tooltip:b()(Z,"abTesting.reportRefreshTooltip")},l.a.createElement(q.a,{icon:"undo",color:Q.a.abTestingTimeFilter})))),l.a.createElement("ul",{className:"et-fb-ab-testing-filter--subjects"},this.renderSubjectFilter(e)),i,this.renderTable(e),this.renderPieChart(e)))))}},{key:"renderTable",value:function(e){var t=this,n=b()(this,["state","durations",e]),r=H.a.abGetAnalysisFormula(e),o=b()(r,"denominator"),i=b()(r,"numerator"),a=b()(Z,["abTesting","view_stats_thead_titles",e]),s=0,u=0,c=0,d=A()(this.getRenderedSubjects(),function(r){var a=b()(r,"attrs.ab_subject_id");if(L()(a))return!1;var d="subject_"+a,p=H.a.abGetSubjectLabel(r),f=b()(t,["state","reportData",n,"subjects_totals",d,o],0),h=b()(t,["state","reportData",n,"subjects_totals",d,i],0),m=b()(t,["state","reportData",n,"subjects_totals",d,e],0);return s+=parseFloat(f),u+=parseFloat(h),c+=parseFloat(m),l.a.createElement("tr",{key:"abTesting-row-"+e+"-"+n+"-"+a},l.a.createElement("td",null,a),l.a.createElement("td",null,p),l.a.createElement("td",null,f),l.a.createElement("td",null,h),l.a.createElement("td",null,m+"%"))}),p=c/d.length,f=(""+p).split(".").length>1?2:0,h=!x()(this.getRenderedSubjects())&&l.a.createElement("tr",null,l.a.createElement("td",{colSpan:"2"},b()(Z,["abTesting","reportTotal"])),l.a.createElement("td",null,s),l.a.createElement("td",null,u),l.a.createElement("td",null,p.toFixed(f)+"%"));return l.a.createElement("div",{className:"et-fb-ab-testing-report-table--wrapper"},l.a.createElement("table",{id:"et-fb-ab-testing-report-table-"+e,className:"et-fb-ab-testing-report-table"},l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null,a[0]),l.a.createElement("th",null,a[1]),l.a.createElement("th",null,a[2]),l.a.createElement("th",null,a[3]),l.a.createElement("th",null,a[4]))),l.a.createElement("tbody",null,d),l.a.createElement("tfoot",null,h)))}},{key:"renderPieChart",value:function(e){var t=this,n=A()(this.subjects,function(n,r){var o=t.isSubjectDisabled(t.state.tab,n),i=o?"#E1E4E9":H.a.abGetSubjectRank(n,"color"),a=o?{color:"#E1E4E9"}:{};return l.a.createElement("li",{key:e+"-legend-"+r},l.a.createElement("span",{style:{backgroundColor:i}}),l.a.createElement("a",{href:"#subject",style:a,"data-subject-id":b()(n,"attrs.ab_subject_id"),"data-tab-name":e,onClick:t._handleFilterSubjectChange},H.a.abGetSubjectLabel(n)))}),r=x()(b()(this.getLineChartData(),"datasets"))?l.a.createElement("div",{className:"et-fb-ab-testing-report-chart"}):l.a.createElement("canvas",{id:"et-fb-ab-testing-report-pie-"+e,className:"et-fb-ab-testing-report-pie",width:"200",height:"200"});return l.a.createElement("div",{className:"et-fb-ab-testing-report-pie--wrapper"},r,l.a.createElement("ul",{className:"et-fb-ab-testing-report-pie--legend"},n))}},{key:"render",value:function(){var e=this,t=this,n=A()(this.tabList,function(e){return!("conversions"===e&&!t.hasConversion)&&(!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&l.a.createElement($.a,{key:"abTesting-report-nav-"+e},b()(Z,["abTesting","reportTabNavs",e])))}),r=A()(this.tabList,function(n){return!("conversions"===n&&!t.hasConversion)&&(!("shortcode_conversions"===n&&!t.hasShortcodeConversions)&&e.renderTabPanel(n))});return l.a.createElement(Y.a,{fullscreen:!0,headerButtons:this.headerButtons(),footerButtons:[l.a.createElement(V.a,{block:!0,info:!0,buttonName:G.a.BUTTON_AB_DISABLE},F()(b()(Z,"abTesting.reportEndTestButton")))],label:b()(Z,"abTesting.reportTitle"),onRest:function(){t.onMountInit||(t.initUI(),t.onMountInit=!0)}},l.a.createElement($.d,{selectedIndex:0,onSelect:this._handleTabSwitch},l.a.createElement($.b,null,n),r))}}]),t}(l.a.Component);t.default=ee},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n.n(a),l=n(2),u=n.n(l),c=n(630),d=n(881),p=(n.n(d),n(3)),f=n.n(p),h=n(12),m=n.n(h),g=n(33),v=n.n(g),b=n(191),y=n.n(b),_=n(38),w=n.n(_),k=n(13),C=n.n(k),x=n(882),E=n.n(x),S=n(66),T=n.n(S),O=n(196),M=n.n(O),L=n(29),N=n.n(L),A=n(89),P=n.n(A),D=n(57),I=n.n(D),F=n(18),R=n.n(F),j=n(59),B=n.n(j),U=n(11),H=n(19),z=function(){function e(e,t){for(var n=0;n'),jQuery(".et_search_form_container").length>0&&jQuery(".et_search_form_container").addClass("et_pb_is_animating"),jQuery(".et_header_style_slide .et_slide_in_menu_container").length>0){jQuery(".et_header_style_slide .et_slide_in_menu_container").addClass("et_pb_slide_menu_opened"),jQuery("#main-header").on("click",".et_toggle_slide_menu",t.disableSlideMenu)}jQuery(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&jQuery("#page-container").on("click",".et_toggle_fullscreen_menu",t.disableFullscreenMenu),U.a.addProductTourMoveFinishedListener(this.setAfterMoveStep),G.on("click",".et-fb-tour-video-overlay",function(){var e=jQuery(this),t=e.data("video");e.replaceWith('')}),this.shortThrottleReset=B()(this.maybeAddScrollbar,100),window.addEventListener("resize",this.shortThrottleReset),this.maybeAddScrollbar()}},{key:"componentWillUnmount",value:function(){U.a.removeProductTourMoveFinishedListener(this.setAfterMoveStep),window.removeEventListener("resize",this.shortThrottleReset),G.off("click mouseup mousedown","*",this.isTourButtonClicked),G.off("et_fb_product_tour_element_clicked")}},{key:"disableSlideMenu",value:function(){var e=jQuery(".et_header_style_slide .et_slide_in_menu_container");return e.hasClass("et_pb_slide_menu_opened")?e.removeClass("et_pb_slide_menu_opened"):e.addClass("et_pb_slide_menu_opened"),!1}},{key:"disableFullscreenMenu",value:function(){jQuery(".et_header_style_fullscreen .et_slide_in_menu_container").removeClass("et_pb_fullscreen_menu_opened"),G.removeClass("et_pb_fullscreen_menu_active")}},{key:"maybeAddScrollbar",value:function(){var e=jQuery(".et-fb-tooltip--product-tour--centered"),t=jQuery(window).height();if(this.getActiveElementPosition(this.state.tourElement),800>t)return void e.addClass("et-core-modal-enabled-scrollbar");e.removeClass("et-core-modal-enabled-scrollbar")}},{key:"setAfterMoveStep",value:function(){var e=m()(this.stepsSequence,T()(this.stepsSequence,"moveModule")+1,"");U.a.setProductTourElementReady(e)}},{key:"isTourButtonClicked",value:function(e){return"mouseup"===e.type&&"moveModule"===this.state.tourElement||(!(0===jQuery(e.target).closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-tooltip--product-tour, .et-fb-modal__module-settings, .et-fb-modal-history, .et-fb-tour-video-overlay, #wpadminbar, .et-fb-product-tour-secondary-element-hidden").length||jQuery(e.target).closest(".et-fb-modal__footer").length>0&&0===jQuery(e.target).closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-product-tour-secondary-element-hidden").length)||(e.preventDefault(),e.stopPropagation(),!1))}},{key:"maybeScroll",value:function(){if("selectModule"===this.state.tourElement&&jQuery(".et-fb-settings-options-wrap").animate({scrollTop:100},400),"editRow"===this.state.tourElement&&jQuery(".et-fb-tabs__panel--general").animate({scrollTop:100},400),!R()(this.absolutelyPositionedElements,this.state.tourElement))return void this.maybeAddScrollbar();var e=jQuery(".et-fb-tooltip--product-tour");if(e.length>0){var t=jQuery(window).height(),n=jQuery(window).scrollTop(),r=n+t,o=e.innerHeight(),i=e.offset().top;r0&&(n=t.offset(),t.closest(".et-fb-page-settings-bar").length>0)){var o=t.closest(".et-fb-page-settings-bar");n.top=o.position().top-100}if(f()(n))return void this.setState({isActive:!0});m()(this.appliedModalOffsets,e)?n=this.appliedModalOffsets[e]:(n.element=!1,n.top+=E()(m()(r,"top",0)),n.left+=E()(m()(r,"left",0)),this.appliedModalOffsets[e]=n),this.setState({modalPosition:n,isActive:!0})}},{key:"getElementOffset",value:function(e){var t={top:100,left:0,usePrevElementPosition:!1};switch(e){case"loadLayout":case"openHistory":case"pageSettings":t={left:-50,top:80};break;case"selectLayoutPack":t={left:850,top:-330,usePrevElementPosition:!0};break;case"loadLayoutItem":t={left:0,top:150,usePrevElementPosition:!0};break;case"addSection":t={left:-240,top:100};break;case"selectSectionType":t={left:600,top:150};break;case"selectModule":t={left:600,top:19};break;case"selectRow":t={left:-500,top:163};break;case"configureModule":t={left:590,top:-700};break;case"saveModule":t={left:630,top:-878};break;case"duplicateModule":t={left:410,top:247};break;case"rightClickCopy":t={left:440,top:255};break;case"moveModule":t={left:810,top:260};break;case"rightClickPaste":t={left:-300,top:307};break;case"rowOptions":t={left:367,top:291};break;case"editRow":t={left:590,top:-710};break;case"saveRow":t={left:320,top:-879};break;case"tabletPreview":t={left:50,top:75};break;case"desktopPreview":t={left:100,top:75};break;case"editHistory":t={left:320,top:-879};break;case"savePage":t={left:-125,top:95}}return t}},{key:"nextTourContent",value:function(e){var t=this,n=m()(this.productTourLocalization,[e,"endButtonText"],this.productTourLocalization.endButtonTextDefault),r=m()(this.productTourLocalization,[e,"skipButtonText"],this.productTourLocalization.skipButtonTextDefault),o=m()(this.productTourLocalization,[e,"title"],""),i=m()(this.productTourLocalization,[e,"description"],!1);setTimeout(function(){t.getActiveElementPosition(e)},200);var a={__html:i};i=s.a.createElement("div",{className:"et-fb-product-tour-text",dangerouslySetInnerHTML:a}),this.setState({tourElement:e,modalContent:i,modalTitle:o,endButtonText:n,skipButtonText:r}),setTimeout(this.maybeScroll,500)}},{key:"nextTip",value:function(e){var t=this,n=this.state.tourElement,r=m()(this.stepsSequence,T()(this.stepsSequence,n)+1,"");if(e)if(v()(this.skipToArray,n)){var o=this.skipToArray[n];if(-1===T()(this.stepsSequence,o))for(;-1===T()(this.stepsSequence,o);)o=v()(this.skipToArray,o)?this.skipToArray[o]:r;r=o}else if(R()(["selectLayoutPack","loadLayoutItem"],n)){var i="loadLayoutItem"===n?"button:last-child":"";jQuery(window).trigger("et-fb-product-tour-skip",i)}else jQuery(".et-fb-product-tour-element").trigger("click");var a=!1,s=!1,l=[];switch("loadLayoutItem"===n&&H.a.settingsBarToggleStatus("inactive"),r){case"loadLayout":jQuery(".et-fb-product-tour-overlay").remove(),H.a.settingsBarToggleStatus("active");break;case"selectLayoutPack":case"loadLayoutItem":a=!0,l.push(r);break;case"moveModule":case"rowOptions":case"rightClickCopy":"not_set"===U.a.getProductTourModule()&&U.a.setProductTourModule(),"moveModule"!==n||e||l.push(r);break;case"finish":G.append('
')}if(R()(["moveModule","loadLayoutItem"],n)&&(a=!0,s=!0,"loadLayoutItem"===n&&l.push("addSection")),"start"===n&&"loadLayout"!==r&&(l.push("predefined_layouts"),a=!0,"pageSettings"===r&&(s=!0),this.setState({autoLoadDemo:!0}),U.a.activateGlobalPreloader(),U.a.emitPreloaderInProcess(),this.autoloadLayout(!0)),this.setState({isActive:!1}),s||setTimeout(function(){H.a.setActiveTourElement(r)},0),a)this.waitProductTourElement(l,r,s);else{var u=R()(["rightClickCopy","rightClickPaste"],n)?800:500;setTimeout(function(){t.nextTourContent(r)},u)}}},{key:"waitProductTourElement",value:function(e,t,n){var r=this,o=U.a.getProductTourElementReady();if(w()(e,y()(o,e)))return n&&H.a.setActiveTourElement(t),void this.nextTourContent(t);setTimeout(function(){r.waitProductTourElement(e,t,n)},1e3)}},{key:"autoloadLayout",value:function(e){if((this.state.autoLoadDemo||e)&&!C()(results)){var t=results.pop();this.setState({autoLoadDemo:!1}),t[0].savedShortcode=t[0].shortcode,U.a.loadSavedLayoutFromComponent(t[0],!0),setTimeout(function(){U.a.replacePageContent(),U.a.setProductTourElementReady("predefined_layouts"),jQuery(".et-fb-product-tour-overlay").remove()},1e3)}}},{key:"onClose",value:function(){H.a.endProductTour();var e=this;if(jQuery(".et-fb-product-tour-overlay").remove(),jQuery(".et_search_form_container").length>0&&jQuery(".et_search_form_container").removeClass("et_pb_is_animating"),jQuery(".et_header_style_slide .et_slide_in_menu_container").length>0){jQuery(".et_header_style_slide .et_slide_in_menu_container").removeClass("et_pb_slide_menu_opened"),G.removeClass("et_pb_slide_menu_active"),jQuery("#main-header").off("click",".et_toggle_slide_menu",e.disableSlideMenu)}jQuery(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&jQuery("#page-container").off("click",".et_toggle_fullscreen_menu",e.disableFullscreenMenu),this.setState({isActive:!1}),G.off("click mouseup mousedown ondragstart","*",e.isTourButtonClicked)}},{key:"skipTip",value:function(){this.nextTip(!0)}},{key:"render",value:function(){if(!this.state.isActive)return!1;var e="finish"===this.state.tourElement?"":s.a.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onMouseUp:this.skipTip},this.state.skipButtonText),t=s.a.createElement("div",{className:"et-fb-tour-buttons"},s.a.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onClose},this.state.endButtonText),e),n=!R()(this.absolutelyPositionedElements,this.state.tourElement),r={"et-fb-tooltip--no-arrow":!0,"et-fb-tooltip--product-tour":!0,"et-fb-tooltip--product-tour--centered":"start"===this.state.tourElement||"finish"===this.state.tourElement,"et-fb-tooltip--product-tour--finish":"finish"===this.state.tourElement},o="start"===this.state.tourElement||"finish"===this.state.tourElement;return s.a.createElement(c.default,{active:this.state.isActive,actionType:"custom_content",tooltipTitle:this.state.modalTitle,_closeFunction:this.onClose,classNames:r,modalPosition:this.state.modalPosition,forceFixedPosition:n,modalWidth:340,enableContextMenu:!0,ignorePosition:o,movable:!o,buttons:t},s.a.createElement("div",null,this.state.modalContent))}}]),t}(s.a.Component);q.propTypes=V,q.defaultProps=W,t.default=q},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n.n(a),l=n(2),u=n.n(l),c=n(6),d=(n.n(c),n(143)),p=n(630),f=n(190),h=n(646),m=n(22),g=n(109),v=n(65),b=n(883),y=(n.n(b),n(13)),_=n.n(y),w=n(12),k=n.n(w),C=n(30),x=n.n(C),E=n(3),S=n.n(E),T=n(18),O=n.n(T),M=n(55),L=n.n(M),N=n(702),A=n.n(N),P=n(20),D=n.n(P),I=n(59),F=n.n(I),R=n(197),j=n.n(R),B=n(282),U=n.n(B),H=n(110),z=(n.n(H),n(147)),W=n.n(z),V=n(47),G=n.n(V),q=(n(11),n(26),n(19)),Y=function(){function e(e,t){for(var n=0;n'),Q.addClass("et-fb-global-scroll-disabled"),this.shortThrottleReset=F()(this.maybeAddScrollbar,100),window.addEventListener("resize",this.shortThrottleReset),this.maybeAddScrollbar()}},{key:"componentWillUnmount",value:function(){Q.removeClass("et-fb-global-scroll-disabled"),window.removeEventListener("resize",this.shortThrottleReset)}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_isDescriptionVisible",value:function(e){return this.state.activeDescription===e}},{key:"_isHoveredGroup",value:function(e){return this.state.hoveredGroup===e}},{key:"maybeAddScrollbar",value:function(){var e=jQuery(".et-fb-font-upload-modal");if(800>jQuery(window).height())return void e.addClass("et-core-modal-enabled-scrollbar");e.removeClass("et-core-modal-enabled-scrollbar")}},{key:"fontDataValid",value:function(e){var t=[],n="";return"add"!==e||(""===this.state.fontName&&t.push("fontName"),_()(this.state.fontFilesData)&&(n=X.noFilesError,t.push("fontFile")),"on"!==this.state.selectedFontWeightsAll&&-1===this.state.selectedFontWeights.indexOf("on")&&t.push("fontWeight"),_()(t)?(this.setState({errorElements:[],fontError:""}),!0):(this.setState({errorElements:t,fontProcessing:!1,fontError:n}),!1))}},{key:"_onFontNameInput",value:function(e,t){var n=U()(this.state.errorElements,function(e){return"fontName"===e});this.setState({fontName:t,errorElements:n})}},{key:"onUpload",value:function(){this.state.fontProcessing||this.processFont("add")}},{key:"onDelete",value:function(){this.state.fontProcessing||this.processFont("remove",this.props.fontID)}},{key:"getFontWeights",value:function(){if("on"===this.state.selectedFontWeightsAll)return"all";var e=this.state.selectedFontWeights.split("|"),t=0;return L()(x()(J,function(n,r){return t++,"on"===e[t-1]&&r})).join(",")}},{key:"processFont",value:function(e,t){var n=this,r=S()(t)?n.state.fontName:t,o={};if(n.fontDataValid(e)){n.setState({fontError:"",errorElements:[],fontProcessing:!0}),"add"===e&&(o=JSON.stringify({font_weights:n.getFontWeights(),generic_family:"sans-serif"}));var i=new FormData,a={action:"et_pb_process_custom_font",et_pb_font_action:e,et_fb_upload_font_nonce:ETBuilderBackend.nonces.uploadFontNonce,et_pb_font_name:r,et_pb_font_settings:o};D()(n.state.fontFilesData,function(e,t){a["et_pb_font_file_"+t]=e.file}),jQuery.each(a,function(e,t){i.append(e,t)}),jQuery.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,contentType:!1,processData:!1,data:i,success:function(t){var r=jQuery.parseJSON(t);if(_()(r.error)){if(ETBuilderBackend.customFonts=k()(r,"updated_fonts",ETBuilderBackend.customFonts),n.setState({fontError:"",fontProcessing:!1}),"add"===e&&""!==n.props.callback){var o=k()(r,"uploaded_font","");n.props.callback(o)}n.onClose()}else n.setState({fontError:r.error,fontProcessing:!1})}})}}},{key:"getFontName",value:function(e){return k()(ETBuilderBackend.customFonts,[e,"font_name"],e)}},{key:"onClose",value:function(){q.a.setFontUploaderStatus("disabled"),jQuery(".et-fb-font-upload-overlay").remove()}},{key:"_onFileUpload",value:function(e){var t=e.target.files,n=this.state.fontFilesData;if(!(G()(t)<1)){if(D()(t,function(e){var t=W()(k()(e,"name",""));D()(Z,function(r){A()(t,r)&&(n[r]={fileName:t,file:e})})}),_()(n)){var r=X.fileError+". "+X.supportedFiles+": "+Z.join(", ");return void this.setState({fontError:r})}this.setState({fontFilesData:n,fontError:""})}}},{key:"updateFontSettings",value:function(e,t){switch(e){case"et-font-uploader-weights-all":this.setState({selectedFontWeightsAll:t});break;case"et-font-uploader-weights-select":this.setState({selectedFontWeights:t})}}},{key:"removeFontFile",value:function(e){var t=jQuery(e.target).closest(".et-fb-font-files-list-item");if(!(t.length<1)){var n=t.data("file_ext"),r=this.state.fontFilesData;j()(r,n),this.setState({fontFilesData:r})}}},{key:"generateFilesListPreview",value:function(){var e=this;if(_()(this.state.fontFilesData))return!1;var t=x()(this.state.fontFilesData,function(t,n){return s.a.createElement("div",{className:"et-fb-font-files-list-item","data-file_ext":n,key:n},s.a.createElement("span",{className:"et-fb-font-files-list-item-remove",onClick:e.removeFontFile},s.a.createElement(m.a,{icon:"delete",color:v.a.danger})),t.fileName)});return s.a.createElement("div",{className:"et-fb-font-files-list"},s.a.createElement("label",{className:"et-fb-form__label"},s.a.createElement("span",{className:"et-fb-form__label-text"},X.selectedFiles,":")),t)}},{key:"getWeightCheckboxValues",value:function(){var e=[];return D()(J,function(t,n){var r=t+" "+n;e.push({value:t,label:r})}),e}},{key:"render",value:function(){var e={"et-fb-font-upload-modal":!0,"et-fb-font-upload-modal--delete":"delete"===this.props.action,"et-fb-modal-allow-scroll":!0},t=""!==this.state.fontError?s.a.createElement("div",{className:"et-fb-font-upload-error"},this.state.fontError):"",n="";if(this.state.fontProcessing)n=s.a.createElement(g.a,{isLoading:!0});else if("delete"===this.props.action){var r=s.a.createElement("div",{className:"et_pb_prompt_buttons et-fb-font-delete-confirmation"},s.a.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onClick:this.onClose},X.cancel),s.a.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-restore",onClick:this.onDelete},X.delete));n=s.a.createElement("div",null,s.a.createElement("div",{className:"et-core-modal-content"},X.deleteConfirm+' "'+this.getFontName(this.props.fontID)+'"',"?"),r)}else{var o="on"!==this.state.selectedFontWeightsAll?s.a.createElement(h.a,{options:this.getWeightCheckboxValues(),name:"et-font-uploader-weights-select",_onChange:this.updateFontSettings,value:this.state.selectedFontWeights}):"",i=s.a.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onUpload},X.upload);n=s.a.createElement("div",null,s.a.createElement("div",{className:"et-core-modal-content et-fb-allow-mouse-wheel"},s.a.createElement("div",{className:"et-core-modal-content-inner et-fb-allow-mouse-wheel-form"},t,s.a.createElement("label",{className:"et-fb-form__label"},s.a.createElement("span",{className:"et-fb-form__label-text"},X.fontNameLabel)),s.a.createElement(f.a,{type:"text",value:this.state.fontName,name:"userFontName",_onChange:this._onFontNameInput,className:!!O()(this.state.errorElements,"fontName")&&"et-fb-font-error-element",additional_attrs:{placeholder:X.fontName}}),s.a.createElement("div",{className:"et-fb-upload-file-container"},s.a.createElement("span",{className:"et-core-portability-import-placeholder"},X.noFile),s.a.createElement("button",{className:"et-core-button"},X.chooseFile),s.a.createElement("input",{type:"file",className:"et-fb-import-file",onChange:this._onFileUpload,accept:".ttf, .otf, .eot, .woff2, .woff",multiple:!0}),s.a.createElement("p",{className:"et-font-uploader-hint"},X.supportedFiles,": ",Z.join(", "))),this.generateFilesListPreview(),s.a.createElement(d.c,{name:"et-font-uploader-weight",activeHelp:this._isDescriptionVisible("et-font-uploader-weight"),hoveredGroup:!0,key:"et-font-uploader-weight-label",onClickHelp:this._onClickHelp},X.weightsSupport),s.a.createElement(d.a,{active:this._isDescriptionVisible("et-font-uploader-weight"),key:"et-font-uploader-weight-desc"},X.weightsHelp),s.a.createElement("div",{className:O()(this.state.errorElements,"fontWeight")?"et-fb-font-error-element":""},s.a.createElement(h.a,{options:[X.all],_onChange:this.updateFontSettings,name:"et-font-uploader-weights-all",value:this.state.selectedFontWeightsAll}),o))),i)}var a="delete"===this.props.action?X.delete:X.upload;return s.a.createElement(p.default,{active:!0,actionType:"custom_content",tooltipTitle:a+" "+X.font,_closeFunction:this.onClose,classNames:e,ignorePosition:!0,enableContextMenu:!0,movable:!1},n)}}]),t}(s.a.Component);ee.propTypes=$,ee.defaultProps=K,t.default=ee},function(e,t,n){ // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE !function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}function p(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=t)return r}}function h(e){for(;Ya.length<=e;)Ya.push(m(Ya)+" ");return Ya[e]}function m(e){return e[e.length-1]}function g(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ka.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&_(e))||t.test(e):_(e)}function k(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&$a.test(e)}function x(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}function S(e,t,n){var i=this;this.input=n,i.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=o("div",null,"CodeMirror-code"),i.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=r("div",null,"CodeMirror-cursors"),i.measure=r("div",null,"CodeMirror-measure"),i.lineMeasure=r("div",null,"CodeMirror-measure"),i.lineSpace=o("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=o("div",[i.lineSpace],"CodeMirror-lines");i.mover=r("div",[a],null,"position: relative"),i.sizer=r("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=r("div",null,null,"position: absolute; height: "+za+"px; width: 1px;"),i.gutters=r("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=r("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=r("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ba&&ya<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),_a||ha&&Ma||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function T(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?I(n,T(e,n).text.length):W(t,T(e,t.line).text.length)}function W(e,t){var n=e.ch;return null==n||n>t?I(e.line,t):n<0?I(e.line,0):e}function V(e,t){for(var n=[],r=0;r=t:i.to>t);(r||(r=[])).push(new Y(a,i.from,l?null:i.to))}}return r}function J(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t);if(s||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&s)for(var w=0;w0)){var c=[l,1],d=F(u.from,s.from),f=F(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),o.splice.apply(o,c),l+=c.length-3}}return o}function ne(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?F(u.to,n)>=0:F(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?F(u.from,r)<=0:F(u.from,r)<0)))return!0}}}function de(e){for(var t;t=le(e);)e=t.find(-1,!0).line;return e}function pe(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function fe(e){for(var t,n;t=ue(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function he(e,t){var n=T(e,t),r=de(n);return n==r?t:N(r)}function me(e,t){if(t>e.lastLine())return t;var n,r=T(e,t);if(!ge(e,r))return t;for(;n=ue(r);)r=n.find(1,!0).line;return N(r)+1}function ge(e,t){var n=Xa&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function we(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;it||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}function ke(e,t,n){var r;Ja=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:Ja=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:Ja=o)}return null!=r?r:Ja}function Ce(e,t){var n=e.order;return null==n&&(n=e.order=Za(e.text,t)),n}function xe(e,t){return e._handlers&&e._handlers[t]||es}function Ee(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=p(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function Se(e,t){var n=xe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function Le(e){e.prototype.on=function(e,t){ts(this,e,t)},e.prototype.off=function(e,t){Ee(this,e,t)}}function Ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Pe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){Ne(e),Ae(e)}function Ie(e){return e.target||e.srcElement}function Fe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),La&&e.ctrlKey&&1==t&&(t=3),t}function Re(e){if(null==Ua){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ua=t.offsetWidth<=1&&t.offsetHeight>2&&!(ba&&ya<8))}var o=Ua?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function je(e){if(null!=Ha)return Ha;var r=n(e,document.createTextNode("AخA")),o=Da(r,0,1).getBoundingClientRect(),i=Da(r,1,2).getBoundingClientRect();return t(e),!(!o||o.left==o.right)&&(Ha=i.right-o.right<3)}function Be(e){if(null!=as)return as;var t=n(e,r("span","x")),o=t.getBoundingClientRect(),i=Da(t,0,1).getBoundingClientRect();return as=Math.abs(o.left-i.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ss[e]=t}function He(e,t){ls[e]=t}function ze(e){if("string"==typeof e&&ls.hasOwnProperty(e))e=ls[e];else if(e&&"string"==typeof e.name&&ls.hasOwnProperty(e.name)){var t=ls[e.name];"string"==typeof t&&(t={name:t}),e=y(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function We(e,t){t=ze(t);var n=ss[t.name];if(!n)return We(e,"text/plain");var r=n(e,t);if(us.hasOwnProperty(t.name)){var o=us[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ve(e,t){c(t,us.hasOwnProperty(e)?us[e]:us[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}function Ke(e,t,n,r){var o=[e.state.modeGen],i={};nt(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},i,r);for(var a=n.state,s=0;se&&o.splice(l,1,e,o[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ge(e.doc.mode,r.state),i=Ke(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Qe(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new ps(r,!0,t);var i=rt(e,t,n),a=i>r.first&&T(r,i-1).stateAfter,s=a?ps.fromSaved(r,a,i):new ps(r,Ye(r.mode),i);return r.iter(i,t,function(n){Xe(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,n,r){var o,i=e.doc,a=i.mode;t=z(i,t);var s,l=T(i,t.line),u=Qe(e,t.line,n),c=new cs(l.text,e.options.tabSize,u);for(r&&(s=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&Xe(e,t,r,d.pos),d.pos=t.length,l=null):l=tt(Ze(n,d,r.state,p),i),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;ua;--s){if(s<=i.first)return i.first;var l=T(i,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ds?u.lookAhead:0)<=i.modeFrontier))return s;var c=d(l.text,null,e.options.tabSize);(null==o||r>c)&&(o=s-1,r=c)}return o}function ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=T(e,r).stateAfter;if(o&&(!(o instanceof ds)||r+o.lookAhead1&&!/ /.test(e))return e;for(var n=t,r="",o=0;ou&&d.from<=u));p++);if(d.to>=c)return e(n,r,o,i,a,s,l);e(n,r.slice(0,d.to-u),o,i,null,s,l),i=null,r=r.slice(d.to-u),u=d.to}}}function ft(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function ht(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,u,c,d,p,f=o.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=d=s="",p=null,v=1/0;for(var b=[],y=void 0,_=0;_h||k.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==h&&(c+=" "+k.startStyle),k.endStyle&&w.to==v&&(y||(y=[])).push(k.endStyle,w.to),k.title&&!d&&(d=k.title),k.collapsed&&(!p||ae(p.marker,k)<0)&&(p=w)):w.from>h&&v>w.from&&(v=w.from)}if(y)for(var C=0;C=f)break;for(var E=Math.min(f,v);;){if(g){var S=h+g.length;if(!p){var T=S>E?g.slice(0,E-h):g;t.addToken(t,T,a?a+l:l,c,h+T.length==v?u:"",d,s)}if(S>=E){g=g.slice(E-h),h=E;break}h=S,c=""}g=o.slice(i,i=n[m++]),a=st(n[m++],t.cm.options)}}else for(var O=1;O2&&i.push((l.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Wt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Vt(e,t){t=de(t);var r=N(t),o=e.display.externalMeasured=new mt(e.doc,t,r);o.lineN=r;var i=o.built=lt(e,o);return o.text=i.pre,n(e.display.lineMeasure,i.pre),o}function Gt(e,t,n,r){return Kt(e,Yt(e,t),n,r)}function qt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=l-s,o=i-1,t>=l&&(a="right")),null!=o){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==l-s)for(;u=0&&(n=e[o]).left==n.right;o--);return n}function Xt(e,t,n,r){var o,i=$t(t.map,n,r),a=i.node,s=i.start,l=i.end,u=i.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&C(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+l0&&(u=r="right");var d;o=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(ba&&ya<9&&!s&&(!o||!o.left&&!o.right)){var p=a.parentNode.getClientRects()[0];o=p?{left:p.left,right:p.left+_n(e.display),top:p.top,bottom:p.bottom}:_s}for(var f=o.top-t.rect.top,h=o.bottom-t.rect.top,m=(f+h)/2,g=t.view.measure.heights,v=0;v=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!l)return a("before"==c?u-1:u,"before"==c);var d=ke(l,u,c),p=Ja,f=s(u,d,"before"==c);return null!=p&&(f.other=s(u,p,"before"!=c)),f}function cn(e,t){var n=0;t=z(e.doc,t),e.options.lineWrapping||(n=_n(e.display)*t.ch);var r=T(e.doc,t.line),o=be(r)+Ft(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function dn(e,t,n,r,o){var i=I(e,t,n);return i.xRel=o,r&&(i.outside=!0),i}function pn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return dn(r.first,0,null,!0,-1);var o=A(r,n),i=r.first+r.size-1;if(o>i)return dn(r.first+r.size-1,T(r,i).text.length,null,!0,1);t<0&&(t=0);for(var a=T(r,o);;){var s=gn(e,a,o,t,n),l=ue(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;o=N(a=u.to.line)}}function fn(e,t,n,r){r-=on(t);var o=t.text.length,i=E(function(t){return Kt(e,n,t-1).bottom<=r},o,0);return o=E(function(t){return Kt(e,n,t).top>r},i,o),{begin:i,end:o}}function hn(e,t,n,r){return n||(n=Yt(e,t)),fn(e,t,n,an(e,t,Kt(e,n,r),"line").top)}function mn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function gn(e,t,n,r,o){o-=be(t);var i=Yt(e,t),a=on(t),s=0,l=t.text.length,u=!0,c=Ce(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?bn:vn)(e,t,n,i,c,r,o);u=1!=d.level,s=u?d.from:d.to-1,l=u?d.to:d.from-1}var p,f,h=null,m=null,g=E(function(t){var n=Kt(e,i,t);return n.top+=a,n.bottom+=a,!!mn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)},s,l),v=!1;if(m){var b=r-m.left=_.bottom}return g=x(t.text,g,1),dn(n,g,f,v,r-p)}function vn(e,t,n,r,o,i,a){var s=E(function(s){var l=o[s],u=1!=l.level;return mn(un(e,I(n,u?l.to:l.from,u?"before":"after"),"line",t,r),i,a,!0)},0,o.length-1),l=o[s];if(s>0){var u=1!=l.level,c=un(e,I(n,u?l.from:l.to,u?"after":"before"),"line",t,r);mn(c,i,a,!0)&&c.top>a&&(l=o[s-1])}return l}function bn(e,t,n,r,o,i,a){var s=fn(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,p=0;p=u||f.to<=l)){var h=1!=f.level,m=Kt(e,r,h?Math.min(u,f.to)-1:Math.max(l,f.from)).right,g=mg)&&(c=f,d=g)}}return c||(c=o[o.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function yn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ms){ms=r("pre");for(var o=0;o<49;++o)ms.appendChild(document.createTextNode("x")),ms.appendChild(r("br"));ms.appendChild(document.createTextNode("x"))}n(e.measure,ms);var i=ms.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),t(e.measure),i||1}function _n(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),o=r("pre",[t]);n(e.measure,o);var i=t.getBoundingClientRect(),a=(i.right-i.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function wn(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a)n[e.options.gutters[a]]=i.offsetLeft+i.clientLeft+o,r[e.options.gutters[a]]=i.clientWidth;return{fixedPos:kn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function kn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cn(e){var t=yn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/_n(e.display)-3);return function(o){if(ge(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pn(e){e.state.focused||(e.display.input.focus(),In(e))}function Dn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Fn(e))},100)}function In(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Se(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),_a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),An(e))}function Fn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Se(e,"blur",e,t),e.state.focused=!1,Ra(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Rn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||l<-.005)&&(L(o.line,i),jn(o.line),o.rest))for(var u=0;u=a&&(i=A(t,be(T(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Un(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=kn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Sa){var a=r("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Ft(e.display))+"px;\n height: "+(t.bottom-t.top+Bt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function Wn(e,t,n,r){null==r&&(r=0);var o;e.options.lineWrapping||t!=n||(t=t.ch?I(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?I(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,s=un(e,t),l=n&&n!=t?un(e,n):s;o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r};var u=Gn(e,o),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Jn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(er(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}function Vn(e,t){var n=Gn(e,t);null!=n.scrollTop&&Jn(e,n.scrollTop),null!=n.scrollLeft&&er(e,n.scrollLeft)}function Gn(e,t){var n=e.display,r=yn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Ht(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Rt(n),l=t.tops-r;if(t.topo+i){var c=Math.min(t.top,(u?s:t.bottom)-i);c!=o&&(a.scrollTop=c)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=Ut(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+d-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function qn(e,t){null!=t&&(Qn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Yn(e){Qn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Kn(e,t,n){null==t&&null==n||Qn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function $n(e,t){Qn(e),e.curOp.scrollToPos=t}function Qn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Xn(e,cn(e,t.from),cn(e,t.to),t.margin)}}function Xn(e,t,n,r){var o=Gn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Kn(e,o.scrollLeft,o.scrollTop)}function Jn(e,t){Math.abs(e.doc.scrollTop-t)<2||(ha||Lr(e,{top:t}),Zn(e,t,!0),ha&&Lr(e),Cr(e,100))}function Zn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function er(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Un(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function tr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Rt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Bt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function nr(e,t){t||(t=tr(e));var n=e.display.barWidth,r=e.display.barHeight;rr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Rn(e),rr(e,tr(e)),n=e.display.barWidth,r=e.display.barHeight}function rr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function or(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ra(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Cs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ts(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?er(e,t):Jn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function ir(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xs},vt(e.curOp)}function ar(e){yt(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Es(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ur(e){e.updatedDisplay=e.mustUpdate&&Or(e.cm,e.update)}function cr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Rn(t),e.barMeasure=tr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Gt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Bt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ut(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function dr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Xa&&he(e.doc,t)o.viewFrom?yr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)yr(e);else if(t<=o.viewFrom){var i=_r(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):yr(e)}else if(n>=o.viewTo){var a=_r(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):yr(e)}else{var s=_r(e,t,t,-1),l=_r(e,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(gt(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):yr(e)}var u=o.externalMeasured;u&&(n=o.lineN&&t=r.viewTo)){var i=r.view[Sn(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==p(a,n)&&a.push(n)}}}function yr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var o,i=Sn(e,t),a=e.display.view;if(!Xa||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;he(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function wr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=gt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=gt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Sn(e,n)))),r.viewTo=n}function kr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Qe(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,l=Ke(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var u=i.styleClasses,c=l.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!d&&pn)return Cr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&fr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==kr(e))return!1;Hn(e)&&(yr(e),n.dims=wn(e));var i=o.first+o.size,a=Math.max(n.visible.from-e.options.viewportMargin,o.first),s=Math.min(i,n.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(i,r.viewTo)),Xa&&(a=he(e.doc,a),s=me(e.doc,s));var l=a!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;wr(e,a,s),r.viewOffset=be(T(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=kr(e);if(!l&&0==u&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=Sr(e);return u>4&&(r.lineDiv.style.display="none"),Nr(e,r.updateLineNumbers,n.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Tr(c),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,Cr(e,400)),r.updateLineNumbers=null,!0}function Mr(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ut(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Rt(e.display)-Ht(e),n.top)}),t.visible=Bn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Or(e,t);r=!1){Rn(e);var o=tr(e);Tn(e),nr(e,o),Pr(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Lr(e,t){var n=new Es(e,t);if(Or(e,n)){Rn(e),Mr(e,n);var r=tr(e);Tn(e),nr(e,r),Pr(e,r),n.finish()}}function Nr(e,n,r){function o(t){var n=t.nextSibling;return _a&&La&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,a=e.options.lineNumbers,s=i.lineDiv,l=s.firstChild,u=i.view,c=i.viewFrom,d=0;d-1&&(h=!1),kt(e,f,c,r)),h&&(t(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(e.options,c)))),l=f.node.nextSibling}else{var m=Lt(e,f,c,r);s.insertBefore(m,l)}c+=f.size}for(;l;)l=o(l)}function Ar(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Pr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Bt(e)+"px"}function Dr(e){var n=e.display.gutters,o=e.options.gutters;t(n);for(var i=0;i-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Fr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Rr(e){var t=Fr(e);return t.x*=Ts,t.y*=Ts,t}function jr(e,t){var n=Fr(t),r=n.x,o=n.y,i=e.display,a=i.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||o&&l){if(o&&La&&_a)e:for(var u=t.target,c=i.view;u!=a;u=u.parentNode)for(var d=0;d=0){var a=U(i.from(),o.from()),s=B(i.to(),o.to()),l=i.empty()?o.from()==o.head:i.from()==i.head;r<=t&&--t,e.splice(--r,2,new Ms(l?s:a,l?a:s))}}return new Os(e,t)}function Ur(e,t){return new Os([new Ms(e,t||e)],0)}function Hr(e){return e.text?I(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zr(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return Hr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Hr(t).ch-t.to.ch),I(n,r)}function Wr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,b)}_t(e,"change",e,t)}function Qr(e,t,n){function r(e,o,i){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function oo(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,s=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&o.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(i=ro(o,o.lastOp==r)))a=m(i.changes),0==F(t.from,t.to)&&0==F(t.from,a.to)?a.to=Hr(t):i.changes.push(to(e,t));else{var l=m(o.done);for(l&&l.ranges||so(e.sel,o.done),i={changes:[to(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||Se(e,"historyAdded")}function io(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ao(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||io(e,i,m(o.done),t))?o.done[o.done.length-1]=t:so(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&no(o.undone)}function so(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function lo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i})}function uo(e){if(!e)return null;for(var t,n=0;n-1&&(m(s)[d]=u[d],delete u[d])}}}return r}function ho(e,t,n,r){if(r){var o=e.anchor;if(n){var i=F(t,o)<0;i!=F(n,o)<0?(o=t,t=n):i!=F(t,n)<0&&(t=n)}return new Ms(o,t)}return new Ms(n||t,t)}function mo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),wo(e,new Os([ho(e.sel.primary(),t,n,o)],0),r)}function go(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:s.to>t.ch))){if(o&&(Se(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u=l.find(r<0?1:-1),c=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Oo(e,u,-r,u&&u.line==t.line?i:null)),u&&u.line==t.line&&(c=F(u,n))&&(r<0?c<0:c>0))return So(e,u,t,r,o)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Oo(e,d,r,d.line==t.line?i:null)),d?So(e,d,t,r,o):null}}return t}function To(e,t,n,r,o){var i=r||1,a=So(e,t,n,i,o)||!o&&So(e,t,n,i,!0)||So(e,t,n,-i,o)||!o&&So(e,t,n,-i,!0);return a||(e.cantEdit=!0,I(e.first,0))}function Oo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?z(e,I(t.line-1)):null:n>0&&t.ch==(r||T(e,t.line)).text.length?t.line=0;--o)Ao(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else Ao(e,t)}}function Ao(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var n=Wr(e,t);oo(e,t,n,e.cm?e.cm.curOp.id:NaN),Io(e,t,n,Z(e,t));var r=[];Qr(e,function(e,n){n||-1!=p(r,e.history)||(Uo(e.history,t),r.push(e.history)),Io(e,t,null,Z(e,t))})}}function Po(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,o=e.history,i=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,l=0;l=0;--d){var f=function(n){var o=r.changes[n];if(o.origin=t,c&&!Lo(e,o,!1))return a.length=0,{};u.push(to(e,o));var i=n?Wr(e,o):m(a);Io(e,o,i,po(e,o)),!n&&e.cm&&e.cm.scrollIntoView({from:o.from,to:Hr(o)});var s=[];Qr(e,function(e,t){t||-1!=p(s,e.history)||(Uo(e.history,o),s.push(e.history)),Io(e,o,null,po(e,o))})}(d);if(f)return f.v}}}}function Do(e,t){if(0!=t&&(e.first+=t,e.sel=new Os(g(e.sel.ranges,function(e){return new Ms(I(e.anchor.line+t,e.anchor.ch),I(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){vr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:I(i,T(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=O(e,t.from,t.to),n||(n=Wr(e,t)),e.cm?Fo(e.cm,t,r):$r(e,t,r),ko(e,n,Va)}}function Fo(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=N(de(T(r,i.line))),r.iter(l,a.line+1,function(e){if(e==o.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Oe(e),$r(r,t,n,Cn(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,function(e){var t=ye(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),ot(r,i.line),Cr(e,400);var u=t.text.length-(a.line-i.line)-1;t.full?vr(e):i.line!=a.line||1!=t.text.length||Kr(e.doc,t)?vr(e,i.line,a.line+1,u):br(e,i.line,"text");var c=Me(e,"changes"),d=Me(e,"change");if(d||c){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&_t(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Ro(e,t,n,r,o){if(r||(r=n),F(r,n)<0){var i;i=[r,n],n=i[0],r=i[1]}"string"==typeof t&&(t=e.splitLines(t)),No(e,{from:n,to:r,text:t,origin:o})}function jo(e,t,n,r){n0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=o("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ce(e,t.line,t,n,a)||t.line!=n.line&&ce(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}a.addToHistory&&oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,d=e.cm;if(e.iter(u,n.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&de(e)==d.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&L(e,0),Q(e,new Y(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){ge(e,t)&&L(t,0)}),a.clearOnEnter&&ts(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(G(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ns,a.atomic=!0),d){if(l&&(d.curOp.updateMaxLine=!0),a.collapsed)vr(d,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)br(d,p,"text");a.atomic&&xo(d.doc),_t(d,"markerAdded",d,a)}return a}function Yo(e,t,n,r,o){r=c(r),r.shared=!1;var i=[qo(e,t,n,r,o)],a=i[0],s=r.widgetNode;return Qr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),i.push(qo(e,z(e,t),z(e,n),r,o));for(var l=0;l-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var l=e.dataTransfer.getData("Text");if(l){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),ko(t.doc,Ur(n,n)),u)for(var c=0;c=0;t--)Ro(e.doc,"",r[t].from,r[t].to,"+delete");Yn(e)})}function fi(e,t,n){var r=x(e.text,t+n,n);return r<0||r>e.text.length?null:r}function hi(e,t,n){var r=fi(e,t.ch,n);return null==r?null:new I(t.line,r,n<0?"after":"before")}function mi(e,t,n,r,o){if(e){var i=Ce(n,t.doc.direction);if(i){var a,s=o<0?m(i):i[0],l=o<0==(1==s.level),u=l?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Yt(t,n);a=o<0?n.text.length-1:0;var d=Kt(t,c,a).top;a=E(function(e){return Kt(t,c,e).top==d},o<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=fi(n,a,1))}else a=o<0?s.to:s.from;return new I(r,a,u)}}return new I(r,o<0?n.text.length:0,o<0?"before":"after")}function gi(e,t,n,r){var o=Ce(t,e.doc.direction);if(!o)return hi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=ke(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=c.begin)){var f=d?"before":"after";return new I(n.line,p,f)}}var h=function(e,t,r){for(var i=function(e,t){return t?new I(n.line,l(e,1),"before"):new I(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:o.length-1,r,u(g)))?null:m}function vi(e,t){var n=T(e.doc,t),r=de(n);return r!=n&&(t=N(r)),mi(!0,e,r,t,1)}function bi(e,t){var n=T(e.doc,t),r=pe(n);return r!=n&&(t=N(r)),mi(!0,e,n,t,-1)}function yi(e,t){var n=vi(e,t.line),r=T(e.doc,n.line),o=Ce(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return I(n.line,a?0:i,n.sticky)}return n}function _i(e,t,n){if("string"==typeof t&&!(t=Ws[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=Wa}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}function wi(e,t,n){for(var r=0;r-1&&(F((o=s.ranges[o]).from(),t)<0||t.xRel>0)&&(F(o.to(),t)>0||t.xRel<0)?Ii(e,r,t,i):Ri(e,r,t,i)}function Ii(e,t,n,r){var o=e.display,i=!1,a=hr(e,function(t){_a&&(o.scroller.draggable=!1),e.state.draggingText=!1,Ee(document,"mouseup",a),Ee(document,"mousemove",s),Ee(o.scroller,"dragstart",l),Ee(o.scroller,"drop",a),i||(Ne(t),r.addNew||mo(e.doc,n,null,null,r.extend),_a||ba&&9==ya?setTimeout(function(){document.body.focus(),o.input.focus()},20):o.input.focus())}),s=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},l=function(){return i=!0};_a&&(o.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),ts(document,"mouseup",a),ts(document,"mousemove",s),ts(o.scroller,"dragstart",l),ts(o.scroller,"drop",a),Dn(e),setTimeout(function(){return o.input.focus()},20)}function Fi(e,t,n){if("char"==n)return new Ms(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ms(I(t.line,0),z(e.doc,I(t.line+1,0)));var r=n(e,t);return new Ms(r.from,r.to)}function Ri(e,t,n,r){function o(t){if(0!=F(v,t))if(v=t,"rectangle"==r.unit){for(var o=[],i=e.options.tabSize,a=d(T(u,n.line).text,n.ch,i),s=d(T(u,t.line).text,t.ch,i),l=Math.min(a,s),m=Math.max(a,s),g=Math.min(n.line,t.line),b=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=b;g++){var y=T(u,g).text,_=f(y,l,i);l==m?o.push(new Ms(I(g,_),I(g,_))):y.length>_&&o.push(new Ms(I(g,_),I(g,f(y,m,i))))}o.length||o.push(new Ms(n,n)),wo(u,Br(h.ranges.slice(0,p).concat(o),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,k=c,C=Fi(e,t,r.unit),x=k.anchor;F(C.anchor,x)>0?(w=C.head,x=U(k.from(),C.anchor)):(w=C.anchor,x=B(k.to(),C.head));var E=h.ranges.slice(0);E[p]=ji(e,new Ms(z(u,x),w)),wo(u,Br(E,p),Ga)}}function i(t){var n=++y,s=En(e,t,!0,"rectangle"==r.unit);if(s)if(0!=F(s,v)){e.curOp.focus=a(),o(s);var c=Bn(l,u);(s.line>=c.to||s.lineb.bottom?20:0;d&&setTimeout(hr(e,function(){y==n&&(l.scroller.scrollTop+=d,i(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Ne(t),l.input.focus(),Ee(document,"mousemove",_),Ee(document,"mouseup",w),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Ne(t);var c,p,h=u.sel,m=h.ranges;if(r.addNew&&!r.extend?(p=u.sel.contains(n),c=p>-1?m[p]:new Ms(n,n)):(c=u.sel.primary(),p=u.sel.primIndex),"rectangle"==r.unit)r.addNew||(c=new Ms(n,n)),n=En(e,t,!0,!0),p=-1;else{var g=Fi(e,n,r.unit);c=r.extend?ho(c,g.anchor,g.head,r.extend):g}r.addNew?-1==p?(p=m.length,wo(u,Br(m.concat([c]),p),{scroll:!1,origin:"*mouse"})):m.length>1&&m[p].empty()&&"char"==r.unit&&!r.extend?(wo(u,Br(m.slice(0,p).concat(m.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),h=u.sel):vo(u,p,c,Ga):(p=0,wo(u,new Os([c],0),Ga),h=u.sel);var v=n,b=l.wrapper.getBoundingClientRect(),y=0,_=hr(e,function(e){Fe(e)?i(e):s(e)}),w=hr(e,s);e.state.selectingText=w,ts(document,"mousemove",_),ts(document,"mouseup",w)}function ji(e,t){var n=t.anchor,r=t.head,o=T(e.doc,n.line);if(0==F(n,r)&&n.sticky==r.sticky)return t;var i=Ce(o);if(!i)return t;var a=ke(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==l||l==i.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ke(i,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);u=c==l-1||c==l?d<0:d>0}var p=i[l+(u?-1:0)],f=u==(1==p.level),h=f?p.from:p.to,m=f?"after":"before";return n.ch==h&&n.sticky==m?t:new Ms(new I(n.line,h,m),r)}function Bi(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ne(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!Me(e,n))return Pe(t);i-=s.top-a.viewOffset;for(var l=0;l=o){return Se(e,n,e,A(e.doc,i),e.options.gutters[l],t),Pe(t)}}}function Ui(e,t){return Bi(e,t,"gutterClick",!0)}function Hi(e,t){It(e.display,t)||zi(e,t)||Te(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function zi(e,t){return!!Me(e,"gutterContextMenu")&&Bi(e,t,"gutterContextMenu",!1)}function Wi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tn(e)}function Vi(e){Dr(e),vr(e),Un(e)}function Gi(e,t,n){if(!t!=!(n&&n!=$s)){var r=e.display.dragFunctions,o=t?ts:Ee;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function qi(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ra(e.display.wrapper,"CodeMirror-wrap"),_e(e)),xn(e),vr(e),tn(e),setTimeout(function(){return nr(e)},100)}function Yi(e,t){var n=this;if(!(this instanceof Yi))return new Yi(e,t);this.options=t=t?c(t):{},c(Qs,t,!1),Ir(t);var r=t.value;"string"==typeof r&&(r=new Is(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var o=new Yi.inputStyles[t.inputStyle](this),i=this.display=new S(e,r,o);i.wrapper.CodeMirror=this,Dr(this),Wi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),or(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Ba,keySeq:null,specialChars:null},t.autofocus&&!Ma&&i.input.focus(),ba&&ya<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ki(this),ni(),ir(this),this.curOp.forceUpdate=!0,Xr(this,r),t.autofocus&&!Ma||this.hasFocus()?setTimeout(u(In,this),20):Fn(this);for(var a in Xs)Xs.hasOwnProperty(a)&&Xs[a](n,t[a],$s);Hn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var o=e.display;ts(o.scroller,"mousedown",hr(e,Ni)),ba&&ya<11?ts(o.scroller,"dblclick",hr(e,function(t){if(!Te(e,t)){var n=En(e,t);if(n&&!Ui(e,t)&&!It(e.display,t)){Ne(t);var r=e.findWordAt(n);mo(e.doc,r.anchor,r.head)}}})):ts(o.scroller,"dblclick",function(t){return Te(e,t)||Ne(t)}),Fa||ts(o.scroller,"contextmenu",function(t){return Hi(e,t)});var i,a={end:0};ts(o.scroller,"touchstart",function(t){if(!Te(e,t)&&!n(t)&&!Ui(e,t)){o.input.ensurePolled(),clearTimeout(i);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),ts(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),ts(o.scroller,"touchend",function(n){var i=o.activeTouch;if(i&&!It(o,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(o.activeTouch,"page");a=!i.prev||r(i,i.prev)?new Ms(s,s):!i.prev.prev||r(i,i.prev.prev)?e.findWordAt(s):new Ms(I(s.line,0),z(e.doc,I(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ne(n)}t()}),ts(o.scroller,"touchcancel",t),ts(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Jn(e,o.scroller.scrollTop),er(e,o.scroller.scrollLeft,!0),Se(e,"scroll",e))}),ts(o.scroller,"mousewheel",function(t){return jr(e,t)}),ts(o.scroller,"DOMMouseScroll",function(t){return jr(e,t)}),ts(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){Te(e,t)||De(t)},over:function(t){Te(e,t)||(Zo(e,t),De(t))},start:function(t){return Jo(e,t)},drop:hr(e,Xo),leave:function(t){Te(e,t)||ei(e)}};var s=o.input.getField();ts(s,"keyup",function(t){return Oi.call(e,t)}),ts(s,"keydown",hr(e,Si)),ts(s,"keypress",hr(e,Mi)),ts(s,"focus",function(t){return In(e,t)}),ts(s,"blur",function(t){return Fn(e,t)})}function $i(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=Qe(e,t).state:n="prev");var a=e.options.tabSize,s=T(i,t),l=d(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=i.mode.indent(o,s.text.slice(c.length),s.text))==Wa||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?d(T(i,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",f=0;if(e.options.indentWithTabs)for(var m=Math.floor(u/a);m;--m)f+=a,p+="\t";if(f1)if(Zs&&Zs.text.join("\n")==t){if(r.ranges.length%Zs.text.length==0){l=[];for(var u=0;u=0;d--){var p=r.ranges[d],f=p.from(),h=p.to();p.empty()&&(n&&n>0?f=I(f.line,f.ch-n):e.state.overwrite&&!a?h=I(h.line,Math.min(T(i,h.line).text.length,h.ch+m(s).length)):Zs&&Zs.lineWise&&Zs.text.join("\n")==t&&(f=h=I(f.line,0))),c=e.curOp.updateInput;var v={from:f,to:h,text:l?l[d%l.length]:s,origin:o||(a?"paste":e.state.cutIncoming?"cut":"+input")};No(e.doc,v),_t(e,"inputRead",e,v)}t&&!a&&Zi(e,t),Yn(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ji(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fr(t,function(){return Xi(t,n,0,null,"paste")}),!0}function Zi(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=$i(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(T(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=$i(e,o.head.line,"smart"));a&&_t(e,"electricInput",e,o.head.line)}}}function ea(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new I(r,t.ch,t.sticky),u=T(e,r))}function a(r){var a;if(null==(a=o?gi(e.cm,u,t,n):hi(u,t,n))){if(r||!i())return!1;t=mi(o,e.cm,u,t.line,n)}else t=a;return!0}var s=t,l=n,u=T(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||a(!f);f=!1){var h=u.text.charAt(t.ch)||"\n",m=w(h,p)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||f||m||(m="s"),c&&c!=m){n<0&&(n=1,a(),t.sticky="after");break}if(m&&(c=m),n>0&&!a(!f))break}var g=To(e,t,s,l,!0);return R(s,g)&&(g.hitSide=!0),g}function oa(e,t,n,r){var o,i=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*yn(e.display),3);o=(n>0?t.bottom:t.top)+n*l}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(var u;u=pn(e,a,o),u.outside;){if(n<0?o<=0:o>=i.height){u.hitSide=!0;break}o+=5*n}return u}function ia(e,t){var n=qt(e,t.line);if(!n||n.hidden)return null;var r=T(e.doc,t.line),o=Wt(n,r,t.line),i=Ce(r,e.doc.direction),a="left";if(i){a=ke(i,t.ch)%2?"right":"left"}var s=$t(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function aa(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sa(e,t){return t&&(e.bad=!0),e}function la(e,t,n,r,o){function i(e){return function(t){return t.id==e}}function a(){c&&(u+=d,c=!1)}function s(e){e&&(a(),u+=e)}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void s(n||t.textContent.replace(/\u200b/g,""));var u,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(I(r,0),I(o+1,0),i(+p));return void(f.length&&(u=f[0].find(0))&&s(O(e.doc,u.from,u.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&a();for(var m=0;m=15&&(Ca=!1,_a=!0);var Da,Ia=La&&(wa||Ca&&(null==Pa||Pa<12.11)),Fa=ha||ba&&ya>=9,Ra=function(t,n){var r=t.className,o=e(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);t.className=r.slice(0,o.index)+(i?o[1]+i:"")}};Da=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var ja=function(e){e.select()};Ta?ja=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ba&&(ja=function(e){try{e.select()}catch(e){}});var Ba=function(){this.id=null};Ba.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ua,Ha,za=30,Wa={toString:function(){return"CodeMirror.Pass"}},Va={scroll:!1},Ga={origin:"*mouse"},qa={origin:"+move"},Ya=[""],Ka=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,$a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Qa=!1,Xa=!1,Ja=null,Za=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/;return function(n,r){var u="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!o.test(n))return!1;for(var c=n.length,d=[],p=0;p=this.string.length},cs.prototype.sol=function(){return this.pos==this.lineStart},cs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cs.prototype.next=function(){if(this.post},cs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},cs.prototype.skipToEnd=function(){this.pos=this.string.length},cs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cs.prototype.backUp=function(e){this.pos-=e},cs.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},cs.prototype.current=function(){return this.string.slice(this.start,this.pos)},cs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ds=function(e,t){this.state=e,this.lookAhead=t},ps=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};ps.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ps.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ps.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ps.fromSaved=function(e,t,n){return t instanceof ds?new ps(e,Ge(e.mode,t.state),n,t.lookAhead):new ps(e,Ge(e.mode,t),n)},ps.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ds(t,this.maxLookAhead):t};var fs=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},hs=function(e,t,n){this.text=e,re(this,t),this.height=n?n(this):1};hs.prototype.lineNo=function(){return N(this)},Le(hs);var ms,gs={},vs={},bs=null,ys=null,_s={left:0,right:0,top:0,bottom:0},ws=function(e,t,n){this.cm=n;var o=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(o),e(i),ts(o,"scroll",function(){o.clientHeight&&t(o.scrollTop,"vertical")}),ts(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&ya<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ws.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ws.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ws.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ws.prototype.zeroWidthHack=function(){var e=La&&!Ea?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ba,this.disableVert=new Ba},ws.prototype.enableZeroWidthBar=function(e,t,n){function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},ws.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ks=function(){};ks.prototype.update=function(){return{bottom:0,right:0}},ks.prototype.setScrollLeft=function(){},ks.prototype.setScrollTop=function(){},ks.prototype.clear=function(){};var Cs={native:ws,null:ks},xs=0,Es=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Bn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ut(e),this.force=n,this.dims=wn(e),this.events=[]};Es.prototype.signal=function(e,t){Me(e,t)&&this.events.push(arguments)},Es.prototype.finish=function(){for(var e=this,t=0;t=0&&F(e,o.to())<=0)return r}return-1};var Ms=function(e,t){this.anchor=e,this.head=t};Ms.prototype.from=function(){return U(this.anchor,this.head)},Ms.prototype.to=function(){return B(this.anchor,this.head)},Ms.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},zo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,o=e+t;r1||!(this.children[0]instanceof zo))){var l=[];this.collapse(l),this.children=[new zo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var s=i.lines.length%25+25,l=s;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&vr(t,o,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&xo(t.doc)),t&&_t(t,"markerCleared",t,this,o,i),n&&ar(t),this.parent&&this.parent.clear()}},As.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,o,i=0;i=0;u--)No(r,o[u]);l?_o(this,l):this.cm&&Yn(this.cm)}),undo:gr(function(){Po(this,"undo")}),redo:gr(function(){Po(this,"redo")}),undoSelection:gr(function(){Po(this,"undo",!0)}),redoSelection:gr(function(){Po(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=z(this,e),t=z(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n}),z(this,I(n,t))},indexFromPos:function(e){e=z(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)o=new I(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),I(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=T(e.doc,o.line-1).text;a&&(o=new I(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),I(o.line-1,a.length-1),o,"+transpose"))}n.push(new Ms(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return fr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==F(t,this.pos)&&n==this.button};var Ys,Ks,$s={toString:function(){return"CodeMirror.Init"}},Qs={},Xs={};Yi.defaults=Qs,Yi.optionHandlers=Xs;var Js=[];Yi.defineInitHook=function(e){return Js.push(e)};var Zs=null,el=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ba,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};el.prototype.init=function(e){function t(e){if(!Te(o,e)){if(o.somethingSelected())Qi({lineWise:!1,text:o.getSelections()}),"cut"==e.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var t=ea(o);Qi({lineWise:!0,text:t.text}),"cut"==e.type&&o.operation(function(){o.setSelections(t.ranges,0,Va),o.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Zs.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=na(),s=a.firstChild;o.display.lineSpace.insertBefore(a,o.display.lineSpace.firstChild),s.value=Zs.text.join("\n");var l=document.activeElement;ja(s),setTimeout(function(){o.display.lineSpace.removeChild(a),l.focus(),l==i&&r.showPrimarySelection()},50)}}var n=this,r=this,o=r.cm,i=r.div=e.lineDiv;ta(i,o.options.spellcheck),ts(i,"paste",function(e){Te(o,e)||Ji(e,o)||ya<=11&&setTimeout(hr(o,function(){return n.updateFromDOM()}),20)}),ts(i,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ts(i,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ts(i,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ts(i,"touchstart",function(){return r.forceCompositionEnd()}),ts(i,"input",function(){n.composing||n.readFromDOMSoon()}),ts(i,"copy",t),ts(i,"cut",t)},el.prototype.prepareSelection=function(){var e=On(this.cm,!1);return e.focus=this.cm.state.focused,e},el.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},el.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line=t.display.viewFrom&&ia(t,r)||{node:s[0].measure.map[2],offset:0},u=o.linee.firstLine()&&(r=I(r.line-1,T(e.doc,r.line-1).length)),o.ch==T(e.doc,o.line).text.length&&o.linet.viewTo-1)return!1;var i,a,s;r.line==t.viewFrom||0==(i=Sn(e,r.line))?(a=N(t.view[0].line),s=t.view[0].node):(a=N(t.view[i].line),s=t.view[i-1].node.nextSibling);var l,u,c=Sn(e,o.line);if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=N(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(la(e,s,u,a,l)),p=O(e.doc,I(a,0),I(l,T(e.doc,l).text.length));d.length>1&&p.length>1;)if(m(d)==m(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),a++}for(var f=0,h=0,g=d[0],v=p[0],b=Math.min(g.length,v.length);fr.ch&&y.charCodeAt(y.length-h-1)==_.charCodeAt(_.length-h-1);)f--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var k=I(a,f),C=I(l,p.length?m(p).length-h:0);return d.length>1||d[0]||F(k,C)?(Ro(e.doc,d,k,C,"+input"),!0):void 0},el.prototype.ensurePolled=function(){this.forceCompositionEnd()},el.prototype.reset=function(){this.forceCompositionEnd()},el.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},el.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},el.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fr(this.cm,function(){return vr(e.cm)})},el.prototype.setUneditable=function(e){e.contentEditable="false"},el.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||hr(this.cm,Xi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},el.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},el.prototype.onContextMenu=function(){},el.prototype.resetPosition=function(){},el.prototype.needsContentAttribute=!0;var tl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ba,this.hasSelection=!1,this.composing=null};tl.prototype.init=function(e){function t(e){if(!Te(o,e)){if(o.somethingSelected())Qi({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var t=ea(o);Qi({lineWise:!0,text:t.text}),"cut"==e.type?o.setSelections(t.ranges,null,Va):(r.prevInput="",a.value=t.text.join("\n"),ja(a))}"cut"==e.type&&(o.state.cutIncoming=!0)}}var n=this,r=this,o=this.cm,i=this.wrapper=na(),a=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),Ta&&(a.style.width="0px"),ts(a,"input",function(){ba&&ya>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),ts(a,"paste",function(e){Te(o,e)||Ji(e,o)||(o.state.pasteIncoming=!0,r.fastPoll())}),ts(a,"cut",t),ts(a,"copy",t),ts(e.scroller,"paste",function(t){It(e,t)||Te(o,t)||(o.state.pasteIncoming=!0,r.focus())}),ts(e.lineSpace,"selectstart",function(t){It(e,t)||Ne(t)}),ts(a,"compositionstart",function(){var e=o.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:o.markText(e,o.getCursor("to"),{className:"CodeMirror-composing"})}}),ts(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},tl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=On(e);if(e.options.moveInputWithCursor){var o=un(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},tl.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},tl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&ja(this.textarea),ba&&ya>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ba&&ya>=9&&(this.hasSelection=null))}},tl.prototype.getField=function(){return this.textarea},tl.prototype.supportsTouch=function(){return!1},tl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ma||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},tl.prototype.blur=function(){this.textarea.blur()},tl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},tl.prototype.receivedFocus=function(){this.slowPoll()},tl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},tl.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},tl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||os(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(ba&&ya>=9&&this.hasSelection===o||La&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,o.length);a1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},tl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},tl.prototype.onKeyPress=function(){ba&&ya>=9&&(this.hasSelection=null),this.fastPoll()},tl.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=o.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,i.selForContextMenu=o.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=c,a.style.cssText=u,ba&&ya<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=a.selectionStart){(!ba||ba&&ya<9)&&t();var e=0,n=function(){i.selForContextMenu==o.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?hr(o,Mo)(o):e++<10?i.detectingSelectAll=setTimeout(n,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,i=o.display,a=r.textarea,s=En(o,e),l=i.scroller.scrollTop;if(s&&!Ca){o.options.resetSelectionOnContextMenu&&-1==o.doc.sel.contains(s)&&hr(o,wo)(o.doc,Ur(s),Va);var u=a.style.cssText,c=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var d=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(_a&&(p=window.scrollY),i.input.focus(),_a&&window.scrollTo(null,p),i.input.reset(),o.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,i.selForContextMenu=o.doc.sel,clearTimeout(i.detectingSelectAll),ba&&ya>=9&&t(),Fa){De(e);var f=function(){Ee(window,"mouseup",f),setTimeout(n,20)};ts(window,"mouseup",f)}else setTimeout(n,50)}},tl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},tl.prototype.setUneditable=function(){},tl.prototype.needsContentAttribute=!1,function(e){function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,t,n){n!=$s&&o(e,t,n)}:o)}var n=e.optionHandlers;e.defineOption=t,e.Init=$s,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,qr(e)},!0),t("indentUnit",2,qr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yr(e),tn(e),vr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(I(r,i))}r++});for(var o=n.length-1;o>=0;o--)Ro(e.doc,t,n[o],I(n[o].line,n[o].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=$s&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Ma?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Aa),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Wi(e),Vi(e)},!0),t("keyMap","default",function(e,t,n){var r=di(t),o=n!=$s&&di(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,qi,!0),t("gutters",[],function(e){Ir(e.options),Vi(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?kn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return nr(e)},!0),t("scrollbarStyle","native",function(e){or(e),nr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Ir(e.options),Vi(e)},!0),t("firstLineNumber",1,Vi,!0),t("lineNumberFormatter",function(e){return e},Vi,!0),t("showCursorWhenSelecting",!1,Tn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Fn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Gi),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tn,!0),t("singleCursorHeightPerLine",!0,Tn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yr,!0),t("addModeClass",!1,Yr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Yi),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&hr(this,t[e])(this,n,o),Se(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](di(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&($i(t,i.head.line,e,!0),r=i.head.line,o==t.doc.sel.primIndex&&Yn(t));else{var a=i.from(),s=i.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=l;u0&&vo(t.doc,o,new Ms(a,c[o].to()),Va)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,I(e),t,!0)},getTokenTypeAt:function(e){e=z(this.doc,e);var t,n=$e(this,T(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=T(this.doc,e)}else r=e;return an(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-be(r):0)},defaultTextHeight:function(){return yn(this.display)},defaultCharWidth:function(){return _n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i=this.display;e=un(this,z(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(i.wrapper.clientHeight,this.doc.height),u=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(s=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Vn(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:mr(Si),triggerOnKeyPress:mr(Mi),triggerOnKeyUp:Oi,triggerOnMouseDown:mr(Ni),execCommand:function(e){if(Ws.hasOwnProperty(e))return Ws[e].call(null,this)},triggerElectric:mr(function(e){Zi(this,e)}),findPosH:function(e,t,n,r){var o=this,i=1;t<0&&(i=-1,t=-t);for(var a=z(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;o.5)&&xn(this),Se(this,"refresh",this)}),swapDoc:mr(function(e){var t=this.doc;return t.cm=null,Xr(this,e),tn(this),this.display.input.reset(),Kn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,_t(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Le(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Yi);var nl="iter insert remove copy getEditor constructor".split(" ");for(var rl in Is.prototype)Is.prototype.hasOwnProperty(rl)&&p(nl,rl)<0&&(Yi.prototype[rl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Is.prototype[rl]));return Le(Is),Yi.inputStyles={textarea:tl,contenteditable:el},Yi.defineMode=function(e){Yi.defaults.mode||"null"==e||(Yi.defaults.mode=e),Ue.apply(this,arguments)},Yi.defineMIME=He,Yi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Yi.defineMIME("text/plain","null"),Yi.defineExtension=function(e,t){Yi.prototype[e]=t},Yi.defineDocExtension=function(e,t){Is.prototype[e]=t},Yi.fromTextArea=da,function(e){e.off=Ee,e.on=ts,e.wheelEventPixels=Rr,e.Doc=Is,e.splitLines=rs,e.countColumn=d,e.findColumn=f,e.isWordChar=_,e.Pass=Wa,e.signal=Se,e.Line=hs,e.changeEnd=Hr,e.scrollbarModel=Cs,e.Pos=I,e.cmpPos=F,e.modes=ss,e.mimeModes=ls,e.resolveMode=ze,e.getMode=We,e.modeExtensions=us,e.extendMode=Ve,e.copyState=Ge,e.startState=Ye,e.innerMode=qe,e.commands=Ws,e.keyMap=zs,e.keyName=ci,e.isModifierKey=li,e.lookupKey=si,e.normalizeKeyMap=ai,e.StringStream=cs,e.SharedTextMarker=Ps,e.TextMarker=As,e.LineWidget=Ls,e.e_preventDefault=Ne,e.e_stopPropagation=Ae,e.e_stop=De,e.addClass=s,e.contains=i,e.rmClass=Ra,e.keyNames=js}(Yi),Yi.version="5.34.0",Yi})},function(e,t,n){"use strict";/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var r=function(e,t,n,r,o,i,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.col=n,this.line=t,this.text=e,this.type=r}e.exports=r,r.fromToken=function(e){return new r(e.value,e.startLine,e.startCol)},r.prototype={constructor:r,valueOf:function(){return this.toString()},toString:function(){return this.text}}},function(e,t,n){"use strict";function r(e){o.call(this),this.options=e||{},this._tokenStream=null}e.exports=r;var o=n(688),i=n(651),a=n(641),s=n(687),l=n(689),u=n(690),c=n(691),d=n(692),p=n(661),f=n(693),h=n(662),m=n(695),g=n(696),v=n(652),b=n(804);r.DEFAULT_TYPE=0,r.COMBINATOR_TYPE=1,r.MEDIA_FEATURE_TYPE=2,r.MEDIA_QUERY_TYPE=3,r.PROPERTY_NAME_TYPE=4,r.PROPERTY_VALUE_TYPE=5,r.PROPERTY_VALUE_PART_TYPE=6,r.SELECTOR_TYPE=7,r.SELECTOR_PART_TYPE=8,r.SELECTOR_SUB_PART_TYPE=9,r.prototype=function(){var e,t=new o,n={__proto__:null,constructor:r,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,n,r=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();r.peek()===v.IMPORT_SYM;)this._import(),this._skipCruft();for(;r.peek()===v.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(n=r.peek();n>v.EOF;){try{switch(n){case v.MEDIA_SYM:this._media(),this._skipCruft();break;case v.PAGE_SYM:this._page(),this._skipCruft();break;case v.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case v.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case v.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case v.DOCUMENT_SYM:this._document(),this._skipCruft();break;case v.SUPPORTS_SYM:this._supports(),this._skipCruft();break;case v.UNKNOWN_SYM:if(r.get(),this.options.strict)throw new i("Unknown @ rule.",r.LT(0).startLine,r.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+r.LT(0).value+".",line:r.LT(0).startLine,col:r.LT(0).startCol}),e=0;r.advance([v.LBRACE,v.RBRACE])===v.LBRACE;)e++;for(;e;)r.advance([v.RBRACE]),e--;break;case v.S:this._readWhitespace();break;default:if(!this._ruleset())switch(n){case v.CHARSET_SYM:throw t=r.LT(1),this._charset(!1),new i("@charset not allowed here.",t.startLine,t.startCol);case v.IMPORT_SYM:throw t=r.LT(1),this._import(!1),new i("@import not allowed here.",t.startLine,t.startCol);case v.NAMESPACE_SYM:throw t=r.LT(1),this._namespace(!1),new i("@namespace not allowed here.",t.startLine,t.startCol);default:r.get(),this._unexpectedToken(r.token())}}}catch(e){if(!(e instanceof i)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}n=r.peek()}n!==v.EOF&&this._unexpectedToken(r.token()),this.fire("endstylesheet")},_charset:function(e){var t,n,r,o,i=this._tokenStream;i.match(v.CHARSET_SYM)&&(r=i.token().startLine,o=i.token().startCol,this._readWhitespace(),i.mustMatch(v.STRING),n=i.token(),t=n.value,this._readWhitespace(),i.mustMatch(v.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:r,col:o}))},_import:function(e){var t,n,r=this._tokenStream,o=[];r.mustMatch(v.IMPORT_SYM),n=r.token(),this._readWhitespace(),r.mustMatch([v.STRING,v.URI]),t=r.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/,"$1"),this._readWhitespace(),o=this._media_query_list(),r.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:o,line:n.startLine,col:n.startCol})},_namespace:function(e){var t,n,r,o,i=this._tokenStream;i.mustMatch(v.NAMESPACE_SYM),t=i.token().startLine,n=i.token().startCol,this._readWhitespace(),i.match(v.IDENT)&&(r=i.token().value,this._readWhitespace()),i.mustMatch([v.STRING,v.URI]),o=i.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),i.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:r,uri:o,line:t,col:n})},_supports:function(e){var t,n,r=this._tokenStream;if(r.match(v.SUPPORTS_SYM)){for(t=r.token().startLine,n=r.token().startCol,this._readWhitespace(),this._supports_condition(),this._readWhitespace(),r.mustMatch(v.LBRACE),this._readWhitespace(),!1!==e&&this.fire({type:"startsupports",line:t,col:n});;)if(!this._ruleset())break;r.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endsupports",line:t,col:n})}},_supports_condition:function(){var e,t=this._tokenStream;if(t.match(v.IDENT))e=t.token().value.toLowerCase(),"not"===e?(t.mustMatch(v.S),this._supports_condition_in_parens()):t.unget();else for(this._supports_condition_in_parens(),this._readWhitespace();t.peek()===v.IDENT;)"and"!==(e=t.LT(1).value.toLowerCase())&&"or"!==e||(t.mustMatch(v.IDENT),this._readWhitespace(),this._supports_condition_in_parens(),this._readWhitespace())},_supports_condition_in_parens:function(){var e,t=this._tokenStream;t.match(v.LPAREN)?(this._readWhitespace(),t.match(v.IDENT)?(e=t.token().value.toLowerCase(),"not"===e?(this._readWhitespace(),this._supports_condition(),this._readWhitespace(),t.mustMatch(v.RPAREN)):(t.unget(),this._supports_declaration_condition(!1))):(this._supports_condition(),this._readWhitespace(),t.mustMatch(v.RPAREN))):this._supports_declaration_condition()},_supports_declaration_condition:function(e){var t=this._tokenStream;!1!==e&&t.mustMatch(v.LPAREN),this._readWhitespace(),this._declaration(),t.mustMatch(v.RPAREN)},_media:function(){var e,t,n,r=this._tokenStream;for(r.mustMatch(v.MEDIA_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),n=this._media_query_list(),r.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:n,line:e,col:t});;)if(r.peek()===v.PAGE_SYM)this._page();else if(r.peek()===v.FONT_FACE_SYM)this._font_face();else if(r.peek()===v.VIEWPORT_SYM)this._viewport();else if(r.peek()===v.DOCUMENT_SYM)this._document();else if(r.peek()===v.SUPPORTS_SYM)this._supports();else if(r.peek()===v.MEDIA_SYM)this._media();else if(!this._ruleset())break;r.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:n,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!==v.IDENT&&e.peek()!==v.LPAREN||t.push(this._media_query());e.match(v.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,n=null,r=null,o=[];if(e.match(v.IDENT)&&(n=e.token().value.toLowerCase(),"only"!==n&&"not"!==n?(e.unget(),n=null):r=e.token()),this._readWhitespace(),e.peek()===v.IDENT?(t=this._media_type(),null===r&&(r=e.token())):e.peek()===v.LPAREN&&(null===r&&(r=e.LT(1)),o.push(this._media_expression())),null===t&&0===o.length)return null;for(this._readWhitespace();e.match(v.IDENT);)"and"!==e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),o.push(this._media_expression());return new u(n,t,o,r.startLine,r.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t=this._tokenStream,n=null,r=null;return t.mustMatch(v.LPAREN),n=this._media_feature(),this._readWhitespace(),t.match(v.COLON)&&(this._readWhitespace(),e=t.LT(1),r=this._expression()),t.mustMatch(v.RPAREN),this._readWhitespace(),new l(n,r?new a(r,e.startLine,e.startCol):null)},_media_feature:function(){var e=this._tokenStream;return this._readWhitespace(),e.mustMatch(v.IDENT),a.fromToken(e.token())},_page:function(){var e,t,n=this._tokenStream,r=null,o=null;n.mustMatch(v.PAGE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),n.match(v.IDENT)&&(r=n.token().value,"auto"===r.toLowerCase()&&this._unexpectedToken(n.token())),n.peek()===v.COLON&&(o=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:r,pseudo:o,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:r,pseudo:o,line:e,col:t})},_margin:function(){var e,t,n=this._tokenStream,r=this._margin_sym();return!!r&&(e=n.token().startLine,t=n.token().startCol,this.fire({type:"startpagemargin",margin:r,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:r,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([v.TOPLEFTCORNER_SYM,v.TOPLEFT_SYM,v.TOPCENTER_SYM,v.TOPRIGHT_SYM,v.TOPRIGHTCORNER_SYM,v.BOTTOMLEFTCORNER_SYM,v.BOTTOMLEFT_SYM,v.BOTTOMCENTER_SYM,v.BOTTOMRIGHT_SYM,v.BOTTOMRIGHTCORNER_SYM,v.LEFTTOP_SYM,v.LEFTMIDDLE_SYM,v.LEFTBOTTOM_SYM,v.RIGHTTOP_SYM,v.RIGHTMIDDLE_SYM,v.RIGHTBOTTOM_SYM])?a.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(v.COLON),e.mustMatch(v.IDENT),e.token().value},_font_face:function(){var e,t,n=this._tokenStream;n.mustMatch(v.FONT_FACE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,n=this._tokenStream;n.mustMatch(v.VIEWPORT_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_document:function(){var e,t=this._tokenStream,n=[],r="";for(t.mustMatch(v.DOCUMENT_SYM),e=t.token(),/^@\-([^\-]+)\-/.test(e.value)&&(r=RegExp.$1),this._readWhitespace(),n.push(this._document_function());t.match(v.COMMA);)this._readWhitespace(),n.push(this._document_function());t.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startdocument",functions:n,prefix:r,line:e.startLine,col:e.startCol});for(var o=!0;o;)switch(t.peek()){case v.PAGE_SYM:this._page();break;case v.FONT_FACE_SYM:this._font_face();break;case v.VIEWPORT_SYM:this._viewport();break;case v.MEDIA_SYM:this._media();break;case v.KEYFRAMES_SYM:this._keyframes();break;case v.DOCUMENT_SYM:this._document();break;default:o=Boolean(this._ruleset())}t.mustMatch(v.RBRACE),e=t.token(),this._readWhitespace(),this.fire({type:"enddocument",functions:n,prefix:r,line:e.startLine,col:e.startCol})},_document_function:function(){var e,t=this._tokenStream;return t.match(v.URI)?(e=t.token().value,this._readWhitespace()):e=this._function(),e},_operator:function(e){var t=this._tokenStream,n=null;return(t.match([v.SLASH,v.COMMA])||e&&t.match([v.PLUS,v.STAR,v.MINUS]))&&(n=t.token(),this._readWhitespace()),n?p.fromToken(n):null},_combinator:function(){var e,t=this._tokenStream,n=null;return t.match([v.PLUS,v.GREATER,v.TILDE])&&(e=t.token(),n=new s(e.value,e.startLine,e.startCol),this._readWhitespace()),n},_unary_operator:function(){var e=this._tokenStream;return e.match([v.MINUS,v.PLUS])?e.token().value:null},_property:function(){var e,t,n,r,o=this._tokenStream,i=null,a=null;return o.peek()===v.STAR&&this.options.starHack&&(o.get(),t=o.token(),a=t.value,n=t.startLine,r=t.startCol),o.match(v.IDENT)&&(t=o.token(),e=t.value,"_"===e.charAt(0)&&this.options.underscoreHack&&(a="_",e=e.substring(1)),i=new c(e,a,n||t.startLine,r||t.startCol),this._readWhitespace()),i},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof i)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([v.RBRACE])!==v.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,n=[];if(null!==(e=this._selector()))for(n.push(e);t.match(v.COMMA);)this._readWhitespace(),e=this._selector(),null!==e?n.push(e):this._unexpectedToken(t.LT(1));return n.length?n:null},_selector:function(){var e=this._tokenStream,t=[],n=null,r=null,o=null;if(null===(n=this._simple_selector_sequence()))return null;for(t.push(n);;)if(null!==(r=this._combinator()))t.push(r),n=this._simple_selector_sequence(),null===n?this._unexpectedToken(e.LT(1)):t.push(n);else{if(!this._readWhitespace())break;o=new s(e.token().value,e.token().startLine,e.token().startCol),r=this._combinator(),n=this._simple_selector_sequence(),null===n?null!==r&&this._unexpectedToken(e.LT(1)):(null!==r?t.push(r):t.push(o),t.push(n))}return new f(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,n=this._tokenStream,r=null,o=[],i="",a=[function(){return n.match(v.HASH)?new m(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],s=0,l=a.length,u=null;for(e=n.LT(1).startLine,t=n.LT(1).startCol,r=this._type_selector(),r||(r=this._universal()),null!==r&&(i+=r);;){if(n.peek()===v.S)break;for(;s1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(v.DOT)?(t.mustMatch(v.IDENT),e=t.token(),new m("."+e.value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(v.IDENT)?(e=t.token(),new m(e.value,"elementName",e.startLine,e.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==v.PIPE&&e.LA(2)!==v.PIPE||(e.match([v.IDENT,v.STAR])&&(t+=e.token().value),e.mustMatch(v.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,n="";return e=this._namespace_prefix(),e&&(n+=e),t.match(v.STAR)&&(n+="*"),n.length?n:null},_attrib:function(){var e,t,n=this._tokenStream,r=null;return n.match(v.LBRACKET)?(t=n.token(),r=t.value,r+=this._readWhitespace(),e=this._namespace_prefix(),e&&(r+=e),n.mustMatch(v.IDENT),r+=n.token().value,r+=this._readWhitespace(),n.match([v.PREFIXMATCH,v.SUFFIXMATCH,v.SUBSTRINGMATCH,v.EQUALS,v.INCLUDES,v.DASHMATCH])&&(r+=n.token().value,r+=this._readWhitespace(),n.mustMatch([v.IDENT,v.STRING]),r+=n.token().value,r+=this._readWhitespace()),n.mustMatch(v.RBRACKET),new m(r+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,n=this._tokenStream,r=null,o=":";if(n.match(v.COLON)){if(n.match(v.COLON)&&(o+=":"),n.match(v.IDENT)?(r=n.token().value,e=n.token().startLine,t=n.token().startCol-o.length):n.peek()===v.FUNCTION&&(e=n.LT(1).startLine,t=n.LT(1).startCol-o.length,r=this._functional_pseudo()),!r){var a=n.LT(1).startLine,s=n.LT(0).startCol;throw new i("Expected a `FUNCTION` or `IDENT` after colon at line "+a+", col "+s+".",a,s)}r=new m(o+r,"pseudo",e,t)}return r},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(v.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(v.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([v.PLUS,v.MINUS,v.DIMENSION,v.NUMBER,v.STRING,v.IDENT,v.LENGTH,v.FREQ,v.ANGLE,v.TIME,v.RESOLUTION,v.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,n,r=this._tokenStream,o="",i=null;return r.match(v.NOT)&&(o=r.token().value,e=r.token().startLine,t=r.token().startCol,o+=this._readWhitespace(),n=this._negation_arg(),o+=n,o+=this._readWhitespace(),r.match(v.RPAREN),o+=r.token().value,i=new m(o,"not",e,t),i.args.push(n)),i},_negation_arg:function(){var e,t,n=this._tokenStream,r=[this._type_selector,this._universal,function(){return n.match(v.HASH)?new m(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo],o=null,i=0,a=r.length;for(e=n.LT(1).startLine,t=n.LT(1).startCol;i0?new d(t,t[0].line,t[0].col):null},_term:function(e){var t,n,r,o=this._tokenStream,i=null,a=null,s=null,l=null;return i=this._unary_operator(),null!==i&&(n=o.token().startLine,r=o.token().startCol),o.peek()===v.IE_FUNCTION&&this.options.ieFilters?(a=this._ie_function(),null===i&&(n=o.token().startLine,r=o.token().startCol)):e&&o.match([v.LPAREN,v.LBRACE,v.LBRACKET])?(t=o.token(),s=t.endChar,a=t.value+this._expr(e).text,null===i&&(n=o.token().startLine,r=o.token().startCol),o.mustMatch(v.type(s)),a+=s,this._readWhitespace()):o.match([v.NUMBER,v.PERCENTAGE,v.LENGTH,v.ANGLE,v.TIME,v.FREQ,v.STRING,v.IDENT,v.URI,v.UNICODE_RANGE])?(a=o.token().value,null===i&&(n=o.token().startLine,r=o.token().startCol,l=p.fromToken(o.token())),this._readWhitespace()):(t=this._hexcolor(),null===t?(null===i&&(n=o.LT(1).startLine,r=o.LT(1).startCol),null===a&&(a=o.LA(3)===v.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(a=t.value,null===i&&(n=t.startLine,r=t.startCol))),null!==l?l:null!==a?new p(null!==i?i+a:a,n,r):null},_function:function(){var e,t=this._tokenStream,n=null,r=null;if(t.match(v.FUNCTION)){if(n=t.token().value,this._readWhitespace(),r=this._expr(!0),n+=r,this.options.ieFilters&&t.peek()===v.EQUALS)do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)===v.COMMA&&(n+=t.token().value),t.match(v.IDENT),n+=t.token().value,t.match(v.EQUALS),n+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),n+=")",this._readWhitespace()}return n},_ie_function:function(){var e,t=this._tokenStream,n=null;if(t.match([v.IE_FUNCTION,v.FUNCTION])){n=t.token().value;do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)===v.COMMA&&(n+=t.token().value),t.match(v.IDENT),n+=t.token().value,t.match(v.EQUALS),n+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),n+=")",this._readWhitespace()}return n},_hexcolor:function(){var e,t=this._tokenStream,n=null;if(t.match(v.HASH)){if(n=t.token(),e=n.value,!/#[a-f0-9]{3,6}/i.test(e))throw new i("Expected a hex color but found '"+e+"' at line "+n.startLine+", col "+n.startCol+".",n.startLine,n.startCol);this._readWhitespace()}return n},_keyframes:function(){var e,t,n,r=this._tokenStream,o="";for(r.mustMatch(v.KEYFRAMES_SYM),e=r.token(),/^@\-([^\-]+)\-/.test(e.value)&&(o=RegExp.$1),this._readWhitespace(),n=this._keyframe_name(),this._readWhitespace(),r.mustMatch(v.LBRACE),this.fire({type:"startkeyframes",name:n,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=r.peek();t===v.IDENT||t===v.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=r.peek();this.fire({type:"endkeyframes",name:n,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),r.mustMatch(v.RBRACE),this._readWhitespace()},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([v.IDENT,v.STRING]),a.fromToken(e.token())},_keyframe_rule:function(){var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(v.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(v.PERCENTAGE))return a.fromToken(t.token());if(t.match(v.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return a.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([v.S,v.CDO,v.CDC]););},_readDeclarations:function(e,t){var n,r=this._tokenStream;this._readWhitespace(),e&&r.mustMatch(v.LBRACE),this._readWhitespace();try{for(;;){if(r.match(v.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!r.match(v.SEMICOLON))break}this._readWhitespace()}r.mustMatch(v.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof i)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(n=r.advance([v.SEMICOLON,v.RBRACE]))===v.SEMICOLON)this._readDeclarations(!1,t);else if(n!==v.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(v.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new i("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!==v.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){b.validate(e,t)},parse:function(e){this._tokenStream=new g(e,v),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new g(e,v);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new g(e,v),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new g(e,v),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new g(e,v),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new g(e,v),this._readDeclarations()}};for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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)}var a=n(0),s=n.n(a),l=n(7),u=n.n(l),c=n(6),d=n.n(c),p=n(24),f=(n.n(p),n(811)),h=n(19),m=n(11),g=(n(27),n(5)),v=(n.n(g),n(190)),b=n(1),y=(n(22),n(25)),_=n(65),w=n(30),k=n.n(w),C=n(46),x=n.n(C),E=n(91),S=n.n(E),T=n(3),O=n.n(T),M=n(17),L=n.n(M),N=n(23),A=n.n(N),P=n(87),D=n.n(P),I=n(29),F=n.n(I),R=n(110),j=n.n(R),B=n(13),U=n.n(B),H=n(38),z=n.n(H),W=n(47),V=n.n(W),G=n(144),q=n.n(G),Y=n(284),K=n.n(Y),$=n(18),Q=n.n($),X=n(4),J=n.n(X),Z=n(285),ee=n.n(Z),te=n(31),ne=n.n(te),re=n(12),oe=n.n(re),ie=n(20),ae=n.n(ie),se=n(51),le=n.n(se),ue=n(812),ce=(n.n(ue),function(){function e(e,t){for(var n=0;n500?500:r;var f=r>a?a-100:r;l.length>0&&(d=l.position().top),p=s.top-i-d;var h=a-p-d-100;h=3&&(t=ee()(t)),t=q()([e],t));var n="https:"===window.location.protocol,r=this.props.recentCategory?this.props.recentCategory:this.props.name;wpCookies.set("et-pb-recent-items-"+r,t.join("|"),31536e6,ETBuilderBackend.cookie_path,!1,n),this.setState({recentItems:t})}}},{key:"getRecentItems",value:function(){if(!this.props.displayRecent)return[];var e=this.props.recentCategory?this.props.recentCategory:this.props.name,t=wpCookies.get("et-pb-recent-items-"+e);if(t=O()(t)||ne()(t)?[]:t.split("|"),U()(t))return[];var n=!O()(this.props.additionalOptions)&&!U()(this.props.additionalOptions)&&this.props.additionalOptions,r=[],o=L()(this.props.options)?this.props.options:F()(this.props.options);!1!==n&&ae()(n,function(e,t){U()(e)||ae()(e,function(e,t){var n=S()(t)?e:t;r.push(n)})});var i=q()(r,o),a=[];return ae()(t,function(e){Q()(i,e)&&a.push(e)}),a}},{key:"isSelectedOption",value:function(e,t){return t===this.getSelectedOption()}},{key:"getOptionMarker",value:function(e){return!U()(this.state.recentItems)&&Q()(this.state.recentItems,e)?"recent":!O()(this.props.additionalOptions)&&!U()(this.props.additionalOptions)&&K()(this.props.additionalOptions,function(t){return Q()(t,e)})}},{key:"_renderSearchField",value:function(){if(!this.props.searchable||!this.state.active)return!1;var e=this.props.searchPlaceholder?this.props.searchPlaceholder:pe.typeToSearch;return s.a.createElement("li",{className:"et-fb-select-options-filter select-option-item"},s.a.createElement(v.a,{type:"text",value:this.state.filterValue,name:"filterOptions",_onChange:this._onFilterInput,additional_attrs:{placeholder:e}}))}},{key:"_onFilterInput",value:function(e,t){this.setState({filterValue:t})}},{key:"deleteFont",value:function(e){this.setState({deleteConfirmation:e})}},{key:"confirmFontRemove",value:function(){h.a.deleteFont(this.state.deleteConfirmation)}},{key:"cancelFontRemove",value:function(){this.setState({deleteConfirmation:""})}},{key:"openFontUploader",value:function(){h.a.setFontUploaderStatus("enabled","add","",this.fonUploaderFinishedCallback),this._closeMenu()}},{key:"fonUploaderFinishedCallback",value:function(e){this._onChange("",e)}},{key:"getSelectedOption",value:function(){var e=this.props.options,t=!Object(b.d)(this.props.value)&&Object(b.d)(this.props.default)?this.props.default:this.props.value;return(O()(t)||""===t)&&(t=L()(e)?e[0]:K()(e,function(e){return!U()(e)})),t}},{key:"_renderActiveOption",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(this.state.active&&(!this.props.searchable||""!==this.state.filterValue))return!1;var n=this.getSelectedOption(),r=L()(e)?{0:n}:D()(e,this.isSelectedOption);if(!U()(r)){var o=F()(r)[0],i=j()(r)[0],a=L()(e)?i:o,l=o,u="";""!==t&&(l=t+"-"+l),x()(i)||"et_pb_social_media_follow_network"!==oe()(this.props,"module.props.module.props.type","")||(i=i.value),"divider"===this.props.type&&(u=this._renderDividerSVG(this.props.name,!0,oe()(this.props.additionalProps,"dividerFlip"),l));var c=s.a.createElement(f.a,{key:l,additionalContent:u,value:a,name:i,isMenuActive:this.state.active,selectedOption:n,_onChange:this._onChange,_setHoveredItem:this.updateActiveItemIndex,_resetHoveredItem:this.resetHoveredItem,itemIndex:0,isItemHovered:!1,_closeMenu:this._closeMenu,displayCheckMark:!0,customMarker:"menuArrow"});return this.state.active?s.a.createElement("li",{className:"et-fb-option-subgroup",key:l},s.a.createElement("ul",null,c)):c}return!1}},{key:"_renderAdditionalOptions",value:function(){var e=this,t=this.props.displayRecent?{recent:this.state.recentItems}:{};return t=O()(this.props.additionalOptions)||U()(this.props.additionalOptions)?t:J()(t,this.props.additionalOptions),!(!this.state.active||U()(t))&&k()(t,function(t,n){if(U()(t)&&"uploaded"!==n||"recent"===n&&""!==e.state.filterValue)return!1;var r=k()(t,function(t,r){if(-1!==t.toLowerCase().indexOf(e.state.filterValue.toLowerCase())){var o=S()(r)?t:r,i=n+"-"+o,a=!("uploaded"!==n||!m.a.isAllowedAction("custom_fonts_management"))&&e.deleteFont,l=!("uploaded"===n&&!m.a.isAllowedAction("custom_fonts_management"))&&n,u="",c="";e.state.deleteConfirmation&&"uploaded"===n&&""===e.state.filterValue&&t===e.state.deleteConfirmation&&(l=!1,c="et-fb-font-removal-activated",u=s.a.createElement("div",{className:"et-fb-select-additional-content-container et-fb-delete-font-confirmation"},s.a.createElement("div",{className:"et-fb-delete-font-confirmation-message"},de.confirmAction),s.a.createElement("div",{className:"et-fb-delete-font-confirmation-buttons"},s.a.createElement("span",{className:"et-fb-delete-font-button et-fb-delete-font-cancel",onClick:e.cancelFontRemove},de.cancel),s.a.createElement("span",{className:"et-fb-delete-font-button et-fb-delete-font-confirm",onClick:e.confirmFontRemove},de.delete)))),e.itemIndex++;var d=e.state.hoveredItemIndex===e.itemIndex&&"divider"!==e.props.type;return s.a.createElement(f.a,{key:i,value:o,name:t,isMenuActive:e.state.active,selectedOption:"",_onChange:e._onChange,_setHoveredItem:e.updateActiveItemIndex,_resetHoveredItem:e.resetHoveredItem,itemIndex:e.itemIndex,isItemHovered:d,_closeMenu:e._closeMenu,displayCheckMark:!1,customMarker:l,customMarkerAction:a,hoverAction:e.props._hoverAction,additionalContent:u,classNames:c})}});if(""!==e.state.filterValue)return r;var o="uploaded"===n&&m.a.isAllowedAction("custom_fonts_management")?s.a.createElement(y.a,{className:"et-fb-upload-font",_onClick:e.openFontUploader},de.upload):"",i=oe()(pe,["subgroups",n],n),a=U()(t)?"":s.a.createElement("p",{className:"et-fb-subgroup-title"},i),l={"et-fb-option-subgroup":!0,"et-fb-option-subgroup-empty":U()(t)};return s.a.createElement("li",{className:d()(l),key:n},a,s.a.createElement("ul",null,r),o)})}},{key:"_render_options",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.state.active)return!1;var r=this.getSelectedOption();return k()(e,function(e,o){var i=S()(o)?e:o,a=i,l="";if(""!==n&&(a=n+"-"+i),x()(e)||"et_pb_social_media_follow_network"!==oe()(t.props,"module.props.module.props.type","")||(e=e.value),"divider"===t.props.type&&"none"!==i&&(l=t._renderDividerSVG(t.props.name,r===i,oe()(t.props.additionalProps,"dividerFlip"),i)),-1!==e.toLowerCase().indexOf(t.state.filterValue.toLowerCase())){t.itemIndex++;var u=""!==t.state.filterValue&&t.getOptionMarker(i),c=t.state.hoveredItemIndex===t.itemIndex&&"divider"!==t.props.type||t.state.hoveredItemIndex===t.itemIndex&&1===t.itemIndex;return s.a.createElement(f.a,{key:a,additionalContent:l,value:i,name:e,isMenuActive:t.state.active,selectedOption:r,_onChange:t._onChange,_setHoveredItem:t.updateActiveItemIndex,_resetHoveredItem:t.resetHoveredItem,itemIndex:t.itemIndex,isItemHovered:c,_closeMenu:t._closeMenu,displayCheckMark:!0,customMarker:u,hoverAction:t.props._hoverAction})}})}},{key:"toggleMenu",value:function(e){jQuery(e.target).closest(".et-fb-select-options-filter, .et-fb-upload-font, .et-fb-icon--delete, .et-fb-font-removal-activated").length>0||this.setState({active:!this.state.active,deleteConfirmation:"",filterValue:""})}},{key:"maybeCloseMenu",value:function(e){jQuery(e.target).closest(jQuery(u.a.findDOMNode(this))).length<1&&this._closeMenu()}},{key:"_performScrolling",value:function(e){var t="down"===e?"+=26":"-=26";jQuery(u.a.findDOMNode(this)).find(".et-fb-settings-option-select").animate({scrollTop:t},0)}},{key:"maybeNavigate",value:function(e){if(Q()([38,40,13],e.keyCode)){13===e.keyCode&&(-1!==this.state.hoveredItemIndex&&this.state.hoveredItemValue&&this._onChange(e,this.state.hoveredItemValue),this._closeMenu());var t=V()(this.props.options),n=-1===this.state.hoveredItemIndex?this.state.lastHoveredItem:this.state.hoveredItemIndex;40===e.keyCode&&(n=n===t?t:n+1,this._performScrolling("down"),event.preventDefault()),38===e.keyCode&&(n=n<=0?0:n-1,this._performScrolling("up"),event.preventDefault()),this.updateActiveItemIndex(n)}}},{key:"updateActiveItemIndex",value:function(e,t){var n=!O()(t)&&t;this.setState({hoveredItemIndex:e,hoveredItemValue:n})}},{key:"_onChange",value:function(e,t,n){var r=this;if(this.props.displayRecent&&this.updateRecentItems(t),O()(this.props.__onChange)){var o=this.props.name,i=this.props.overwrite_onchange,a=this.props.value_overwrite,s=O()(t)?e.target.value:t;this.props._onChange(o,s),!O()(i)&&L()(i)&&!O()(a)&&A()(a)&&k()(this.props.overwrite_onchange,function(e){O()(a[s])||h.a.moduleSettingsChange(r.props.module.props.module,e,a[s])})}else this.props.__onChange(t);n&&this._closeMenu()}},{key:"_onChangeAdditional",value:function(){this._closeMenu()}},{key:"_closeMenu",value:function(){this.setState({active:!1,deleteConfirmation:""})}},{key:"resetHoveredItem",value:function(){var e=this.state.hoveredItemIndex;this.setState({hoveredItemIndex:-1,lastHoveredItem:e})}},{key:"render",value:function(){var e=this,t=this.state.active?s.a.createElement("div",{className:"et-fb-settings-option-select-advanced-placeholder"}):"",n=m.a.getAppPreference("builder_animation"),r=void 0,o=void 0,i=void 0,a=void 0,l={};this.itemIndex=0;var u={"et-fb-settings-option-select":!0,"et-fb-allow-mouse-wheel":this.state.active,"et-fb-settings-option-select-advanced":!0},c={"et-fb-settings-custom-select-wrapper":!0,"et-fb-settings-option-select-active":this.state.active,"et-fb-settings-option-select-closed":!this.state.active,"et-fb-settings-option-select-searchable":this.state.active&&this.props.searchable};this.props.className?u[this.props.className]=!0:u["et-fb-main-setting"]=!0,o=this._renderActiveOption(this.props.options),i=this._renderAdditionalOptions(),r=this._render_options(this.props.options),a=this._renderSearchField(),this.state.active&&(l.top=this.state.menuPosition,l.width=this.state.menuWidth);var f=this.state.active?s.a.createElement(p.Motion,{defaultStyle:{size:.5,opacity:0},style:{size:n?Object(p.spring)(1,{stiffness:300,damping:20}):1,opacity:n?Object(p.spring)(1,{stiffness:300,damping:20}):1}},function(t){return s.a.createElement("ul",{className:d()(u),style:le()(J()({maxHeight:e.state.menuHeight},{opacity:t.opacity,transform:"scale( "+t.size+" )"}))},s.a.createElement("li",{className:"et-fb-settings-custom-select-wrapper-inner et-fb-allow-mouse-wheel-form"},s.a.createElement("ul",null,a,o,i,r)))}):s.a.createElement("ul",{className:d()(u),style:{maxHeight:this.state.menuHeight}},o);return s.a.createElement("div",null,t,s.a.createElement("div",{id:"et-fb-"+this.props.name,className:d()(c),style:l,onClick:this.toggleMenu},f))}}]),t}(s.a.Component);t.a=fe},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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)}var a=n(0),s=n.n(a),l=n(2),u=n.n(l),c=n(6),d=n.n(c),p=n(5),f=n.n(p),h=n(34),m=n.n(h),g=n(3),v=n.n(g),b=n(709),y=(n.n(b),function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,r=t.clientOffset,o=t.getSourceClientOffset;(0,d.default)((0,f.default)(e),"Expected sourceIds to be an array.");var i=this.getMonitor(),a=this.getRegistry();(0,d.default)(!i.isDragging(),"Cannot call beginDrag while dragging.");for(var s=0;s=0;u--)if(i.canDragSource(e[u])){l=e[u];break}if(null!==l){var c=null;r&&((0,d.default)("function"==typeof o,"When clientOffset is provided, getSourceClientOffset must be a function."),c=o(l));var p=a.getSource(l),h=p.beginDrag(i,l);(0,d.default)((0,m.default)(h),"Item must be an object."),a.pinSource(l);var g=a.getSourceType(l);return{type:b,itemType:g,item:h,sourceId:l,clientOffset:r,sourceClientOffset:c,isSourcePublic:n}}}function i(){if(this.getMonitor().isDragging())return{type:y}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,r=void 0===n?null:n;(0,d.default)((0,f.default)(e),"Expected targetIds to be an array.");var o=e.slice(0),i=this.getMonitor(),a=this.getRegistry();(0,d.default)(i.isDragging(),"Cannot call hover while not dragging."),(0,d.default)(!i.didDrop(),"Cannot call hover after drop.");for(var s=0;s=0;p--){var h=o[p],m=a.getTargetType(h);(0,v.default)(m,c)||o.splice(p,1)}for(var g=0;g0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),r=this.getRegistry();(0,d.default)(n.isDragging(),"Cannot call drop while not dragging."),(0,d.default)(!n.didDrop(),"Cannot call drop twice during one drag operation.");var o=n.getTargetIds().filter(n.canDropOnTarget,n);o.reverse(),o.forEach(function(o,i){var a=r.getTarget(o),s=a.drop(n,o);(0,d.default)(void 0===s||(0,m.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===i?{}:n.getDropResult()),e.store.dispatch({type:w,dropResult:u({},t,s)})})}function l(){var e=this.getMonitor(),t=this.getRegistry();(0,d.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,!0).endDrag(e,n),t.unpinSource(),{type:k}}Object.defineProperty(t,"__esModule",{value:!0}),t.END_DRAG=t.DROP=t.HOVER=t.PUBLISH_DRAG_SOURCE=t.BEGIN_DRAG=void 0;var u=Object.assign||function(e){for(var t=1;t.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value),N.a.addPreviewModeListener(this._onPreviewModeChange)},componentDidUpdate:function(e){(this.props.previewMode&&this.props.previewMode!==e.previewMode||this.props.value!==e.value)&&this.setState({value:this.emptyIfDefault(this.getCurrentInputValue())})},componentWillUnmount:function(){this.deferredUpdate.cancel(),N.a.removePreviewModeListener(this._onPreviewModeChange)},_onPreviewModeChange:function(){var e="zoom"===N.a.getPreviewMode()?"desktop":N.a.getPreviewMode(),t=["desktop","tablet","phone"];y()(t,e)&&this.setState({activeTab:e,value:this.getCurrentInputValue(e)})},getCurrentInputValue:function(e){var t="";if(this.hasMobileOptions()){var n="desktop";this.getActiveTab("tablet")&&this.getValue("isResponsive")&&(n="tablet"),this.getActiveTab("phone")&&this.getValue("isResponsive")&&(n="phone"),t=this.getValue(n,e)}else t=this.props.value;return d()(t)?"":t},getDefaultValue:function(e){var t=M()(this,"props.allow_empty",!1)?void 0:14,n=M()(this,"props.additionalAttrs.getDefaultFrom",!1),r=M()(this,"props.default_values_mapping",!1),o=this.props.shortcode_default||this.props.default;return n&&r&&(o=M()(r,n,o)),!d()(e)&&y()(["tablet","phone"],e)&&T()(this,"props.default_"+e)&&(o=M()(this,"props.default_"+e)),L.a.hasValue(o)?o:t},getValues:function(){var e=this,t=["desktop","tablet","phone"],n=this.props.value;return v()(n)?n:(w()(n,function(r,o){y()(t,o)&&L.a.hasValue(o)?n[o]=L.a.hasValue(r)?r:e.getDefaultValue(o):"activeTab"===o&&(n.activeTab=y()(t,r)?r:"desktop")}),n)},getValue:function(e){var t=this.getValues(),n=d()(t)||d()(t[e])?"":t[e];if(""===n&&!d()(t))switch(e){case"tablet":n=t.desktop;break;case"phone":n=d()(t.tablet)||""===t.tablet?t.desktop:t.tablet}return n},getActiveTab:function(e){var t="zoom"===N.a.getPreviewMode()?"desktop":M()(this,"state.activeTab");return this.hasResponsiveValue()?e===t:e===this.getValue("activeTab")},getPropsNameSuffix:function(){var e=this.state.activeTab;return!y()(["zoom","wireframe","desktop"],e)&&this.hasResponsiveValue()?"_"+e:""},getPropsNameLastEdited:function(){return this.props.name+"_last_edited"},getPropsValueLastEdited:function(e,t){var n=e?"on":"off",t=e?t:"desktop";return n+"|"+t},emptyIfDefault:function(e){return e===this.getDefaultValue()?"":e},isFixedUnit:function(){return L.a.hasValue(this.props.fixed_unit)},isValidateUnit:function(){return!1!==this.props.validate_unit},hasMobileOptions:function(){return L.a.hasValue(this.props.mobile_options)},hasResponsiveValue:function(){return this.hasMobileOptions()&&m()(this.props.value)&&this.props.value.isResponsive},validateValue:function(e){var t=this.getValue("activeTab"),n=this.hasMobileOptions()?this.getValue(t):this.props.value,r=this.isChangingRange?A.a.getUnit(n):A.a.getUnit(e),o=this.isFixedUnit()?this.props.fixed_unit:r,i=this.isValidateUnit()&&!0!==this.props.unitless?o:"";return A.a.sanitizeInputUnit(E()(parseFloat(e)),!1,i)},toggleResponsive:function(e){e.preventDefault();var t=!this.getValue("isResponsive"),n=t?this.getValue("activeTab"):"desktop";t||(n="desktop"),this.props._onChange(this.getPropsNameLastEdited(),this.getPropsValueLastEdited(t,n))},reset:function(e){e.preventDefault(),this.updateOptionAndState("")},changeTab:function(e){var t=this.getValue("isResponsive"),n=e.target.getAttribute("data-tab"),r=N.a.getPreviewMode();this.setState({activeTab:n,value:this.getCurrentInputValue(n)}),"wireframe"!==r&&I.a.switchResponsiveMode(n),this.props._onChange(this.getPropsNameLastEdited(),this.getPropsValueLastEdited(t,n))},inputsWrap:function(e){var t="et-fb-"+this.props.name,n=this.props.name,r=this.props.mobile_options?this.getValue(e):this.props.value;m()(r)&&!d()(r.desktop)&&(r=r.desktop),r=this.state.value;var i=d()(this.getDefaultValue())?"0":this.getDefaultValue(),a=""===r?i:r;return o.a.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o.a.createElement("input",{id:t,name:n,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.state.rangeStep,className:"et-fb-range",value:parseFloat(a),"data-tab":e,onChange:this._updateFromRange}),o.a.createElement("input",{id:t+"-number",name:n+"-name",type:"text",className:"et-fb-range-number et-fb-settings-option-input",value:this.state.value,"data-tab":e,onBlur:this._onBlur,onChange:C.a,onInput:this._onInput,onKeyPress:this._onKeyPress,placeholder:this.getDefaultValue()}))},render:function(){var e=this.getActiveTab("desktop")?"active":"",t=this.getActiveTab("tablet")?"active":"",n=this.getActiveTab("phone")?"active":"",r=this.getValue("activeTab"),i=this.getDefaultValue(r),a=this.hasMobileOptions()?this.getValue(r):this.props.value,s="",l="",c="",d="",p="",f="",h={"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0};return this.hasMobileOptions()&&(h["et-fb-settings-option-inner-responsive"]=!0),this.getValue("isResponsive")&&(h["et-fb-settings-option-inner-responsive--active"]=!0),this.getValue("isResponsive")&&(s=o.a.createElement("ul",{className:"et-fb-settings-option-responsive-tab-nav"},o.a.createElement("li",{className:e,"data-tab":"desktop",onClick:this.changeTab},"Desktop"),o.a.createElement("li",{className:t,"data-tab":"tablet",onClick:this.changeTab},"Tablet"),o.a.createElement("li",{className:n,"data-tab":"phone",onClick:this.changeTab},"Smartphone"))),!this.getActiveTab("desktop")&&this.hasResponsiveValue()||(l=this.inputsWrap("desktop")),this.getActiveTab("tablet")&&this.getValue("isResponsive")&&(c=this.inputsWrap("tablet")),this.getActiveTab("phone")&&this.getValue("isResponsive")&&(d=this.inputsWrap("phone")),a&&a!==i&&(p=o.a.createElement("button",{className:"et-fb-settings-option-button--reset",onClick:this.reset})),this.hasMobileOptions()&&(f=o.a.createElement("button",{className:"et-fb-settings-option-button--responsive",onClick:this.toggleResponsive})),o.a.createElement("div",{className:u()(h)},s,l,c,d,f,p)},updateOptionAndState:function(e){e=d()(e)?this.state.value:e;var t=this.validateValue(e);this.setState({value:this.emptyIfDefault(t)}),this.props._onChange(this.props.name+this.getPropsNameSuffix(),t,this.props.type)},_updateFromRange:function(e){this.isChangingRange=!0,this.updateOptionAndState(e.target.value),this.isChangingRange=!1,this.checkAnimationReset()},_onInput:function(e){var t=e.target.value;this.checkRangeBoundaries(t),this.setState({value:t}),this.deferredUpdate.cancel(),this.deferredUpdate(),this.checkAnimationReset()},_onBlur:function(e){this.updateOptionAndState(e.target.value)},_onKeyPress:function(e){13===e.charCode&&L.a.hasValue(this.props.fixed_unit)&&this.updateOptionAndState()},checkAnimationReset:function(){if(!1!==M()(this.props,"reset_animation",!1)){var e=N.a.getActiveModule();if(e){var t=M()(e,"refs.module");if(t||(t=M()(e,"_row")),t||(t=M()(e,"_section")),t){var n=M()(e,"props.attrs.animation_style","none");if("none"!==n){var r=M()(e,"props.attrs.animation_direction","");"center"===r&&(r="");var o=n;""!==r&&"fade"!==o&&(o=o+r[0].toUpperCase()+r.slice(1)),t.classList.remove(o),setTimeout(function(){t.classList.add(o)},0)}}}}},checkRangeBoundaries:function(e){if(L.a.hasValue(e)){var t=parseFloat(e);t>this.state.rangeMax&&this.setState({rangeMax:t}),t.1&&t%1>0&&this.setState({rangeStep:"0.1"})}}}));t.a=R},function(e,t,n){"use strict";function r(e,t,n){Error.call(this),this.name=this.constructor.name,this.col=n,this.line=t,this.message=e}e.exports=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r},function(e,t,n){"use strict";var r=e.exports=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"SUPPORTS_SYM",text:"@supports"},{name:"VIEWPORT_SYM",text:["@viewport","@-ms-viewport","@-o-viewport"]},{name:"DOCUMENT_SYM",text:["@document","@-moz-document"]},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",endChar:"}",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",endChar:"]",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",endChar:")",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];!function(){var e=[],t=Object.create(null);r.UNKNOWN=-1,r.unshift({name:"EOF"});for(var n=0,o=r.length;n1&&void 0!==arguments[1]?arguments[1]:"";return y()(e,function(e,r){var o=r;return""!==n&&(o=n+"-"+r),w()(e)||"et_pb_social_media_follow_network"!==t.props.module.props.module.props.type||(e=e.value),s.a.createElement(p.a,{key:o,value:r,name:e})})}},{key:"render",value:function(){var e=this,t=!Object(v.d)(this.props.value)&&Object(v.d)(this.props.default)?this.props.default:this.props.value,n=void 0,r={"et-fb-settings-option-select":!0};return this.props.className?r[this.props.className]=!0:r["et-fb-main-setting"]=!0,n=this.props.groups?y()(this.props.options,function(t,n){return"0"===n?e._render_options(t,n):s.a.createElement(g.a,{label:n,key:"option-group-"+n},e._render_options(t,n))}):this._render_options(this.props.options),s.a.createElement("select",{className:d()(r),value:t,name:this.props.name,id:"et-fb-"+this.props.name,onChange:this._onChange},n)}},{key:"_onChange",value:function(e){var t=this,n=this.props.name,r=this.props.overwrite_onchange,o=this.props.value_overwrite,i=this.getGroupForSelected(),a=e.target.value;Object(v.d)(i)&&(a=i+"|"+a),this.props._onChange(n,a),!C()(r)&&E()(r)&&!C()(o)&&T()(o)&&y()(this.props.overwrite_onchange,function(e){C()(o[a])||f.a.moduleSettingsChange(t.props.module.props.module,e,o[a])})}}]),t}(s.a.Component);t.a=L},function(e,t,n){"use strict";/** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,c=u&&u(Object);e.exports=function e(t,n,d){if("string"!=typeof n){if(c){var p=u(n);p&&p!==c&&e(t,p,d)}var f=a(n);s&&(f=f.concat(s(n)));for(var h=0;h=s;o--,i=-1){var l=e.getLine(o);i>-1&&(l=l.slice(0,i));var u=a(l,t);if(u)return{from:m(o,u.index),to:m(o,u.index+u[0].length),match:u}}}function l(e,t,r){t=n(t);for(var o,i=1,s=r.line,l=e.firstLine();s>=l;){for(var u=0;u>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?i=a:o=a+1}}function c(e,t,n,r){if(!t.length)return null;var o=r?f:h,i=o(t).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,l=e.lastLine()+1-i.length;a<=l;a++,s=0){var c=e.getLine(a).slice(s),d=o(c);if(1==i.length){var p=d.indexOf(i[0]);if(-1==p)continue e;var n=u(c,d,p,o)+s;return{from:m(a,u(c,d,p,o)+s),to:m(a,u(c,d,p+i[0].length,o)+s)}}var g=d.length-i[0].length;if(d.slice(g)==i[0]){for(var v=1;v=l;a--,s=-1){var c=e.getLine(a);s>-1&&(c=c.slice(0,s));var d=o(c);if(1==i.length){var p=d.lastIndexOf(i[0]);if(-1==p)continue e;return{from:m(a,u(c,d,p,o)),to:m(a,u(c,d,p+i[0].length,o))}}var g=i[i.length-1];if(d.slice(0,g.length)==g){for(var v=1,n=a-i.length+1;v0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)})})},function(e,t,n){ // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE !function(e){e(n(639))}(function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=a,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function i(e){return function(t,n){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(n.tokenize=null),r("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),r(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(!1===r?0:g),e.context),n}function u(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,n){return N[n.context.type](e,t,n)}function d(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return c(e,t,n)}function p(e){var t=e.current().toLowerCase();m=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var h,m,g=t.indentUnit,v=n.tokenHooks,b=n.documentTypes||{},y=n.mediaTypes||{},_=n.mediaFeatures||{},w=n.mediaValueKeywords||{},k=n.propertyKeywords||{},C=n.nonStandardPropertyKeywords||{},x=n.fontProperties||{},E=n.counterDescriptors||{},S=n.colorKeywords||{},T=n.valueKeywords||{},O=n.allowNested,M=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return u(n);if(L&&/@component/i.test(e))return l(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return l(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return l(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(O&&"("==e)return l(n,t,"parens")}return n.context.type},N.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return k.hasOwnProperty(r)?(m="property","maybeprop"):C.hasOwnProperty(r)?(m="string-2","maybeprop"):O?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":O||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(m="error","block")},N.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):c(e,t,n)},N.prop=function(e,t,n){if(";"==e)return u(n);if("{"==e&&O)return l(n,t,"propBlock");if("}"==e||"{"==e)return d(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return l(n,t,"interpolation")}else m+=" error";return"prop"},N.propBlock=function(e,t,n){return"}"==e?u(n):"word"==e?(m="property","maybeprop"):n.context.type},N.parens=function(e,t,n){return"{"==e||"}"==e?d(e,t,n):")"==e?u(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&p(t),"parens")},N.pseudo=function(e,t,n){return"meta"==e?"pseudo":"word"==e?(m="variable-3",n.context.type):c(e,t,n)},N.documentTypes=function(e,t,n){return"word"==e&&b.hasOwnProperty(t.current())?(m="tag",n.context.type):N.atBlock(e,t,n)},N.atBlock=function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,n);if("{"==e)return u(n)&&l(n,t,O?"block":"top");if("interpolation"==e)return l(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();m="only"==r||"not"==r||"and"==r||"or"==r?"keyword":y.hasOwnProperty(r)?"attribute":_.hasOwnProperty(r)?"property":w.hasOwnProperty(r)?"keyword":k.hasOwnProperty(r)?"property":C.hasOwnProperty(r)?"string-2":T.hasOwnProperty(r)?"atom":S.hasOwnProperty(r)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(e,t,n){return"}"==e?d(e,t,n):"{"==e?u(n)&&l(n,t,O?"block":"top",!1):("word"==e&&(m="error"),n.context.type)},N.atBlock_parens=function(e,t,n){return")"==e?u(n):"{"==e||"}"==e?d(e,t,n,2):N.atBlock(e,t,n)},N.restricted_atBlock_before=function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(m="variable","restricted_atBlock_before"):c(e,t,n)},N.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,u(n)):"word"==e?(m="@font-face"==n.stateArg&&!x.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!E.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,n){return"word"==e?(m="variable","keyframes"):"{"==e?l(n,t,"top"):c(e,t,n)},N.at=function(e,t,n){return";"==e?u(n):"{"==e||"}"==e?d(e,t,n):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},N.interpolation=function(e,t,n){return"}"==e?u(n):"{"==e||";"==e?d(e,t,n):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new s(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||o)(e,t);return n&&"object"==typeof n&&(h=n[1],n=n[0]),m=n,"comment"!=h&&(t.state=N[t.state](h,e,t)),m},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-g)):(n=n.prev,o=n.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:M,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],o=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=t(s),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=t(u),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=t(f),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],b=t(v),y=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],_=t(y),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(w),C=r.concat(i).concat(s).concat(u).concat(d).concat(f).concat(y).concat(w);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:o,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:b,colorKeywords:_,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:_,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:_,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:a,mediaFeatures:l,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:b,colorKeywords:_,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css",helperType:"gss"})})},function(e,t,n){"use strict";function r(e,t,n,s){var l=s||{};o.call(this,e,t,n,a.PROPERTY_VALUE_PART_TYPE),this.type="unknown";var u;if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(e))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vmax":case"vmin":this.type="length";break;case"fr":this.type="grid";break;case"deg":case"rad":case"grad":case"turn":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}else/^([+\-]?[\d\.]+)%$/i.test(e)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(e)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(e)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(e)?(this.type="color",u=RegExp.$1,3===u.length?(this.red=parseInt(u.charAt(0)+u.charAt(0),16),this.green=parseInt(u.charAt(1)+u.charAt(1),16),this.blue=parseInt(u.charAt(2)+u.charAt(2),16)):(this.red=parseInt(u.substring(0,2),16),this.green=parseInt(u.substring(2,4),16),this.blue=parseInt(u.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(e)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\(("([^\\"]|\\.)*")\)/i.test(e)?(this.type="uri",this.uri=r.parseString(RegExp.$1)):/^([^\(]+)\(/i.test(e)?(this.type="function",this.name=RegExp.$1,this.value=e):/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(e)?(this.type="string",this.value=r.parseString(e)):/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(e)?(this.type="string",this.value=r.parseString(e)):i[e.toLowerCase()]?(this.type="color",u=i[e.toLowerCase()].substring(1),this.red=parseInt(u.substring(0,2),16),this.green=parseInt(u.substring(2,4),16),this.blue=parseInt(u.substring(4,6),16)):/^[,\/]$/.test(e)?(this.type="operator",this.value=e):/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(e)&&(this.type="identifier",this.value=e);this.wasIdent=Boolean(l.ident)}e.exports=r;var o=n(641),i=n(686),a=n(642),s=n(652);r.prototype=new o,r.prototype.constructor=r,r.parseString=function(e){e=e.slice(1,-1);var t=function(e,t){if(/^(\n|\r\n|\r|\f)$/.test(t))return"";var n=/^[0-9a-f]{1,6}/i.exec(t);if(n){var r=parseInt(n[0],16);return String.fromCodePoint?String.fromCodePoint(r):String.fromCharCode(r)}return t};return e.replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/gi,t)},r.serializeString=function(e){var t=function(e,t){return'"'===t?"\\"+t:"\\"+(String.codePointAt?String.codePointAt(0):String.charCodeAt(0)).toString(16)+" "};return'"'+e.replace(/["\r\n\f]/g,t)+'"'},r.fromToken=function(e){return new r(e.value,e.startLine,e.startCol,{ident:e.type===s.IDENT})}},function(e,t,n){"use strict";function r(e,t,n,r,a){o.call(this,n,r,a,i.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}e.exports=r;var o=n(641),i=n(642);r.prototype=new o,r.prototype.constructor=r},function(e,t,n){"use strict";function r(e){this._input=e.replace(/(\r\n?|\n)/g,"\n"),this._line=1,this._col=1,this._cursor=0}e.exports=r,r.prototype={constructor:r,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor===this._input.length},peek:function(e){var t=null;return e=void 0===e?1:e,this._cursorn&&(o="[ "+o+" ]"),o})},r.alt=function(){var e=Array.prototype.slice.call(arguments).map(r.cast);return 1===e.length?e[0]:new r(function(t){var n,r=!1;for(n=0;!r&&nn&&(o="[ "+o+" ]"),o})},r.many=function(e){var t=Array.prototype.slice.call(arguments,1).reduce(function(e,t){if(t.expand){var o=n(665);e.push.apply(e,o.complex[t.expand].options)}else e.push(r.cast(t));return e},[]);!0===e&&(e=t.map(function(){return!0}));var o=new r(function(n){var r=[],o=0,i=0,a=function(e){return 0===i?(o=Math.max(e,o),e===t.length):e===o},s=function(o){for(var i=0;i0;for(var l=0;lo&&(i="[ "+i+" ]"),i});return o.options=t,o},r.andand=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!0),r.many.apply(r,e)},r.oror=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!1),r.many.apply(r,e)},r.prototype={constructor:r,match:function(){throw new Error("unimplemented")},toString:function(){throw new Error("unimplemented")},func:function(){return this.match.bind(this)},then:function(e){return r.seq(this,e)},or:function(e){return r.alt(this,e)},andand:function(e){return r.many(!0,this,e)},oror:function(e){return r.many(!1,this,e)},star:function(){return this.braces(0,1/0,"*")},plus:function(){return this.braces(1,1/0,"+")},question:function(){return this.braces(0,1,"?")},hash:function(){return this.braces(1,1/0,"#",r.cast(","))},braces:function(e,t,n,o){var i=this,a=o?o.then(this):this;return n||(n="{"+e+","+t+"}"),new r(function(n){var r;for(r=0;r0&&o?a.match(n):i.match(n));r++);return r>=e},function(){return i.toString(r.prec.MOD)+n})}}},function(e,t,n){"use strict";var r=e.exports,o=n(664);!function(e,t){Object.keys(t).forEach(function(n){e[n]=t[n]})}(r,{isLiteral:function(e,t){var n,r,o=e.text.toString().toLowerCase(),i=t.split(" | "),a=!1;for(n=0,r=i.length;n":"xx-small | x-small | small | medium | large | x-large | xx-large","":"scroll-position | contents | ","":function(e){return this[""](e)&&!/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(e)},"":function(e){return"angle"===e.type},"":"scroll | fixed | local","":"attr()","":"inset() | circle() | ellipse() | polygon()","":" | | none","":"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset","":" | thin | medium | thick","":"padding-box | border-box | content-box","":"","":function(e){return"color"===e.type||"transparent"===String(e)||"currentColor"===String(e)},"":function(e){return"color"===e.type},"":"content()","":"fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content","":function(e){return"function"===e.type&&/^[A-Z0-9]{4}$/i.test(e)},"":"blur() | brightness() | contrast() | custom() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()","":"","":"row | row-reverse | column | column-reverse","":"","":"","":"nowrap | wrap | wrap-reverse","":" | | | ","":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded","":"normal | italic | oblique","":"small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps","":"normal | small-caps","":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900","":"serif | sans-serif | cursive | fantasy | monospace","":" | fill-box | stroke-box | view-box","":function(e){return"angle"===e.type&&"deg"===e.units},"":function(e){return"function"===e.type&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)},"":"cielab() | cielch() | cielchab() | icc-color() | icc-named-color()","":function(e){return"identifier"===e.type||e.wasIdent},"":function(e){return this[""](e)&&!this[""](e)},"":"","":function(e){return"integer"===e.type},"":function(e){return!("function"!==e.type||!/^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(e))||("length"===e.type||"number"===e.type||"integer"===e.type||"0"===String(e))},"":function(e){return"integer"===e.type},"":" | | | normal","":" | | auto","":function(e){return this[""](e)&&e.value>=1},"":function(e){return(this[""](e)||this[""](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"":function(e){return(this[""](e)||this[""](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"":function(e){return"number"===e.type||this[""](e)},"":function(e){return this[""](e)&&e.value>=0&&e.value<=1},"":"","":function(e){return"percentage"===e.type||"0"===String(e)},"":"smaller | larger","":"rect() | inset-rect()","":" | margin-box","":"normal | reverse | alternate | alternate-reverse","":function(e){return this[""](e)&&/^-?[a-z_][-a-z0-9_]+$/i.test(e)&&!/^(none|unset|initial|inherit)$/i.test(e)},"":function(e){return"string"===e.type},"