@syncfusion/ej2-ribbon 23.2.4 → 23.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/ej2-ribbon.umd.min.js +2 -2
- package/dist/ej2-ribbon.umd.min.js.map +1 -1
- package/dist/es6/ej2-ribbon.es2015.js +201 -11
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +201 -11
- package/dist/es6/ej2-ribbon.es5.js.map +1 -1
- package/dist/global/ej2-ribbon.min.js +2 -2
- package/dist/global/ej2-ribbon.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/ribbon/base/interface.d.ts +17 -0
- package/src/ribbon/base/ribbon-model.d.ts +15 -1
- package/src/ribbon/base/ribbon.d.ts +17 -1
- package/src/ribbon/base/ribbon.js +201 -11
- package/styles/bootstrap-dark.css +7 -3
- package/styles/bootstrap.css +7 -3
- package/styles/bootstrap4.css +7 -3
- package/styles/bootstrap5-dark.css +7 -3
- package/styles/bootstrap5.css +7 -3
- package/styles/fabric-dark.css +7 -3
- package/styles/fabric.css +7 -3
- package/styles/fluent-dark.css +7 -3
- package/styles/fluent.css +7 -3
- package/styles/highcontrast-light.css +7 -3
- package/styles/highcontrast.css +7 -3
- package/styles/material-dark.css +7 -3
- package/styles/material.css +7 -3
- package/styles/material3-dark.css +7 -3
- package/styles/material3.css +7 -3
- package/styles/ribbon/_layout.scss +10 -3
- package/styles/ribbon/bootstrap-dark.css +7 -3
- package/styles/ribbon/bootstrap.css +7 -3
- package/styles/ribbon/bootstrap4.css +7 -3
- package/styles/ribbon/bootstrap5-dark.css +7 -3
- package/styles/ribbon/bootstrap5.css +7 -3
- package/styles/ribbon/fabric-dark.css +7 -3
- package/styles/ribbon/fabric.css +7 -3
- package/styles/ribbon/fluent-dark.css +7 -3
- package/styles/ribbon/fluent.css +7 -3
- package/styles/ribbon/highcontrast-light.css +7 -3
- package/styles/ribbon/highcontrast.css +7 -3
- package/styles/ribbon/material-dark.css +7 -3
- package/styles/ribbon/material.css +7 -3
- package/styles/ribbon/material3-dark.css +7 -3
- package/styles/ribbon/material3.css +7 -3
- package/styles/ribbon/tailwind-dark.css +7 -3
- package/styles/ribbon/tailwind.css +7 -3
- package/styles/tailwind-dark.css +7 -3
- package/styles/tailwind.css +7 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-ribbon.umd.min.js
|
|
3
|
-
* version : 23.2.
|
|
3
|
+
* version : 23.2.7
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-navigations"),require("@syncfusion/ej2-dropdowns"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-navigations","@syncfusion/ej2-dropdowns","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-buttons","@syncfusion/ej2-inputs","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Navigations,e.ej2Dropdowns,e.ej2Splitbuttons,e.ej2Buttons,e.ej2Inputs,e.ej2Popups)}(this,function(e,t,o,i,r,n,s,a){"use strict";function l(e,t){for(var o=0;o<e.length;o++)if(t(e[parseInt(o.toString(),10)],o))return o;return-1}function c(e){if("string"==typeof e){var o="";try{var i=t.select(e);o=i?"SCRIPT"===i.tagName?i.innerHTML:i.outerHTML:e}catch(t){o=e}return t.compile(o)}return t.compile(e)}function p(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++)for(var n=i.groups[parseInt(r.toString(),10)],s=0;s<n.collections.length;s++)for(var a=n.collections[parseInt(s.toString(),10)],l=0;l<a.items.length;l++){var c=a.items[parseInt(l.toString(),10)];if(c.id===t)return{item:c,collection:a,group:n,tabIndex:o,groupIndex:r,collectionIndex:s,itemIndex:l}}return null}function u(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++)for(var n=i.groups[parseInt(r.toString(),10)],s=0;s<n.collections.length;s++){var a=n.collections[parseInt(s.toString(),10)];if(a.id===t)return{collection:a,group:n,tabIndex:o,groupIndex:r,collectionIndex:s}}return null}function d(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++){var n=i.groups[parseInt(r.toString(),10)];if(n.id===t)return{group:n,tabIndex:o,groupIndex:r}}return null}function h(e,o){t.getComponent(e,o).destroy()}function b(e,o,i){t.getComponent(e,o).setProperties(i)}function m(e,o,i){t.getComponent(e,o).setProperties("combobox"===o?{enabled:!i}:{disabled:i})}function f(o,i,n){if(!n&&!(n=p(o.tabs,i)))return null;var s=o.tabObj.items[n.tabIndex].content;if(""===s.innerHTML)return null;if(o.activeLayout===e.RibbonLayout.Classic)return n.item.displayOptions&e.DisplayMode.Classic?(s=n.group.isCollapsed?o.ribbonDropDownModule.getOverflowDropDownPopup(n,s):s).querySelector("#"+i):null;var a=n.item.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+n.item.id):null;if(!a){a=(n.group.enableGroupOverflow?t.getComponent(s.querySelector("#"+n.group.id+xt),r.DropDownButton):o.overflowDDB).target.querySelector("#"+n.item.id)}return a}function y(e){return!!(e.content||e.iconCss||e.title||e.id||e.cssClass)}function v(e,t,o){var i=e.target.getAttribute("id"),r=o.filter(function(e){return e.id===i})[0].data,n=t.createElement("div",{id:r.id?It+"_"+r.id:It});if(t.element.append(n),r.title){var s=t.createElement("div",{innerHTML:r.title,className:vt});n.appendChild(s)}var a=t.createElement("div",{className:Ct});if(n.appendChild(a),r.iconCss){var l=t.createElement("div",{className:r.iconCss+" "+St});a.appendChild(l)}if(r.content){var c=t.createElement("div",{innerHTML:r.content,className:gt});a.appendChild(c)}t.setProperties({content:n,cssClass:r.cssClass?r.cssClass+" "+ft:ft})}function g(e,t){var o=new a.Tooltip({target:"."+yt,beforeRender:function(e){v(e,o,t.tooltipData)}.bind(this),windowCollision:!0});o.appendTo(e)}function S(e){t.getComponent(e,a.Tooltip).destroy()}function I(e,o){t.getComponent(e,a.Tooltip).setProperties(o)}function C(e,o){for(var i in o)if("class"===i){var r=o.class.replace(/\s+/g," ").trim();r&&t.addClass([e],r.split(" "))}else if("style"===i){var n=""+(e.getAttribute("style")||"")+o[""+i];e.setAttribute(""+i,n)}else e.setAttribute(i,o[""+i])}!function(e){e.Classic="Classic",e.Simplified="Simplified"}(e.RibbonLayout||(e.RibbonLayout={})),function(e){e.Row="Row",e.Column="Column"}(e.ItemOrientation||(e.ItemOrientation={})),function(e){e[e.Large=4]="Large",e[e.Medium=2]="Medium",e[e.Small=1]="Small"}(e.RibbonItemSize||(e.RibbonItemSize={})),function(e){e[e.Classic=4]="Classic",e[e.Simplified=2]="Simplified",e[e.Overflow=1]="Overflow",e[e.Auto=7]="Auto"}(e.DisplayMode||(e.DisplayMode={})),function(e){e.Button="Button",e.CheckBox="CheckBox",e.ColorPicker="ColorPicker",e.ComboBox="ComboBox",e.DropDown="DropDown",e.SplitButton="SplitButton",e.GroupButton="GroupButton",e.Template="Template"}(e.RibbonItemType||(e.RibbonItemType={})),function(e){e.Single="Single",e.Multiple="Multiple"}(e.RibbonGroupButtonSelection||(e.RibbonGroupButtonSelection={}));var B=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),O=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},w=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return B(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},O([t.Property("")],o.prototype,"content",void 0),O([t.Property("")],o.prototype,"cssClass",void 0),O([t.Property("")],o.prototype,"iconCss",void 0),O([t.Property(!1)],o.prototype,"isToggle",void 0),O([t.Property(!1)],o.prototype,"isPrimary",void 0),O([t.Property({})],o.prototype,"htmlAttributes",void 0),O([t.Event()],o.prototype,"created",void 0),O([t.Event()],o.prototype,"clicked",void 0),o}(t.ChildProperty),P=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),D=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},L=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return P(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},D([t.Property(!1)],o.prototype,"checked",void 0),D([t.Property("")],o.prototype,"cssClass",void 0),D([t.Property("")],o.prototype,"label",void 0),D([t.Property("After")],o.prototype,"labelPosition",void 0),D([t.Property({})],o.prototype,"htmlAttributes",void 0),D([t.Event()],o.prototype,"created",void 0),D([t.Event()],o.prototype,"change",void 0),o}(t.ChildProperty),R=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),T=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},k=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return R(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},T([t.Property(10)],o.prototype,"columns",void 0),T([t.Property("")],o.prototype,"cssClass",void 0),T([t.Property(!0)],o.prototype,"enableOpacity",void 0),T([t.Property("Picker")],o.prototype,"mode",void 0),T([t.Property(!0)],o.prototype,"modeSwitcher",void 0),T([t.Property(!1)],o.prototype,"noColor",void 0),T([t.Property(null)],o.prototype,"presetColors",void 0),T([t.Property(!0)],o.prototype,"showButtons",void 0),T([t.Property("#008000ff")],o.prototype,"value",void 0),T([t.Property({})],o.prototype,"htmlAttributes",void 0),T([t.Event()],o.prototype,"beforeClose",void 0),T([t.Event()],o.prototype,"beforeOpen",void 0),T([t.Event()],o.prototype,"beforeTileRender",void 0),T([t.Event()],o.prototype,"created",void 0),T([t.Event()],o.prototype,"change",void 0),T([t.Event()],o.prototype,"open",void 0),T([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),E=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),M=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},x=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return E(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},M([t.Property(!1)],o.prototype,"allowFiltering",void 0),M([t.Property(!0)],o.prototype,"autofill",void 0),M([t.Property("")],o.prototype,"cssClass",void 0),M([t.Property([])],o.prototype,"dataSource",void 0),M([t.Complex({text:null,value:null,iconCss:null,groupBy:null},i.FieldSettings)],o.prototype,"fields",void 0),M([t.Property("Contains")],o.prototype,"filterType",void 0),M([t.Property(null)],o.prototype,"footerTemplate",void 0),M([t.Property(null)],o.prototype,"groupTemplate",void 0),M([t.Property(null)],o.prototype,"headerTemplate",void 0),M([t.Property(null)],o.prototype,"index",void 0),M([t.Property(null)],o.prototype,"itemTemplate",void 0),M([t.Property("No records found")],o.prototype,"noRecordsTemplate",void 0),M([t.Property(null)],o.prototype,"placeholder",void 0),M([t.Property("300px")],o.prototype,"popupHeight",void 0),M([t.Property("100%")],o.prototype,"popupWidth",void 0),M([t.Property(!0)],o.prototype,"showClearButton",void 0),M([t.Property("None")],o.prototype,"sortOrder",void 0),M([t.Property(null)],o.prototype,"text",void 0),M([t.Property(null)],o.prototype,"value",void 0),M([t.Property("150px")],o.prototype,"width",void 0),M([t.Property({})],o.prototype,"htmlAttributes",void 0),M([t.Event()],o.prototype,"beforeOpen",void 0),M([t.Event()],o.prototype,"change",void 0),M([t.Event()],o.prototype,"close",void 0),M([t.Event()],o.prototype,"created",void 0),M([t.Event()],o.prototype,"filtering",void 0),M([t.Event()],o.prototype,"open",void 0),M([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),_=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),q=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},z=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return _(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},q([t.Property("")],o.prototype,"closeActionEvents",void 0),q([t.Property("")],o.prototype,"content",void 0),q([t.Property("")],o.prototype,"cssClass",void 0),q([t.Property("")],o.prototype,"iconCss",void 0),q([t.Collection([],r.Item)],o.prototype,"items",void 0),q([t.Property("")],o.prototype,"target",void 0),q([t.Property(!1)],o.prototype,"createPopupOnClick",void 0),q([t.Property({})],o.prototype,"htmlAttributes",void 0),q([t.Event()],o.prototype,"beforeClose",void 0),q([t.Event()],o.prototype,"beforeItemRender",void 0),q([t.Event()],o.prototype,"beforeOpen",void 0),q([t.Event()],o.prototype,"close",void 0),q([t.Event()],o.prototype,"created",void 0),q([t.Event()],o.prototype,"open",void 0),q([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),j=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),A=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},N=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return j(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},A([t.Property("")],o.prototype,"closeActionEvents",void 0),A([t.Property("")],o.prototype,"content",void 0),A([t.Property("")],o.prototype,"cssClass",void 0),A([t.Property("")],o.prototype,"iconCss",void 0),A([t.Collection([],r.Item)],o.prototype,"items",void 0),A([t.Property("")],o.prototype,"target",void 0),A([t.Property({})],o.prototype,"htmlAttributes",void 0),A([t.Event()],o.prototype,"beforeClose",void 0),A([t.Event()],o.prototype,"beforeItemRender",void 0),A([t.Event()],o.prototype,"beforeOpen",void 0),A([t.Event()],o.prototype,"close",void 0),A([t.Event()],o.prototype,"click",void 0),A([t.Event()],o.prototype,"created",void 0),A([t.Event()],o.prototype,"open",void 0),A([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),G=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),H=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},W=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return G(o,e),H([t.Property("")],o.prototype,"cssClass",void 0),H([t.Property("")],o.prototype,"id",void 0),H([t.Property("")],o.prototype,"title",void 0),H([t.Property("")],o.prototype,"content",void 0),H([t.Property("")],o.prototype,"iconCss",void 0),o}(t.ChildProperty),F=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),U=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},V=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return F(o,e),U([t.Property("")],o.prototype,"content",void 0),U([t.Property("")],o.prototype,"iconCss",void 0),U([t.Complex({},W)],o.prototype,"ribbonTooltipSettings",void 0),U([t.Property(!1)],o.prototype,"selected",void 0),U([t.Property({})],o.prototype,"htmlAttributes",void 0),U([t.Event()],o.prototype,"beforeClick",void 0),U([t.Event()],o.prototype,"click",void 0),o}(t.ChildProperty),K=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),X=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},Z=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return K(o,e),X([t.Property("Single")],o.prototype,"selection",void 0),X([t.Collection([],V)],o.prototype,"items",void 0),o}(t.ChildProperty),Y=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),J=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},Q=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return Y(i,o),i.prototype.setProperties=function(e,t){o.prototype.setProperties.call(this,e,t)},J([t.Property(e.RibbonItemSize.Medium)],i.prototype,"activeSize",void 0),J([t.Property(e.RibbonItemSize.Small|e.RibbonItemSize.Medium|e.RibbonItemSize.Large)],i.prototype,"allowedSizes",void 0),J([t.Property("")],i.prototype,"id",void 0),J([t.Property("")],i.prototype,"cssClass",void 0),J([t.Property(!1)],i.prototype,"disabled",void 0),J([t.Property("")],i.prototype,"itemTemplate",void 0),J([t.Property("Button")],i.prototype,"type",void 0),J([t.Property(e.DisplayMode.Auto)],i.prototype,"displayOptions",void 0),J([t.Complex({},W)],i.prototype,"ribbonTooltipSettings",void 0),J([t.Complex({},w)],i.prototype,"buttonSettings",void 0),J([t.Complex({},z)],i.prototype,"dropDownSettings",void 0),J([t.Complex({},L)],i.prototype,"checkBoxSettings",void 0),J([t.Complex({},k)],i.prototype,"colorPickerSettings",void 0),J([t.Complex({},x)],i.prototype,"comboBoxSettings",void 0),J([t.Complex({},N)],i.prototype,"splitButtonSettings",void 0),J([t.Complex({},Z)],i.prototype,"groupButtonSettings",void 0),i}(t.ChildProperty),$=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ee=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},te=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return $(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ee([t.Property("")],o.prototype,"id",void 0),ee([t.Property("")],o.prototype,"cssClass",void 0),ee([t.Collection([],Q)],o.prototype,"items",void 0),o}(t.ChildProperty),oe=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ie=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},re=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return oe(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ie([t.Collection([],te)],o.prototype,"collections",void 0),ie([t.Property("")],o.prototype,"cssClass",void 0),ie([t.Property("")],o.prototype,"id",void 0),ie([t.Property(!1)],o.prototype,"isCollapsed",void 0),ie([t.Property(!0)],o.prototype,"isCollapsible",void 0),ie([t.Property(!1)],o.prototype,"enableGroupOverflow",void 0),ie([t.Property("")],o.prototype,"groupIconCss",void 0),ie([t.Property("")],o.prototype,"header",void 0),ie([t.Property("Column")],o.prototype,"orientation",void 0),ie([t.Property(0)],o.prototype,"priority",void 0),ie([t.Property(!1)],o.prototype,"showLauncherIcon",void 0),o}(t.ChildProperty),ne=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),se=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ae=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ne(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},se([t.Property("")],o.prototype,"id",void 0),se([t.Property("")],o.prototype,"cssClass",void 0),se([t.Collection([],re)],o.prototype,"groups",void 0),se([t.Property("")],o.prototype,"header",void 0),o}(t.ChildProperty),le=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ce=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},pe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return le(i,e),i.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ce([t.Property("File")],i.prototype,"text",void 0),ce([t.Property(!1)],i.prototype,"visible",void 0),ce([t.Collection([],o.MenuItem)],i.prototype,"menuItems",void 0),ce([t.Property(!1)],i.prototype,"showItemOnClick",void 0),ce([t.Complex({},o.MenuAnimationSettings)],i.prototype,"animationSettings",void 0),ce([t.Property("")],i.prototype,"itemTemplate",void 0),ce([t.Property("")],i.prototype,"popupTemplate",void 0),ce([t.Complex({},W)],i.prototype,"ribbonTooltipSettings",void 0),ce([t.Event()],i.prototype,"beforeClose",void 0),ce([t.Event()],i.prototype,"beforeOpen",void 0),ce([t.Event()],i.prototype,"beforeItemRender",void 0),ce([t.Event()],i.prototype,"close",void 0),ce([t.Event()],i.prototype,"open",void 0),ce([t.Event()],i.prototype,"select",void 0),i}(t.ChildProperty),ue=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),de=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},he=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ue(o,e),de([t.Property("")],o.prototype,"text",void 0),de([t.Property("")],o.prototype,"iconCss",void 0),de([t.Property(!0)],o.prototype,"visible",void 0),o}(t.ChildProperty),be=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),me=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},fe=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return be(o,e),me([t.Property("")],o.prototype,"text",void 0),me([t.Property("")],o.prototype,"id",void 0),me([t.Property("")],o.prototype,"content",void 0),me([t.Property("")],o.prototype,"iconCss",void 0),me([t.Property(!1)],o.prototype,"separator",void 0),me([t.Property(!1)],o.prototype,"isFooter",void 0),me([t.Event()],o.prototype,"backStageItemClick",void 0),o}(t.ChildProperty),ye=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ve=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ge=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ye(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ve([t.Property("File")],o.prototype,"text",void 0),ve([t.Property(!1)],o.prototype,"visible",void 0),ve([t.Property("auto")],o.prototype,"height",void 0),ve([t.Property("auto")],o.prototype,"width",void 0),ve([t.Property(null)],o.prototype,"target",void 0),ve([t.Complex({},he)],o.prototype,"backButton",void 0),ve([t.Collection([],fe)],o.prototype,"items",void 0),ve([t.Property("")],o.prototype,"template",void 0),ve([t.Complex({},W)],o.prototype,"ribbonTooltipSettings",void 0),o}(t.ChildProperty),Se="e-ribbon-vertical-center",Ie="e-icons e-drop-icon",Ce="e-icons e-arrow-left",Be="e-icons e-more-horizontal-1",Oe="e-vertical",we="e-disabled",Pe="e-rtl",De="e-ribbon-hover",Le="e-ribbon-control",Re="e-ribbon-popup-control",Te="e-ribbon-open",ke="e-hscroll-bar",Ee="e-ribbon-hide",Me="e-ribbon-active",xe="e-ribbon-tab-item",_e="e-ribbon-collapse-btn",qe="e-ribbon-expand-btn",ze="e-ribbon-collapsible",je="e-ribbon-overall-of-btn",Ae="e-ribbon-group-of-btn",Ne="e-ribbon-overflow-target",Ge="e-ribbon-overflow",He="e-content",We="e-ribbon-minimize",Fe="e-ribbon-group",Ue="e-ribbon-single-selection",Ve="e-ribbon-multiple-selection",Ke="e-ribbon-group-button",Xe="e-ribbon-group-button-overflow-popup",Ze="e-ribbon-group-container",Ye="e-ribbon-of-tab",Je="e-ribbon-of-group-container",Qe="e-ribbon-group-content",$e="e-ribbon-group-header",et="e-ribbon-overflow-header",tt="e-ribbon-group-overflow",ot="e-ribbon-group-overflow-ddb",it="e-ribbon-launcher",rt="e-ribbon-launcher-icon",nt="e-icons e-launcher",st="e-ribbon-collection",at="e-ribbon-item",lt="e-ribbon-row",ct="e-ribbon-column",pt="e-ribbon-large-item",ut="e-ribbon-medium-item",dt="e-ribbon-small-item",ht="e-ribbon-content-height",bt="e-ribbon-template",mt="e-ribbon-help-template",ft="e-ribbon-tooltip",yt="e-ribbon-tooltip-target",vt="e-ribbon-tooltip-title",gt="e-ribbon-tooltip-content",St="e-ribbon-tooltip-icon",It="e-ribbon-tooltip-container",Ct="e-ribbon-text-container",Bt="e-ribbon-simplified-mode",Ot="e-ribbon-backstage-popup",wt="e-ribbon-backstage-open",Pt="e-ribbon-backstage-content",Dt="e-ribbon-backstage",Lt="e-ribbon-backstage-menu",Rt="e-ribbon-backstage-template",Tt="e-ribbon-backstage-wrapper",kt="e-ribbon-backstage-items-wrapper",Et="_collapsebutton",Mt="_sim_ovrl_overflow",xt="_sim_grp_overflow",_t="_header",qt="_launcher",zt="_content",jt="_container",At="_overflow",Nt="_dropdown",Gt="_backstage",Ht="_backstagepopup",Wt="_filemenulist",Ft="_footermenulist",Ut="_helppanetemplate",Vt="_grpbtn",Kt="--fileMenuWidth",Xt="--helpTemplateWidth",Zt=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createButton=function(t,o){var i=this,r=this.parent.createElement("button",{id:t.id});o.appendChild(r);var s=t.buttonSettings;new n.Button({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:t.activeSize===e.RibbonItemSize.Large?"Top":"Left",iconCss:s.iconCss,disabled:t.disabled,cssClass:(Se+" "+Le+" "+(s.cssClass?s.cssClass:"")).trim(),content:t.activeSize===e.RibbonItemSize.Small?"":s.content,isPrimary:s.isPrimary,isToggle:s.isToggle,created:s.created},r),s.htmlAttributes&&C(r,s.htmlAttributes),r.onclick=function(e){s.clicked&&s.clicked.call(i,e)},r.setAttribute("aria-label",s.content)},o.prototype.addOverFlowEvents=function(e,o,i){var r=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,n.Button);a.setProperties({cssClass:a.cssClass+" "+Re}),s.onclick=function(t){e.buttonSettings.clicked&&e.buttonSettings.clicked.call(r,t),i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),s=t.getComponent(r,n.Button),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.setProperties({cssClass:a.join(" ")}),r.onclick=function(t){e.buttonSettings.clicked&&e.buttonSettings.clicked.call(i,t)}},o.prototype.click=function(e){var o=f(this.parent,e);if(o){t.getComponent(o,n.Button).click()}},o.prototype.updateButton=function(o,i){var r=p(this.parent.tabs,i);if(r){t.merge(r.item.buttonSettings,o);var s=f(this.parent,i,r);if(s){var a=t.getComponent(s,n.Button);o.isToggle&&s.classList.add("e-active"),o.cssClass&&(o.cssClass=(Se+" "+Le+" "+o.cssClass).trim()),o.content&&(o.content=r.item.activeSize===e.RibbonItemSize.Small?"":o.content,s.setAttribute("aria-label",o.content)),delete o.clicked,a.setProperties(o)}}},o.prototype.updateButtonSize=function(o,i){t.getComponent(o,n.Button).setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left",content:i.activeSize===e.RibbonItemSize.Small?"":i.buttonSettings.content})},o}(),Yt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonCheckBox"},e.prototype.destroy=function(){this.parent=null},e.prototype.createCheckBox=function(e,t){var o=this,i=this.parent.createElement("input",{id:e.id});t.appendChild(i);var r=e.checkBoxSettings;new n.CheckBox({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,checked:r.checked,cssClass:(Le+" "+(r.cssClass?r.cssClass:"")).trim(),label:r.label,labelPosition:r.labelPosition,disabled:e.disabled,created:r.created,htmlAttributes:r.htmlAttributes,change:function(e){r.change&&r.change.call(o,e)}},i)},e.prototype.addOverFlowEvents=function(e,o,i){var r=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,n.CheckBox);a.cssClass=a.cssClass+" "+Re,a.dataBind(),a.change=function(t){e.checkBoxSettings.change&&e.checkBoxSettings.change.call(r,t),i.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),s=t.getComponent(r,n.CheckBox),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.change=function(t){e.checkBoxSettings.change&&e.checkBoxSettings.change.call(i,t)}},e.prototype.click=function(e){var o=f(this.parent,e);if(o){t.getComponent(o,n.CheckBox).click()}},e.prototype.updateCheckBox=function(e,o){var i=p(this.parent.tabs,o);if(i){t.merge(i.item.checkBoxSettings,e);var r=f(this.parent,o,i);if(r){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.change;t.getComponent(r,n.CheckBox).setProperties(e)}}},e}(),Jt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonColorPicker"},e.prototype.destroy=function(){this.parent=null},e.prototype.createColorPicker=function(e,o){var i=this,r=this.parent.createElement("input",{id:e.id});o.appendChild(r);var n=e.colorPickerSettings,a=new s.ColorPicker({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,columns:n.columns,cssClass:(Le+" "+(n.cssClass?n.cssClass:"")).trim(),disabled:e.disabled,enableOpacity:n.enableOpacity,mode:n.mode,modeSwitcher:n.modeSwitcher,noColor:n.noColor,presetColors:n.presetColors,showButtons:n.showButtons,value:n.value,beforeClose:function(){a.element.parentElement.classList.remove(Te),n.beforeClose&&n.beforeClose.call(i)},beforeOpen:n.beforeOpen,beforeTileRender:n.beforeTileRender,created:n.created,change:n.change,open:function(){a.element.parentElement.classList.add(Te),n.open&&n.open.call(i)},select:n.select},r);n.htmlAttributes&&C(r,n.htmlAttributes);var l=a.element.parentElement;t.EventHandler.add(l,"mouseenter",this.toggleWrapperHover.bind(this,l,!0),this),t.EventHandler.add(l,"mouseleave",this.toggleWrapperHover.bind(this,l,!1),this)},e.prototype.toggleWrapperHover=function(e,t){t?e.classList.add(De):e.classList.remove(De)},e.prototype.addOverFlowEvents=function(e,o,i){var r=this,n=o.querySelector("#"+e.id);n.setAttribute("data-control",e.type.toString());var a=t.getComponent(n,s.ColorPicker);a.setProperties({cssClass:a.cssClass+" "+Re});var l,c=a.splitBtn;a.beforeClose=function(t){l=t.event?t.event.target:null,a.element.parentElement.classList.remove(Te),e.colorPickerSettings.beforeClose&&e.colorPickerSettings.beforeClose.call(r)},c.close=function(){l&&!l.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),n=t.getComponent(r,s.ColorPicker),a=n.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),n.setProperties({cssClass:a.join(" ")});n.splitBtn.close=null,n.beforeClose=function(){n.element.parentElement.classList.remove(Te),e.colorPickerSettings.beforeClose&&e.colorPickerSettings.beforeClose.call(i)}},e.prototype.getColorPickerObj=function(e){var o=f(this.parent,e);return o?t.getComponent(o,s.ColorPicker):null},e.prototype.getValue=function(e,t,o){var i=this.getColorPickerObj(e);return i?i.getValue(t,o):""},e.prototype.toggle=function(e){var t=this.getColorPickerObj(e);t&&t.toggle()},e.prototype.updateColorPicker=function(e,o){var i=p(this.parent.tabs,o);if(i){t.merge(i.item.checkBoxSettings,e);var r=f(this.parent,o,i);if(r){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.beforeClose,delete e.open;t.getComponent(r,s.ColorPicker).setProperties(e)}}},e.prototype.unwireColorPickerEvents=function(e){var o=t.getComponent(e,s.ColorPicker).element.parentElement;t.EventHandler.remove(o,"mouseenter",this.toggleWrapperHover),t.EventHandler.remove(o,"mouseleave",this.toggleWrapperHover)},e}(),Qt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonComboBox"},e.prototype.destroy=function(){this.parent=null},e.prototype.createComboBox=function(e,t){var o=this,r=this.parent.createElement("input",{id:e.id});t.appendChild(r);var n=e.comboBoxSettings;new i.ComboBox({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,allowCustom:!1,floatLabelType:"Never",ignoreAccent:!0,ignoreCase:!0,allowFiltering:n.allowFiltering,autofill:n.autofill,cssClass:(Le+" "+(n.cssClass?n.cssClass:"")).trim(),dataSource:n.dataSource,enabled:!e.disabled,fields:n.fields,filterType:n.filterType,footerTemplate:n.footerTemplate,groupTemplate:n.groupTemplate,headerTemplate:n.headerTemplate,index:n.index,itemTemplate:n.itemTemplate,noRecordsTemplate:n.noRecordsTemplate,placeholder:n.placeholder,popupHeight:n.popupHeight,popupWidth:n.popupWidth,showClearButton:n.showClearButton,sortOrder:n.sortOrder,text:n.text,value:n.value,width:n.width,beforeOpen:n.beforeOpen,open:n.open,htmlAttributes:n.htmlAttributes,close:function(e){n.close&&n.close.call(o,e)},filtering:n.filtering,change:n.change,select:n.select,created:n.created},r)},e.prototype.addOverFlowEvents=function(e,o,r){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,i.ComboBox);a.setProperties({cssClass:a.cssClass+" "+Re}),a.close=function(t){var o=t.event?t.event.target:null;e.comboBoxSettings.close&&e.comboBoxSettings.close.call(n,t),o&&!o.closest(".e-ribbon-group-overflow-ddb")&&r.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var r=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,i.ComboBox),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.setProperties({cssClass:a.join(" ")}),s.close=function(t){e.comboBoxSettings.close&&e.comboBoxSettings.close.call(r,t)}},e.prototype.getComboBoxObj=function(e){var o=f(this.parent,e);return o?t.getComponent(o,i.ComboBox):null},e.prototype.filter=function(e,t,o,i){this.getComboBoxObj(e).filter(t,o,i)},e.prototype.hidePopup=function(e){var t=this.getComboBoxObj(e);t&&t.hidePopup()},e.prototype.showPopup=function(e){var t=this.getComboBoxObj(e);t&&t.showPopup()},e.prototype.updateComboBox=function(e,o){var r=p(this.parent.tabs,o);if(r){t.merge(r.item.comboBoxSettings,e);var n=f(this.parent,o,r);if(n){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.close;t.getComponent(n,i.ComboBox).setProperties(e)}}},e}(),$t=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonDropDown"},o.prototype.destroy=function(){this.parent=null},o.prototype.createDropDown=function(t,o){var i=this,n=this.parent.createElement("button",{id:t.id});o.appendChild(n);var s=t.dropDownSettings,a=(Se+" "+Le+" "+(s.cssClass?s.cssClass:"")).trim();new r.DropDownButton({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:t.activeSize===e.RibbonItemSize.Large?"Top":"Left",closeActionEvents:s.closeActionEvents,content:t.activeSize===e.RibbonItemSize.Small?"":s.content,cssClass:a+(t.activeSize===e.RibbonItemSize.Large?" "+Oe:""),disabled:t.disabled,iconCss:s.iconCss,items:s.items,target:s.target,createPopupOnClick:s.createPopupOnClick,beforeClose:function(e){s.beforeClose&&s.beforeClose.call(i,e)},beforeItemRender:s.beforeItemRender,beforeOpen:s.beforeOpen,close:function(e){s.close&&s.close.call(i,e)},created:s.created,open:s.open,select:s.select}).appendTo(n),s.htmlAttributes&&C(n,s.htmlAttributes)},o.prototype.addOverFlowEvents=function(e,o,i){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,r.DropDownButton);a.cssClass=a.cssClass+" "+Re,a.dataBind();var l;a.beforeClose=function(t){e.dropDownSettings.beforeClose&&e.dropDownSettings.beforeClose.call(n,t),l=t.event?t.event.target:null},a.close=function(t){e.dropDownSettings.close&&e.dropDownSettings.close.call(n,t),l&&!l.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.DropDownButton),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.close=function(t){e.dropDownSettings.close&&e.dropDownSettings.close.call(i,t)},s.beforeClose=function(t){e.dropDownSettings.beforeClose&&e.dropDownSettings.beforeClose.call(i,t)}},o.prototype.createOverFlowDropDown=function(e,o,i,n,s,a){var l=this;this.enableRtl=a;var c=this.parent.createElement("button",{id:e+At+Nt});n.setAttribute("tabindex","0"),s.appendChild(c);var p=new r.DropDownButton({iconCss:i,target:n,locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,cssClass:Oe+" "+ot,iconPosition:"Top",content:o,beforeClose:function(e){e.cancel=!t.isNullOrUndefined(e.event&&t.closest(e.event.target,"."+Re))}},c);return g(n,this.parent),c.onclick=c.onkeydown=function(){l.itemIndex=0},n.onkeydown=function(e){l.keyActionHandler(e,n)},p},o.prototype.keyActionHandler=function(e,t){var o,i=t.querySelectorAll(".e-control"),r=t.querySelectorAll(".e-combobox");if(r)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)].closest(".e-input-focus")&&(o=r[parseInt(n.toString(),10)]);if(o)for(n=0;n<i.length;n++)i[parseInt(n.toString(),10)].classList.contains("e-combobox")&&i[parseInt(n.toString(),10)].closest(".e-input-focus")&&(this.itemIndex=n);(e.target.classList.contains("e-control")||e.target.classList.contains("e-ribbon-launcher-icon")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-first-item"))&&(("ArrowRight"===e.key||!e.shiftKey&&"Tab"===e.key)&&this.handleNavigation(e,!this.enableRtl,i),("ArrowLeft"===e.key||e.shiftKey&&"Tab"===e.key)&&this.handleNavigation(e,this.enableRtl,i))},o.prototype.handleNavigation=function(e,t,o){if(o[0].classList.contains("e-ribbon-first-item")||o[0].classList.add("e-ribbon-first-item"),o[o.length-1].classList.contains("e-ribbon-last-item")||o[o.length-1].classList.add("e-ribbon-last-item"),t){if(0===this.itemIndex&&o[parseInt(this.itemIndex.toString(),10)].classList.contains("e-ribbon-first-item")&&this.updateItemIndex(e,o,!0),e.target.classList.contains("e-combobox")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-group-container")||!e.target.classList.contains("e-ribbon-first-item")&&0===this.itemIndex||!e.target.classList.contains("e-control")||(this.itemIndex++,this.updateItemIndex(e,o,!0)),e.target.classList.contains("e-ribbon-last-item")){this.focusLauncherIcon(e,o)||(this.itemIndex=0,this.updateItemIndex(e,o,!0))}e.target.classList.contains("e-ribbon-launcher-icon")&&(this.itemIndex=0,this.updateItemIndex(e,o,!0))}else{if(e.target.classList.contains("e-combobox")||0===this.itemIndex||(this.itemIndex--,this.updateItemIndex(e,o,!1)),e.target.classList.contains("e-ribbon-first-item")){this.focusLauncherIcon(e,o)||(this.itemIndex=o.length-1,this.updateItemIndex(e,o,!1))}e.target.classList.contains("e-ribbon-launcher-icon")&&(this.itemIndex=o.length-1,this.updateItemIndex(e,o,!1))}e.target.classList.contains("e-combobox")&&"Tab"===e.key&&(t?this.itemIndex<o.length-1&&this.itemIndex++:this.itemIndex>0&&this.itemIndex--)},o.prototype.focusLauncherIcon=function(e,t){var o,i=t[parseInt(this.itemIndex.toString(),10)].closest(".e-ribbon-group-container");return i&&(o=i.querySelector(".e-ribbon-launcher-icon")),!!o&&("Tab"===e.key&&e.preventDefault(),i.querySelector(".e-ribbon-launcher-icon").focus(),!0)},o.prototype.updateItemIndex=function(e,t,o){for(var i=t[this.itemIndex].closest(".e-ribbon-item");i&&i.classList.contains("e-disabled");){if(o)if(this.itemIndex<t.length-1)this.itemIndex++;else{if(this.focusLauncherIcon(e,t))break;this.itemIndex=0}else if(this.itemIndex>0)this.itemIndex--;else{if(this.focusLauncherIcon(e,t))break;this.itemIndex=t.length-1}i=t[this.itemIndex].closest(".e-ribbon-item")}"Tab"===e.key&&e.preventDefault(),t[parseInt(this.itemIndex.toString(),10)].focus()},o.prototype.removeOverFlowDropDown=function(e){var o=t.getComponent(e,r.DropDownButton);t.getComponent(o.target,a.Tooltip).destroy(),e.parentElement.parentElement.insertBefore(o.target,e.parentElement),o.destroy(),t.remove(e)},o.prototype.getDDBItemElement=function(e,o){return t.getComponent(e,r.DropDownButton).dropDown.element.querySelector("#"+o)},o.prototype.getOverflowDropDownPopup=function(e,o){var i=o.querySelector("#"+this.parent.tabs[e.tabIndex].groups[e.groupIndex].id+At+Nt);return t.getComponent(i,r.DropDownButton).dropDown.element},o.prototype.getDropDownObj=function(e){var o=f(this.parent,e);return o?t.getComponent(o,r.DropDownButton):null},o.prototype.addItems=function(e,t,o){this.getDropDownObj(e).addItems(t,o)},o.prototype.removeItems=function(e,t,o){this.getDropDownObj(e).removeItems(t,o)},o.prototype.toggle=function(e){this.getDropDownObj(e).toggle()},o.prototype.updateDropDown=function(o,i){var n=p(this.parent.tabs,i);if(n){t.merge(n.item.dropDownSettings,o);var s=f(this.parent,i,n);if(s){var a=t.getComponent(s,r.DropDownButton);o.cssClass&&(o.cssClass=(Le+" "+Se+" "+o.cssClass).trim(),o.cssClass=n.item.activeSize===e.RibbonItemSize.Large?(Oe+" "+o.cssClass).trim():o.cssClass,a.cssClass=o.cssClass),delete o.close,delete o.beforeClose,o.content&&(o.content=n.item.activeSize===e.RibbonItemSize.Small?"":o.content),a.setProperties(o)}}},o.prototype.updateDropDownSize=function(o,i){var n=t.getComponent(o,r.DropDownButton),s=n.cssClass.split(" ");i.activeSize===e.RibbonItemSize.Large?s.push(Oe):s=s.filter(function(e){return e!==Oe}),n.cssClass=s.join(" "),n.setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left"}),n.setProperties({content:i.activeSize===e.RibbonItemSize.Small?"":i.dropDownSettings.content})},o}(),eo=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonSplitButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createSplitButton=function(o,i){var n=this,s=this.parent.createElement("button",{id:o.id});i.appendChild(s);var a=o.splitButtonSettings,l=(Se+" "+Le+" "+(a.cssClass?a.cssClass:"")).trim(),c=new r.SplitButton({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:o.activeSize===e.RibbonItemSize.Large?"Top":"Left",closeActionEvents:a.closeActionEvents,cssClass:l+(o.activeSize===e.RibbonItemSize.Large?" "+Oe:""),disabled:o.disabled,iconCss:a.iconCss,items:a.items,target:a.target,beforeClose:function(e){a.beforeClose&&a.beforeClose.call(n,e)},beforeItemRender:a.beforeItemRender,beforeOpen:a.beforeOpen,close:function(){c.wrapper.classList.remove(Te),a.close&&a.close.call(n)},created:a.created,open:function(){c.wrapper.classList.add(Te),a.open&&a.open.call(n)},select:a.select,click:function(e){a.click&&a.click.call(n,e)}},s);a.htmlAttributes&&C(s,a.htmlAttributes);var p=s.parentElement.querySelector(".e-dropdown-btn");p.onkeydown=function(e){"Enter"===e.key&&(e.stopImmediatePropagation(),p.click())},this.setContent(o,c);var u=c.wrapper;t.EventHandler.add(u,"mouseenter",function(){u.classList.add(De)},this),t.EventHandler.add(u,"mouseleave",function(){u.classList.remove(De)},this)},o.prototype.addOverFlowEvents=function(e,o,i){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,r.SplitButton);a.cssClass=a.cssClass+" "+Re,a.dataBind();var l=s.parentElement.querySelector(".e-dropdown-btn"),c=l.getAttribute("id"),p=document.querySelector("#"+c+"-popup");l.onkeydown=function(e){"Enter"===e.key&&(e.stopImmediatePropagation(),l.click())},p.onkeydown=function(e){"Enter"===e.key&&(e.preventDefault(),a.wrapper.classList.remove("e-ribbon-open"),p.querySelector(".e-focused").click())};var u;a.beforeClose=function(t){e.splitButtonSettings.beforeClose&&e.splitButtonSettings.beforeClose.call(n,t),u=t.event?t.event.target:null},a.click=function(t){e.splitButtonSettings.click&&e.splitButtonSettings.click.call(n,t),i.toggle()},a.close=function(t){e.splitButtonSettings.close&&e.splitButtonSettings.close.call(n,t),a.wrapper.classList.remove(Te),u&&!u.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.SplitButton),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.beforeClose=function(t){e.splitButtonSettings.beforeClose&&e.splitButtonSettings.beforeClose.call(i,t)},s.click=function(t){e.splitButtonSettings.click&&e.splitButtonSettings.click.call(i,t)},s.close=function(t){e.splitButtonSettings.close&&e.splitButtonSettings.close.call(i,t),s.wrapper.classList.remove(Te)}},o.prototype.setContent=function(t,o){o.primaryBtnObj.setProperties({content:t.activeSize===e.RibbonItemSize.Medium?t.splitButtonSettings.content:""}),o.secondaryBtnObj.setProperties({content:t.activeSize===e.RibbonItemSize.Large?t.splitButtonSettings.content:""})},o.prototype.getSplitButtonObj=function(e){var o=f(this.parent,e);return t.getComponent(o,r.SplitButton)},o.prototype.addItems=function(e,t,o){this.getSplitButtonObj(e).addItems(t,o)},o.prototype.removeItems=function(e,t,o){this.getSplitButtonObj(e).removeItems(t,o)},o.prototype.toggle=function(e){this.getSplitButtonObj(e).toggle()},o.prototype.updateSplitButton=function(o,i){var n=p(this.parent.tabs,i);if(n){t.merge(n.item.splitButtonSettings,o);var s=f(this.parent,i,n);if(s){var a=t.getComponent(s,r.SplitButton);o.cssClass&&(o.cssClass=(Le+" "+Se+" "+o.cssClass).trim(),o.cssClass=n.item.activeSize===e.RibbonItemSize.Large?(Oe+" "+o.cssClass).trim():o.cssClass,a.cssClass=o.cssClass),delete o.open,delete o.click,delete o.close,delete o.beforeClose,a.setProperties(o),o.content&&this.setContent(n.item,a)}}},o.prototype.updateSplitButtonSize=function(o,i){var n=t.getComponent(o,r.SplitButton),s=n.cssClass.split(" ");i.activeSize===e.RibbonItemSize.Large?s.push(Oe):s=s.filter(function(e){return e!==Oe}),n.cssClass=s.join(" "),n.setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left"}),this.setContent(i,n)},o}(),to=function(){function o(e){this.parent=e,this.isSelected=!1}return o.prototype.getModuleName=function(){return"ribbonGroupButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createGroupButton=function(o,i){var s=this,a=o.groupButtonSettings;this.count=0;var l=this.parent.createElement("div",{id:o.id+Vt,className:"e-btn-group"});i.appendChild(l);for(var c=0;c<a.items.length;c++)if(a.items[parseInt(c.toString(),10)].iconCss){var p=this.parent.createElement("button",{id:o.id+Vt+c,className:Ke});l.appendChild(p),new n.Button({iconCss:a.items[parseInt(c.toString(),10)].iconCss,disabled:o.disabled,enableRtl:this.parent.enableRtl,content:o.activeSize===e.RibbonItemSize.Small?"":a.items[parseInt(c.toString(),10)].content,iconPosition:o.activeSize===e.RibbonItemSize.Large?"Top":"Left"},p),a.items[parseInt(c.toString(),10)].htmlAttributes&&C(p,a.items[parseInt(c.toString(),10)].htmlAttributes);var u=i.querySelector("#"+o.id+Vt+c);a.selection===e.RibbonGroupButtonSelection.Single?l.classList.add(Ue):l.classList.add(Ve),a.items[parseInt(c.toString(),10)].selected&&(a.selection===e.RibbonGroupButtonSelection.Multiple?u.classList.add("e-active"):this.count<1&&(u.classList.add("e-active"),this.count++)),a.items[parseInt(c.toString(),10)].ribbonTooltipSettings&&y(a.items[parseInt(c.toString(),10)].ribbonTooltipSettings)&&(p.classList.add(yt),this.parent.tooltipData.push({id:p.id,data:a.items[parseInt(c.toString(),10)].ribbonTooltipSettings})),t.EventHandler.add(u,"click",this.groupButtonClicked.bind(this,c,o,a),this)}if("Simplified"===this.parent.activeLayout){var d=void 0,h=0,b=0;u=this.parent.createElement("button",{id:o.id});i.appendChild(u);for(c=0;c<a.items.length;c++)o.groupButtonSettings.items[parseInt(c.toString(),10)].selected&&!this.isSelected&&a.selection===e.RibbonGroupButtonSelection.Single?(d=o.groupButtonSettings.items[parseInt(c.toString(),10)].iconCss,this.isSelected=!0):o.groupButtonSettings.items[parseInt(c.toString(),10)].selected&&a.selection===e.RibbonGroupButtonSelection.Multiple&&(d=1===++h?o.groupButtonSettings.items[parseInt(c.toString(),10)].iconCss:null);for(;b<o.groupButtonSettings.items.length&&!this.isSelected&&!d;)o.groupButtonSettings.items[parseInt(b.toString(),10)].iconCss&&(d=o.groupButtonSettings.items[parseInt(b.toString(),10)].iconCss,this.isSelected=!0),b++;new r.DropDownButton({iconCss:d,target:l,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-dropdown-group-button",disabled:o.disabled},u),u.onclick=u.onkeydown=function(){i.querySelector("#"+o.id).classList.contains("e-active")&&(document.querySelector("#"+o.id+Vt+0).focus(),s.grpBtnIndex=0)},l.onkeydown=function(e){"Simplified"===s.parent.activeLayout&&s.handleGroupButtonNavigation(e,o)},g(l,this.parent),this.isSelected=!1}},o.prototype.groupButtonClicked=function(o,i,n){for(var s,a,l=[],c=[],p=[],u=0;u<n.items.length;u++)document.querySelector("#"+i.id+Vt+u)&&document.querySelector("#"+i.id+Vt+u).classList.contains("e-active")&&l.push(n.items[parseInt(u.toString(),10)]);document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")||c.push(n.items[parseInt(o.toString(),10)]);var d={cancel:!1,previousItems:l,selectingItems:c};if(n.items[parseInt(o.toString(),10)].beforeClick&&n.items[parseInt(o.toString(),10)].beforeClick.call(this,d),!d.cancel){if(n.selection===e.RibbonGroupButtonSelection.Single){document.querySelector("#"+i.id+Vt).classList.contains(Ve)&&(document.querySelector("#"+i.id+Vt).classList.remove(Ve),document.querySelector("#"+i.id+Vt).classList.add(Ue));for(u=0;u<n.items.length;u++)document.querySelector("#"+i.id+Vt+u)&&document.querySelector("#"+i.id+Vt+u).classList.contains("e-active")&&document.querySelector("#"+i.id+Vt+u).classList.remove("e-active");document.querySelector("#"+i.id+Vt+o).classList.toggle("e-active"),document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&"Simplified"===this.parent.activeLayout&&(this.grpBtnIndex=o,s=document.querySelector("#"+i.id),(a=t.getComponent(s,r.DropDownButton)).setProperties({iconCss:n.items[parseInt(o.toString(),10)].iconCss}))}else{document.querySelector("#"+i.id+Vt).classList.contains(Ue)&&(document.querySelector("#"+i.id+Vt).classList.remove(Ue),document.querySelector("#"+i.id+Vt).classList.add(Ve)),document.querySelector("#"+i.id+Vt+o).classList.toggle("e-active");for(var h=0,b=0;b<n.items.length;b++)document.querySelector("#"+i.id+Vt+b)&&document.querySelector("#"+i.id+Vt+b).classList.contains("e-active")&&"Simplified"===this.parent.activeLayout&&b!==o&&(this.isSelected=!0,h++);if("Simplified"===this.parent.activeLayout){var m=null,f=0;if(s=document.querySelector("#"+i.id),a=t.getComponent(s,r.DropDownButton),this.isSelected){if(1===h&&!document.querySelector("#"+i.id+Vt+o).classList.contains("e-active"))for(b=0;b<n.items.length;b++)document.querySelector("#"+i.id+Vt+b)&&document.querySelector("#"+i.id+Vt+b).classList.contains("e-active")&&(m=n.items[parseInt(b.toString(),10)].iconCss)}else document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&(m=n.items[parseInt(o.toString(),10)].iconCss);for(;f<n.items.length&&!m;)n.items[parseInt(f.toString(),10)].iconCss&&(m=n.items[parseInt(f.toString(),10)].iconCss),f++;a.setProperties({iconCss:m}),this.grpBtnIndex=o}this.isSelected=!1}document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&p.push(n.items[parseInt(o.toString(),10)]);var y={previousItems:l,selectedItems:p};n.items[parseInt(o.toString(),10)].click&&n.items[parseInt(o.toString(),10)].click.call(this,y)}},o.prototype.switchGroupButton=function(o,i){var n=this,s=o.groupButtonSettings,a=null,l=0,c=0;if("Simplified"===this.parent.activeLayout){var p=i.querySelector("#"+o.id+Vt),u=this.parent.createElement("button",{id:o.id});i.appendChild(u);for(var d=0;d<s.items.length;d++)document.querySelector("#"+o.id+Vt+d)&&(document.querySelector("#"+o.id+Vt+d).classList.contains("e-active")&&s.selection===e.RibbonGroupButtonSelection.Single?a=s.items[parseInt(d.toString(),10)].iconCss:document.querySelector("#"+o.id+Vt+d).classList.contains("e-active")&&s.selection===e.RibbonGroupButtonSelection.Multiple&&(1===++l?a=s.items[parseInt(d.toString(),10)].iconCss:l>1&&(a=null)));for(;c<s.items.length&&!a;)s.items[parseInt(c.toString(),10)].iconCss&&(a=s.items[parseInt(c.toString(),10)].iconCss),c++;new r.DropDownButton({iconCss:a,target:p,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-dropdown-group-button",disabled:o.disabled},u),u.onclick=u.onkeydown=function(){i.querySelector("#"+o.id).classList.contains("e-active")&&(document.querySelector("#"+o.id+Vt+0).focus(),n.grpBtnIndex=0)},p.onkeydown=function(e){"Simplified"===n.parent.activeLayout&&n.handleGroupButtonNavigation(e,o)},g(p,this.parent)}else{var h=i.querySelector("#"+o.id),b=t.getComponent(h,r.DropDownButton);i.appendChild(b.target),h&&(b.destroy(),t.remove(h))}},o.prototype.handleGroupButtonNavigation=function(e,o){var i=document.querySelector("#"+o.id),n=t.getComponent(i,r.DropDownButton).target,s=!1;"Simplified"===this.parent.activeLayout&&n.closest(".e-ribbon-dropdown-group-button").classList.contains(Xe)&&(s=!0),"Tab"===e.key&&e.preventDefault();var a=o.groupButtonSettings;"ArrowRight"===e.key&&!s||"ArrowDown"===e.key&&s?!this.parent.enableRtl||"ArrowDown"===e.key&&s?(this.grpBtnIndex++,this.grpBtnIndex<a.items.length?document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus():(this.grpBtnIndex=0,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus())):0===this.grpBtnIndex?(this.grpBtnIndex=a.items.length-1,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex--,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):("ArrowLeft"===e.key&&!s||"ArrowUp"===e.key&&s)&&(!this.parent.enableRtl||"ArrowUp"===e.key&&s?0===this.grpBtnIndex?(this.grpBtnIndex=a.items.length-1,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex--,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex++,this.grpBtnIndex<a.items.length?document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus():(this.grpBtnIndex=0,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus())))},o.prototype.addOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.DropDownButton);s.setProperties({cssClass:s.cssClass+" "+Xe});var a=s.target;a.onclick=function(){"Simplified"===i.parent.activeLayout&&a.closest(".e-ribbon-dropdown-group-button").classList.contains(Xe)&&(s.element.focus(),s.toggle())}},o.prototype.removeOverFlowEvents=function(e,o){var i=o.querySelector("#"+e.id);if(i){var n=t.getComponent(i,r.DropDownButton),s=n.cssClass.split(" ");s=s.filter(function(e){return e!==Xe}),n.setProperties({cssClass:s.join(" ")})}},o.prototype.destroyDropDown=function(e){var o=document.querySelector("#"+e.id);if(o){var i=t.getComponent(o,r.DropDownButton);t.getComponent(i.target,a.Tooltip).destroy(),i.destroy(),t.remove(o)}},o.prototype.updateGroupButtonSize=function(o,i){for(var r,s=i.groupButtonSettings,a=0;a<s.items.length;a++)if(r="Classic"===this.parent.activeLayout?o.querySelector("#"+i.id+Vt+a):document.querySelector("#"+i.id+Vt+a)){t.getComponent(r,n.Button).setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left",content:i.activeSize===e.RibbonItemSize.Small?"":s.items[parseInt(a.toString(),10)].content})}},o}(),oo=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),io=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ro=function(i){function s(e,t){return a.Inject(Zt,Yt,$t,eo,Qt,to),i.call(this,e,t)||this}oo(s,i),a=s,s.prototype.render=function(){this.initialize()},s.prototype.preRender=function(){this.idIndex=0,this.tooltipData=[],this.initialPropsData={},this.isAddRemove=!1,this.keyConfigs={leftarrow:"leftarrow",rightarrow:"rightarrow",tab:"tab",shiftTab:"shift+tab"}},s.prototype.getPersistData=function(){return this.addOnPersist(["activeLayout"])},s.prototype.getModuleName=function(){return"ribbon"},s.prototype.requiredModules=function(){var e=[];return e.push({member:"ribbonButton",args:[this]},{member:"ribbonDropDown",args:[this]},{member:"ribbonSplitButton",args:[this]},{member:"ribbonCheckBox",args:[this]},{member:"ribbonColorPicker",args:[this]},{member:"ribbonComboBox",args:[this]},{member:"ribbonGroupButton",args:[this]},{member:"ribbonFileMenu",args:[this]},{member:"ribbonBackstage",args:[this]}),e},s.prototype.initialize=function(){this.element.id=this.element.id||t.getUniqueID("e-"+this.getModuleName()),t.addClass([this.element],["e-rbn"].concat(this.cssClass?this.cssClass.split(" "):[])),this.enableRtl&&this.element.classList.add(Pe),this.element.style.width=t.formatUnit(this.width),this.renderTabs(),this.ribbonFileMenuModule&&this.ribbonFileMenuModule.createFileMenu(this.fileMenu),this.ribbonBackstageModule&&this.ribbonBackstageModule.createBackStage(this.backStageMenu),this.createHelpPaneTemplate();this.tabObj.tbObj.refreshOverflow(),g(this.element,this),this.wireEvents(),this.wireKeyboardEvent(),this.currentControlIndex=0},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this)},s.prototype.wireKeyboardEvent=function(){this.keyboardModuleRibbon=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.keyActionHandler=function(e){"Tab"!==e.key||e.target.classList.contains("e-tab-wrap")||e.target.classList.contains("e-combobox")||e.preventDefault();var t,o=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt),i=o.querySelectorAll(".e-control"),r=o.querySelectorAll(".e-combobox");if(r)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)].closest(".e-input-focus")&&(t=r[parseInt(n.toString(),10)]);if(t)for(n=0;n<i.length;n++)i[parseInt(n.toString(),10)].classList.contains("e-combobox")&&i[parseInt(n.toString(),10)].closest(".e-input-focus")&&(this.currentControlIndex=n);if(0===this.currentControlIndex)for(var s=i[this.currentControlIndex].closest(".e-ribbon-item");s&&s.classList.contains("e-disabled");)this.currentControlIndex++,s=i[this.currentControlIndex].closest(".e-ribbon-item");if(e.target.classList.contains("e-control")||e.target.classList.contains("e-ribbon-launcher-icon")||e.target.classList.contains("e-ribbon-collapse-btn")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-first-item")||e.target.classList.contains("e-ribbon-group-of-btn")||e.target.classList.contains("e-ribbon-overall-of-btn"))switch(e.action){case"rightarrow":this.handleNavigation(e,!this.enableRtl,i);break;case"leftarrow":this.handleNavigation(e,this.enableRtl,i);break;case"tab":e.target.classList.contains("e-combobox")&&this.currentControlIndex<i.length-1&&this.currentControlIndex++;break;case"shiftTab":e.target.classList.contains("e-combobox")?this.currentControlIndex>0&&this.currentControlIndex--:(this.tabObj.element.querySelector(".e-toolbar-item.e-active").querySelector(".e-tab-wrap").focus(),this.currentControlIndex=0)}},s.prototype.handleNavigation=function(e,t,o){var i,r;if(t?this.currentControlIndex<o.length-1&&o[this.currentControlIndex+1].classList.contains("e-colorpicker")&&this.currentControlIndex++:this.currentControlIndex>0&&o[this.currentControlIndex-1].classList.contains("e-colorpicker")&&this.currentControlIndex--,!t&&this.currentControlIndex>0||t&&this.currentControlIndex<o.length-1){if(!e.target.classList.contains("e-combobox")&&e.target.classList.contains("e-control")&&!e.target.classList.contains("e-ribbon-last-item")){if(t)this.currentControlIndex++;else{var n=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze);n&&(r=n.getAttribute("id")),this.currentControlIndex--}for(var s=o[this.currentControlIndex].closest(".e-ribbon-item");s&&s.classList.contains("e-disabled");){if((t&&this.currentControlIndex===o.length-1||!t&&0===this.currentControlIndex)&&o[this.currentControlIndex].closest(".e-ribbon-item").classList.contains("e-disabled")){this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus();break}t?this.currentControlIndex++:this.currentControlIndex--,s=o[this.currentControlIndex].closest(".e-ribbon-item")}if(o[parseInt(this.currentControlIndex.toString(),10)].focus(),"Classic"===this.activeLayout){if(i=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze),t){var a=void 0;if(i&&(a=i.querySelector(".e-ribbon-launcher-icon")),a){var l=i.querySelectorAll(".e-ribbon-item");l[l.length-1].querySelector(".e-control").classList.add("e-ribbon-last-item")}}else if(i){if(r!==i.getAttribute("id")){(a=i.querySelector(".e-ribbon-launcher-icon"))&&o[parseInt((this.currentControlIndex+1).toString(),10)].classList.add("e-ribbon-first-item")}}}else o[parseInt(this.currentControlIndex.toString(),10)].classList.contains("e-ribbon-first-item")?o[parseInt(this.currentControlIndex.toString(),10)].classList.remove("e-ribbon-first-item"):o[parseInt(this.currentControlIndex.toString(),10)].classList.contains("e-ribbon-last-item")&&o[parseInt(this.currentControlIndex.toString(),10)].classList.remove("e-ribbon-last-item")}}else if("Classic"===this.activeLayout&&this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus(),"Simplified"===this.activeLayout){var c=this.tabObj.element.querySelector(".e-ribbon-overall-of-btn");t&&c&&!c.classList.contains("e-ribbon-hide")?c.focus():this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus()}if(e.target.classList.contains("e-ribbon-last-item")&&(t?(i=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze)).querySelector(".e-ribbon-launcher-icon").focus():(this.currentControlIndex--,o[parseInt(this.currentControlIndex.toString(),10)].focus())),!t&&e.target.classList.contains("e-ribbon-first-item")){(a=(i=o[parseInt((this.currentControlIndex-1).toString(),10)].closest("."+Ze)).querySelector(".e-ribbon-launcher-icon"))&&i.querySelector(".e-ribbon-launcher-icon").focus()}if(e.target.classList.contains("e-ribbon-launcher-icon")&&(t?(this.currentControlIndex++,o[parseInt(this.currentControlIndex.toString(),10)].focus(),o[parseInt((this.currentControlIndex-1).toString(),10)].classList.contains("e-ribbon-last-item")&&o[parseInt((this.currentControlIndex-1).toString(),10)].classList.remove("e-ribbon-last-item")):(this.currentControlIndex,o[parseInt(this.currentControlIndex.toString(),10)].focus())),e.target.classList.contains("e-ribbon-collapse-btn"))if(t){this.currentControlIndex=0;for(var p=o[this.currentControlIndex].closest(".e-ribbon-item");p&&p.classList.contains("e-disabled");)this.currentControlIndex++,p=o[this.currentControlIndex].closest(".e-ribbon-item");o[parseInt(this.currentControlIndex.toString(),10)].focus()}else{if((c=this.tabObj.element.querySelector(".e-ribbon-overall-of-btn"))&&!c.classList.contains("e-ribbon-hide"))c.focus();else{this.currentControlIndex=o.length-1;for(p=o[this.currentControlIndex].closest(".e-ribbon-item");p&&p.classList.contains("e-disabled");)this.currentControlIndex--,p=o[this.currentControlIndex].closest(".e-ribbon-item");o[parseInt(this.currentControlIndex.toString(),10)].focus()}}"Simplified"===this.activeLayout&&e.target.classList.contains("e-ribbon-overall-of-btn")&&(t?this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus():(this.currentControlIndex=o.length-1,o[parseInt(this.currentControlIndex.toString(),10)].focus()))},s.prototype.resizeHandler=function(){var e=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);if(this.checkOverflow(this.selectedTab,e),this.scrollModule){var t=this.tabObj.element.querySelector("."+ke);this.scrollModule.scrollStep=t.offsetWidth}},s.prototype.renderTabs=function(){this.tabsInternal=this.tabs.slice(),this.tabsInternal=this.checkID(this.tabsInternal,"tab",this.element.id),this.setProperties({tabs:this.tabsInternal},!0);var e=this.createElement("div",{id:this.element.id+"_tab"});this.element.appendChild(e),this.validateItemSize();var i=this.createTabItems(this.tabs);this.tabObj=new o.Tab({cssClass:"e-ribbon-tab",selectedItem:this.selectedTab,overflowMode:"Popup",width:this.width,items:i,enableRtl:this.enableRtl,created:this.tabCreated.bind(this),selected:this.ribbonTabSelected.bind(this),selecting:this.ribbonTabSelecting.bind(this)}),this.tabObj.appendTo(e),this.element.style.setProperty(Kt,"0px"),this.element.style.setProperty(Xt,"0px");var r=e.querySelector(".e-toolbar");t.getComponent(r,o.Toolbar).setProperties({width:"calc(100% - var(--fileMenuWidth) - var(--helpTemplateWidth))"}),this.element.classList[this.isMinimized?"add":"remove"](We)},s.prototype.minimize=function(e){var t=this;if(e!==this.isMinimized){this.trigger(e?"ribbonCollapsing":"ribbonExpanding",{cancel:!1},function(o){o.cancel||(t.setProperties({isMinimized:e},!0),t.element.classList.toggle(We,t.isMinimized),t.tabObj.element.querySelector(".e-content").style.display=e?"none":"block",e||t.refreshLayout())})}},s.prototype.toggleLayout=function(){this.setProperties({activeLayout:"Simplified"===this.activeLayout?"Classic":"Simplified"},!0),this.switchLayout()},s.prototype.tabCreated=function(){this.hideLayoutSwitcher||this.addExpandCollapse(),this.renderInitialTab(this.selectedTab)},s.prototype.ribbonTabSelected=function(e){this.isAddRemove=!1;var t=e.selectedItem.getAttribute("data-id"),o=l(this.tabs,function(e){return e.id===t});o=-1===o?this.selectedTab:o;var i={previousIndex:this.selectedTab,selectedIndex:o};if(this.setProperties({selectedTab:o},!0),this.checkOverflow(o,e.selectedContent.firstChild),"Simplified"===this.activeLayout&&this.overflowDDB){var r=this.overflowDDB.target,n=r.querySelector("."+Me);n&&n.classList.remove(Me);var s=r.querySelector("#"+t+At);s?(s.classList.add(Me),this.overflowDDB.element.classList.remove(Ee)):this.overflowDDB.element.classList.add(Ee)}this.trigger("tabSelected",i)},s.prototype.checkOverflow=function(e,t){var i=t.closest("."+He),r=i.offsetWidth<t.offsetWidth;if(r&&!this.scrollModule){if("Classic"===this.activeLayout){var n=!1;!(n=this.checkGroupShrinking(e,i,t,!0))&&i.offsetWidth<t.offsetWidth&&(n=this.checkGroupShrinking(e,i,t,!1)),i.offsetWidth<t.offsetWidth&&this.createOverflowDropdown(e,i,t)}else this.checkSimplifiedItemShrinking(e,i,t),i.offsetWidth<t.offsetWidth&&this.createSimplfiedOverflow(i,t,e);i.offsetWidth<t.offsetWidth&&!this.scrollModule&&(this.scrollModule=new o.HScroll({enableRtl:this.enableRtl},this.tabObj.element.querySelector("."+He)))}else if(!r)if(this.destroyScroll(),"Classic"===this.activeLayout){n=!1;!(n=this.removeOverflowDropdown(i,t,!1,e))&&i.offsetWidth>t.offsetWidth&&(n=this.checkGroupExpanding(e,i,t,!0)),!n&&i.offsetWidth>t.offsetWidth&&(n=this.checkGroupExpanding(e,i,t,!1))}else this.removeSimplfiedOverflow(i,t,e),i.offsetWidth>t.offsetWidth&&this.checkSimplifiedItemExpanding(e,i,t)},s.prototype.checkSimplifiedItemShrinking=function(t,o,i){for(var r=this.tabs[parseInt(t.toString(),10)],n=r.groups.length-1;n>=0;n--)for(var s=r.groups[parseInt(n.toString(),10)],a=o.querySelector("#"+s.id+jt),l=0;l<s.collections.length&&o.offsetWidth<i.offsetWidth;l++)for(var c=s.collections[parseInt(l.toString(),10)],p=c.items.length;p>=1&&o.offsetWidth<i.offsetWidth;p--){var u=c.items[p-1];if(u.allowedSizes&e.RibbonItemSize.Small&&u.allowedSizes&e.RibbonItemSize.Medium&&u.activeSize===e.RibbonItemSize.Medium&&u.displayOptions&e.DisplayMode.Simplified){var d=a.querySelector("#"+u.id+jt);if(d){var h=d.querySelector("#"+u.id);d.setAttribute("data-medium-width",i.offsetWidth.toString()),u.setProperties({activeSize:e.RibbonItemSize.Small},!0),this.setItemSize(h,u)}}}},s.prototype.checkSimplifiedItemExpanding=function(t,o,i){for(var r=this.tabs[parseInt(t.toString(),10)],n=r.groups.length-1;n>=0;n--)for(var s=r.groups[parseInt(n.toString(),10)],a=o.querySelector("#"+s.id+jt),l=0;l<s.collections.length&&o.offsetWidth>i.offsetWidth;l++)for(var c=s.collections[parseInt(l.toString(),10)],p=c.items.length;p>=1&&o.offsetWidth>i.offsetWidth;p--){var u=c.items[p-1];if(u.allowedSizes&e.RibbonItemSize.Small&&u.allowedSizes&e.RibbonItemSize.Medium&&u.activeSize===e.RibbonItemSize.Small&&u.displayOptions&e.DisplayMode.Simplified){var d=a.querySelector("#"+u.id+jt);if(d){var h=d.getAttribute("data-medium-width"),b=h?parseInt(h,10):null;if(b&&o.offsetWidth>b){d.removeAttribute("data-medium-width");var m=d.querySelector("#"+u.id);u.setProperties({activeSize:e.RibbonItemSize.Medium},!0),this.setItemSize(m,u)}}}}},s.prototype.createSimplfiedOverflow=function(o,i,r){for(var n=this.getGroupResizeOrder(!0,r),s=0;s<n.length&&o.offsetWidth<i.offsetWidth;s++){for(var a=n[parseInt(s.toString(),10)],l=o.querySelector("#"+a.id),c=l.querySelector("#"+a.id+jt),p=a.collections.length;p>=1&&o.offsetWidth<i.offsetWidth;p--)for(var u=a.collections[parseInt((p-1).toString(),10)],d=l.querySelector("#"+u.id),h=u.items.length;h>=1&&o.offsetWidth<i.offsetWidth;h--){var b=u.items[h-1],m=d.querySelector("#"+b.id+jt);if((b.displayOptions===e.DisplayMode.Auto||b.displayOptions===(e.DisplayMode.Simplified|e.DisplayMode.Overflow))&&!t.isNullOrUndefined(m)){if(m.setAttribute("data-simplified-width",i.offsetWidth.toString()),this.createOverflowPopup(b,r,a.enableGroupOverflow,a.id,a.header,m,c,!0),b.activeSize===e.RibbonItemSize.Small){var f=m.querySelector("#"+b.id);b.setProperties({activeSize:e.RibbonItemSize.Medium},!0),this.setItemSize(f,b)}b.type!==e.RibbonItemType.DropDown&&b.type!==e.RibbonItemType.SplitButton&&b.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(b,m,a.enableGroupOverflow,!0)}}a.enableGroupOverflow||l.querySelector("."+at)||l.classList.add("e-ribbon-emptyCollection")}},s.prototype.updatePopupItems=function(o,i,n,s){var a=t.getComponent(i.querySelector("#"+o.id),o.type===e.RibbonItemType.DropDown||o.type===e.RibbonItemType.GroupButton?r.DropDownButton:r.SplitButton),l=a.dropDown,c=(n&&s)===this.enableRtl;l&&(l.setProperties({position:{X:c?"left":"right",Y:s?"top":"bottom"}},!0),s?a.beforeOpen=function(){c&&(l.element.style.setProperty("visibility","hidden"),l.element.style.setProperty("display","block"),l.setProperties({offsetX:-1*l.element.offsetWidth}),l.element.style.removeProperty("display"),l.element.style.removeProperty("visibility"))}:(l.setProperties({offsetX:0},!0),a.beforeOpen=null))},s.prototype.removeSimplfiedOverflow=function(o,i,n,s){void 0===s&&(s=!1);for(var a=this.getGroupResizeOrder(!1,n),l=!0,c=0;c<a.length&&l;c++){var p=a[parseInt(c.toString(),10)],u=void 0,d=void 0;if(p.enableGroupOverflow){var h=o.querySelector("#"+p.id+xt);h&&(d=(u=t.getInstance(h,r.DropDownButton)).target)}else u=this.overflowDDB,d=this.overflowDDB?this.overflowDDB.target:null;for(var b=0;b<p.collections.length&&l;b++)for(var m=p.collections[parseInt(b.toString(),10)],f=0;f<m.items.length&&l&&!s&&o.offsetWidth>i.offsetWidth;f++){var y=m.items[parseInt(f.toString(),10)],v=void 0;if(d&&(v=d.querySelector("#"+y.id+jt)),(y.displayOptions===e.DisplayMode.Auto||y.displayOptions===(e.DisplayMode.Simplified|e.DisplayMode.Overflow))&&!t.isNullOrUndefined(v)){var g=parseInt(v.getAttribute("data-simplified-width"),10);if(!s&&o.offsetWidth<g){l=!1;break}var S=o.querySelector("#"+m.id);y.type!==e.RibbonItemType.DropDown&&y.type!==e.RibbonItemType.SplitButton&&y.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(y,v,p.enableGroupOverflow,!1),S.append(v),this.removeOverflowEvent(y,v),y.allowedSizes&e.RibbonItemSize.Small&&(y.setProperties({activeSize:e.RibbonItemSize.Small},!0),this.setItemSize(v.querySelector("#"+y.id),y))}}var I=o.querySelector("#"+p.id),C=I.querySelector("."+at);if(I.classList.contains("e-ribbon-emptyCollection")&&null!==C&&I.classList.remove("e-ribbon-emptyCollection"),u)if(p.enableGroupOverflow)0===d.childElementCount&&this.removeOverflowButton(u);else{var B=d.querySelector("#"+p.id+jt);B&&1===B.childElementCount&&B.remove();var O=d.querySelector("#"+this.tabs[parseInt(n.toString(),10)].id+At);O&&0===O.childElementCount&&(O.remove(),this.overflowDDB.element.classList.add(Ee))}}if(this.overflowDDB){0===this.overflowDDB.target.childElementCount&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)}},s.prototype.createOverflowPopup=function(e,o,i,n,s,a,l,c){var p,u=this.tabObj.items[parseInt(o.toString(),10)].content.querySelector("#"+n);if(i){var d=l.querySelector("#"+n+xt);d?p=t.getInstance(d,r.DropDownButton):((p=this.addOverflowButton(n+xt)).element.classList.add(Ae),l.appendChild(p.element));var h=p.target;u&&u.classList.contains("e-disabled")&&h.classList.add("e-disabled"),u&&u.classList.contains("e-hidden")&&h.classList.add("e-hidden"),c?h.insertBefore(a,h.querySelector("."+at)):h.append(a)}else{if(this.overflowDDB){this.overflowDDB.element.classList.remove(Ee);var b=this.overflowDDB.target,m=b.querySelector("#"+this.tabs[parseInt(o.toString(),10)].id+At);if(m){var f=b.querySelector("#"+n+jt);f||(f=this.createGroupContainer(n,s),u&&u.classList.contains("e-disabled")&&f.classList.add("e-disabled"),m.append(f)),c?f.insertBefore(a,f.querySelector("."+at)):f.append(a)}else this.createOfTabContainer(n,s,a,o)}else this.overflowDDB=this.addOverflowButton(this.tabObj.element.id+Mt),this.tabObj.element.insertBefore(this.overflowDDB.element,this.collapseButton),this.overflowDDB.element.classList.add(je),this.createOfTabContainer(n,s,a,o);p=this.overflowDDB}null!==a&&this.addOverflowEvents(e,a,p)},s.prototype.addOverflowEvents=function(e,t,o){switch(e.type){case"Button":this.ribbonButtonModule.addOverFlowEvents(e,t,o);break;case"DropDown":this.ribbonDropDownModule.addOverFlowEvents(e,t,o);break;case"SplitButton":this.ribbonSplitButtonModule.addOverFlowEvents(e,t,o);break;case"CheckBox":this.ribbonCheckBoxModule.addOverFlowEvents(e,t,o);break;case"ColorPicker":this.ribbonColorPickerModule.addOverFlowEvents(e,t,o);break;case"ComboBox":this.ribbonComboBoxModule.addOverFlowEvents(e,t,o);break;case"GroupButton":if("Simplified"===this.activeLayout){this.ribbonGroupButtonModule.addOverFlowEvents(e,t);break}}},s.prototype.createOfTabContainer=function(e,t,o,i){var r=this.createElement("div",{id:this.tabs[parseInt(i.toString(),10)].id+At,className:Ye});this.overflowDDB.target.append(r);var n=this.createGroupContainer(e,t);n.append(o),r.append(n),i===this.selectedTab&&r.classList.add(Me);var s=document.querySelector("#"+e);s&&(s.classList.contains("e-disabled")&&n.classList.add("e-disabled"),s.classList.contains("e-hidden")&&n.classList.add("e-hidden"))},s.prototype.checkGroupShrinking=function(e,t,o,i){for(var r=!0,n=!1,s=this.tabs[parseInt(e.toString(),10)],a=s.groups.length-1;r&&a>=0;a--)r=!(n=i?this.checkLargeToMedium(e,s,a,t,o):this.checkMediumToSmall(e,s,a,t,o))&&t.offsetWidth<o.offsetWidth;return n},s.prototype.checkValidCollectionLength=function(t){for(var o=0,i=0;i<t.length;i++){for(var r=t[parseInt(i.toString(),10)].items,n=0;n<r.length;n++)if(r[parseInt(n.toString(),10)].displayOptions&e.DisplayMode.Classic){o++;break}if(o>1)return!1}return 1===o},s.prototype.checkClassicCollection=function(t,o,i){for(var r=t[parseInt(o.toString(),10)].items,n=0;n<r.length;n++)if(r[parseInt(n.toString(),10)].displayOptions&e.DisplayMode.Classic)return o;return o=i?o+1:o-1,i?o===t.length?o:this.checkClassicCollection(t,o,i):o<0?o:this.checkClassicCollection(t,o,i)},s.prototype.checkClassicItem=function(t,o,i){return t[parseInt(o.toString(),10)].displayOptions&e.DisplayMode.Classic?o:(o=i?o+1:o-1,i?o===t.length?o:this.checkClassicItem(t,o,i):o<0?o:this.checkClassicItem(t,o,i))},s.prototype.checkLargeToMedium=function(t,o,i,r,n,s){var a=this;void 0===s&&(s=!1);var l=o.groups[parseInt(i.toString(),10)];if(l.isCollapsed&&!s)return!1;var c=function(e){return 1===e.items.length&&p(e.items[0])},p=function(t){return t.allowedSizes&e.RibbonItemSize.Medium&&t.activeSize===e.RibbonItemSize.Large},u=function(e,t,o,i){var r=a.createElement("div",{className:"e-ribbon-shrink "+lt,id:e+"_shrink_container"+o,attrs:{"data-start":o.toString(),"data-end":i.toString()}});return t.parentElement.insertBefore(r,t),s||r.setAttribute("data-large-width",n.offsetWidth.toString()),r},d=function(o,r){for(var l=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[0],c=n.querySelector("#"+l.items[parseInt(o.toString(),10)].id+jt),p=s?n.querySelector("#"+l.id+"_shrink_container"+o):u(l.id,c,o,r),d=o;d<=r;d++){var h=l.items[parseInt(d.toString(),10)];if(h.displayOptions&e.DisplayMode.Classic){var b=n.querySelector("#"+h.id+jt);p.appendChild(b),h.setProperties({activeSize:e.RibbonItemSize.Medium},!0),h.type===e.RibbonItemType.GroupButton&&"Classic"===a.activeLayout?a.setItemSize(b.querySelector("#"+h.id+Vt),h):a.setItemSize(b.querySelector("#"+h.id),h)}}},h=function(o,r){for(var l=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)],c=n.querySelector("#"+l.collections[parseInt(o.toString(),10)].id),p=s?n.querySelector("#"+l.id+"_shrink_container"+o):u(l.id,c,o,r),d=o;d<=r;d++){var h=l.collections[parseInt(d.toString(),10)],b=n.querySelector("#"+h.id);p.appendChild(b),h.items[0].setProperties({activeSize:e.RibbonItemSize.Medium},!0),h.items[0].type===e.RibbonItemType.GroupButton&&"Classic"===a.activeLayout?a.setItemSize(b.querySelector("#"+h.items[0].id+Vt),h.items[0]):a.setItemSize(b.querySelector("#"+h.items[0].id),h.items[0])}};if(l.orientation===e.ItemOrientation.Column)for(var b=l.collections.length-1;b>0;b--){if((f=(b=this.checkClassicCollection(l.collections,b,!1))-1)>=0&&c(l.collections[parseInt(b.toString(),10)]))if((f=this.checkClassicCollection(l.collections,f,!1))>=0&&c(l.collections[parseInt(f.toString(),10)])){if((y=f-1)>=0&&(y=this.checkClassicCollection(l.collections,y,!1)),y>=0&&c(l.collections[parseInt(y.toString(),10)])?h(y,b):h(f,b),b=y,!s&&r.offsetWidth>n.offsetWidth)return!0}else b=f}else if(this.checkValidCollectionLength(l.collections)){var m=l.collections[0];for(b=m.items.length-1;b>0;b--){var f;if((f=(b=this.checkClassicItem(m.items,b,!1))-1)>=0&&p(m.items[parseInt(b.toString(),10)]))if((f=this.checkClassicItem(m.items,f,!1))>=0&&p(m.items[parseInt(f.toString(),10)])){var y;if((y=f-1)>=0&&(y=this.checkClassicItem(m.items,y,!1)),y>=0&&p(m.items[parseInt(y.toString(),10)])?d(y,b):d(f,b),b=y,!s&&r.offsetWidth>n.offsetWidth)return!0}else b=f}}return!1},s.prototype.checkMediumToSmall=function(t,o,i,r,n,s){var a=this;void 0===s&&(s=!1);var l=o.groups[parseInt(i.toString(),10)];if(l.isCollapsed&&!s)return!1;var c=l.orientation,p=n.querySelector("#"+l.id).querySelectorAll(".e-ribbon-shrink"),u=function(t){return t.allowedSizes&e.RibbonItemSize.Small&&t.activeSize===e.RibbonItemSize.Medium},d=function(o,r,s,l){void 0===l&&(l=null);var c=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[parseInt(o.toString(),10)],p=function(t){var o=c.items[parseInt(t.toString(),10)];if(o.displayOptions&e.DisplayMode.Classic){var i=n.querySelector("#"+o.id);o.setProperties({activeSize:e.RibbonItemSize.Small},!0),o.type===e.RibbonItemType.GroupButton&&(i=n.querySelector("#"+o.id+"_grpbtn")),a.setItemSize(i,o)}};p(r),l&&p(l),p(s)},h=function(o,r,l,c){void 0===c&&(c=null);var u=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)];s||p[parseInt(o.toString(),10)].setAttribute("data-medium-width",n.offsetWidth.toString());var d=function(t){var o=u.collections[parseInt(t.toString(),10)];if(o.items[0].displayOptions&e.DisplayMode.Classic){var i=n.querySelector("#"+o.items[0].id);o.items[0].setProperties({activeSize:e.RibbonItemSize.Small},!0),o.items[0].type===e.RibbonItemType.GroupButton&&(i=n.querySelector("#"+o.items[0].id+Vt)),a.setItemSize(i,o.items[0])}};d(r),c&&d(c),d(l)},b=function(e){if(!s){n.querySelector("#"+e).setAttribute("data-medium-width",n.offsetWidth.toString())}};if(c===e.ItemOrientation.Column){if(p.length>0)for(var m=p.length-1;m>=0;m--){var f=parseInt(p[parseInt(m.toString(),10)].getAttribute("data-start"),10),y=parseInt(p[parseInt(m.toString(),10)].getAttribute("data-end"),10),v=this.checkClassicCollection(l.collections,f+1,!1);if(u(l.collections[parseInt(f.toString(),10)].items[0])&&u(l.collections[parseInt(v.toString(),10)].items[0])&&(y===v?h(m,f,y):u(l.collections[parseInt(y.toString(),10)].items[0])&&h(m,f,y,v),!s&&r.offsetWidth>n.offsetWidth))return!0}for(m=l.collections.length-1;m>=0;m--){for(var g=l.collections[parseInt(m.toString(),10)],S=[],I=0;I<g.items.length;I++)g.items[parseInt(I.toString(),10)].displayOptions&e.DisplayMode.Classic&&S.push(I);if(S.length>1&&u(g.items[S[0]])&&u(g.items[S[1]])&&(2===S.length?(b(g.id),d(m,S[0],S[1])):u(g.items[S[2]])&&(b(g.id),d(m,S[0],S[2],S[1])),!s&&r.offsetWidth>n.offsetWidth))return!0}}else if(this.checkValidCollectionLength(l.collections)){if(p.length>0)for(m=p.length-1;m>=0;m--){var C=p[parseInt(m.toString(),10)];f=parseInt(C.getAttribute("data-start"),10),y=parseInt(C.getAttribute("data-end"),10),g=l.collections[0],v=this.checkClassicItem(g.items,f+1,!1);if(u(l.collections[0].items[parseInt(f.toString(),10)])&&u(l.collections[0].items[parseInt(v.toString(),10)])&&(y===v?(b(C.id),d(0,f,y)):u(l.collections[0].items[parseInt(y.toString(),10)])&&(b(C.id),d(0,f,y,v)),!s&&r.offsetWidth>n.offsetWidth))return!0}}else for(m=l.collections.length-1;m>=0;m--)for(v=(g=l.collections[parseInt(m.toString(),10)]).items.length-1;v>=0;v--)if(!((v=this.checkClassicItem(g.items,v,!1))<0)){var B=g.items[parseInt(v.toString(),10)];if(u(B)&&(B.type!==e.RibbonItemType.GroupButton?b(B.id):b(B.id+Vt),d(m,v,v),!s&&r.offsetWidth>n.offsetWidth))return!0}return!1},s.prototype.checkGroupExpanding=function(e,t,o,i){for(var r=!1,n=this.tabs[parseInt(e.toString(),10)],s=0;!r&&s<n.groups.length;s++)r=i?this.checkSmallToMedium(e,n,s,t,o,!1,!0):this.checkMediumToLarge(e,n,s,t,o,!1,!0);return r},s.prototype.checkSmallToMedium=function(t,o,i,r,n,s,a){var l=this,c=o.groups[parseInt(i.toString(),10)],p=c.orientation,u=n.querySelector("#"+c.id).querySelectorAll(".e-ribbon-shrink"),d=function(t){return t.allowedSizes&e.RibbonItemSize.Medium&&t.activeSize===e.RibbonItemSize.Small},h=function(o,r,n){var s=l.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[parseInt(o.toString(),10)].items[parseInt(r.toString(),10)];if(s.displayOptions&e.DisplayMode.Classic){var a=n.id===s.id?n:n.querySelector("#"+s.id);s.setProperties({activeSize:e.RibbonItemSize.Medium},!0),s.type===e.RibbonItemType.GroupButton&&(a=document.querySelector("#"+s.id+Vt)),l.setItemSize(a,s)}},b=function(o){var r=l.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections,s=r[parseInt(o.toString(),10)].items[0];if(s.displayOptions&e.DisplayMode.Classic){var a=n.querySelector("#"+r[parseInt(o.toString(),10)].items[0].id);r[parseInt(o.toString(),10)].items[0].setProperties({activeSize:e.RibbonItemSize.Medium},!0),s.type===e.RibbonItemType.GroupButton&&(a=n.querySelector("#"+r[parseInt(o.toString(),10)].items[0].id+Vt)),l.setItemSize(a,r[parseInt(o.toString(),10)].items[0])}};if(p===e.ItemOrientation.Row){if(!this.checkValidCollectionLength(c.collections))for(var m=0;m<c.collections.length;m++)for(var f=c.collections[parseInt(m.toString(),10)],y=0;y<f.items.length;y++)if((y=this.checkClassicItem(f.items,y,!0))!==f.items.length){var v=f.items[parseInt(y.toString(),10)];if(d(v)){var g=n.querySelector("#"+v.id);"GroupButton"===v.type&&(g=n.querySelector("#"+v.id+Vt));if((S=(B=g.getAttribute("data-medium-width"))?parseInt(B,10):null)&&(s||r.offsetWidth>S))h(m,y,g),s&&!a||g.removeAttribute("data-medium-width");else if(S)return!0}}}else for(m=0;m<c.collections.length;m++)if(c.collections[parseInt(m.toString(),10)].items.length>1){f=c.collections[parseInt(m.toString(),10)];for(var S=(B=(g=n.querySelector("#"+f.id)).getAttribute("data-medium-width"))?parseInt(B,10):null,I=[],C=0;C<f.items.length;C++)f.items[parseInt(C.toString(),10)].displayOptions&e.DisplayMode.Classic&&I.push(C);if(I.length>1&&S&&(s||r.offsetWidth>S))h(m,I[0],g),h(m,I[1],g),3===I.length&&h(m,I[2],g),s&&!a||g.removeAttribute("data-medium-width");else if(S)return!0}if(u.length>0)for(m=0;m<u.length;m++){var B,O=u[parseInt(m.toString(),10)];if((S=(B=O.getAttribute("data-medium-width"))?parseInt(B,10):null)&&(s||r.offsetWidth>S)){var w=parseInt(O.getAttribute("data-start"),10),P=parseInt(O.getAttribute("data-end"),10);if(p===e.ItemOrientation.Row){f=c.collections[0],y=this.checkClassicItem(f.items,w+1,!0);h(0,w,O),h(0,y,O),y!==P&&h(0,P,O)}else{var D=this.checkClassicCollection(c.collections,w+1,!0);b(w),b(D),D!==P&&b(P)}s&&!a||O.removeAttribute("data-medium-width")}else if(S)return!0}return!1},s.prototype.checkMediumToLarge=function(o,i,r,n,s,a,l){var c=this,p=i.groups[parseInt(r.toString(),10)],u=p.orientation,d=s.querySelector("#"+p.id).querySelectorAll(".e-ribbon-shrink");if(0===d.length)return!1;for(var h=function(i,n,s,p){var u=c.tabs[parseInt(o.toString(),10)].groups[parseInt(r.toString(),10)].collections[0].items,d=function(t){var o=u[parseInt(t.toString(),10)];if(o.displayOptions&e.DisplayMode.Classic){var i=s.querySelector("#"+o.id+jt),r=i.querySelector("#"+o.id);o.setProperties({activeSize:e.RibbonItemSize.Large},!0),o.type===e.RibbonItemType.GroupButton&&(r=i.querySelector("#"+o.id+Vt)),c.setItemSize(r,o),s.insertAdjacentElement("beforebegin",i)}};d(i),p&&d(p),d(n),a&&!l||t.remove(s)},b=function(i,n,s,p){var u=c.tabs[parseInt(o.toString(),10)].groups[parseInt(r.toString(),10)].collections,d=function(t){var o=u[parseInt(t.toString(),10)];if(o.items[0].displayOptions&e.DisplayMode.Classic){var i=s.querySelector("#"+o.id),r=i.querySelector("#"+o.items[0].id);o.items[0].setProperties({activeSize:e.RibbonItemSize.Large},!0),o.items[0].type===e.RibbonItemType.GroupButton&&(r=i.querySelector("#"+o.items[0].id+Vt)),c.setItemSize(r,o.items[0]),s.insertAdjacentElement("beforebegin",i)}};d(i),p&&d(p),d(n),a&&!l||t.remove(s)},m=0;m<d.length;m++){var f=d[parseInt(m.toString(),10)],y=f.getAttribute("data-large-width"),v=y?parseInt(y,10):null;if(v&&(a||n.offsetWidth>v)){var g=parseInt(f.getAttribute("data-start"),10),S=parseInt(f.getAttribute("data-end"),10);if(u===e.ItemOrientation.Row){var I=p.collections[0],C=this.checkClassicItem(I.items,g+1,!0);C===S?h(g,S,f):h(g,S,f,C)}else{var B=this.checkClassicCollection(p.collections,g+1,!0);B===S?b(g,S,f):b(g,S,f,B)}a&&!l||f.removeAttribute("data-large-width")}else if(v)return!0}return!1},s.prototype.handleContentSize=function(e,t){var o=e.closest("."+Qe);t?o.classList.add(ht):o.classList.remove(ht)},s.prototype.setItemSize=function(o,i){if(o){var r=o.closest("."+at);i.type===e.RibbonItemType.Button?this.ribbonButtonModule.updateButtonSize(o,i):i.type===e.RibbonItemType.DropDown?this.ribbonDropDownModule.updateDropDownSize(o,i):i.type===e.RibbonItemType.SplitButton?this.ribbonSplitButtonModule.updateSplitButtonSize(o,i):i.type===e.RibbonItemType.Template?(t.remove(o),this.createTemplateContent(i,r)):i.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.updateGroupButtonSize(o,i),r.classList.remove(ht,pt,ut,dt),i.activeSize===e.RibbonItemSize.Large?r.classList.add(pt,ht):r.classList.add(i.activeSize===e.RibbonItemSize.Medium?ut:dt)}},s.prototype.createOverflowDropdown=function(e,t,o){var i=this.getGroupResizeOrder(!0,e);if(0!==i.length)for(var r=function(r){var s=i[parseInt(r.toString(),10)],a=n.tabObj.element.querySelector("#"+s.id);a.setAttribute("data-expanded-width",o.offsetWidth.toString());var c=a.querySelector("#"+s.id+jt),p=n.createElement("div",{className:tt+" "+pt,id:s.id+At+jt});a.insertBefore(p,c);var u=l(n.tabs[parseInt(e.toString(),10)].groups,function(e){return e.id===s.id}),d=n.tabs[parseInt(e.toString(),10)];n.checkSmallToMedium(e,d,u,t,o,!0,!1),n.checkMediumToLarge(e,d,u,t,o,!0,!1);var h=n.ribbonDropDownModule.createOverFlowDropDown(s.id,s.header,s.groupIconCss,c,p,n.enableRtl);n.tabs[parseInt(e.toString(),10)].groups[parseInt(u.toString(),10)].setProperties({isCollapsed:!0},!0);for(var b=0;b<s.collections.length;b++)for(var m=s.collections[parseInt(b.toString(),10)],f=c.querySelector("#"+m.id),y=0;y<m.items.length;y++){var v=m.items[parseInt(y.toString(),10)],g=f.querySelector("#"+v.id+jt);null!==g&&(n.handleContentSize(g),n.addOverflowEvents(v,g,h))}},n=this,s=0;s<i.length&&t.offsetWidth<o.offsetWidth;s++)r(s)},s.prototype.removeOverflowDropdown=function(e,t,o,i){void 0===o&&(o=!1);var r=this.getGroupResizeOrder(!1,i);if(0===r.length)return!1;for(var n=function(n){var a=r[parseInt(n.toString(),10)],c=s.tabObj.element.querySelector("#"+a.id);if(!c)return"break";var p=parseInt(c.getAttribute("data-expanded-width"),10);if(!o&&e.offsetWidth<p)return{value:!0};s.removeDropdown(a.id);var u=l(s.tabs[parseInt(i.toString(),10)].groups,function(e){return e.id===a.id});s.tabs[parseInt(i.toString(),10)].groups[parseInt(u.toString(),10)].setProperties({isCollapsed:!1},!0);var d=s.tabs[parseInt(i.toString(),10)];s.checkLargeToMedium(i,d,u,e,t,!0),s.checkMediumToSmall(i,d,u,e,t,!0);for(var h=0;h<a.collections.length;h++)for(var b=a.collections[parseInt(h.toString(),10)],m=c.querySelector("#"+b.id),f=0;f<b.items.length;f++){var y=b.items[parseInt(f.toString(),10)],v=m.querySelector("#"+y.id+jt);null!==v&&(s.handleContentSize(v,!0),s.removeOverflowEvent(y,v))}},s=this,a=0;a<r.length;a++){var c=n(a);if("object"==typeof c)return c.value;if("break"===c)break}return!1},s.prototype.removeDropdown=function(e){var o=this.tabObj.element.querySelector("#"+e+At+Nt);if(o){var i=o.parentElement;this.ribbonDropDownModule.removeOverFlowDropDown(o),t.remove(i)}},s.prototype.getGroupResizeOrder=function(e,o){var i=this,r=this.tabs[parseInt(o.toString(),10)].groups;return(r=r.filter(function(o){return"Classic"!==i.activeLayout||(t.isUndefined(o.isCollapsible)||o.isCollapsible)&&(e&&t.isUndefined(o.isCollapsed)||!t.isUndefined(o.isCollapsed)&&e!==o.isCollapsed)})).sort(function(e,t){return e.priority-t.priority}),e?r.reverse():r},s.prototype.destroyScroll=function(){this.scrollModule&&(this.scrollModule.destroy(),this.scrollModule=null)},s.prototype.clearOverflowDropDown=function(e){var t=this.tabObj.element.querySelector("#"+this.tabs[parseInt(e.toString(),10)].id+zt);if(t){var o=t.closest("."+He);"Simplified"===this.activeLayout?this.removeSimplfiedOverflow(t,o,e,!0):this.removeOverflowDropdown(t,o,!0,e)}},s.prototype.ribbonTabSelecting=function(e){var o=this;this.currentControlIndex=0;var i=e.selectingItem.getAttribute("data-id"),r=e.previousItem.getAttribute("data-id"),n=l(this.tabs,function(e){return e.id===i}),s=l(this.tabs,function(e){return e.id===r});n=-1===n?this.selectedTab:n;var a={cancel:e.cancel,isInteracted:e.isInteracted,previousIndex:s,selectedIndex:n};this.trigger("tabSelecting",a,function(e){if(!e.cancel){o.destroyScroll(),o.isAddRemove||-1===s||o.clearOverflowDropDown(s);var i=o.tabObj.items[parseInt(n.toString(),10)].content;if(!i.querySelector("."+Fe)&&0!==o.tabs[parseInt(n.toString(),10)].groups.length){var r=o.createGroups(o.tabs[parseInt(n.toString(),10)].groups,n);t.append(r,i)}}})},s.prototype.createTabItems=function(e){for(var t=this,o=[],i=0;i<e.length;i++){var r=e[parseInt(i.toString(),10)],n=this.createElement("span",{innerHTML:r.header,id:r.id+_t});n.onclick=function(){t.minimize(!1)},n.ondblclick=function(){t.minimize(!0)};var s={header:{text:n},id:r.id,cssClass:r.cssClass},a=this.createElement("div",{className:s.cssClass,id:r.id+zt});a.classList.add(xe),s.content=a,o.push(s)}return o},s.prototype.renderInitialTab=function(e){var o=this.createGroups(this.tabs[parseInt(e.toString(),10)].groups,e),i=this.tabObj.items[parseInt(e.toString(),10)].content;t.append(o,i),"Simplified"===this.activeLayout&&this.element.classList.add(Bt);var r=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);this.checkOverflow(this.selectedTab,r)},s.prototype.addOverflowButton=function(e){var o=this,i=this.createElement("button",{id:e}),n=this.createElement("div",{className:Ne,attrs:{tabindex:"0"}}),s=new r.DropDownButton({iconCss:Be,cssClass:"e-caret-hide "+ot,target:n,locale:this.locale,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence,beforeClose:function(e){(e.event?t.closest(e.event.target,"."+Re):null)&&(e.cancel=!0)}},i);this.element.classList.add(Ge),g(n,this);var a;return i.onkeydown=i.onclick=function(){o.itemIndex=-1,a=!i.classList.contains("e-ribbon-overall-of-btn")},n.onkeydown=function(e){return o.upDownKeyHandler(e,n,a),o},s},s.prototype.upDownKeyHandler=function(e,o,i){var r;if(i)r=o.getElementsByClassName("e-ribbon-item");else{r=o.querySelector(".e-ribbon-of-tab.e-ribbon-active").getElementsByClassName("e-ribbon-item")}var s,a=r[!this.itemIndex||this.itemIndex<0?0:this.itemIndex].querySelector(".e-control").classList.contains("e-combobox")?r[!this.itemIndex||this.itemIndex<0?0:this.itemIndex].querySelector(".e-combobox"):null;(null===a||"Tab"===e.key||this.itemIndex<0)&&("ArrowDown"===e.key||!e.shiftKey&&"Tab"===e.key?!this.itemIndex&&0!==this.itemIndex||this.itemIndex<0||this.itemIndex===r.length-1?(this.itemIndex=0,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!0),a&&"Tab"===e.key&&(e.preventDefault(),r[this.itemIndex].querySelector(".e-control").focus())):this.itemIndex<r.length-1&&this.itemIndex>=0&&(this.itemIndex++,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!0)):("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(null!==a&&"Tab"!==e.key||(this.itemIndex&&-1!==this.itemIndex?this.itemIndex<=r.length-1&&this.itemIndex>0&&(this.itemIndex--,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!1)):(this.itemIndex=r.length-1,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!1),a&&e.shiftKey&&"Tab"===e.key&&(e.preventDefault(),r[this.itemIndex].querySelector(".e-control").focus())))),o.setAttribute("index",this.itemIndex.toString()));var l=parseInt(o.getAttribute("index"),10),c=r[parseInt(l.toString(),10)]?r[parseInt(l.toString(),10)].querySelector(".e-control").getAttribute("data-control"):null;if(("ArrowDown"===e.key||"ArrowUp"===e.key||" "===e.key||"Tab"===e.key)&&("ColorPicker"===c?("Tab"===e.key&&e.preventDefault(),r[parseInt(l.toString(),10)].querySelector(".e-split-colorpicker").focus()):("Tab"===e.key&&e.preventDefault(),r[parseInt(l.toString(),10)].querySelector(".e-control").focus())," "===e.key&&"CheckBox"===c)){var p=r[parseInt(l.toString(),10)].querySelector(".e-control"),u=t.getComponent(p,n.CheckBox);this.itemIndex=-1,u.click()}"SplitButton"!==c||"ArrowRight"!==e.key&&"ArrowLeft"!==e.key||("ArrowRight"===e.key&&(this.enableRtl?r[parseInt(l.toString(),10)].querySelector(".e-control").focus():r[parseInt(l.toString(),10)].querySelector(".e-dropdown-btn").focus()),"ArrowLeft"===e.key&&(this.enableRtl?r[parseInt(l.toString(),10)].querySelector(".e-dropdown-btn").focus():r[parseInt(l.toString(),10)].querySelector(".e-control").focus())),"Enter"===e.key&&(this.itemIndex=-1)},s.prototype.findDisabledItem=function(e,t,o){for(;e&&e.classList.contains("e-disabled");)o?this.itemIndex===t.length-1&&t[this.itemIndex].closest(".e-ribbon-item").classList.contains("e-disabled")&&(this.itemIndex=-1):0===this.itemIndex&&t[this.itemIndex].closest(".e-ribbon-item").classList.contains("e-disabled")&&(this.itemIndex=t.length),o?this.itemIndex++:this.itemIndex--,e=t[this.itemIndex].closest(".e-ribbon-item")},s.prototype.removeOverflowButton=function(e){if(e){var t=e.element;S(e.target),e.destroy(),t.remove()}},s.prototype.removeOverflowEvent=function(e,t){if(t)switch(e.type){case"Button":this.ribbonButtonModule.removeOverFlowEvents(e,t);break;case"DropDown":this.ribbonDropDownModule.removeOverFlowEvents(e,t);break;case"SplitButton":this.ribbonSplitButtonModule.removeOverFlowEvents(e,t);break;case"CheckBox":this.ribbonCheckBoxModule.removeOverFlowEvents(e,t);break;case"ColorPicker":this.ribbonColorPickerModule.removeOverFlowEvents(e,t);break;case"ComboBox":this.ribbonComboBoxModule.removeOverFlowEvents(e,t);break;case"GroupButton":this.ribbonGroupButtonModule.removeOverFlowEvents(e,t)}},s.prototype.createGroupContainer=function(e,t){var o=this.createElement("div",{className:Je,id:e+jt}),i=this.createElement("div",{className:et,id:e+_t,innerHTML:t});return o.append(i),o},s.prototype.addExpandCollapse=function(){var e=this;this.collapseButton=this.createElement("span",{className:_e+" "+Ie,id:this.tabObj.element.id+Et,attrs:{tabindex:"0",type:"button","aria-label":"Layout Switcher",role:"button"}}),this.collapseButton.onclick=function(){e.toggleLayout()},this.collapseButton.onkeydown=function(t){"Enter"===t.key&&e.toggleLayout()},this.element.classList.add(ze),"Simplified"===this.activeLayout&&this.collapseButton.classList.add(qe),this.tabObj.element.appendChild(this.collapseButton)},s.prototype.removeExpandCollapse=function(){var e=this,o=l(this.tooltipData,function(t){return t.id===e.collapseButton.id});-1!==o&&this.tooltipData.splice(o,1),this.element.classList.remove(ze),t.remove(this.tabObj.element.querySelector("."+_e)),this.collapseButton=null},s.prototype.reRenderTabs=function(e){this.destroyScroll(),this.checkID(this.tabs,"tab",this.element.id);for(var o in e){for(var i=parseInt(o,10),r=e[parseInt(i.toString(),10)],n=!1,s=0;s<this.tabObj.items.length;s++)if(this.tabs[parseInt(i.toString(),10)].id===this.tabObj.items[parseInt(s.toString(),10)].id){n=!0;break}if(!n){this.destroyTabItems(this.tabsInternal),this.tabsInternal=this.tabs.slice(),this.validateItemSize();var a=this.createTabItems(this.tabs);this.selectedTab>=this.tabs.length&&(this.selectedTab=this.tabs.length-1),this.tabObj.setProperties({items:a,selectedItem:this.selectedTab});break}var l=this.tabs[parseInt(i.toString(),10)].groups,c=this.tabObj.element,p=this.tabs[parseInt(i.toString(),10)];p.setProperties(r,!0),this.setProperties({groups:this.checkID(p.groups,"group",p.id)},!0),this.validateItemSize();var u=this.tabObj.items[parseInt(i.toString(),10)].content;if(l&&(r.header&&(this.tabObj.items[parseInt(i.toString(),10)].header.text.innerText=p.header),r.cssClass&&(this.tabObj.items[parseInt(i.toString(),10)].cssClass&&(u.classList.remove(this.tabObj.items[parseInt(i.toString(),10)].cssClass),c.querySelector(".e-active").classList.remove(this.tabObj.items[parseInt(i.toString(),10)].cssClass)),u.classList.add(p.cssClass),c.querySelector(".e-active").classList.add(p.cssClass)),r.groups)){for(var d=0,h=l;d<h.length;d++){for(var b=h[d],m=b.isCollapsed?u.querySelector("#"+b.id+At+Nt):null,f=0,y=b.collections;f<y.length;f++)for(var v=0,g=y[f].items;v<g.length;v++){var S=g[v],I=m?this.ribbonDropDownModule.getDDBItemElement(m,S.id):u.querySelector("#"+S.id);I&&this.destroyFunction(S,I)}m&&this.ribbonDropDownModule.removeOverFlowDropDown(m)}u.querySelectorAll(".e-ribbon-group").forEach(function(e){e.remove()});var C=this.createGroups(p.groups,i);t.append(C,u)}}var B=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);this.checkOverflow(this.selectedTab,B)},s.prototype.switchLayout=function(){this.currentControlIndex=0,this.destroyScroll(),this.collapseButton.classList.toggle(qe,"Simplified"===this.activeLayout),this.element.classList.toggle(Bt,"Simplified"===this.activeLayout);for(var o=0;o<=this.tabs.length-1;o++){var i=o;if(""!==this.tabObj.items[parseInt(i.toString(),10)].content.innerHTML){var n=this.tabs[parseInt(i.toString(),10)],s=this.tabs[parseInt(i.toString(),10)].groups,a=this.tabObj.element.querySelector("#"+this.tabs[parseInt(i.toString(),10)].id+zt),l=a.closest("."+He);if("Simplified"===this.activeLayout)for(var c=0;c<s.length;c++){var p=s[parseInt(c.toString(),10)],u=s[parseInt(c.toString(),10)].orientation;p.isCollapsed?(p.setProperties({isCollapsed:!1},!0),this.removeDropdown(p.id)):(this.checkSmallToMedium(i,n,c,l,a,!0,!1),this.checkMediumToLarge(i,n,c,l,a,!0,!1));for(var d=l.querySelector("#"+p.id),h=(P=d.querySelector("#"+p.id+jt)).querySelectorAll(".e-ribbon-shrink"),b=0;b<h.length;b++)h[parseInt(b.toString(),10)].remove();(L=P.querySelector("#"+p.id+_t)).remove();(D=P.querySelector("#"+p.id+zt)).classList.replace(lt,ct),D.classList.remove(ht);for(var m=0;m<p.collections.length;m++){var f=p.collections[parseInt(m.toString(),10)];(E=P.querySelector("#"+f.id)).classList.replace(lt,ct);for(var y=0;y<f.items.length;y++){for(var v=f.items,g=f.items[parseInt(y.toString(),10)],S=!0;S&&g.displayOptions===e.DisplayMode.Classic;){y++;var I=P.querySelector("#"+g.id+jt),C=I.querySelector("#"+g.id);this.destroyFunction(g,C),I.remove(),y<v.length?g=v[parseInt(y.toString(),10)]:S=!1}if(!S)break;var B=g.allowedSizes===e.RibbonItemSize.Large||g.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;B=!(g.displayOptions&e.DisplayMode.Simplified)&&g.displayOptions&e.DisplayMode.Overflow?e.RibbonItemSize.Medium:B;var O=void 0;if(g.displayOptions&e.DisplayMode.Classic){if(O=P.querySelector("#"+g.id+jt),g.displayOptions===(e.DisplayMode.Classic|e.DisplayMode.Overflow)&&(this.createOverflowPopup(g,i,p.enableGroupOverflow,p.id,p.header,O,P),g.type!==e.RibbonItemType.DropDown&&g.type!==e.RibbonItemType.SplitButton&&g.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(g,O,p.enableGroupOverflow,!0)),g.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.switchGroupButton(g,O),g.setProperties({activeSize:B},!0),O){C=O.querySelector("#"+g.id);this.setItemSize(C,g)}}else O=this.createItems([g],u,p.id,p.header,p.enableGroupOverflow,i,P)[0],g.displayOptions&e.DisplayMode.Simplified&&E.append(O)}}p.enableGroupOverflow||d.querySelector("."+at)||d.classList.add("e-ribbon-emptyCollection")}else{this.element.classList.remove(Ge);for(var w=0;w<s.length;w++){p=s[parseInt(w.toString(),10)],u=s[parseInt(w.toString(),10)].orientation;var P,D=(P=l.querySelector("#"+p.id+jt)).querySelector("#"+p.id+zt),L=this.createElement("div",{className:$e,id:p.id+_t,innerHTML:p.header});P.appendChild(L),"Row"===u&&D.classList.replace(ct,lt),D.classList.add(ht);for(m=0;m<p.collections.length;m++){var R=void 0,T=void 0;if(p.enableGroupOverflow){var k=P.querySelector("#"+p.id+xt);k&&(T=(R=t.getInstance(k,r.DropDownButton)).target)}else(R=this.overflowDDB)&&(T=this.overflowDDB.target);f=p.collections[parseInt(m.toString(),10)];var E=P.querySelector("#"+f.id);"Column"===u&&E.classList.replace(ct,lt);for(y=0;y<f.items.length;y++){for(v=f.items,g=f.items[parseInt(y.toString(),10)],S=!0;S&&!(g.displayOptions&e.DisplayMode.Classic);){y++;O=void 0;if((g.displayOptions&e.DisplayMode.Simplified||g.displayOptions&e.DisplayMode.Overflow)&&null!==(O=g.displayOptions&e.DisplayMode.Simplified?P.querySelector("#"+g.id+jt):T.querySelector("#"+g.id+jt))){var M=O.querySelector("#"+g.id);this.destroyFunction(g,M),O.remove()}y<v.length?g=v[parseInt(y.toString(),10)]:S=!1}if(!S)break;if(g.displayOptions&(e.DisplayMode.Simplified|e.DisplayMode.Overflow)){!(O=P.querySelector("#"+g.id+jt))&&T&&(O=T.querySelector("#"+g.id+jt),g.type!==e.RibbonItemType.DropDown&&g.type!==e.RibbonItemType.SplitButton&&g.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(g,O,p.enableGroupOverflow,!1),this.removeOverflowEvent(g,O)),g.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.switchGroupButton(g,O),O&&E.append(O)}else{var O=this.createItems([g],u,p.id,p.header,p.enableGroupOverflow,i)[0];E.append(O)}C=P.querySelector("#"+g.id);g.type===e.RibbonItemType.GroupButton&&(C=P.querySelector("#"+g.id+Vt));var x=g.allowedSizes&e.RibbonItemSize.Large?e.RibbonItemSize.Large:g.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;g.setProperties({activeSize:x},!0),this.setItemSize(C,g)}p.enableGroupOverflow&&R&&0===T.childElementCount&&this.removeOverflowButton(R)}}}this.selectedTab===i&&this.checkOverflow(i,a)}}"Classic"===this.activeLayout&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)},s.prototype.createLauncherIcon=function(e,o){var i=this,r=this.createElement("div",{className:rt+" "+(this.launcherIconCss?this.launcherIconCss:nt),id:e+qt,attrs:{tabindex:"0",type:"button","aria-label":"Launcher Icon",role:"button"}});o.appendChild(r),o.classList.add(it),t.EventHandler.add(r,"click",this.launcherIconClicked.bind(this,e),this),t.EventHandler.add(r,"keydown",function(t){"Enter"===t.key&&i.launcherIconClicked(e)},this)},s.prototype.launcherIconClicked=function(e){var t={groupId:e};this.trigger("launcherIconClick",t)},s.prototype.createGroups=function(e,o){for(var i=[],r=0;r<e.length;r++){var n=e[parseInt(r.toString(),10)],s=n.orientation,a=this.createElement("div",{className:n.cssClass,id:n.id});a.classList.add(Fe),i.push(a);var l=this.createElement("div",{className:n.cssClass,id:n.id+jt});l.classList.add(Ze),a.appendChild(l);var c=this.createElement("div",{className:"Simplified"===this.activeLayout?Qe:Qe+" "+ht,id:n.id+zt});if(c.classList.add("Column"===s||"Simplified"===this.activeLayout?ct:lt),l.appendChild(c),"Classic"===this.activeLayout){var p=this.createElement("div",{className:$e,id:n.id+_t,innerHTML:n.header});l.appendChild(p)}n.showLauncherIcon&&this.createLauncherIcon(n.id,l);var u=this.createCollection(n.collections,n.orientation,n.id,n.header,n.enableGroupOverflow,o,l);t.append(u,c),"Simplified"!==this.activeLayout||n.enableGroupOverflow||a.querySelector("."+at)||a.classList.add("e-ribbon-emptyCollection");var d=this.initialPropsData[parseInt(o.toString(),10)];d&&(d.hiddenGroups&&d.hiddenGroups.length&&this.updateGroupProps("hiddenGroups",d,a),d.disabledGroups&&d.disabledGroups.length&&this.updateGroupProps("disabledGroups",d,a))}return this.initialPropsData[parseInt(o.toString(),10)]&&delete this.initialPropsData[parseInt(o.toString(),10)],i},s.prototype.updateGroupProps=function(e,t,o){-1!==t[e].indexOf(o.id)&&("hiddenGroups"===e?o.classList.add("e-hidden"):o.classList.add("e-disabled"))},s.prototype.validateItemSize=function(){for(var t=0;t<this.tabs.length;t++)for(var o=this.tabs[parseInt(t.toString(),10)].groups,i=0;i<o.length;i++)for(var r=o[parseInt(i.toString(),10)].collections,n=o[parseInt(i.toString(),10)].orientation,s=0;s<r.length;s++)for(var a=r[parseInt(s.toString(),10)].items,l=0;l<a.length;l++){var c=a[parseInt(l.toString(),10)];if(c.allowedSizes&&0!==c.allowedSizes||c.setProperties({allowedSizes:e.RibbonItemSize.Small|e.RibbonItemSize.Medium|e.RibbonItemSize.Large},!0),"ColorPicker"===c.type&&c.allowedSizes!==e.RibbonItemSize.Small)c.setProperties({allowedSizes:e.RibbonItemSize.Small},!0);else if("ComboBox"!==c.type&&"CheckBox"!==c.type||c.allowedSizes===e.RibbonItemSize.Medium){if(("Column"===n&&a.length>1||"Row"===n&&r.length>1)&&c.allowedSizes&e.RibbonItemSize.Large){var p=c.allowedSizes&(e.RibbonItemSize.Small|e.RibbonItemSize.Medium);p=p||e.RibbonItemSize.Medium,c.setProperties({allowedSizes:p},!0)}}else c.setProperties({allowedSizes:e.RibbonItemSize.Medium},!0);var u=c.allowedSizes&e.RibbonItemSize.Large?e.RibbonItemSize.Large:c.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;c.setProperties({activeSize:u},!0)}},s.prototype.createCollection=function(e,o,i,r,n,s,a){for(var l=[],c=0;c<e.length;c++){var p=e[parseInt(c.toString(),10)],u=this.createElement("div",{className:p.cssClass,id:p.id});u.classList.add(st),u.classList.add("Column"!==o||"Simplified"===this.activeLayout?ct:lt),l.push(u);var d=this.createItems(p.items,o,i,r,n,s,a);if(t.append(d,u),"Row"===o&&2===c)break}return l},s.prototype.createRibbonItem=function(e,t){switch(e.type){case"Button":this.ribbonButtonModule.createButton(e,t);break;case"DropDown":this.ribbonDropDownModule.createDropDown(e,t);break;case"SplitButton":this.ribbonSplitButtonModule.createSplitButton(e,t);break;case"CheckBox":this.ribbonCheckBoxModule.createCheckBox(e,t);break;case"ColorPicker":this.ribbonColorPickerModule.createColorPicker(e,t);break;case"ComboBox":this.ribbonComboBoxModule.createComboBox(e,t);break;case"Template":this.createTemplateContent(e,t);break;case"GroupButton":this.ribbonGroupButtonModule.createGroupButton(e,t)}},s.prototype.createItems=function(t,o,i,r,n,s,a){for(var l,c=[],p=0;p<t.length;p++){for(var u=t[parseInt(p.toString(),10)],d=!0;d&&("Simplified"===this.activeLayout&&!(u.displayOptions&(e.DisplayMode.Simplified|e.DisplayMode.Overflow))||"Classic"===this.activeLayout&&!(u.displayOptions&e.DisplayMode.Classic));)++p<t.length?u=t[parseInt(p.toString(),10)]:d=!1;if(!d)break;var h=this.createElement("div",{className:u.cssClass,id:u.id+jt});(l=h.classList).add.apply(l,[at].concat(u.disabled?[we]:[])),u.ribbonTooltipSettings&&y(u.ribbonTooltipSettings)&&(h.classList.add(yt),this.tooltipData.push({id:h.id,data:u.ribbonTooltipSettings}));var b=u.activeSize;"Simplified"===this.activeLayout&&(b=u.allowedSizes===e.RibbonItemSize.Large||u.allowedSizes&e.RibbonItemSize.Medium||u.displayOptions===e.DisplayMode.Overflow?e.RibbonItemSize.Medium:e.RibbonItemSize.Small,u.setProperties({activeSize:b},!0)),b&e.RibbonItemSize.Large?h.classList.add(pt,ht):h.classList.add(b&e.RibbonItemSize.Medium?ut:dt);var m=this.initialPropsData[parseInt(s.toString(),10)];if(m&&m.hiddenItems&&m.hiddenItems.length){-1!==m.hiddenItems.indexOf(u.id)&&h.classList.add("e-hidden")}if(this.createRibbonItem(u,h),"Simplified"!==this.activeLayout||u.displayOptions!==e.DisplayMode.Overflow&&u.displayOptions!==(e.DisplayMode.Classic|e.DisplayMode.Overflow)?c.push(h):(this.createOverflowPopup(u,s,n,i,r,h,a),u.type!==e.RibbonItemType.DropDown&&u.type!==e.RibbonItemType.SplitButton&&u.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(u,h,n,!0)),"Column"===o&&2===p)break}return c},s.prototype.createHelpPaneTemplate=function(){if(this.helpPaneTemplate){var e="helpPaneTemplate";this.clearTemplate([e]),this.ribbonTempEle=this.createElement("div",{className:mt,id:this.element.id+Ut});var o=c(this.helpPaneTemplate);t.append(o({},this,e,"helpPaneTemplate",this.isStringTemplate),this.ribbonTempEle);var i=this.tabObj.element;i.querySelector(".e-toolbar").after(this.ribbonTempEle),i.style.setProperty(Xt,this.ribbonTempEle.offsetWidth+"px"),this.renderReactTemplates()}},s.prototype.createTemplateContent=function(e,t){var o=this.createElement("div",{className:e.cssClass?bt+" "+e.cssClass:bt,id:e.id});e.disabled&&(o.classList.add(we),o.setAttribute("disabled","")),t.appendChild(o),this.renderItemTemplate(e,o)},s.prototype.renderItemTemplate=function(o,i){var r="ribbon"+o.id+"itemTemplate";this.clearTemplate([r]);var n=c(o.itemTemplate);t.append(n({activeSize:e.RibbonItemSize[o.activeSize]},this,r,o.id+"itemTemplate",this.isStringTemplate),i),this.renderReactTemplates()},s.prototype.checkID=function(e,t,o){for(var i="tab"===t?"_tab":"group"===t?"_group":"collection"===t?"_collection":"_item",r=0;r<e.length;r++){var n=e[parseInt(r.toString(),10)];switch(n.id||n.setProperties({id:o+i+this.idIndex++},!0),t){case"tab":n.setProperties({groups:this.checkID(n.groups,"group",n.id)},!0);break;case"group":n.setProperties({collections:this.checkID(n.collections,"collection",n.id)},!0);break;case"collection":n.setProperties({items:this.checkID(n.items,"item",n.id)},!0)}}return e},s.prototype.updateCommonProperty=function(o){this.tabObj.setProperties(o),this.ribbonFileMenuModule&&this.ribbonFileMenuModule.setCommonProperties(o),this.ribbonBackstageModule&&this.ribbonBackstageModule.setCommonProperties(o);for(var i=0;i<this.tabs.length;i++){var n=this.tabs[parseInt(i.toString(),10)],s=this.tabObj.items[parseInt(i.toString(),10)].content;if(s.querySelector("."+Fe))for(var a=0,l=n.groups;a<l.length;a++){var c=l[a],p=void 0,u=void 0;this.activeLayout===e.RibbonLayout.Classic?p=c.isCollapsed?s.querySelector("#"+c.id+At+Nt):null:(u=(p=c.enableGroupOverflow?s.querySelector("#"+c.id+xt):null)?t.getComponent(p,r.DropDownButton):this.overflowDDB)&&(I(u.target,o),u.setProperties(o));for(var d=0,h=c.collections;d<h.length;d++)for(var m=0,f=h[d].items;m<f.length;m++){var y=f[m],v=null;if(this.activeLayout===e.RibbonLayout.Classic?y.displayOptions&e.DisplayMode.Classic&&(v=p?this.ribbonDropDownModule.getDDBItemElement(p,y.id):y.type===e.RibbonItemType.GroupButton?s.querySelector("#"+y.id+Vt):s.querySelector("#"+y.id)):(v=y.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+y.id):null)||(v=u.target.querySelector("#"+y.id),"DropDown"===y.type&&this.updatePopupItems(y,u.target,c.enableGroupOverflow,!0)),v){var g=this.getItemModuleName(y);if("template"!==g)if("group-btn"===g&&"Classic"===this.activeLayout)for(var S=0;S<y.groupButtonSettings.items.length;S++){b(v.querySelector("#"+y.id+Vt+S),"btn",o)}else if("group-btn"===g&&"Simplified"===this.activeLayout){b(v,"dropdown-btn",o);for(var C=0;C<y.groupButtonSettings.items.length;C++){b(document.querySelector("#"+y.id+Vt+C),"btn",o)}}else b(v,g,o);else t.isNullOrUndefined(o.enableRtl)||v.classList.toggle(Pe,o.enableRtl)}}}}},s.prototype.removeLauncherIcon=function(e,o,i){var r=e+jt,n=o?this.ribbonDropDownModule.getDDBItemElement(o,r):i.querySelector("#"+r);if(n){n.classList.remove(it);var s=n.querySelector("#"+e+qt);t.remove(s)}},s.prototype.destroyTabItems=function(o){for(var i=0;i<o.length;i++)for(var n=o[parseInt(i.toString(),10)],s=this.tabObj.items[parseInt(i.toString(),10)].content,a=0,l=n.groups;a<l.length;a++){var c=l[a],p=void 0,u=void 0;this.activeLayout===e.RibbonLayout.Classic?(p=c.isCollapsed?s.querySelector("#"+c.id+At+Nt):null,c.showLauncherIcon&&this.removeLauncherIcon(c.id,p,s)):u=(p=c.enableGroupOverflow?s.querySelector("#"+c.id+xt):null)?t.getComponent(p,r.DropDownButton):this.overflowDDB;for(var d=0,h=c.collections;d<h.length;d++)for(var b=0,m=h[d].items;b<m.length;b++){var f=m[b],y=void 0;this.activeLayout===e.RibbonLayout.Classic?f.displayOptions&e.DisplayMode.Classic&&(y=p?this.ribbonDropDownModule.getDDBItemElement(p,f.id):s.querySelector("#"+f.id),f.type===e.RibbonItemType.GroupButton&&(y=p?this.ribbonDropDownModule.getDDBItemElement(p,f.id+Vt):s.querySelector("#"+f.id+Vt))):(y=f.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+f.id):null)||(y=u?u.target.querySelector("#"+f.id):null),y&&this.destroyFunction(f,y)}this.activeLayout===e.RibbonLayout.Classic&&p?this.ribbonDropDownModule.removeOverFlowDropDown(p):this.activeLayout===e.RibbonLayout.Simplified&&c.enableGroupOverflow&&p&&this.removeOverflowButton(u)}this.overflowDDB&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)},s.prototype.destroyFunction=function(e,t){var o=this.getItemModuleName(e);if("colorpicker"===o)this.ribbonColorPickerModule.unwireColorPickerEvents(t);else if("group-btn"===o){if("Classic"===this.activeLayout)for(var i=0;i<e.groupButtonSettings.items.length;i++){var r=t.querySelector("#"+e.id+Vt+i);r&&h(r,"btn")}else this.ribbonGroupButtonModule.destroyDropDown(e);var n=function(t){if(e.groupButtonSettings.items[parseInt(t.toString(),10)].ribbonTooltipSettings){var o=e.id+Vt+t,i=l(s.tooltipData,function(e){return e.id===o});-1!==i&&s.tooltipData.splice(i,1)}},s=this;for(i=0;i<e.groupButtonSettings.items.length;i++)n(i)}else"template"!==o&&h(t,o);if(e.ribbonTooltipSettings){var a=l(this.tooltipData,function(t){return t.id===e.id+jt});-1!==a&&this.tooltipData.splice(a,1)}"GroupButton"===e.type&&this.ribbonGroupButtonModule.destroyDropDown(e)},s.prototype.getItemModuleName=function(e){switch(e.type){case"Button":return"btn";case"DropDown":return"dropdown-btn";case"SplitButton":return"split-btn";case"CheckBox":return"checkbox";case"ColorPicker":return"colorpicker";case"ComboBox":return"combobox";case"GroupButton":return"group-btn";default:return"template"}},s.prototype.clearOverflowResize=function(){this.destroyScroll(),this.clearOverflowDropDown(this.selectedTab);for(var e=this.tabs[this.selectedTab],t=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt),o=t.closest("."+He),i=0;i<e.groups.length;i++)this.checkSmallToMedium(this.selectedTab,e,i,o,t,!0,!0),this.checkMediumToLarge(this.selectedTab,e,i,o,t,!0,!0)},s.prototype.refreshLayout=function(){this.resizeHandler()},s.prototype.selectTab=function(e){var t=l(this.tabs,function(t){return t.id===e});this.setProperties({selectedTab:t})},s.prototype.showTab=function(e){this.showHideTab(e,!1)},s.prototype.hideTab=function(e){this.showHideTab(e,!0)},s.prototype.showHideTab=function(e,t){var o=l(this.tabs,function(t){return t.id===e});-1!==o&&this.tabObj.hideTab(o,t)},s.prototype.enableTab=function(e){this.enableDisableTab(e,!0)},s.prototype.disableTab=function(e){this.enableDisableTab(e,!1)},s.prototype.enableDisableTab=function(e,t){var o=l(this.tabs,function(t){return t.id===e});-1!==o&&this.tabObj.enableTab(o,t)},s.prototype.addTab=function(e,t,o){var i=t?l(this.tabs,function(e){return e.id===t}):-1;i=-1===i?this.tabs.length:i+(o?1:0),this.tabsInternal=this.tabs.slice(),this.tabsInternal.splice(i,0,e),this.setProperties({tabs:this.tabsInternal},!0),this.checkID([this.tabs[parseInt(i.toString(),10)]],"tab",this.element.id),this.tabsInternal=this.tabs.slice(),this.validateItemSize();var r=this.createTabItems([e]);this.tabObj.addTab(r,i)},s.prototype.removeTab=function(t){var o=l(this.tabs,function(e){return e.id===t});if(-1!==o){var i=this.tabObj.items[parseInt(o.toString(),10)].content,r=this.tabs[parseInt(o.toString(),10)].groups;if(r&&""!==i.innerHTML)for(var n=0,s=r;n<s.length;n++){for(var a=s[n],c=a.isCollapsed?i.querySelector("#"+a.id+At+Nt):null,p=0,u=a.collections;p<u.length;p++)for(var d=0,h=u[p].items;d<h.length;d++){var b=h[d],m=c?this.ribbonDropDownModule.getDDBItemElement(c,b.id):i.querySelector("#"+b.id);b.type===e.RibbonItemType.GroupButton&&"Classic"===this.activeLayout&&(m=c?this.ribbonDropDownModule.getDDBItemElement(c,b.id+Vt):i.querySelector("#"+b.id+Vt)),m&&this.destroyFunction(b,m)}c&&this.ribbonDropDownModule.removeOverFlowDropDown(c)}o===this.selectedTab&&(this.isAddRemove=!0),this.tabsInternal=this.tabs.slice(),this.tabsInternal.splice(o,1),this.setProperties({tabs:this.tabsInternal},!0),this.tabObj.removeTab(o)}},s.prototype.addGroup=function(e,t,o,i){var r=l(this.tabs,function(t){return t.id===e});if(-1!==r){this.selectedTab===r&&this.clearOverflowResize();var n=this.tabs[parseInt(r.toString(),10)],s=n.groups.slice(),a=o?l(s,function(e){return e.id===o}):-1;a=-1===a?s.length:a+(i?1:0),s.splice(a,0,t),n.setProperties({groups:s},!0),this.checkID([n.groups[parseInt(a.toString(),10)]],"group",e),this.validateItemSize();var c=this.tabObj.items[parseInt(r.toString(),10)].content;if(""!==c.innerHTML){var p=this.createGroups([n.groups[parseInt(a.toString(),10)]],r)[0],u=o?c.querySelector("#"+o):null;u?u.insertAdjacentElement(i?"afterend":"beforebegin",p):c.append(p)}this.selectedTab===r&&this.refreshLayout()}},s.prototype.removeGroup=function(o){var i=d(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;i.group.showLauncherIcon&&this.removeLauncherIcon(i.group.id,null,n),this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);for(var l=0,c=i.group.collections;l<c.length;l++)for(var p=0,u=c[l].items;p<u.length;p++){var h=u[p];this.removeItemElement(n,h,a)}if(this.activeLayout===e.RibbonLayout.Simplified)if(i.group.enableGroupOverflow)0===a.target.childElementCount&&this.removeOverflowButton(a);else{var b=a.target.querySelector("#"+i.group.id+jt);b&&1===b.childElementCount&&b.remove();var m=a.target.querySelector("#"+this.tabs[parseInt(i.tabIndex.toString(),10)].id+At);m&&0===m.childElementCount&&m.remove()}var f=n.querySelector("#"+o);f&&f.remove()}var y=this.tabs[i.tabIndex].groups.slice();y.splice(i.groupIndex,1),this.tabs[i.tabIndex].setProperties({groups:y},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.hideGroup=function(e){this.showHideGroup(e,!0)},s.prototype.showGroup=function(e){this.showHideGroup(e,!1)},s.prototype.showHideGroup=function(e,o){var i,n=d(this.tabs,e);if(n){var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+e);if(a?o?a.classList.add("e-hidden"):a.classList.remove("e-hidden"):this.updateInitialProps(n.tabIndex,e,"hiddenGroups",o),this.overflowDDB){var l=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);if(n.group.enableGroupOverflow){var c=s.querySelector("#"+e+xt);c&&(i=t.getInstance(c,r.DropDownButton).target),i&&(o?i.classList.add("e-hidden"):i.classList.remove("e-hidden"))}else if(l){var p=l.querySelector("#"+e+jt);p&&(o?p.classList.add("e-hidden"):p.classList.remove("e-hidden"))}}this.refreshLayout()}},s.prototype.disableGroup=function(e){this.enableDisableGroup(e,!0)},s.prototype.enableGroup=function(e){this.enableDisableGroup(e,!1)},s.prototype.enableDisableGroup=function(e,o){var i,n=d(this.tabs,e);if(n){var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+e);if(a?o?a.classList.add("e-disabled"):a.classList.remove("e-disabled"):this.updateInitialProps(n.tabIndex,e,"disabledGroups",o),this.overflowDDB){var l=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);if(n.group.enableGroupOverflow){var c=s.querySelector("#"+e+xt);c&&(i=t.getInstance(c,r.DropDownButton).target),i&&(o?i.classList.add("e-disabled"):i.classList.remove("e-disabled"))}else if(l){var p=l.querySelector("#"+e+jt);p&&(o?p.classList.add("e-disabled"):p.classList.remove("e-disabled"))}}}},s.prototype.addCollection=function(e,t,o,i){var r=d(this.tabs,e);if(r&&("Row"!==r.group.orientation||3!==r.group.collections.length)){this.selectedTab===r.tabIndex&&this.clearOverflowResize();var n=r.group.collections.slice(),s=o?l(n,function(e){return e.id===o}):-1;s=-1===s?n.length:s+(i?1:0),n.splice(s,0,t),r.group.setProperties({collections:n},!0),this.checkID([r.group.collections[parseInt(s.toString(),10)]],"collection",e),this.validateItemSize();var a=this.tabObj.items[r.tabIndex].content;if(""!==a.innerHTML){var c=r.group.collections[parseInt(s.toString(),10)],p=this.createCollection([c],r.group.orientation,r.group.id,r.group.header,r.group.enableGroupOverflow,r.tabIndex)[0];r.group.isCollapsed&&(a=this.ribbonDropDownModule.getOverflowDropDownPopup(r,a));var u=o?a.querySelector("#"+o):null;u?u.insertAdjacentElement(i?"afterend":"beforebegin",p):a.querySelector("#"+e+zt).append(p)}this.selectedTab===r.tabIndex&&this.refreshLayout()}},s.prototype.removeCollection=function(o){var i=u(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);for(var l=0,c=i.collection.items;l<c.length;l++){var p=c[l];this.removeItemElement(n,p,a)}var d=n.querySelector("#"+o);d&&d.remove()}var h=i.group,b=h.collections.slice();b.splice(i.collectionIndex,1),h.setProperties({collections:b},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.addItem=function(e,t,o,i){var r=u(this.tabs,e);if(r&&("Column"!==r.group.orientation||3!==r.collection.items.length)){this.selectedTab===r.tabIndex&&this.clearOverflowResize();var n=r.collection.items.slice(),s=o?l(n,function(e){return e.id===o}):-1;s=-1===s?n.length:s+(i?1:0),n.splice(s,0,t),r.collection.setProperties({items:n},!0),this.checkID([r.collection.items[parseInt(s.toString(),10)]],"item",e),this.validateItemSize();var a=this.tabObj.items[r.tabIndex].content,c=a.querySelector("#"+r.group.id+jt);if(""!==a.innerHTML){var p=r.collection.items[parseInt(s.toString(),10)],d=this.createItems([p],r.group.orientation,r.group.id,r.group.header,r.group.enableGroupOverflow,r.tabIndex,c)[0];r.group.isCollapsed&&(a=this.ribbonDropDownModule.getOverflowDropDownPopup(r,a));var h=o?a.querySelector("#"+o):null;h?h.closest("."+at).insertAdjacentElement(i?"afterend":"beforebegin",d):d&&a.querySelector("#"+e).append(d)}this.selectedTab===r.tabIndex&&this.refreshLayout()}},s.prototype.removeItem=function(o){var i=p(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);var l=i.item;this.removeItemElement(n,l,a)}var c=i.collection,u=c.items;u.splice(i.itemIndex,1),c.setProperties({items:u},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.hideItem=function(e){this.showHideItem(e,!0)},s.prototype.showItem=function(e){this.showHideItem(e,!1)},s.prototype.showHideItem=function(e,o){var i=p(this.tabs,e);if(i){var r;if(r="GroupButton"===i.item.type?f(this,e+Vt,i):f(this,e,i)){var n=t.closest(r,".e-ribbon-item");o?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),this.refreshLayout()}else this.updateInitialProps(i.tabIndex,e,"hiddenItems",o)}},s.prototype.updateInitialProps=function(e,t,o,i){var r=this.initialPropsData[parseInt(e.toString(),10)];if(r||(this.initialPropsData[parseInt(e.toString(),10)]={},r=this.initialPropsData[parseInt(e.toString(),10)]),r){r[o]||(r[o]=[]);var n=r[o].indexOf(t);i?-1===n&&r[o].push(t):(-1!==n&&r[o].splice(n,1),0===r[o].length&&delete r[o],0===Object.keys(r).length&&delete this.initialPropsData[parseInt(e.toString(),10)])}},s.prototype.updateTab=function(o){var i=o.id,r=l(this.tabs,function(e){return e.id===i});if(-1!==r){var n=this.tabObj.items[parseInt(r.toString(),10)].content,s=this.tabs[parseInt(r.toString(),10)].groups,a=this.tabObj.element;if(s&&""!==n.innerHTML&&(o.cssClass&&this.tabs[parseInt(r.toString(),10)].cssClass&&(n.classList.remove(this.tabs[parseInt(r.toString(),10)].cssClass),a.querySelector(".e-active").classList.remove(this.tabs[parseInt(r.toString(),10)].cssClass)),o.groups)){for(var c=0,p=s;c<p.length;c++){for(var u=p[c],d=u.isCollapsed?n.querySelector("#"+u.id+At+Nt):null,h=0,b=u.collections;h<b.length;h++)for(var m=0,f=b[h].items;m<f.length;m++){var y=f[m],v=d?this.ribbonDropDownModule.getDDBItemElement(d,y.id):n.querySelector("#"+y.id);y.type===e.RibbonItemType.GroupButton&&"Classic"===this.activeLayout&&(v=d?this.ribbonDropDownModule.getDDBItemElement(d,y.id+Vt):n.querySelector("#"+y.id+Vt)),v&&this.destroyFunction(y,v)}d&&this.ribbonDropDownModule.removeOverFlowDropDown(d)}n.querySelectorAll(".e-ribbon-group").forEach(function(e){e.remove()})}r===this.selectedTab&&(this.isAddRemove=!0);var g=this.tabs[parseInt(r.toString(),10)];if(g.setProperties(o,!0),this.setProperties({groups:this.checkID(g.groups,"group",g.id)},!0),this.validateItemSize(),""===n.innerHTML){if(o.groups){var S=this.createGroups(g.groups,r);t.append(S,n)}this.selectedTab===r&&this.refreshLayout(),o.cssClass&&(n.classList.add(g.cssClass),a.querySelector(".e-active").classList.add(g.cssClass)),o.header&&(a.querySelector("#"+i+_t).innerText=g.header)}}},s.prototype.updateGroup=function(o){var i=o.id,n=d(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s,a,l=this.tabObj.items[n.tabIndex].content,c=l.querySelector("#"+i),p=c.querySelector("#"+o.id+jt);if(""!==l.innerHTML){if(n.group.showLauncherIcon&&this.removeLauncherIcon(n.group.id,null,l),this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=n.group.enableGroupOverflow?l.querySelector("#"+n.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB),o.cssClass&&n.group.cssClass&&(c.classList.remove(n.group.cssClass),p&&p.classList.remove(n.group.cssClass)),(o.collections||o.orientation)&&(n.group.collections||n.group.orientation)){for(var u=0,h=n.group.collections;u<h.length;u++)for(var b=0,m=h[u].items;b<m.length;b++){var f=m[b];this.removeItemElement(l,f,a)}if(c.querySelectorAll(".e-ribbon-collection").forEach(function(e){e.remove()}),o.orientation){var y=(I=p.querySelector(".e-ribbon-group-content")).classList.value.match(/(e-ribbon-[column|row]+)/g);y&&t.removeClass([I],y)}}if(this.activeLayout===e.RibbonLayout.Simplified)if(n.group.enableGroupOverflow)0===a.target.childElementCount&&this.removeOverflowButton(a);else{var v=a.target.querySelector("#"+n.group.id+jt);v&&1===v.childElementCount&&v.remove();var g=a.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);g&&0===g.childElementCount&&g.remove()}}var S=n.group;if(S.setProperties(o,!0),S.setProperties({collections:this.checkID(S.collections,"collection",S.id)},!0),this.validateItemSize(),""!==l.innerHTML){if(o.showLauncherIcon&&this.createLauncherIcon(S.id,p),o.collections||o.orientation){var I;(I=p.querySelector(".e-ribbon-group-content")).classList.add("Column"===S.orientation||"Simplified"===this.activeLayout?ct:lt);var C=this.createCollection(S.collections,S.orientation,S.id,S.header,S.enableGroupOverflow,n.tabIndex,p);t.append(C,I)}if(this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&(c.classList.add(S.cssClass),p&&p.classList.add(S.cssClass)),o.header)if(this.activeLayout!==e.RibbonLayout.Simplified||o.enableGroupOverflow)if(this.activeLayout!==e.RibbonLayout.Classic||S.isCollapsed){if(this.activeLayout===e.RibbonLayout.Classic&&S.isCollapsed){var B=c.querySelector("#"+S.id+At+Nt);(O=t.getInstance(B,r.DropDownButton).target.querySelector("#"+o.id+_t))&&(O.innerText=S.header)}}else c.querySelector(".e-ribbon-group-header").innerText=S.header;else{var O;(O=a.target.querySelector("#"+o.id+_t))&&(O.innerText=S.header)}}}},s.prototype.updateCollection=function(o){var i=o.id,n=u(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+i);if(""!==s.innerHTML){var l=void 0,c=void 0;if(this.activeLayout===e.RibbonLayout.Simplified&&(c=(l=n.group.enableGroupOverflow?s.querySelector("#"+n.group.id+xt):null)?t.getComponent(l,r.DropDownButton):this.overflowDDB),o.cssClass&&n.collection.cssClass&&a.classList.remove(n.collection.cssClass),o.items&&n.collection.items)for(var p=0,d=n.collection.items;p<d.length;p++){var h=d[p];this.removeItemElement(s,h,c)}}var b=n.collection;if(b.setProperties(o,!0),b.setProperties({items:this.checkID(b.items,"item",b.id)},!0),this.validateItemSize(),""!==s.innerHTML&&o.items){var m=s.querySelector("#"+n.group.id+jt),f=this.createItems(b.items,n.group.orientation,n.group.id,n.group.header,n.group.enableGroupOverflow,n.tabIndex,m);t.append(f,a)}this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&a.classList.add(b.cssClass)}},s.prototype.updateItem=function(o){var i=o.id,n=p(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s,a,l=this.tabObj.items[n.tabIndex].content,c=l.querySelector("#"+n.group.id).querySelector("#"+n.group.id+jt),u=null,d=null;if(""!==l.innerHTML){if(this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=n.group.enableGroupOverflow?l.querySelector("#"+n.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB),this.activeLayout===e.RibbonLayout.Simplified&&n.item.displayOptions===e.DisplayMode.Overflow){if(u=a.target.querySelector("#"+i+jt),d=a.target.querySelector("#"+i),o.displayOptions&&o.displayOptions!==e.DisplayMode.Overflow){var h=c.querySelector("#"+n.collection.id);h&&h.appendChild(u)}}else u=c.querySelector("#"+i+jt),d=l.querySelector("#"+i),"GroupButton"===n.item.type&&this.activeLayout===e.RibbonLayout.Classic&&(d=l.querySelector("#"+i+Vt)),this.activeLayout===e.RibbonLayout.Simplified&&o.displayOptions===e.DisplayMode.Overflow&&(this.createOverflowPopup(n.item,n.tabIndex,n.group.enableGroupOverflow,n.group.id,n.group.header,u,c),n.item.type!==e.RibbonItemType.DropDown&&n.item.type!==e.RibbonItemType.SplitButton&&o.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(n.item,u,n.group.enableGroupOverflow,!0));o.cssClass&&n.item.cssClass&&u.classList.remove(n.item.cssClass),this.destroyFunction(n.item,d),d.remove();var b=u.classList.value.match(/(e-ribbon-[large|medium|small]+-item)/g);b&&t.removeClass([u],b)}var m=n.item;if(m.setProperties(o,!0),this.validateItemSize(),""!==l.innerHTML){u=this.activeLayout!==e.RibbonLayout.Simplified||m.displayOptions!==e.DisplayMode.Overflow?c.querySelector("#"+i+jt):a.target.querySelector("#"+i+jt),m.ribbonTooltipSettings&&y(m.ribbonTooltipSettings)&&(u.classList.add(yt),this.tooltipData.push({id:u.id,data:m.ribbonTooltipSettings}));var f=m.activeSize;"Simplified"===this.activeLayout&&(f=m.allowedSizes===e.RibbonItemSize.Large||m.allowedSizes&e.RibbonItemSize.Medium||m.displayOptions===e.DisplayMode.Overflow?e.RibbonItemSize.Medium:e.RibbonItemSize.Small,m.setProperties({activeSize:f},!0)),f&e.RibbonItemSize.Large?u.classList.add(pt,ht):u.classList.add(f&e.RibbonItemSize.Medium?ut:dt),this.createRibbonItem(m,u),"Simplified"===this.activeLayout&&n.group.enableGroupOverflow&&0===a.target.childElementCount&&this.removeOverflowButton(a),this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&u.classList.add(m.cssClass),this.enableDisableItem(m.id,m.disabled)}}},s.prototype.removeItemElement=function(t,o,i){var r=null;this.activeLayout===e.RibbonLayout.Classic?(r=o.displayOptions&e.DisplayMode.Classic?t.querySelector("#"+o.id):null,"GroupButton"===o.type&&(r=o.displayOptions&e.DisplayMode.Classic?t.querySelector("#"+o.id+Vt):null)):(r=o.displayOptions&e.DisplayMode.Simplified?t.querySelector("#"+o.id):null)||(r=i.target.querySelector("#"+o.id)),r&&(this.destroyFunction(o,r),"GroupButton"===o.type&&this.activeLayout===e.RibbonLayout.Simplified?document.getElementById(o.id+jt).remove():r.closest("#"+o.id+jt).remove())},s.prototype.enableItem=function(e){this.enableDisableItem(e,!1)},s.prototype.disableItem=function(e){this.enableDisableItem(e,!0)},s.prototype.enableDisableItem=function(e,o){var i=p(this.tabs,e);if(i){i.item.setProperties({disabled:o},!0);var r;if(r="GroupButton"===i.item.type?f(this,e+Vt,i):f(this,e,i)){t.closest(r,".e-ribbon-item").classList.toggle(we,i.item.disabled);var n=this.getItemModuleName(i.item);if("template"!==n)if("group-btn"===n&&"Simplified"===this.activeLayout){m(r,"dropdown-btn",o);for(var s=0;s<i.item.groupButtonSettings.items.length;s++){m(document.querySelector("#"+e+Vt+s),"btn",o)}}else if("group-btn"===n&&"Classic"===this.activeLayout)for(s=0;s<i.item.groupButtonSettings.items.length;s++){m(r.querySelector("#"+e+Vt+s),"btn",o)}else m(r,n,o);else r.classList.toggle(we,o),r.toggleAttribute("disabled",o)}}},s.prototype.unwireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler)},s.prototype.destroy=function(){this.keyboardModuleRibbon.destroy(),this.keyboardModuleRibbon=null,S(this.element),this.destroyTabItems(this.tabs),this.hideLayoutSwitcher||this.removeExpandCollapse(),this.collapseButton=void 0,this.scrollModule&&this.scrollModule.destroy(),this.ribbonTempEle&&(t.remove(this.ribbonTempEle),this.ribbonTempEle=null),i.prototype.destroy.call(this),this.tabObj.destroy(),this.tabObj=void 0,this.initialPropsData={},t.remove(this.element.querySelector("#"+this.element.id+"_tab")),this.element.style.removeProperty(Kt),this.element.style.removeProperty(Xt),this.element.style.removeProperty("width"),this.cssClass&&t.removeClass([this.element],this.cssClass.split(" ")),this.element.classList.remove(Pe,Bt,Ge,ze,We,"e-rbn"),this.unwireEvents()},s.prototype.onPropertyChanged=function(e,o){for(var i,n,s=0,a=Object.keys(e);s<a.length;s++){switch(a[s]){case"activeLayout":this.switchLayout();break;case"cssClass":o.cssClass&&(i=this.element.classList).remove.apply(i,o.cssClass.split(" ")),e.cssClass&&(n=this.element.classList).add.apply(n,e.cssClass.split(" "));break;case"isMinimized":this.element.classList.toggle(We,this.isMinimized),this.tabObj.element.querySelector(".e-content").style.display=this.isMinimized?"none":"block",this.isMinimized||this.refreshLayout();break;case"locale":this.updateCommonProperty({locale:this.locale});break;case"enablePersistence":this.updateCommonProperty({enablePersistence:this.enablePersistence});break;case"enableRtl":this.element.classList.toggle(Pe,this.enableRtl),this.updateCommonProperty({enableRtl:e.enableRtl}),this.scrollModule&&this.scrollModule.setProperties({enableRtl:e.enableRtl});break;case"launcherIconCss":for(var l=0;l<this.tabs.length;l++){var c=this.tabObj.items[parseInt(l.toString(),10)].content,p=this.tabs[parseInt(l.toString(),10)];if(c.querySelector("."+Fe))for(var u=0,d=p.groups;u<d.length;u++){var h=d[u];if(h.showLauncherIcon){var b=rt+" "+(this.launcherIconCss||nt);if(h.isCollapsed){var m=c.querySelector("#"+h.id+At+Nt);t.getComponent(m,r.DropDownButton).target.querySelector("#"+h.id+qt).className=b}else{(m=c.querySelector("#"+h.id+qt)).className=b}}}}break;case"selectedTab":this.tabObj.setProperties({selectedItem:e.selectedTab});break;case"tabAnimation":this.tabObj.setProperties({animation:e.tabAnimation});break;case"tabs":this.reRenderTabs(e.tabs);break;case"width":this.element.style.width=t.formatUnit(e.width),this.refreshLayout();break;case"fileMenu":this.ribbonFileMenuModule&&this.ribbonFileMenuModule.updateFileMenu(this.fileMenu);this.tabObj.tbObj.refreshOverflow();break;case"backStageMenu":this.ribbonBackstageModule&&this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);this.tabObj.tbObj.refreshOverflow();break;case"helpPaneTemplate":this.ribbonTempEle&&(t.remove(this.ribbonTempEle),this.ribbonTempEle=null,this.tabObj.element.style.setProperty(Xt,"0px")),this.helpPaneTemplate&&this.createHelpPaneTemplate();this.tabObj.tbObj.refreshOverflow();break;case"hideLayoutSwitcher":this.hideLayoutSwitcher?this.removeExpandCollapse():this.addExpandCollapse()}}};var a;return io([t.Property("Classic")],s.prototype,"activeLayout",void 0),io([t.Property("")],s.prototype,"cssClass",void 0),io([t.Complex({},pe)],s.prototype,"fileMenu",void 0),io([t.Complex({},ge)],s.prototype,"backStageMenu",void 0),io([t.Property("")],s.prototype,"launcherIconCss",void 0),io([t.Property(!1)],s.prototype,"isMinimized",void 0),io([t.Property("en-us")],s.prototype,"locale",void 0),io([t.Property(0)],s.prototype,"selectedTab",void 0),io([t.Complex({},o.TabAnimationSettings)],s.prototype,"tabAnimation",void 0),io([t.Collection([],ae)],s.prototype,"tabs",void 0),io([t.Property("100%")],s.prototype,"width",void 0),io([t.Property("")],s.prototype,"helpPaneTemplate",void 0),io([t.Property(!1)],s.prototype,"hideLayoutSwitcher",void 0),io([t.Event()],s.prototype,"tabSelecting",void 0),io([t.Event()],s.prototype,"tabSelected",void 0),io([t.Event()],s.prototype,"ribbonExpanding",void 0),io([t.Event()],s.prototype,"ribbonCollapsing",void 0),io([t.Event()],s.prototype,"launcherIconClick",void 0),io([t.Event()],s.prototype,"created",void 0),s=a=io([t.NotifyPropertyChanges],s)}(t.Component),no=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonFileMenu"},e.prototype.destroy=function(){this.fileMenuDDB&&this.destroyDDB(),this.parent=null},e.prototype.createFileMenu=function(e){var t=this;if(e.visible){this.ddbElement=this.parent.createElement("button",{id:this.parent.element.id+"_filemenu"});var o=this.parent.tabObj.element,i=o.querySelector(".e-toolbar");o.insertBefore(this.ddbElement,i),this.fileMenuDDB=new r.DropDownButton({content:e.text,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-file-menu e-caret-hide",created:function(){o.style.setProperty(Kt,t.ddbElement.offsetWidth+"px")},beforeClose:this.ddbBeforeEvent.bind(this,!1),beforeOpen:this.ddbBeforeEvent.bind(this,!0),close:this.ddbAfterEvent.bind(this,!1),open:this.ddbAfterEvent.bind(this,!0)},this.ddbElement),this.parent.fileMenu.popupTemplate?this.fileMenuDDB.setProperties({target:this.parent.fileMenu.popupTemplate}):this.createRibbonMenu(e),this.parent.tabObj.refreshActiveTabBorder(),this.addFileMenuTooltip(e)}},e.prototype.addFileMenuTooltip=function(e){y(e.ribbonTooltipSettings)&&(this.ddbElement.classList.add(yt),this.parent.tooltipData.push({id:this.ddbElement.id,data:e.ribbonTooltipSettings}))},e.prototype.ddbBeforeEvent=function(e,t){!e&&t.event&&t.event.target.closest(".e-ribbon-menu")&&(t.cancel=!0);var o=e?this.parent.fileMenu.beforeOpen:this.parent.fileMenu.beforeClose;if(o){var i={cancel:t.cancel,element:t.element,event:t.event};o.call(this,i),t.cancel=i.cancel}},e.prototype.ddbAfterEvent=function(e,t){(e?this.fileMenuDDB.target:this.fileMenuDDB.element).focus();var o=e?this.parent.fileMenu.open:this.parent.fileMenu.close;if(o){var i={element:t.element};o.call(this,i)}},e.prototype.cloneMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];t.push({iconCss:i.iconCss,id:i.id,separator:i.separator,text:i.text,url:i.url,items:this.cloneMenuItem(i.items)})}return t},e.prototype.createRibbonMenu=function(e){var i=this,r=this.parent.createElement("ul",{id:this.parent.element.id+Wt});this.fileMenuDDB.setProperties({target:r}),this.menuctrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-menu",animationSettings:e.animationSettings,items:this.cloneMenuItem(e.menuItems),showItemOnClick:e.showItemOnClick,template:e.itemTemplate,beforeClose:this.menuBeforeEvent.bind(this,!1),beforeOpen:this.menuBeforeEvent.bind(this,!0),beforeItemRender:this.beforeItemRender.bind(this),onClose:this.menuAfterEvent.bind(this,!1),onOpen:this.menuAfterEvent.bind(this,!0),select:this.menuSelect.bind(this)},r),t.EventHandler.add(r,"keydown",function(e){"Tab"===e.key&&i.fileMenuDDB.toggle()},this)},e.prototype.menuBeforeEvent=function(e,t){var o=e?this.parent.fileMenu.beforeOpen:this.parent.fileMenu.beforeClose;if(o){var i={cancel:t.cancel,element:t.element,event:t.event,items:t.items,parentItem:t.parentItem};o.call(this,i),t.cancel=i.cancel}},e.prototype.menuAfterEvent=function(e,t){var o=e?this.parent.fileMenu.open:this.parent.fileMenu.close;if(o){var i={element:t.element,items:t.items,parentItem:t.parentItem};o.call(this,i)}},e.prototype.beforeItemRender=function(e){var t=this.parent.fileMenu.beforeItemRender;if(t){var o={element:e.element,item:e.item};t.call(this,o)}},e.prototype.menuSelect=function(e){var t=this.parent.fileMenu.select;if(t){var o={element:e.element,item:e.item,event:e.event};t.call(this,o),e.element.classList.contains("e-menu-caret-icon")||this.fileMenuDDB.toggle()}},e.prototype.setCommonProperties=function(e){this.fileMenuDDB&&(this.fileMenuDDB.setProperties(e),this.menuctrl&&this.menuctrl.setProperties(e))},e.prototype.updateFileMenu=function(e){e.visible?this.fileMenuDDB?(e.text&&(this.fileMenuDDB.setProperties({content:e.text}),this.parent.tabObj.element.style.setProperty(Kt,this.ddbElement.offsetWidth+"px")),e.popupTemplate?(this.menuctrl&&this.destroyMenu(),this.fileMenuDDB.setProperties({target:e.popupTemplate})):this.menuctrl?this.menuctrl.setProperties({animationSettings:e.animationSettings,items:this.cloneMenuItem(e.menuItems),showItemOnClick:e.showItemOnClick,template:e.itemTemplate}):this.createRibbonMenu(e),this.removeFileMenuTooltip(),this.addFileMenuTooltip(e)):this.createFileMenu(e):this.fileMenuDDB&&this.destroyDDB(),this.parent.tabObj.refreshActiveTabBorder()},e.prototype.destroyMenu=function(){this.menuctrl&&(this.menuctrl.destroy(),this.menuctrl=null)},e.prototype.destroyDDB=function(){this.removeFileMenuTooltip();this.parent.tabObj.element.style.removeProperty(Kt),this.destroyMenu(),this.fileMenuDDB.destroy(),this.fileMenuDDB=null,t.remove(this.ddbElement),this.ddbElement=null},e.prototype.removeFileMenuTooltip=function(){var e=this,t=l(this.parent.tooltipData,function(t){return t.id===e.ddbElement.id});-1!==t&&(this.ddbElement.classList.remove(yt),this.parent.tooltipData.splice(t,1))},e.prototype.addItems=function(e,t,o,i){o?this.menuctrl.insertAfter(e,t,i):this.menuctrl.insertBefore(e,t,i),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.removeItems=function(e,t){this.menuctrl.removeItems(e,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.enableItems=function(e,t){this.menuctrl.enableItems(e,!0,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.disableItems=function(e,t){this.menuctrl.enableItems(e,!1,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.setItem=function(e,t,o){this.menuctrl.setItem(e,t,o),this.menuctrl.refresh(),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e}(),so=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ao=function(e){function i(t){var o=e.call(this)||this;return o.parent=t,o}return so(i,e),i.prototype.render=function(){},i.prototype.preRender=function(){},i.prototype.getPersistData=function(){return""},i.prototype.onPropertyChanged=function(){},i.prototype.getModuleName=function(){return"ribbonBackstage"},i.prototype.destroy=function(){this.backstageButton&&this.destroyDDB(),this.parent=null},i.prototype.createBackStage=function(e){var o=this;if(e.visible){this.backstageButtonEle=this.parent.createElement("button",{id:this.parent.element.id+Gt});var i=this.parent.tabObj.element,r=i.querySelector(".e-toolbar");if(i.insertBefore(this.backstageButtonEle,r),this.backstageButton=new n.Button({content:e.text,enableRtl:this.parent.enableRtl,cssClass:Dt,created:function(){i.style.setProperty(Kt,o.backstageButtonEle.offsetWidth+"px")}},this.backstageButtonEle),this.createBackStagePopup(e),this.parent.backStageMenu.template)this.createBackStageTemplate(this.parent.backStageMenu.template);else{for(var s=0,a=0,l=0;l<e.items.length;l++){e.items[parseInt(l.toString(),10)].isFooter?s++:a++}a>0&&this.createBackstageMenu(e,!1),s>0&&this.createBackstageMenu(e,!0),this.menuCtrl&&this.checkMenuItems(this.menuCtrl.items),this.footerMenuCtrl&&this.checkMenuItems(this.footerMenuCtrl.items)}this.backstageButtonEle.onclick=function(t){t.stopPropagation(),o.showBackstage(),o.popupHTMLElement.classList.add(wt);var i=o.menuWrapper.querySelector(".e-menu-item.e-selected");i&&i.classList.remove("e-selected");for(var r=0;r<e.items.length;r++){var n=e.items[parseInt(r.toString(),10)];if(!n.isFooter&&o.menuCtrl.items[0].text===n.text){var s=o.popupHTMLElement.querySelector("#"+o.menuCtrl.items[0].id);s&&(s.classList.add("e-selected"),s.focus()),o.createBackStageContent(o.menuCtrl.items[0].id,n.content);break}}},this.parent.tabObj.refreshActiveTabBorder(),this.addBackStageMenuTooltip(e),t.EventHandler.add(document,"click",this.onClickEvent,this)}},i.prototype.onClickEvent=function(e){var t=e.target;this.popupHTMLElement.contains(t)||this.hideBackstage()},i.prototype.addBackStageMenuTooltip=function(e){y(e.ribbonTooltipSettings)&&(this.backstageButtonEle.classList.add(yt),this.parent.tooltipData.push({id:this.backstageButtonEle.id,data:e.ribbonTooltipSettings}))},i.prototype.checkMenuItems=function(e){for(var t=0;t<e.length;t++){var o=e[parseInt(t.toString(),10)];if(!o.iconCss){this.popupHTMLElement.querySelector("#"+o.id).classList.add("e-blankicon")}}},i.prototype.createBackStagePopup=function(e){var t=this;this.popupHTMLElement=this.parent.createElement("div",{id:this.parent.element.id+Ht,className:Ot});e.target?(e.target instanceof HTMLElement?e.target:document.querySelector(e.target)).appendChild(this.popupHTMLElement):this.parent.element.appendChild(this.popupHTMLElement),this.popupEle=new a.Popup(this.popupHTMLElement,{height:e.height,width:e.width,relateTo:e.target||this.parent.element,enableRtl:this.parent.enableRtl}),this.parent.enableRtl&&this.updatePopupPositionOnRtl(this.parent.enableRtl),this.popupHTMLElement.onkeydown=function(e){"Escape"===e.code&&t.hideBackstage()},this.hideBackstage()},i.prototype.updatePopupPositionOnRtl=function(e){var t=this.popupHTMLElement.style;e?(t.right=t.left,t.left="unset"):(t.left=t.right,t.right="unset")},i.prototype.createBackstageMenu=function(e,t){var i=this;if(this.popupHTMLElement.querySelector("#"+this.parent.element.id+"_wrapper")||(this.menuWrapper=this.parent.createElement("div",{id:this.parent.element.id+"_wrapper",className:Tt}),this.popupHTMLElement.appendChild(this.menuWrapper)),e.backButton.visible&&!t){var r=this.parent.createElement("button",{id:this.parent.element.id+"_close",className:"e-ribbon-close-btn"});this.closeBtn=new n.Button({content:e.backButton.text,iconCss:e.backButton.iconCss?e.backButton.iconCss:Ce,enableRtl:this.parent.enableRtl},r),this.menuWrapper.append(r),r.onclick=function(){i.popupHTMLElement.classList.remove(wt),i.hideBackstage(),i.isBackButtonClicked=!0}}this.popupHTMLElement.querySelector("#"+this.parent.element.id+"_itemswrapper")||(this.itemsWrapperEle=this.parent.createElement("div",{id:this.parent.element.id+"_itemswrapper",className:kt}),this.menuWrapper.append(this.itemsWrapperEle));var s;t?(s=this.parent.createElement("ul",{id:this.parent.element.id+Ft}),this.itemsWrapperEle.appendChild(s)):(this.ulMenuElem=this.parent.createElement("ul",{id:this.parent.element.id+"_menulist"}),this.itemsWrapperEle.appendChild(this.ulMenuElem)),t?this.footerMenuCtrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:Lt,items:this.cloneFooterMenuItem(e.items),select:this.menuSelect.bind(this,e)},s):this.menuCtrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:Lt,items:this.cloneMenuItem(e.items),select:this.menuSelect.bind(this,e)},this.ulMenuElem)},i.prototype.cloneMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];i.isFooter||t.push({id:i.id,iconCss:i.iconCss,separator:i.separator,text:i.text})}return t},i.prototype.cloneFooterMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];i.isFooter&&t.push({id:i.id,iconCss:i.iconCss,separator:i.separator,text:i.text})}return t},i.prototype.createBackStageContent=function(e,o){var i="backstageContent";this.clearTemplate([i]),this.backstageContentEle?(this.backstageContentEle.innerHTML="",this.backstageContentEle.id=e+zt):this.backstageContentEle=this.parent.createElement("div",{id:e+zt,className:Pt});var r=c(o);return t.append(r({},this,i,"backstageContent",this.parent.isStringTemplate),this.backstageContentEle),o&&this.popupHTMLElement.append(this.backstageContentEle),this.renderReactTemplates(),r},i.prototype.createBackStageTemplate=function(e){var o="backstageTemplate";this.clearTemplate([o]),this.backstageTempEle=this.parent.createElement("div",{id:this.parent.element.id+Gt+"_template",className:Rt});var i=c(e);return t.append(i({},this,o,"backstageTemplate",this.parent.isStringTemplate),this.backstageTempEle),this.popupHTMLElement.append(this.backstageTempEle),this.renderReactTemplates(),i},i.prototype.menuSelect=function(e,t){for(var o=0;o<e.items.length;o++){var i=e.items[parseInt(o.toString(),10)];if(i.text===t.item.text){this.contentItem=i;break}}this.createBackStageContent(t.item.id,this.contentItem.content);var r={cancel:!1,target:t.element,item:this.contentItem,isBackButton:this.isBackButtonClicked};this.contentItem.backStageItemClick&&this.contentItem.backStageItemClick.call(this,r)},i.prototype.setCommonProperties=function(e){this.backstageButton&&(this.backstageButton.setProperties(e),this.popupEle&&(this.popupEle.setProperties(e),this.popupHTMLElement&&this.updatePopupPositionOnRtl(e.enableRtl),this.menuCtrl&&(this.menuCtrl.setProperties(e),this.closeBtn&&this.closeBtn.setProperties(e))))},i.prototype.updateBackStageMenu=function(e){if(e.visible)if(this.backstageButton){if(e.text&&(this.backstageButton.setProperties({content:e.text}),this.parent.tabObj.element.style.setProperty(Kt,this.backstageButtonEle.offsetWidth+"px")),this.popupEle&&this.popupEle.setProperties({height:e.height,width:e.width,target:e.target||this.parent.element}),e.template)this.backstageTempEle&&(t.remove(this.backstageTempEle),this.backstageTempEle=null),this.createBackStageTemplate(e.template);else if(this.menuCtrl&&this.menuCtrl.setProperties({items:this.cloneMenuItem(e.items)}),this.footerMenuCtrl)this.footerMenuCtrl.setProperties({items:this.cloneFooterMenuItem(e.items)});else{for(var o=0,i=0,r=0;r<e.items.length;r++){e.items[parseInt(r.toString(),10)].isFooter?o++:i++}i>0&&this.createBackstageMenu(e,!1),o>0&&this.createBackstageMenu(e,!0)}this.removeBackstageMenuTooltip(),this.addBackStageMenuTooltip(e)}else this.createBackStage(e);else this.backstageButton&&this.destroyDDB();this.parent.tabObj.refreshActiveTabBorder()},i.prototype.destroyMenu=function(){this.menuCtrl&&(this.menuCtrl.destroy(),this.menuCtrl=null)},i.prototype.destroyDDB=function(){this.removeBackstageMenuTooltip();this.parent.tabObj.element.style.removeProperty(Kt),this.destroyMenu(),this.backstageButton.destroy(),this.backstageButton=null,t.remove(this.backstageButtonEle),this.backstageButtonEle=null,t.EventHandler.remove(document,"click",this.onClickEvent)},i.prototype.removeBackstageMenuTooltip=function(){var e=this,t=l(this.parent.tooltipData,function(t){return t.id===e.backstageButtonEle.id});-1!==t&&(this.backstageButtonEle.classList.remove(yt),this.parent.tooltipData.splice(t,1))},i.prototype.addBackstageItems=function(e,t,o,i){for(var r=0;r<e.length;r++){(a=e[parseInt(r.toString(),10)]).isFooter?o?this.footerMenuCtrl.insertAfter(e,t,i):this.footerMenuCtrl.insertBefore(e,t,i):o?this.menuCtrl.insertAfter(e,t,i):this.menuCtrl.insertBefore(e,t,i)}var n=[].concat(this.menuCtrl.items,this.footerMenuCtrl.items),s=this.parent.backStageMenu;for(r=0;r<s.items.length;r++)for(var a=s.items[parseInt(r.toString(),10)],l=0;l<n.length;l++){var c=n[parseInt(l.toString(),10)];if(a.text===c.text){c.content=a.content;break}}this.parent.backStageMenu.setProperties({items:n},!0)},i.prototype.removeBackstageItems=function(e,t){this.menuCtrl.removeItems(e,t),this.footerMenuCtrl.removeItems(e,t);var o=[].concat(this.menuCtrl.items,this.footerMenuCtrl.items);this.parent.backStageMenu.setProperties({items:o},!0)},i.prototype.showBackstage=function(){this.popupEle.show()},i.prototype.hideBackstage=function(){this.popupEle.element.classList.contains(wt)&&this.popupEle.element.classList.remove(wt),this.popupEle.hide()},i}(t.Component);e.Ribbon=ro,e.ITEM_VERTICAL_CENTER=Se,e.EXPAND_COLLAPSE_ICON=Ie,e.BACKSTAGE_CLOSE_ICON=Ce,e.OVERFLOW_ICON=Be,e.VERTICAL_DDB=Oe,e.DISABLED_CSS=we,e.RTL_CSS=Pe,e.RIBBON_HOVER=De,e.RIBBON_CONTROL=Le,e.RIBBON_POPUP_CONTROL=Re,e.RIBBON_POPUP_OPEN=Te,e.SPACE=" ",e.HORIZONTAL_SCROLLBAR=ke,e.HIDE_CSS=Ee,e.RIBBON_TAB="e-ribbon-tab",e.RIBBON_TAB_ACTIVE=Me,e.RIBBON_TAB_ITEM=xe,e.RIBBON_COLLAPSE_BUTTON=_e,e.RIBBON_EXPAND_BUTTON=qe,e.RIBBON_COLLAPSIBLE=ze,e.RIBBON_OVERALL_OF_BUTTON=je,e.RIBBON_GROUP_OF_BUTTON=Ae,e.RIBBON_OVERFLOW_TARGET=Ne,e.RIBBON_OVERFLOW=Ge,e.TAB_CONTENT=He,e.RIBBON_MINIMIZE=We,e.RIBBON_GROUP=Fe,e.RIBBON_SINGLE_BUTTON_SELECTION=Ue,e.RIBBON_MULTIPLE_BUTTON_SELECTION=Ve,e.RIBBON_GROUP_BUTTON=Ke,e.RIBBON_GROUP_BUTTON_OVERFLOW_POPUP=Xe,e.RIBBON_GROUP_CONTAINER=Ze,e.RIBBON_OF_TAB_CONTAINER=Ye,e.RIBBON_OF_GROUP_CONTAINER=Je,e.RIBBON_GROUP_CONTENT=Qe,e.RIBBON_GROUP_HEADER=$e,e.RIBBON_OVERFLOW_HEADER=et,e.RIBBON_GROUP_OVERFLOW=tt,e.RIBBON_GROUP_OVERFLOW_DDB=ot,e.RIBBON_LAUNCHER=it,e.RIBBON_LAUNCHER_ICON_ELE=rt,e.RIBBON_LAUNCHER_ICON=nt,e.RIBBON_COLLECTION=st,e.RIBBON_ITEM=at,e.RIBBON_ROW=lt,e.RIBBON_COLUMN=ct,e.RIBBON_LARGE_ITEM=pt,e.RIBBON_MEDIUM_ITEM=ut,e.RIBBON_SMALL_ITEM=dt,e.RIBBON_CONTENT_HEIGHT=ht,e.DROPDOWNBUTTON="e-dropdown-btn",e.DROPDOWNBUTTON_HIDE="e-caret-hide",e.RIBBON_TEMPLATE=bt,e.RIBBON_HELP_TEMPLATE=mt,e.RIBBON_TOOLTIP=ft,e.RIBBON_TOOLTIP_TARGET=yt,e.RIBBON_TOOLTIP_TITLE=vt,e.RIBBON_TOOLTIP_CONTENT=gt,e.RIBBON_TOOLTIP_ICON=St,e.RIBBON_TOOLTIP_CONTAINER=It,e.RIBBON_TEXT_CONTAINER=Ct,e.RIBBON_SIMPLIFIED_MODE=Bt,e.RIBBON_BACKSTAGE_POPUP=Ot,e.RIBBON_BACKSTAGE_OPEN=wt,e.RIBBON_BACKSTAGE_CONTENT=Pt,e.RIBBON_SELECTED_CONTENT="e-ribbon-selected-content",e.RIBBON_BACKSTAGE=Dt,e.RIBBON_BACKSTAGE_MENU=Lt,e.RIBBON_BACKSTAGE_TEMPLATE=Rt,e.RIBBON_BACKSTAGE_MENU_WRAPPER=Tt,e.RIBBON_BACKSTAGE_ITEMS_WRAPPER=kt,e.RIBBON_BACKSTAGE_TEXT_MENU="e-blankicon",e.TAB_ID="_tab",e.GROUP_ID="_group",e.COLLECTION_ID="_collection",e.ITEM_ID="_item",e.COLLAPSE_BUTTON_ID=Et,e.OVRLOF_BUTTON_ID=Mt,e.GROUPOF_BUTTON_ID=xt,e.HEADER_ID=_t,e.LAUNCHER_ID=qt,e.CONTENT_ID=zt,e.CONTAINER_ID=jt,e.OVERFLOW_ID=At,e.DROPDOWN_ID=Nt,e.RIBBON_FILE_MENU_ID="_filemenu",e.RIBBON_BACKSTAGE_MENU_ID=Gt,e.RIBBON_BACKSTAGE_POPUP_ID=Ht,e.RIBBON_FILE_MENU_LIST=Wt,e.RIBBON_MENU_LIST="_menulist",e.RIBBON_FOOTER_MENU_LIST=Ft,e.RIBBON_HELP_PANE_TEMPLATE_ID=Ut,e.RIBBON_GROUP_BUTTON_ID=Vt,e.RIBBON_FILE_MENU_WIDTH=Kt,e.RIBBON_HELP_PANE_TEMPLATE_WIDTH=Xt,e.getIndex=l,e.getTemplateFunction=c,e.getItem=p,e.getCollection=u,e.getGroup=d,e.destroyControl=h,e.updateCommonProperty=b,e.updateControlDisabled=m,e.getItemElement=f,e.isTooltipPresent=y,e.setToolTipContent=v,e.createTooltip=g,e.destroyTooltip=S,e.updateTooltipProp=I,e.setCustomAttributes=C,e.RibbonTab=ae,e.RibbonGroup=re,e.RibbonCollection=te,e.RibbonItem=Q,e.RibbonButtonSettings=w,e.RibbonCheckBoxSettings=L,e.RibbonColorPickerSettings=k,e.RibbonComboBoxSettings=x,e.RibbonDropDownSettings=z,e.RibbonSplitButtonSettings=N,e.FileMenuSettings=pe,e.BackStageMenu=ge,e.BackstageBackButton=he,e.BackstageItem=fe,e.RibbonTooltip=W,e.RibbonGroupButtonSettings=Z,e.RibbonGroupButtonItem=V,e.RibbonButton=Zt,e.RibbonCheckBox=Yt,e.RibbonColorPicker=Jt,e.RibbonComboBox=Qt,e.RibbonDropDown=$t,e.RibbonSplitButton=eo,e.RibbonGroupButton=to,e.RibbonFileMenu=no,e.RibbonBackstage=ao,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-navigations"),require("@syncfusion/ej2-dropdowns"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-navigations","@syncfusion/ej2-dropdowns","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-buttons","@syncfusion/ej2-inputs","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Navigations,e.ej2Dropdowns,e.ej2Splitbuttons,e.ej2Buttons,e.ej2Inputs,e.ej2Popups)}(this,function(e,t,o,i,r,n,s,a){"use strict";function l(e,t){for(var o=0;o<e.length;o++)if(t(e[parseInt(o.toString(),10)],o))return o;return-1}function c(e){if("string"==typeof e){var o="";try{var i=t.select(e);o=i?"SCRIPT"===i.tagName?i.innerHTML:i.outerHTML:e}catch(t){o=e}return t.compile(o)}return t.compile(e)}function p(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++)for(var n=i.groups[parseInt(r.toString(),10)],s=0;s<n.collections.length;s++)for(var a=n.collections[parseInt(s.toString(),10)],l=0;l<a.items.length;l++){var c=a.items[parseInt(l.toString(),10)];if(c.id===t)return{item:c,collection:a,group:n,tabIndex:o,groupIndex:r,collectionIndex:s,itemIndex:l}}return null}function u(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++)for(var n=i.groups[parseInt(r.toString(),10)],s=0;s<n.collections.length;s++){var a=n.collections[parseInt(s.toString(),10)];if(a.id===t)return{collection:a,group:n,tabIndex:o,groupIndex:r,collectionIndex:s}}return null}function d(e,t){for(var o=0;o<e.length;o++)for(var i=e[parseInt(o.toString(),10)],r=0;r<i.groups.length;r++){var n=i.groups[parseInt(r.toString(),10)];if(n.id===t)return{group:n,tabIndex:o,groupIndex:r}}return null}function h(e,o){t.getComponent(e,o).destroy()}function b(e,o,i){t.getComponent(e,o).setProperties(i)}function f(e,o,i){t.getComponent(e,o).setProperties("combobox"===o?{enabled:!i}:{disabled:i})}function m(o,i,n){if(!n&&!(n=p(o.tabs,i)))return null;var s=o.tabObj.items[n.tabIndex].content;if(""===s.innerHTML)return null;if(o.activeLayout===e.RibbonLayout.Classic)return n.item.displayOptions&e.DisplayMode.Classic?(s=n.group.isCollapsed?o.ribbonDropDownModule.getOverflowDropDownPopup(n,s):s).querySelector("#"+i):null;var a=n.item.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+n.item.id):null;if(!a){a=(n.group.enableGroupOverflow?t.getComponent(s.querySelector("#"+n.group.id+xt),r.DropDownButton):o.overflowDDB).target.querySelector("#"+n.item.id)}return a}function y(e){return!!(e.content||e.iconCss||e.title||e.id||e.cssClass)}function v(e,t,o){var i=e.target.getAttribute("id"),r=o.filter(function(e){return e.id===i})[0].data,n=t.createElement("div",{id:r.id?It+"_"+r.id:It});if(t.element.append(n),r.title){var s=t.createElement("div",{innerHTML:r.title,className:vt});n.appendChild(s)}var a=t.createElement("div",{className:Ct});if(n.appendChild(a),r.iconCss){var l=t.createElement("div",{className:r.iconCss+" "+St});a.appendChild(l)}if(r.content){var c=t.createElement("div",{innerHTML:r.content,className:gt});a.appendChild(c)}t.setProperties({content:n,cssClass:r.cssClass?r.cssClass+" "+mt:mt})}function g(e,t){var o=new a.Tooltip({target:"."+yt,beforeRender:function(e){v(e,o,t.tooltipData)}.bind(this),windowCollision:!0});o.appendTo(e)}function S(e){t.getComponent(e,a.Tooltip).destroy()}function I(e,o){t.getComponent(e,a.Tooltip).setProperties(o)}function C(e,o){for(var i in o)if("class"===i){var r=o.class.replace(/\s+/g," ").trim();r&&t.addClass([e],r.split(" "))}else if("style"===i){var n=""+(e.getAttribute("style")||"")+o[""+i];e.setAttribute(""+i,n)}else e.setAttribute(i,o[""+i])}!function(e){e.Classic="Classic",e.Simplified="Simplified"}(e.RibbonLayout||(e.RibbonLayout={})),function(e){e.Row="Row",e.Column="Column"}(e.ItemOrientation||(e.ItemOrientation={})),function(e){e[e.Large=4]="Large",e[e.Medium=2]="Medium",e[e.Small=1]="Small"}(e.RibbonItemSize||(e.RibbonItemSize={})),function(e){e[e.Classic=4]="Classic",e[e.Simplified=2]="Simplified",e[e.Overflow=1]="Overflow",e[e.Auto=7]="Auto"}(e.DisplayMode||(e.DisplayMode={})),function(e){e.Button="Button",e.CheckBox="CheckBox",e.ColorPicker="ColorPicker",e.ComboBox="ComboBox",e.DropDown="DropDown",e.SplitButton="SplitButton",e.GroupButton="GroupButton",e.Template="Template"}(e.RibbonItemType||(e.RibbonItemType={})),function(e){e.Single="Single",e.Multiple="Multiple"}(e.RibbonGroupButtonSelection||(e.RibbonGroupButtonSelection={}));var O=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),B=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},w=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return O(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},B([t.Property("")],o.prototype,"content",void 0),B([t.Property("")],o.prototype,"cssClass",void 0),B([t.Property("")],o.prototype,"iconCss",void 0),B([t.Property(!1)],o.prototype,"isToggle",void 0),B([t.Property(!1)],o.prototype,"isPrimary",void 0),B([t.Property({})],o.prototype,"htmlAttributes",void 0),B([t.Event()],o.prototype,"created",void 0),B([t.Event()],o.prototype,"clicked",void 0),o}(t.ChildProperty),D=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),P=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},L=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return D(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},P([t.Property(!1)],o.prototype,"checked",void 0),P([t.Property("")],o.prototype,"cssClass",void 0),P([t.Property("")],o.prototype,"label",void 0),P([t.Property("After")],o.prototype,"labelPosition",void 0),P([t.Property({})],o.prototype,"htmlAttributes",void 0),P([t.Event()],o.prototype,"created",void 0),P([t.Event()],o.prototype,"change",void 0),o}(t.ChildProperty),R=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),k=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},T=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return R(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},k([t.Property(10)],o.prototype,"columns",void 0),k([t.Property("")],o.prototype,"cssClass",void 0),k([t.Property(!0)],o.prototype,"enableOpacity",void 0),k([t.Property("Picker")],o.prototype,"mode",void 0),k([t.Property(!0)],o.prototype,"modeSwitcher",void 0),k([t.Property(!1)],o.prototype,"noColor",void 0),k([t.Property(null)],o.prototype,"presetColors",void 0),k([t.Property(!0)],o.prototype,"showButtons",void 0),k([t.Property("#008000ff")],o.prototype,"value",void 0),k([t.Property({})],o.prototype,"htmlAttributes",void 0),k([t.Event()],o.prototype,"beforeClose",void 0),k([t.Event()],o.prototype,"beforeOpen",void 0),k([t.Event()],o.prototype,"beforeTileRender",void 0),k([t.Event()],o.prototype,"created",void 0),k([t.Event()],o.prototype,"change",void 0),k([t.Event()],o.prototype,"open",void 0),k([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),E=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),M=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},x=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return E(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},M([t.Property(!1)],o.prototype,"allowFiltering",void 0),M([t.Property(!0)],o.prototype,"autofill",void 0),M([t.Property("")],o.prototype,"cssClass",void 0),M([t.Property([])],o.prototype,"dataSource",void 0),M([t.Complex({text:null,value:null,iconCss:null,groupBy:null},i.FieldSettings)],o.prototype,"fields",void 0),M([t.Property("Contains")],o.prototype,"filterType",void 0),M([t.Property(null)],o.prototype,"footerTemplate",void 0),M([t.Property(null)],o.prototype,"groupTemplate",void 0),M([t.Property(null)],o.prototype,"headerTemplate",void 0),M([t.Property(null)],o.prototype,"index",void 0),M([t.Property(null)],o.prototype,"itemTemplate",void 0),M([t.Property("No records found")],o.prototype,"noRecordsTemplate",void 0),M([t.Property(null)],o.prototype,"placeholder",void 0),M([t.Property("300px")],o.prototype,"popupHeight",void 0),M([t.Property("100%")],o.prototype,"popupWidth",void 0),M([t.Property(!0)],o.prototype,"showClearButton",void 0),M([t.Property("None")],o.prototype,"sortOrder",void 0),M([t.Property(null)],o.prototype,"text",void 0),M([t.Property(null)],o.prototype,"value",void 0),M([t.Property("150px")],o.prototype,"width",void 0),M([t.Property({})],o.prototype,"htmlAttributes",void 0),M([t.Event()],o.prototype,"beforeOpen",void 0),M([t.Event()],o.prototype,"change",void 0),M([t.Event()],o.prototype,"close",void 0),M([t.Event()],o.prototype,"created",void 0),M([t.Event()],o.prototype,"filtering",void 0),M([t.Event()],o.prototype,"open",void 0),M([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),_=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),q=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},z=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return _(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},q([t.Property("")],o.prototype,"closeActionEvents",void 0),q([t.Property("")],o.prototype,"content",void 0),q([t.Property("")],o.prototype,"cssClass",void 0),q([t.Property("")],o.prototype,"iconCss",void 0),q([t.Collection([],r.Item)],o.prototype,"items",void 0),q([t.Property("")],o.prototype,"target",void 0),q([t.Property(!1)],o.prototype,"createPopupOnClick",void 0),q([t.Property({})],o.prototype,"htmlAttributes",void 0),q([t.Event()],o.prototype,"beforeClose",void 0),q([t.Event()],o.prototype,"beforeItemRender",void 0),q([t.Event()],o.prototype,"beforeOpen",void 0),q([t.Event()],o.prototype,"close",void 0),q([t.Event()],o.prototype,"created",void 0),q([t.Event()],o.prototype,"open",void 0),q([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),j=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),A=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},N=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return j(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},A([t.Property("")],o.prototype,"closeActionEvents",void 0),A([t.Property("")],o.prototype,"content",void 0),A([t.Property("")],o.prototype,"cssClass",void 0),A([t.Property("")],o.prototype,"iconCss",void 0),A([t.Collection([],r.Item)],o.prototype,"items",void 0),A([t.Property("")],o.prototype,"target",void 0),A([t.Property({})],o.prototype,"htmlAttributes",void 0),A([t.Event()],o.prototype,"beforeClose",void 0),A([t.Event()],o.prototype,"beforeItemRender",void 0),A([t.Event()],o.prototype,"beforeOpen",void 0),A([t.Event()],o.prototype,"close",void 0),A([t.Event()],o.prototype,"click",void 0),A([t.Event()],o.prototype,"created",void 0),A([t.Event()],o.prototype,"open",void 0),A([t.Event()],o.prototype,"select",void 0),o}(t.ChildProperty),G=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),H=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},W=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return G(o,e),H([t.Property("")],o.prototype,"cssClass",void 0),H([t.Property("")],o.prototype,"id",void 0),H([t.Property("")],o.prototype,"title",void 0),H([t.Property("")],o.prototype,"content",void 0),H([t.Property("")],o.prototype,"iconCss",void 0),o}(t.ChildProperty),F=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),U=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},V=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return F(o,e),U([t.Property("")],o.prototype,"content",void 0),U([t.Property("")],o.prototype,"iconCss",void 0),U([t.Complex({},W)],o.prototype,"ribbonTooltipSettings",void 0),U([t.Property(!1)],o.prototype,"selected",void 0),U([t.Property({})],o.prototype,"htmlAttributes",void 0),U([t.Event()],o.prototype,"beforeClick",void 0),U([t.Event()],o.prototype,"click",void 0),o}(t.ChildProperty),K=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),X=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},Z=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return K(o,e),X([t.Property("Single")],o.prototype,"selection",void 0),X([t.Collection([],V)],o.prototype,"items",void 0),o}(t.ChildProperty),Y=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),J=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},Q=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return Y(i,o),i.prototype.setProperties=function(e,t){o.prototype.setProperties.call(this,e,t)},J([t.Property(e.RibbonItemSize.Medium)],i.prototype,"activeSize",void 0),J([t.Property(e.RibbonItemSize.Small|e.RibbonItemSize.Medium|e.RibbonItemSize.Large)],i.prototype,"allowedSizes",void 0),J([t.Property("")],i.prototype,"id",void 0),J([t.Property("")],i.prototype,"cssClass",void 0),J([t.Property(!1)],i.prototype,"disabled",void 0),J([t.Property("")],i.prototype,"itemTemplate",void 0),J([t.Property("Button")],i.prototype,"type",void 0),J([t.Property(e.DisplayMode.Auto)],i.prototype,"displayOptions",void 0),J([t.Complex({},W)],i.prototype,"ribbonTooltipSettings",void 0),J([t.Complex({},w)],i.prototype,"buttonSettings",void 0),J([t.Complex({},z)],i.prototype,"dropDownSettings",void 0),J([t.Complex({},L)],i.prototype,"checkBoxSettings",void 0),J([t.Complex({},T)],i.prototype,"colorPickerSettings",void 0),J([t.Complex({},x)],i.prototype,"comboBoxSettings",void 0),J([t.Complex({},N)],i.prototype,"splitButtonSettings",void 0),J([t.Complex({},Z)],i.prototype,"groupButtonSettings",void 0),i}(t.ChildProperty),$=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ee=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},te=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return $(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ee([t.Property("")],o.prototype,"id",void 0),ee([t.Property("")],o.prototype,"cssClass",void 0),ee([t.Collection([],Q)],o.prototype,"items",void 0),o}(t.ChildProperty),oe=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ie=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},re=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return oe(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ie([t.Collection([],te)],o.prototype,"collections",void 0),ie([t.Property("")],o.prototype,"cssClass",void 0),ie([t.Property("")],o.prototype,"id",void 0),ie([t.Property(!1)],o.prototype,"isCollapsed",void 0),ie([t.Property(!0)],o.prototype,"isCollapsible",void 0),ie([t.Property(!1)],o.prototype,"enableGroupOverflow",void 0),ie([t.Property("")],o.prototype,"groupIconCss",void 0),ie([t.Property("")],o.prototype,"header",void 0),ie([t.Property("Column")],o.prototype,"orientation",void 0),ie([t.Property(0)],o.prototype,"priority",void 0),ie([t.Property(!1)],o.prototype,"showLauncherIcon",void 0),o}(t.ChildProperty),ne=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),se=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ae=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ne(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},se([t.Property("")],o.prototype,"id",void 0),se([t.Property("")],o.prototype,"cssClass",void 0),se([t.Collection([],re)],o.prototype,"groups",void 0),se([t.Property("")],o.prototype,"header",void 0),o}(t.ChildProperty),le=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ce=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},pe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return le(i,e),i.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ce([t.Property("File")],i.prototype,"text",void 0),ce([t.Property(!1)],i.prototype,"visible",void 0),ce([t.Collection([],o.MenuItem)],i.prototype,"menuItems",void 0),ce([t.Property(!1)],i.prototype,"showItemOnClick",void 0),ce([t.Complex({},o.MenuAnimationSettings)],i.prototype,"animationSettings",void 0),ce([t.Property("")],i.prototype,"itemTemplate",void 0),ce([t.Property("")],i.prototype,"popupTemplate",void 0),ce([t.Complex({},W)],i.prototype,"ribbonTooltipSettings",void 0),ce([t.Event()],i.prototype,"beforeClose",void 0),ce([t.Event()],i.prototype,"beforeOpen",void 0),ce([t.Event()],i.prototype,"beforeItemRender",void 0),ce([t.Event()],i.prototype,"close",void 0),ce([t.Event()],i.prototype,"open",void 0),ce([t.Event()],i.prototype,"select",void 0),i}(t.ChildProperty),ue=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),de=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},he=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ue(o,e),de([t.Property("")],o.prototype,"text",void 0),de([t.Property("")],o.prototype,"iconCss",void 0),de([t.Property(!0)],o.prototype,"visible",void 0),o}(t.ChildProperty),be=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),fe=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},me=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return be(o,e),fe([t.Property("")],o.prototype,"text",void 0),fe([t.Property("")],o.prototype,"id",void 0),fe([t.Property("")],o.prototype,"content",void 0),fe([t.Property("")],o.prototype,"iconCss",void 0),fe([t.Property(!1)],o.prototype,"separator",void 0),fe([t.Property(!1)],o.prototype,"isFooter",void 0),fe([t.Event()],o.prototype,"backStageItemClick",void 0),o}(t.ChildProperty),ye=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ve=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ge=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return ye(o,e),o.prototype.setProperties=function(t,o){e.prototype.setProperties.call(this,t,o)},ve([t.Property("File")],o.prototype,"text",void 0),ve([t.Property(!1)],o.prototype,"visible",void 0),ve([t.Property("auto")],o.prototype,"height",void 0),ve([t.Property("auto")],o.prototype,"width",void 0),ve([t.Property(null)],o.prototype,"target",void 0),ve([t.Complex({},he)],o.prototype,"backButton",void 0),ve([t.Collection([],me)],o.prototype,"items",void 0),ve([t.Property("")],o.prototype,"template",void 0),ve([t.Complex({},W)],o.prototype,"ribbonTooltipSettings",void 0),o}(t.ChildProperty),Se="e-ribbon-vertical-center",Ie="e-icons e-drop-icon",Ce="e-icons e-arrow-left",Oe="e-icons e-more-horizontal-1",Be="e-vertical",we="e-disabled",De="e-rtl",Pe="e-ribbon-hover",Le="e-ribbon-control",Re="e-ribbon-popup-control",ke="e-ribbon-open",Te="e-hscroll-bar",Ee="e-ribbon-hide",Me="e-ribbon-active",xe="e-ribbon-tab-item",_e="e-ribbon-collapse-btn",qe="e-ribbon-expand-btn",ze="e-ribbon-collapsible",je="e-ribbon-overall-of-btn",Ae="e-ribbon-group-of-btn",Ne="e-ribbon-overflow-target",Ge="e-ribbon-overflow",He="e-content",We="e-ribbon-minimize",Fe="e-ribbon-group",Ue="e-ribbon-single-selection",Ve="e-ribbon-multiple-selection",Ke="e-ribbon-group-button",Xe="e-ribbon-group-button-overflow-popup",Ze="e-ribbon-group-container",Ye="e-ribbon-of-tab",Je="e-ribbon-of-group-container",Qe="e-ribbon-group-content",$e="e-ribbon-group-header",et="e-ribbon-overflow-header",tt="e-ribbon-group-overflow",ot="e-ribbon-group-overflow-ddb",it="e-ribbon-launcher",rt="e-ribbon-launcher-icon",nt="e-icons e-launcher",st="e-ribbon-collection",at="e-ribbon-item",lt="e-ribbon-row",ct="e-ribbon-column",pt="e-ribbon-large-item",ut="e-ribbon-medium-item",dt="e-ribbon-small-item",ht="e-ribbon-content-height",bt="e-ribbon-template",ft="e-ribbon-help-template",mt="e-ribbon-tooltip",yt="e-ribbon-tooltip-target",vt="e-ribbon-tooltip-title",gt="e-ribbon-tooltip-content",St="e-ribbon-tooltip-icon",It="e-ribbon-tooltip-container",Ct="e-ribbon-text-container",Ot="e-ribbon-simplified-mode",Bt="e-ribbon-backstage-popup",wt="e-ribbon-backstage-open",Dt="e-ribbon-backstage-content",Pt="e-ribbon-backstage",Lt="e-ribbon-backstage-menu",Rt="e-ribbon-backstage-template",kt="e-ribbon-backstage-wrapper",Tt="e-ribbon-backstage-items-wrapper",Et="_collapsebutton",Mt="_sim_ovrl_overflow",xt="_sim_grp_overflow",_t="_header",qt="_launcher",zt="_content",jt="_container",At="_overflow",Nt="_dropdown",Gt="_backstage",Ht="_backstagepopup",Wt="_filemenulist",Ft="_footermenulist",Ut="_helppanetemplate",Vt="_grpbtn",Kt="--fileMenuWidth",Xt="--helpTemplateWidth",Zt=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createButton=function(t,o){var i=this,r=this.parent.createElement("button",{id:t.id});o.appendChild(r);var s=t.buttonSettings;new n.Button({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:t.activeSize===e.RibbonItemSize.Large?"Top":"Left",iconCss:s.iconCss,disabled:t.disabled,cssClass:(Se+" "+Le+" "+(s.cssClass?s.cssClass:"")).trim(),content:t.activeSize===e.RibbonItemSize.Small?"":s.content,isPrimary:s.isPrimary,isToggle:s.isToggle,created:s.created},r),s.htmlAttributes&&C(r,s.htmlAttributes),r.onclick=function(e){s.clicked&&s.clicked.call(i,e)},r.setAttribute("aria-label",s.content)},o.prototype.addOverFlowEvents=function(e,o,i){var r=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,n.Button);a.setProperties({cssClass:a.cssClass+" "+Re}),s.onclick=function(t){e.buttonSettings.clicked&&e.buttonSettings.clicked.call(r,t),i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),s=t.getComponent(r,n.Button),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.setProperties({cssClass:a.join(" ")}),r.onclick=function(t){e.buttonSettings.clicked&&e.buttonSettings.clicked.call(i,t)}},o.prototype.click=function(e){var o=m(this.parent,e);if(o){t.getComponent(o,n.Button).click()}},o.prototype.updateButton=function(o,i){var r=p(this.parent.tabs,i);if(r){t.merge(r.item.buttonSettings,o);var s=m(this.parent,i,r);if(s){var a=t.getComponent(s,n.Button);o.isToggle&&s.classList.add("e-active"),o.cssClass&&(o.cssClass=(Se+" "+Le+" "+o.cssClass).trim()),o.content&&(o.content=r.item.activeSize===e.RibbonItemSize.Small?"":o.content,s.setAttribute("aria-label",o.content)),delete o.clicked,a.setProperties(o)}}},o.prototype.updateButtonSize=function(o,i){t.getComponent(o,n.Button).setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left",content:i.activeSize===e.RibbonItemSize.Small?"":i.buttonSettings.content})},o}(),Yt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonCheckBox"},e.prototype.destroy=function(){this.parent=null},e.prototype.createCheckBox=function(e,t){var o=this,i=this.parent.createElement("input",{id:e.id});t.appendChild(i);var r=e.checkBoxSettings;new n.CheckBox({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,checked:r.checked,cssClass:(Le+" "+(r.cssClass?r.cssClass:"")).trim(),label:r.label,labelPosition:r.labelPosition,disabled:e.disabled,created:r.created,htmlAttributes:r.htmlAttributes,change:function(e){r.change&&r.change.call(o,e)}},i)},e.prototype.addOverFlowEvents=function(e,o,i){var r=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,n.CheckBox);a.cssClass=a.cssClass+" "+Re,a.dataBind(),a.change=function(t){e.checkBoxSettings.change&&e.checkBoxSettings.change.call(r,t),i.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),s=t.getComponent(r,n.CheckBox),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.change=function(t){e.checkBoxSettings.change&&e.checkBoxSettings.change.call(i,t)}},e.prototype.click=function(e){var o=m(this.parent,e);if(o){t.getComponent(o,n.CheckBox).click()}},e.prototype.updateCheckBox=function(e,o){var i=p(this.parent.tabs,o);if(i){t.merge(i.item.checkBoxSettings,e);var r=m(this.parent,o,i);if(r){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.change;t.getComponent(r,n.CheckBox).setProperties(e)}}},e}(),Jt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonColorPicker"},e.prototype.destroy=function(){this.parent=null},e.prototype.createColorPicker=function(e,o){var i=this,r=this.parent.createElement("input",{id:e.id});o.appendChild(r);var n=e.colorPickerSettings,a=new s.ColorPicker({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,columns:n.columns,cssClass:(Le+" "+(n.cssClass?n.cssClass:"")).trim(),disabled:e.disabled,enableOpacity:n.enableOpacity,mode:n.mode,modeSwitcher:n.modeSwitcher,noColor:n.noColor,presetColors:n.presetColors,showButtons:n.showButtons,value:n.value,beforeClose:function(){a.element.parentElement.classList.remove(ke),n.beforeClose&&n.beforeClose.call(i)},beforeOpen:n.beforeOpen,beforeTileRender:n.beforeTileRender,created:n.created,change:n.change,open:function(){a.element.parentElement.classList.add(ke),n.open&&n.open.call(i)},select:n.select},r);n.htmlAttributes&&C(r,n.htmlAttributes);var l=a.element.parentElement;t.EventHandler.add(l,"mouseenter",this.toggleWrapperHover.bind(this,l,!0),this),t.EventHandler.add(l,"mouseleave",this.toggleWrapperHover.bind(this,l,!1),this)},e.prototype.toggleWrapperHover=function(e,t){t?e.classList.add(Pe):e.classList.remove(Pe)},e.prototype.addOverFlowEvents=function(e,o,i){var r=this,n=o.querySelector("#"+e.id);n.setAttribute("data-control",e.type.toString());var a=t.getComponent(n,s.ColorPicker);a.setProperties({cssClass:a.cssClass+" "+Re});var l,c=a.splitBtn;a.beforeClose=function(t){l=t.event?t.event.target:null,a.element.parentElement.classList.remove(ke),e.colorPickerSettings.beforeClose&&e.colorPickerSettings.beforeClose.call(r)},c.close=function(){l&&!l.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var i=this,r=o.querySelector("#"+e.id),n=t.getComponent(r,s.ColorPicker),a=n.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),n.setProperties({cssClass:a.join(" ")});n.splitBtn.close=null,n.beforeClose=function(){n.element.parentElement.classList.remove(ke),e.colorPickerSettings.beforeClose&&e.colorPickerSettings.beforeClose.call(i)}},e.prototype.getColorPickerObj=function(e){var o=m(this.parent,e);return o?t.getComponent(o,s.ColorPicker):null},e.prototype.getValue=function(e,t,o){var i=this.getColorPickerObj(e);return i?i.getValue(t,o):""},e.prototype.toggle=function(e){var t=this.getColorPickerObj(e);t&&t.toggle()},e.prototype.updateColorPicker=function(e,o){var i=p(this.parent.tabs,o);if(i){t.merge(i.item.checkBoxSettings,e);var r=m(this.parent,o,i);if(r){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.beforeClose,delete e.open;t.getComponent(r,s.ColorPicker).setProperties(e)}}},e.prototype.unwireColorPickerEvents=function(e){var o=t.getComponent(e,s.ColorPicker).element.parentElement;t.EventHandler.remove(o,"mouseenter",this.toggleWrapperHover),t.EventHandler.remove(o,"mouseleave",this.toggleWrapperHover)},e}(),Qt=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonComboBox"},e.prototype.destroy=function(){this.parent=null},e.prototype.createComboBox=function(e,t){var o=this,r=this.parent.createElement("input",{id:e.id});t.appendChild(r);var n=e.comboBoxSettings;new i.ComboBox({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,allowCustom:!1,floatLabelType:"Never",ignoreAccent:!0,ignoreCase:!0,allowFiltering:n.allowFiltering,autofill:n.autofill,cssClass:(Le+" "+(n.cssClass?n.cssClass:"")).trim(),dataSource:n.dataSource,enabled:!e.disabled,fields:n.fields,filterType:n.filterType,footerTemplate:n.footerTemplate,groupTemplate:n.groupTemplate,headerTemplate:n.headerTemplate,index:n.index,itemTemplate:n.itemTemplate,noRecordsTemplate:n.noRecordsTemplate,placeholder:n.placeholder,popupHeight:n.popupHeight,popupWidth:n.popupWidth,showClearButton:n.showClearButton,sortOrder:n.sortOrder,text:n.text,value:n.value,width:n.width,beforeOpen:n.beforeOpen,open:n.open,htmlAttributes:n.htmlAttributes,close:function(e){n.close&&n.close.call(o,e)},filtering:n.filtering,change:n.change,select:n.select,created:n.created},r)},e.prototype.addOverFlowEvents=function(e,o,r){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,i.ComboBox);a.setProperties({cssClass:a.cssClass+" "+Re}),a.close=function(t){var o=t.event?t.event.target:null;e.comboBoxSettings.close&&e.comboBoxSettings.close.call(n,t),o&&!o.closest(".e-ribbon-group-overflow-ddb")&&r.toggle()}},e.prototype.removeOverFlowEvents=function(e,o){var r=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,i.ComboBox),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.setProperties({cssClass:a.join(" ")}),s.close=function(t){e.comboBoxSettings.close&&e.comboBoxSettings.close.call(r,t)}},e.prototype.getComboBoxObj=function(e){var o=m(this.parent,e);return o?t.getComponent(o,i.ComboBox):null},e.prototype.filter=function(e,t,o,i){this.getComboBoxObj(e).filter(t,o,i)},e.prototype.hidePopup=function(e){var t=this.getComboBoxObj(e);t&&t.hidePopup()},e.prototype.showPopup=function(e){var t=this.getComboBoxObj(e);t&&t.showPopup()},e.prototype.updateComboBox=function(e,o){var r=p(this.parent.tabs,o);if(r){t.merge(r.item.comboBoxSettings,e);var n=m(this.parent,o,r);if(n){e.cssClass&&(e.cssClass=(Le+" "+e.cssClass).trim()),delete e.close;t.getComponent(n,i.ComboBox).setProperties(e)}}},e}(),$t=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonDropDown"},o.prototype.destroy=function(){this.parent=null},o.prototype.createDropDown=function(t,o){var i=this,n=this.parent.createElement("button",{id:t.id});o.appendChild(n);var s=t.dropDownSettings,a=(Se+" "+Le+" "+(s.cssClass?s.cssClass:"")).trim();new r.DropDownButton({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:t.activeSize===e.RibbonItemSize.Large?"Top":"Left",closeActionEvents:s.closeActionEvents,content:t.activeSize===e.RibbonItemSize.Small?"":s.content,cssClass:a+(t.activeSize===e.RibbonItemSize.Large?" "+Be:""),disabled:t.disabled,iconCss:s.iconCss,items:s.items,target:s.target,createPopupOnClick:s.createPopupOnClick,beforeClose:function(e){s.beforeClose&&s.beforeClose.call(i,e)},beforeItemRender:s.beforeItemRender,beforeOpen:s.beforeOpen,close:function(e){s.close&&s.close.call(i,e)},created:s.created,open:s.open,select:s.select}).appendTo(n),s.htmlAttributes&&C(n,s.htmlAttributes)},o.prototype.addOverFlowEvents=function(e,o,i){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,r.DropDownButton);a.cssClass=a.cssClass+" "+Re,a.dataBind();var l;a.beforeClose=function(t){e.dropDownSettings.beforeClose&&e.dropDownSettings.beforeClose.call(n,t),l=t.event?t.event.target:null},a.close=function(t){e.dropDownSettings.close&&e.dropDownSettings.close.call(n,t),l&&!l.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.DropDownButton),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.close=function(t){e.dropDownSettings.close&&e.dropDownSettings.close.call(i,t)},s.beforeClose=function(t){e.dropDownSettings.beforeClose&&e.dropDownSettings.beforeClose.call(i,t)}},o.prototype.createOverFlowDropDown=function(e,o,i,n,s,a){var l=this;this.enableRtl=a;var c=this.parent.createElement("button",{id:e+At+Nt});n.setAttribute("tabindex","0"),s.appendChild(c);var p=new r.DropDownButton({iconCss:i,target:n,locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,cssClass:Be+" "+ot,iconPosition:"Top",content:o,beforeClose:function(e){e.cancel=!t.isNullOrUndefined(e.event&&t.closest(e.event.target,"."+Re))}},c);return g(n,this.parent),c.onclick=c.onkeydown=function(){l.itemIndex=0},n.onkeydown=function(e){l.keyActionHandler(e,n)},p},o.prototype.keyActionHandler=function(e,t){var o,i=t.querySelectorAll(".e-control"),r=t.querySelectorAll(".e-combobox");if(r)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)].closest(".e-input-focus")&&(o=r[parseInt(n.toString(),10)]);if(o)for(n=0;n<i.length;n++)i[parseInt(n.toString(),10)].classList.contains("e-combobox")&&i[parseInt(n.toString(),10)].closest(".e-input-focus")&&(this.itemIndex=n);(e.target.classList.contains("e-control")||e.target.classList.contains("e-ribbon-launcher-icon")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-first-item"))&&(("ArrowRight"===e.key||!e.shiftKey&&"Tab"===e.key)&&this.handleNavigation(e,!this.enableRtl,i),("ArrowLeft"===e.key||e.shiftKey&&"Tab"===e.key)&&this.handleNavigation(e,this.enableRtl,i))},o.prototype.handleNavigation=function(e,t,o){if(o[0].classList.contains("e-ribbon-first-item")||o[0].classList.add("e-ribbon-first-item"),o[o.length-1].classList.contains("e-ribbon-last-item")||o[o.length-1].classList.add("e-ribbon-last-item"),t){if(0===this.itemIndex&&o[parseInt(this.itemIndex.toString(),10)].classList.contains("e-ribbon-first-item")&&this.updateItemIndex(e,o,!0),e.target.classList.contains("e-combobox")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-group-container")||!e.target.classList.contains("e-ribbon-first-item")&&0===this.itemIndex||!e.target.classList.contains("e-control")||(this.itemIndex++,this.updateItemIndex(e,o,!0)),e.target.classList.contains("e-ribbon-last-item")){this.focusLauncherIcon(e,o)||(this.itemIndex=0,this.updateItemIndex(e,o,!0))}e.target.classList.contains("e-ribbon-launcher-icon")&&(this.itemIndex=0,this.updateItemIndex(e,o,!0))}else{if(e.target.classList.contains("e-combobox")||0===this.itemIndex||(this.itemIndex--,this.updateItemIndex(e,o,!1)),e.target.classList.contains("e-ribbon-first-item")){this.focusLauncherIcon(e,o)||(this.itemIndex=o.length-1,this.updateItemIndex(e,o,!1))}e.target.classList.contains("e-ribbon-launcher-icon")&&(this.itemIndex=o.length-1,this.updateItemIndex(e,o,!1))}e.target.classList.contains("e-combobox")&&"Tab"===e.key&&(t?this.itemIndex<o.length-1&&this.itemIndex++:this.itemIndex>0&&this.itemIndex--)},o.prototype.focusLauncherIcon=function(e,t){var o,i=t[parseInt(this.itemIndex.toString(),10)].closest(".e-ribbon-group-container");return i&&(o=i.querySelector(".e-ribbon-launcher-icon")),!!o&&("Tab"===e.key&&e.preventDefault(),i.querySelector(".e-ribbon-launcher-icon").focus(),!0)},o.prototype.updateItemIndex=function(e,t,o){for(var i=t[this.itemIndex].closest(".e-ribbon-item");i&&i.classList.contains("e-disabled");){if(o)if(this.itemIndex<t.length-1)this.itemIndex++;else{if(this.focusLauncherIcon(e,t))break;this.itemIndex=0}else if(this.itemIndex>0)this.itemIndex--;else{if(this.focusLauncherIcon(e,t))break;this.itemIndex=t.length-1}i=t[this.itemIndex].closest(".e-ribbon-item")}"Tab"===e.key&&e.preventDefault(),t[parseInt(this.itemIndex.toString(),10)].focus()},o.prototype.removeOverFlowDropDown=function(e){var o=t.getComponent(e,r.DropDownButton);t.getComponent(o.target,a.Tooltip).destroy(),e.parentElement.parentElement.insertBefore(o.target,e.parentElement),o.destroy(),t.remove(e)},o.prototype.getDDBItemElement=function(e,o){return t.getComponent(e,r.DropDownButton).dropDown.element.querySelector("#"+o)},o.prototype.getOverflowDropDownPopup=function(e,o){var i=o.querySelector("#"+this.parent.tabs[e.tabIndex].groups[e.groupIndex].id+At+Nt);return t.getComponent(i,r.DropDownButton).dropDown.element},o.prototype.getDropDownObj=function(e){var o=m(this.parent,e);return o?t.getComponent(o,r.DropDownButton):null},o.prototype.addItems=function(e,t,o){this.getDropDownObj(e).addItems(t,o)},o.prototype.removeItems=function(e,t,o){this.getDropDownObj(e).removeItems(t,o)},o.prototype.toggle=function(e){this.getDropDownObj(e).toggle()},o.prototype.updateDropDown=function(o,i){var n=p(this.parent.tabs,i);if(n){t.merge(n.item.dropDownSettings,o);var s=m(this.parent,i,n);if(s){var a=t.getComponent(s,r.DropDownButton);o.cssClass&&(o.cssClass=(Le+" "+Se+" "+o.cssClass).trim(),o.cssClass=n.item.activeSize===e.RibbonItemSize.Large?(Be+" "+o.cssClass).trim():o.cssClass,a.cssClass=o.cssClass),delete o.close,delete o.beforeClose,o.content&&(o.content=n.item.activeSize===e.RibbonItemSize.Small?"":o.content),a.setProperties(o)}}},o.prototype.updateDropDownSize=function(o,i){var n=t.getComponent(o,r.DropDownButton),s=n.cssClass.split(" ");i.activeSize===e.RibbonItemSize.Large?s.push(Be):s=s.filter(function(e){return e!==Be}),n.cssClass=s.join(" "),n.setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left"}),n.setProperties({content:i.activeSize===e.RibbonItemSize.Small?"":i.dropDownSettings.content})},o}(),eo=function(){function o(e){this.parent=e}return o.prototype.getModuleName=function(){return"ribbonSplitButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createSplitButton=function(o,i){var n=this,s=this.parent.createElement("button",{id:o.id});i.appendChild(s);var a=o.splitButtonSettings,l=(Se+" "+Le+" "+(a.cssClass?a.cssClass:"")).trim(),c=new r.SplitButton({locale:this.parent.locale,enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,iconPosition:o.activeSize===e.RibbonItemSize.Large?"Top":"Left",closeActionEvents:a.closeActionEvents,cssClass:l+(o.activeSize===e.RibbonItemSize.Large?" "+Be:""),disabled:o.disabled,iconCss:a.iconCss,items:a.items,target:a.target,beforeClose:function(e){a.beforeClose&&a.beforeClose.call(n,e)},beforeItemRender:a.beforeItemRender,beforeOpen:a.beforeOpen,close:function(){c.wrapper.classList.remove(ke),a.close&&a.close.call(n)},created:a.created,open:function(){c.wrapper.classList.add(ke),a.open&&a.open.call(n)},select:a.select,click:function(e){a.click&&a.click.call(n,e)}},s);a.htmlAttributes&&C(s,a.htmlAttributes);var p=s.parentElement.querySelector(".e-dropdown-btn");p.onkeydown=function(e){"Enter"===e.key&&(e.stopImmediatePropagation(),p.click())},this.setContent(o,c);var u=c.wrapper;t.EventHandler.add(u,"mouseenter",function(){u.classList.add(Pe)},this),t.EventHandler.add(u,"mouseleave",function(){u.classList.remove(Pe)},this)},o.prototype.addOverFlowEvents=function(e,o,i){var n=this,s=o.querySelector("#"+e.id);s.setAttribute("data-control",e.type.toString());var a=t.getComponent(s,r.SplitButton);a.cssClass=a.cssClass+" "+Re,a.dataBind();var l=s.parentElement.querySelector(".e-dropdown-btn"),c=l.getAttribute("id"),p=document.querySelector("#"+c+"-popup");l.onkeydown=function(e){"Enter"===e.key&&(e.stopImmediatePropagation(),l.click())},p.onkeydown=function(e){"Enter"===e.key&&(e.preventDefault(),a.wrapper.classList.remove("e-ribbon-open"),p.querySelector(".e-focused").click())};var u;a.beforeClose=function(t){e.splitButtonSettings.beforeClose&&e.splitButtonSettings.beforeClose.call(n,t),u=t.event?t.event.target:null},a.click=function(t){e.splitButtonSettings.click&&e.splitButtonSettings.click.call(n,t),i.toggle()},a.close=function(t){e.splitButtonSettings.close&&e.splitButtonSettings.close.call(n,t),a.wrapper.classList.remove(ke),u&&!u.closest(".e-ribbon-group-overflow-ddb")&&i.toggle()}},o.prototype.removeOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.SplitButton),a=s.cssClass.split(" ");a=a.filter(function(e){return e!==Re}),s.cssClass=a.join(" "),s.dataBind(),s.beforeClose=function(t){e.splitButtonSettings.beforeClose&&e.splitButtonSettings.beforeClose.call(i,t)},s.click=function(t){e.splitButtonSettings.click&&e.splitButtonSettings.click.call(i,t)},s.close=function(t){e.splitButtonSettings.close&&e.splitButtonSettings.close.call(i,t),s.wrapper.classList.remove(ke)}},o.prototype.setContent=function(t,o){o.primaryBtnObj.setProperties({content:t.activeSize===e.RibbonItemSize.Medium?t.splitButtonSettings.content:""}),o.secondaryBtnObj.setProperties({content:t.activeSize===e.RibbonItemSize.Large?t.splitButtonSettings.content:""})},o.prototype.getSplitButtonObj=function(e){var o=m(this.parent,e);return t.getComponent(o,r.SplitButton)},o.prototype.addItems=function(e,t,o){this.getSplitButtonObj(e).addItems(t,o)},o.prototype.removeItems=function(e,t,o){this.getSplitButtonObj(e).removeItems(t,o)},o.prototype.toggle=function(e){this.getSplitButtonObj(e).toggle()},o.prototype.updateSplitButton=function(o,i){var n=p(this.parent.tabs,i);if(n){t.merge(n.item.splitButtonSettings,o);var s=m(this.parent,i,n);if(s){var a=t.getComponent(s,r.SplitButton);o.cssClass&&(o.cssClass=(Le+" "+Se+" "+o.cssClass).trim(),o.cssClass=n.item.activeSize===e.RibbonItemSize.Large?(Be+" "+o.cssClass).trim():o.cssClass,a.cssClass=o.cssClass),delete o.open,delete o.click,delete o.close,delete o.beforeClose,a.setProperties(o),o.content&&this.setContent(n.item,a)}}},o.prototype.updateSplitButtonSize=function(o,i){var n=t.getComponent(o,r.SplitButton),s=n.cssClass.split(" ");i.activeSize===e.RibbonItemSize.Large?s.push(Be):s=s.filter(function(e){return e!==Be}),n.cssClass=s.join(" "),n.setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left"}),this.setContent(i,n)},o}(),to=function(){function o(e){this.parent=e,this.isSelected=!1}return o.prototype.getModuleName=function(){return"ribbonGroupButton"},o.prototype.destroy=function(){this.parent=null},o.prototype.createGroupButton=function(o,i){var s=this,a=o.groupButtonSettings;this.count=0;var l=this.parent.createElement("div",{id:o.id+Vt,className:"e-btn-group"});i.appendChild(l);for(var c=0;c<a.items.length;c++)if(a.items[parseInt(c.toString(),10)].iconCss){var p=this.parent.createElement("button",{id:o.id+Vt+c,className:Ke});l.appendChild(p),new n.Button({iconCss:a.items[parseInt(c.toString(),10)].iconCss,disabled:o.disabled,enableRtl:this.parent.enableRtl,content:o.activeSize===e.RibbonItemSize.Small?"":a.items[parseInt(c.toString(),10)].content,iconPosition:o.activeSize===e.RibbonItemSize.Large?"Top":"Left"},p),a.items[parseInt(c.toString(),10)].htmlAttributes&&C(p,a.items[parseInt(c.toString(),10)].htmlAttributes);var u=i.querySelector("#"+o.id+Vt+c);a.selection===e.RibbonGroupButtonSelection.Single?l.classList.add(Ue):l.classList.add(Ve),a.items[parseInt(c.toString(),10)].selected&&(a.selection===e.RibbonGroupButtonSelection.Multiple?u.classList.add("e-active"):this.count<1&&(u.classList.add("e-active"),this.count++)),a.items[parseInt(c.toString(),10)].ribbonTooltipSettings&&y(a.items[parseInt(c.toString(),10)].ribbonTooltipSettings)&&(p.classList.add(yt),this.parent.tooltipData.push({id:p.id,data:a.items[parseInt(c.toString(),10)].ribbonTooltipSettings})),t.EventHandler.add(u,"click",this.groupButtonClicked.bind(this,c,o,a),this)}if("Simplified"===this.parent.activeLayout){var d=void 0,h=0,b=0;u=this.parent.createElement("button",{id:o.id});i.appendChild(u);for(c=0;c<a.items.length;c++)o.groupButtonSettings.items[parseInt(c.toString(),10)].selected&&!this.isSelected&&a.selection===e.RibbonGroupButtonSelection.Single?(d=o.groupButtonSettings.items[parseInt(c.toString(),10)].iconCss,this.isSelected=!0):o.groupButtonSettings.items[parseInt(c.toString(),10)].selected&&a.selection===e.RibbonGroupButtonSelection.Multiple&&(d=1===++h?o.groupButtonSettings.items[parseInt(c.toString(),10)].iconCss:null);for(;b<o.groupButtonSettings.items.length&&!this.isSelected&&!d;)o.groupButtonSettings.items[parseInt(b.toString(),10)].iconCss&&(d=o.groupButtonSettings.items[parseInt(b.toString(),10)].iconCss,this.isSelected=!0),b++;new r.DropDownButton({iconCss:d,target:l,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-dropdown-group-button",disabled:o.disabled},u),u.onclick=u.onkeydown=function(){i.querySelector("#"+o.id).classList.contains("e-active")&&(document.querySelector("#"+o.id+Vt+0).focus(),s.grpBtnIndex=0)},l.onkeydown=function(e){"Simplified"===s.parent.activeLayout&&s.handleGroupButtonNavigation(e,o)},g(l,this.parent),this.isSelected=!1}},o.prototype.groupButtonClicked=function(o,i,n){for(var s,a,l=[],c=[],p=[],u=0;u<n.items.length;u++)document.querySelector("#"+i.id+Vt+u)&&document.querySelector("#"+i.id+Vt+u).classList.contains("e-active")&&l.push(n.items[parseInt(u.toString(),10)]);document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")||c.push(n.items[parseInt(o.toString(),10)]);var d={cancel:!1,previousItems:l,selectingItems:c};if(n.items[parseInt(o.toString(),10)].beforeClick&&n.items[parseInt(o.toString(),10)].beforeClick.call(this,d),!d.cancel){if(n.selection===e.RibbonGroupButtonSelection.Single){document.querySelector("#"+i.id+Vt).classList.contains(Ve)&&(document.querySelector("#"+i.id+Vt).classList.remove(Ve),document.querySelector("#"+i.id+Vt).classList.add(Ue));for(u=0;u<n.items.length;u++)document.querySelector("#"+i.id+Vt+u)&&document.querySelector("#"+i.id+Vt+u).classList.contains("e-active")&&document.querySelector("#"+i.id+Vt+u).classList.remove("e-active");document.querySelector("#"+i.id+Vt+o).classList.toggle("e-active"),document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&"Simplified"===this.parent.activeLayout&&(this.grpBtnIndex=o,s=document.querySelector("#"+i.id),(a=t.getComponent(s,r.DropDownButton)).setProperties({iconCss:n.items[parseInt(o.toString(),10)].iconCss}))}else{document.querySelector("#"+i.id+Vt).classList.contains(Ue)&&(document.querySelector("#"+i.id+Vt).classList.remove(Ue),document.querySelector("#"+i.id+Vt).classList.add(Ve)),document.querySelector("#"+i.id+Vt+o).classList.toggle("e-active");for(var h=0,b=0;b<n.items.length;b++)document.querySelector("#"+i.id+Vt+b)&&document.querySelector("#"+i.id+Vt+b).classList.contains("e-active")&&"Simplified"===this.parent.activeLayout&&b!==o&&(this.isSelected=!0,h++);if("Simplified"===this.parent.activeLayout){var f=null,m=0;if(s=document.querySelector("#"+i.id),a=t.getComponent(s,r.DropDownButton),this.isSelected){if(1===h&&!document.querySelector("#"+i.id+Vt+o).classList.contains("e-active"))for(b=0;b<n.items.length;b++)document.querySelector("#"+i.id+Vt+b)&&document.querySelector("#"+i.id+Vt+b).classList.contains("e-active")&&(f=n.items[parseInt(b.toString(),10)].iconCss)}else document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&(f=n.items[parseInt(o.toString(),10)].iconCss);for(;m<n.items.length&&!f;)n.items[parseInt(m.toString(),10)].iconCss&&(f=n.items[parseInt(m.toString(),10)].iconCss),m++;a.setProperties({iconCss:f}),this.grpBtnIndex=o}this.isSelected=!1}document.querySelector("#"+i.id+Vt+o).classList.contains("e-active")&&p.push(n.items[parseInt(o.toString(),10)]);var y={previousItems:l,selectedItems:p};n.items[parseInt(o.toString(),10)].click&&n.items[parseInt(o.toString(),10)].click.call(this,y)}},o.prototype.switchGroupButton=function(o,i){var n=this,s=o.groupButtonSettings,a=null,l=0,c=0;if("Simplified"===this.parent.activeLayout){var p=i.querySelector("#"+o.id+Vt),u=this.parent.createElement("button",{id:o.id});i.appendChild(u);for(var d=0;d<s.items.length;d++)document.querySelector("#"+o.id+Vt+d)&&(document.querySelector("#"+o.id+Vt+d).classList.contains("e-active")&&s.selection===e.RibbonGroupButtonSelection.Single?a=s.items[parseInt(d.toString(),10)].iconCss:document.querySelector("#"+o.id+Vt+d).classList.contains("e-active")&&s.selection===e.RibbonGroupButtonSelection.Multiple&&(1===++l?a=s.items[parseInt(d.toString(),10)].iconCss:l>1&&(a=null)));for(;c<s.items.length&&!a;)s.items[parseInt(c.toString(),10)].iconCss&&(a=s.items[parseInt(c.toString(),10)].iconCss),c++;new r.DropDownButton({iconCss:a,target:p,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-dropdown-group-button",disabled:o.disabled},u),u.onclick=u.onkeydown=function(){i.querySelector("#"+o.id).classList.contains("e-active")&&(document.querySelector("#"+o.id+Vt+0).focus(),n.grpBtnIndex=0)},p.onkeydown=function(e){"Simplified"===n.parent.activeLayout&&n.handleGroupButtonNavigation(e,o)},g(p,this.parent)}else{var h=i.querySelector("#"+o.id),b=t.getComponent(h,r.DropDownButton);i.appendChild(b.target),h&&(b.destroy(),t.remove(h))}},o.prototype.handleGroupButtonNavigation=function(e,o){var i=document.querySelector("#"+o.id),n=t.getComponent(i,r.DropDownButton).target,s=!1;"Simplified"===this.parent.activeLayout&&n.closest(".e-ribbon-dropdown-group-button").classList.contains(Xe)&&(s=!0),"Tab"===e.key&&e.preventDefault();var a=o.groupButtonSettings;"ArrowRight"===e.key&&!s||"ArrowDown"===e.key&&s?!this.parent.enableRtl||"ArrowDown"===e.key&&s?(this.grpBtnIndex++,this.grpBtnIndex<a.items.length?document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus():(this.grpBtnIndex=0,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus())):0===this.grpBtnIndex?(this.grpBtnIndex=a.items.length-1,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex--,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):("ArrowLeft"===e.key&&!s||"ArrowUp"===e.key&&s)&&(!this.parent.enableRtl||"ArrowUp"===e.key&&s?0===this.grpBtnIndex?(this.grpBtnIndex=a.items.length-1,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex--,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus()):(this.grpBtnIndex++,this.grpBtnIndex<a.items.length?document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus():(this.grpBtnIndex=0,document.querySelector("#"+o.id+Vt+this.grpBtnIndex).focus())))},o.prototype.addOverFlowEvents=function(e,o){var i=this,n=o.querySelector("#"+e.id),s=t.getComponent(n,r.DropDownButton);s.setProperties({cssClass:s.cssClass+" "+Xe});var a=s.target;a.onclick=function(){"Simplified"===i.parent.activeLayout&&a.closest(".e-ribbon-dropdown-group-button").classList.contains(Xe)&&(s.element.focus(),s.toggle())}},o.prototype.removeOverFlowEvents=function(e,o){var i=o.querySelector("#"+e.id);if(i){var n=t.getComponent(i,r.DropDownButton),s=n.cssClass.split(" ");s=s.filter(function(e){return e!==Xe}),n.setProperties({cssClass:s.join(" ")})}},o.prototype.destroyDropDown=function(e){var o=document.querySelector("#"+e.id);if(o){var i=t.getComponent(o,r.DropDownButton);t.getComponent(i.target,a.Tooltip).destroy(),i.destroy(),t.remove(o)}},o.prototype.updateGroupButtonSize=function(o,i){for(var r,s=i.groupButtonSettings,a=0;a<s.items.length;a++)if(r="Classic"===this.parent.activeLayout?o.querySelector("#"+i.id+Vt+a):document.querySelector("#"+i.id+Vt+a)){t.getComponent(r,n.Button).setProperties({iconPosition:i.activeSize===e.RibbonItemSize.Large?"Top":"Left",content:i.activeSize===e.RibbonItemSize.Small?"":s.items[parseInt(a.toString(),10)].content})}},o}(),oo=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),io=function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},ro=function(i){function s(e,t){return a.Inject(Zt,Yt,$t,eo,Qt,to),i.call(this,e,t)||this}oo(s,i),a=s,s.prototype.render=function(){this.initialize()},s.prototype.preRender=function(){this.idIndex=0,this.tooltipData=[],this.initialPropsData={},this.isAddRemove=!1,this.keyConfigs={leftarrow:"leftarrow",rightarrow:"rightarrow",tab:"tab",shiftTab:"shift+tab"}},s.prototype.getPersistData=function(){return this.addOnPersist(["activeLayout"])},s.prototype.getModuleName=function(){return"ribbon"},s.prototype.requiredModules=function(){var e=[];return e.push({member:"ribbonButton",args:[this]},{member:"ribbonDropDown",args:[this]},{member:"ribbonSplitButton",args:[this]},{member:"ribbonCheckBox",args:[this]},{member:"ribbonColorPicker",args:[this]},{member:"ribbonComboBox",args:[this]},{member:"ribbonGroupButton",args:[this]},{member:"ribbonFileMenu",args:[this]},{member:"ribbonBackstage",args:[this]}),e},s.prototype.initialize=function(){this.element.id=this.element.id||t.getUniqueID("e-"+this.getModuleName()),t.addClass([this.element],["e-rbn"].concat(this.cssClass?this.cssClass.split(" "):[])),this.enableRtl&&this.element.classList.add(De),this.element.style.width=t.formatUnit(this.width),this.renderTabs(),this.ribbonFileMenuModule&&this.ribbonFileMenuModule.createFileMenu(this.fileMenu),this.ribbonBackstageModule&&this.ribbonBackstageModule.createBackStage(this.backStageMenu),this.createHelpPaneTemplate();this.tabObj.tbObj.refreshOverflow(),g(this.element,this),this.wireEvents(),this.wireKeyboardEvent(),this.currentControlIndex=0},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this)},s.prototype.wireKeyboardEvent=function(){this.keyboardModuleRibbon=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.keyActionHandler=function(e){"Tab"!==e.key||e.target.classList.contains("e-tab-wrap")||e.target.classList.contains("e-combobox")||e.preventDefault();var t,o=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt),i=o.querySelectorAll(".e-control"),r=o.querySelectorAll(".e-combobox");if(r)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)].closest(".e-input-focus")&&(t=r[parseInt(n.toString(),10)]);if(t)for(n=0;n<i.length;n++)i[parseInt(n.toString(),10)].classList.contains("e-combobox")&&i[parseInt(n.toString(),10)].closest(".e-input-focus")&&(this.currentControlIndex=n);if(0===this.currentControlIndex)for(var s=i[this.currentControlIndex].closest(".e-ribbon-item");s&&s.classList.contains("e-disabled");)this.currentControlIndex++,s=i[this.currentControlIndex].closest(".e-ribbon-item");if(e.target.classList.contains("e-control")||e.target.classList.contains("e-ribbon-launcher-icon")||e.target.classList.contains("e-ribbon-collapse-btn")||e.target.classList.contains("e-ribbon-last-item")||e.target.classList.contains("e-ribbon-first-item")||e.target.classList.contains("e-ribbon-group-of-btn")||e.target.classList.contains("e-ribbon-overall-of-btn"))switch(e.action){case"rightarrow":this.handleNavigation(e,!this.enableRtl,i);break;case"leftarrow":this.handleNavigation(e,this.enableRtl,i);break;case"tab":e.target.classList.contains("e-combobox")&&this.currentControlIndex<i.length-1&&this.currentControlIndex++;break;case"shiftTab":e.target.classList.contains("e-combobox")?this.currentControlIndex>0&&this.currentControlIndex--:(this.tabObj.element.querySelector(".e-toolbar-item.e-active").querySelector(".e-tab-wrap").focus(),this.currentControlIndex=0)}},s.prototype.handleNavigation=function(e,t,o){var i,r;if(t?this.currentControlIndex<o.length-1&&o[this.currentControlIndex+1].classList.contains("e-colorpicker")&&this.currentControlIndex++:this.currentControlIndex>0&&o[this.currentControlIndex-1].classList.contains("e-colorpicker")&&this.currentControlIndex--,!t&&this.currentControlIndex>0||t&&this.currentControlIndex<o.length-1){if(!e.target.classList.contains("e-combobox")&&e.target.classList.contains("e-control")&&!e.target.classList.contains("e-ribbon-last-item")){if(t)this.currentControlIndex++;else{var n=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze);n&&(r=n.getAttribute("id")),this.currentControlIndex--}for(var s=o[this.currentControlIndex].closest(".e-ribbon-item");s&&s.classList.contains("e-disabled");){if((t&&this.currentControlIndex===o.length-1||!t&&0===this.currentControlIndex)&&o[this.currentControlIndex].closest(".e-ribbon-item").classList.contains("e-disabled")){this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus();break}t?this.currentControlIndex++:this.currentControlIndex--,s=o[this.currentControlIndex].closest(".e-ribbon-item")}if(o[parseInt(this.currentControlIndex.toString(),10)].focus(),"Classic"===this.activeLayout){if(i=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze),t){var a=void 0;if(i&&(a=i.querySelector(".e-ribbon-launcher-icon")),a){var l=i.querySelectorAll(".e-ribbon-item");l[l.length-1].querySelector(".e-control").classList.add("e-ribbon-last-item")}}else if(i){if(r!==i.getAttribute("id")){(a=i.querySelector(".e-ribbon-launcher-icon"))&&o[parseInt((this.currentControlIndex+1).toString(),10)].classList.add("e-ribbon-first-item")}}}else o[parseInt(this.currentControlIndex.toString(),10)].classList.contains("e-ribbon-first-item")?o[parseInt(this.currentControlIndex.toString(),10)].classList.remove("e-ribbon-first-item"):o[parseInt(this.currentControlIndex.toString(),10)].classList.contains("e-ribbon-last-item")&&o[parseInt(this.currentControlIndex.toString(),10)].classList.remove("e-ribbon-last-item")}}else if("Classic"===this.activeLayout&&this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus(),"Simplified"===this.activeLayout){var c=this.tabObj.element.querySelector(".e-ribbon-overall-of-btn");t&&c&&!c.classList.contains("e-ribbon-hide")?c.focus():this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus()}if(e.target.classList.contains("e-ribbon-last-item")&&(t?(i=o[parseInt(this.currentControlIndex.toString(),10)].closest("."+Ze)).querySelector(".e-ribbon-launcher-icon").focus():(this.currentControlIndex--,o[parseInt(this.currentControlIndex.toString(),10)].focus())),!t&&e.target.classList.contains("e-ribbon-first-item")){(a=(i=o[parseInt((this.currentControlIndex-1).toString(),10)].closest("."+Ze)).querySelector(".e-ribbon-launcher-icon"))&&i.querySelector(".e-ribbon-launcher-icon").focus()}if(e.target.classList.contains("e-ribbon-launcher-icon")&&(t?(this.currentControlIndex++,o[parseInt(this.currentControlIndex.toString(),10)].focus(),o[parseInt((this.currentControlIndex-1).toString(),10)].classList.contains("e-ribbon-last-item")&&o[parseInt((this.currentControlIndex-1).toString(),10)].classList.remove("e-ribbon-last-item")):(this.currentControlIndex,o[parseInt(this.currentControlIndex.toString(),10)].focus())),e.target.classList.contains("e-ribbon-collapse-btn"))if(t){this.currentControlIndex=0;for(var p=o[this.currentControlIndex].closest(".e-ribbon-item");p&&p.classList.contains("e-disabled");)this.currentControlIndex++,p=o[this.currentControlIndex].closest(".e-ribbon-item");o[parseInt(this.currentControlIndex.toString(),10)].focus()}else{if((c=this.tabObj.element.querySelector(".e-ribbon-overall-of-btn"))&&!c.classList.contains("e-ribbon-hide"))c.focus();else{this.currentControlIndex=o.length-1;for(p=o[this.currentControlIndex].closest(".e-ribbon-item");p&&p.classList.contains("e-disabled");)this.currentControlIndex--,p=o[this.currentControlIndex].closest(".e-ribbon-item");o[parseInt(this.currentControlIndex.toString(),10)].focus()}}"Simplified"===this.activeLayout&&e.target.classList.contains("e-ribbon-overall-of-btn")&&(t?this.tabObj.element.querySelector(".e-ribbon-collapse-btn").focus():(this.currentControlIndex=o.length-1,o[parseInt(this.currentControlIndex.toString(),10)].focus()))},s.prototype.resizeHandler=function(){var e=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);if(this.checkOverflow(this.selectedTab,e),this.scrollModule){var t=this.tabObj.element.querySelector("."+Te);this.scrollModule.scrollStep=t.offsetWidth}},s.prototype.renderTabs=function(){this.tabsInternal=this.tabs.slice(),this.tabsInternal=this.checkID(this.tabsInternal,"tab",this.element.id),this.setProperties({tabs:this.tabsInternal},!0);var e=this.createElement("div",{id:this.element.id+"_tab"});this.element.appendChild(e),this.validateItemSize();var i=this.createTabItems(this.tabs);this.tabObj=new o.Tab({cssClass:"e-ribbon-tab",selectedItem:this.selectedTab,overflowMode:"Popup",width:this.width,items:i,enableRtl:this.enableRtl,created:this.tabCreated.bind(this),selected:this.ribbonTabSelected.bind(this),selecting:this.ribbonTabSelecting.bind(this)}),this.tabObj.appendTo(e),this.element.style.setProperty(Kt,"0px"),this.element.style.setProperty(Xt,"0px");var r=e.querySelector(".e-toolbar");t.getComponent(r,o.Toolbar).setProperties({width:"calc(100% - var(--fileMenuWidth) - var(--helpTemplateWidth))"}),this.element.classList[this.isMinimized?"add":"remove"](We)},s.prototype.minimize=function(e){var t=this;if(e!==this.isMinimized){this.trigger(e?"ribbonCollapsing":"ribbonExpanding",{cancel:!1},function(o){o.cancel||(t.setProperties({isMinimized:e},!0),t.element.classList.toggle(We,t.isMinimized),t.tabObj.element.querySelector(".e-content").style.display=e?"none":"block",e||t.refreshLayout())})}},s.prototype.toggleLayout=function(){this.setProperties({activeLayout:"Simplified"===this.activeLayout?"Classic":"Simplified"},!0),this.switchLayout()},s.prototype.tabCreated=function(){this.hideLayoutSwitcher||this.addExpandCollapse(),this.renderInitialTab(this.selectedTab)},s.prototype.ribbonTabSelected=function(e){this.isAddRemove=!1;var t=e.selectedItem.getAttribute("data-id"),o=l(this.tabs,function(e){return e.id===t});o=-1===o?this.selectedTab:o;var i={previousIndex:this.selectedTab,selectedIndex:o};if(this.setProperties({selectedTab:o},!0),this.checkOverflow(o,e.selectedContent.firstChild),"Simplified"===this.activeLayout&&this.overflowDDB){var r=this.overflowDDB.target,n=r.querySelector("."+Me);n&&n.classList.remove(Me);var s=r.querySelector("#"+t+At);s?(s.classList.add(Me),this.overflowDDB.element.classList.remove(Ee),this.checkOverflowHiddenItems(!1,o)):this.overflowDDB.element.classList.add(Ee)}this.trigger("tabSelected",i)},s.prototype.checkOverflow=function(e,t){var i=t.closest("."+He),r=i.offsetWidth<t.offsetWidth;if(r&&!this.scrollModule){if("Classic"===this.activeLayout){var n=!1;!(n=this.checkGroupShrinking(e,i,t,!0))&&i.offsetWidth<t.offsetWidth&&(n=this.checkGroupShrinking(e,i,t,!1)),i.offsetWidth<t.offsetWidth&&this.createOverflowDropdown(e,i,t)}else this.checkSimplifiedItemShrinking(e,i,t),i.offsetWidth<t.offsetWidth&&this.createSimplfiedOverflow(i,t,e);i.offsetWidth<t.offsetWidth&&!this.scrollModule&&(this.scrollModule=new o.HScroll({enableRtl:this.enableRtl},this.tabObj.element.querySelector("."+He)))}else if(!r)if(this.destroyScroll(),"Classic"===this.activeLayout){n=!1;!(n=this.removeOverflowDropdown(i,t,!1,e))&&i.offsetWidth>t.offsetWidth&&(n=this.checkGroupExpanding(e,i,t,!0)),!n&&i.offsetWidth>t.offsetWidth&&(n=this.checkGroupExpanding(e,i,t,!1))}else this.removeSimplfiedOverflow(i,t,e),i.offsetWidth>t.offsetWidth&&this.checkSimplifiedItemExpanding(e,i,t)},s.prototype.checkSimplifiedItemShrinking=function(t,o,i){for(var r=this.tabs[parseInt(t.toString(),10)],n=r.groups.length-1;n>=0;n--)for(var s=r.groups[parseInt(n.toString(),10)],a=o.querySelector("#"+s.id+jt),l=0;l<s.collections.length&&o.offsetWidth<i.offsetWidth;l++)for(var c=s.collections[parseInt(l.toString(),10)],p=c.items.length;p>=1&&o.offsetWidth<i.offsetWidth;p--){var u=c.items[p-1];if(u.allowedSizes&e.RibbonItemSize.Small&&u.allowedSizes&e.RibbonItemSize.Medium&&u.activeSize===e.RibbonItemSize.Medium&&u.displayOptions&e.DisplayMode.Simplified){var d=a.querySelector("#"+u.id+jt);if(d){var h=d.querySelector("#"+u.id);d.setAttribute("data-medium-width",i.offsetWidth.toString()),u.setProperties({activeSize:e.RibbonItemSize.Small},!0),this.setItemSize(h,u)}}}},s.prototype.checkSimplifiedItemExpanding=function(t,o,i){for(var r=this.tabs[parseInt(t.toString(),10)],n=r.groups.length-1;n>=0;n--)for(var s=r.groups[parseInt(n.toString(),10)],a=o.querySelector("#"+s.id+jt),l=0;l<s.collections.length&&o.offsetWidth>i.offsetWidth;l++)for(var c=s.collections[parseInt(l.toString(),10)],p=c.items.length;p>=1&&o.offsetWidth>i.offsetWidth;p--){var u=c.items[p-1];if(u.allowedSizes&e.RibbonItemSize.Small&&u.allowedSizes&e.RibbonItemSize.Medium&&u.activeSize===e.RibbonItemSize.Small&&u.displayOptions&e.DisplayMode.Simplified){var d=a.querySelector("#"+u.id+jt);if(d){var h=d.getAttribute("data-medium-width"),b=h?parseInt(h,10):null;if(b&&o.offsetWidth>b){d.removeAttribute("data-medium-width");var f=d.querySelector("#"+u.id);u.setProperties({activeSize:e.RibbonItemSize.Medium},!0),this.setItemSize(f,u)}}}}},s.prototype.createSimplfiedOverflow=function(o,i,r){for(var n=this.getGroupResizeOrder(!0,r),s=0;s<n.length&&o.offsetWidth<i.offsetWidth;s++){for(var a=n[parseInt(s.toString(),10)],l=o.querySelector("#"+a.id),c=l.querySelector("#"+a.id+jt),p=a.collections.length;p>=1&&o.offsetWidth<i.offsetWidth;p--)for(var u=a.collections[parseInt((p-1).toString(),10)],d=l.querySelector("#"+u.id),h=u.items.length;h>=1&&o.offsetWidth<i.offsetWidth;h--){var b=u.items[h-1],f=d.querySelector("#"+b.id+jt);if((b.displayOptions===e.DisplayMode.Auto||b.displayOptions===(e.DisplayMode.Simplified|e.DisplayMode.Overflow))&&!t.isNullOrUndefined(f)){if(f.setAttribute("data-simplified-width",i.offsetWidth.toString()),this.createOverflowPopup(b,r,a.enableGroupOverflow,a.id,a.header,f,c,!0),b.activeSize===e.RibbonItemSize.Small){var m=f.querySelector("#"+b.id);b.setProperties({activeSize:e.RibbonItemSize.Medium},!0),this.setItemSize(m,b)}b.type!==e.RibbonItemType.DropDown&&b.type!==e.RibbonItemType.SplitButton&&b.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(b,f,a.enableGroupOverflow,!0)}}a.enableGroupOverflow||l.querySelector("."+at)||l.classList.add("e-ribbon-emptyCollection");var y=l.querySelectorAll("."+at);y&&!a.enableGroupOverflow&&this.checkEmptyCollection(y)&&l.classList.add("e-ribbon-emptyCollection"),this.checkOverflowHiddenItems(a.enableGroupOverflow,r,a.id)}},s.prototype.checkEmptyCollection=function(e){for(var t=!0,o=0;o<e.length;o++)if(!e[parseInt(o.toString(),10)].classList.contains("e-hidden")){t=!1;break}return t},s.prototype.updatePopupItems=function(o,i,n,s){var a=t.getComponent(i.querySelector("#"+o.id),o.type===e.RibbonItemType.DropDown||o.type===e.RibbonItemType.GroupButton?r.DropDownButton:r.SplitButton),l=a.dropDown,c=(n&&s)===this.enableRtl;l&&(l.setProperties({position:{X:c?"left":"right",Y:s?"top":"bottom"}},!0),s?a.beforeOpen=function(){c&&(l.element.style.setProperty("visibility","hidden"),l.element.style.setProperty("display","block"),l.setProperties({offsetX:-1*l.element.offsetWidth}),l.element.style.removeProperty("display"),l.element.style.removeProperty("visibility"))}:(l.setProperties({offsetX:0},!0),a.beforeOpen=null))},s.prototype.removeSimplfiedOverflow=function(o,i,n,s){void 0===s&&(s=!1);for(var a=this.getGroupResizeOrder(!1,n),l=!0,c=0;c<a.length&&l;c++){var p=a[parseInt(c.toString(),10)],u=void 0,d=void 0;if(p.enableGroupOverflow){var h=o.querySelector("#"+p.id+xt);h&&(d=(u=t.getInstance(h,r.DropDownButton)).target)}else u=this.overflowDDB,d=this.overflowDDB?this.overflowDDB.target:null;for(var b=0;b<p.collections.length&&l;b++)for(var f=p.collections[parseInt(b.toString(),10)],m=0;m<f.items.length&&l&&!s&&o.offsetWidth>i.offsetWidth;m++){var y=f.items[parseInt(m.toString(),10)],v=void 0;if(d&&(v=d.querySelector("#"+y.id+jt)),(y.displayOptions===e.DisplayMode.Auto||y.displayOptions===(e.DisplayMode.Simplified|e.DisplayMode.Overflow))&&!t.isNullOrUndefined(v)){var g=parseInt(v.getAttribute("data-simplified-width"),10);if(!s&&o.offsetWidth<g){l=!1;break}var S=o.querySelector("#"+f.id);y.type!==e.RibbonItemType.DropDown&&y.type!==e.RibbonItemType.SplitButton&&y.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(y,v,p.enableGroupOverflow,!1),S.append(v),this.removeOverflowEvent(y,v),y.allowedSizes&e.RibbonItemSize.Small&&(y.setProperties({activeSize:e.RibbonItemSize.Small},!0),this.setItemSize(v.querySelector("#"+y.id),y))}}var I=o.querySelector("#"+p.id),C=I.querySelector("."+at);if(I.classList.contains("e-ribbon-emptyCollection")&&null!==C){var O=I.querySelectorAll("."+at);O&&(this.checkEmptyCollection(O)||I.classList.remove("e-ribbon-emptyCollection"))}if(u)if(p.enableGroupOverflow)0===d.childElementCount&&this.removeOverflowButton(u);else{var B=d.querySelector("#"+p.id+jt);B&&1===B.childElementCount&&B.remove();var w=d.querySelector("#"+this.tabs[parseInt(n.toString(),10)].id+At);w&&0===w.childElementCount&&(w.remove(),this.overflowDDB.element.classList.add(Ee))}this.checkOverflowHiddenItems(p.enableGroupOverflow,n,p.id)}if(this.overflowDDB){0===this.overflowDDB.target.childElementCount&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)}},s.prototype.checkOverflowHiddenItems=function(e,o,i){if(e){var n=document.querySelector("#"+i+xt);if(n){for(var s=t.getInstance(n,r.DropDownButton),a=s.target.querySelectorAll(".e-ribbon-item"),l=!0,c=0;c<a.length;c++)if(!a[parseInt(c.toString(),10)].classList.contains("e-hidden")){l=!1;break}s.element.classList[l?"add":"remove"]("e-hidden")}}else if(this.overflowDDB){var p=!0,u=void 0,d=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(o.toString(),10)].id+At);if(d){for(var h=0;h<d.children.length;h++){u=!0;for(var b=d.children[parseInt(h.toString(),10)],f=b.querySelectorAll(".e-ribbon-item"),m=0;m<f.length;m++)if(!f[parseInt(m.toString(),10)].classList.contains("e-hidden")){u=!1;break}b.classList[u?"add":"remove"]("e-hide-group"),b.classList.contains("e-hide-group")||b.classList.contains("e-hidden")||(p=!1)}this.overflowDDB.element.classList[p?"add":"remove"](Ee)}}},s.prototype.createOverflowPopup=function(e,o,i,n,s,a,l,c){var p,u=this.tabObj.items[parseInt(o.toString(),10)].content.querySelector("#"+n);if(i){var d=l.querySelector("#"+n+xt);d?p=t.getInstance(d,r.DropDownButton):((p=this.addOverflowButton(n+xt)).element.classList.add(Ae),l.appendChild(p.element));var h=p.target;u&&(u.classList.contains("e-disabled")&&h.classList.add("e-disabled"),u.classList.contains("e-hidden")&&h.classList.add("e-hidden"),u.classList.contains("e-hide-group")&&h.classList.add("e-hide-group")),c?h.insertBefore(a,h.querySelector("."+at)):h.append(a)}else{if(this.overflowDDB){this.overflowDDB.element.classList.remove(Ee);var b=this.overflowDDB.target,f=b.querySelector("#"+this.tabs[parseInt(o.toString(),10)].id+At);if(f){var m=b.querySelector("#"+n+jt);m||(m=this.createGroupContainer(n,s),u&&(u.classList.contains("e-disabled")&&m.classList.add("e-disabled"),u.classList.contains("e-hidden")&&m.classList.add("e-hidden"),u.classList.contains("e-hide-group")&&m.classList.add("e-hide-group")),f.append(m)),c?m.insertBefore(a,m.querySelector("."+at)):m.append(a)}else this.createOfTabContainer(n,s,a,o)}else this.overflowDDB=this.addOverflowButton(this.tabObj.element.id+Mt),this.tabObj.element.insertBefore(this.overflowDDB.element,this.collapseButton),this.overflowDDB.element.classList.add(je),this.createOfTabContainer(n,s,a,o);p=this.overflowDDB}null!==a&&this.addOverflowEvents(e,a,p)},s.prototype.addOverflowEvents=function(e,t,o){switch(e.type){case"Button":this.ribbonButtonModule.addOverFlowEvents(e,t,o);break;case"DropDown":this.ribbonDropDownModule.addOverFlowEvents(e,t,o);break;case"SplitButton":this.ribbonSplitButtonModule.addOverFlowEvents(e,t,o);break;case"CheckBox":this.ribbonCheckBoxModule.addOverFlowEvents(e,t,o);break;case"ColorPicker":this.ribbonColorPickerModule.addOverFlowEvents(e,t,o);break;case"ComboBox":this.ribbonComboBoxModule.addOverFlowEvents(e,t,o);break;case"GroupButton":if("Simplified"===this.activeLayout){this.ribbonGroupButtonModule.addOverFlowEvents(e,t);break}}},s.prototype.createOfTabContainer=function(e,t,o,i){var r=this.createElement("div",{id:this.tabs[parseInt(i.toString(),10)].id+At,className:Ye});this.overflowDDB.target.append(r);var n=this.createGroupContainer(e,t);n.append(o),r.append(n),i===this.selectedTab&&r.classList.add(Me);var s=document.querySelector("#"+e);s&&(s.classList.contains("e-disabled")&&n.classList.add("e-disabled"),s.classList.contains("e-hidden")&&n.classList.add("e-hidden"),s.classList.contains("e-hide-group")&&n.classList.add("e-hide-group"))},s.prototype.checkGroupShrinking=function(e,t,o,i){for(var r=!0,n=!1,s=this.tabs[parseInt(e.toString(),10)],a=s.groups.length-1;r&&a>=0;a--)r=!(n=i?this.checkLargeToMedium(e,s,a,t,o):this.checkMediumToSmall(e,s,a,t,o))&&t.offsetWidth<o.offsetWidth;return n},s.prototype.checkValidCollectionLength=function(t){for(var o=0,i=0;i<t.length;i++){for(var r=t[parseInt(i.toString(),10)].items,n=0;n<r.length;n++)if(r[parseInt(n.toString(),10)].displayOptions&e.DisplayMode.Classic){o++;break}if(o>1)return!1}return 1===o},s.prototype.checkClassicCollection=function(t,o,i){for(var r=t[parseInt(o.toString(),10)].items,n=0;n<r.length;n++)if(r[parseInt(n.toString(),10)].displayOptions&e.DisplayMode.Classic)return o;return o=i?o+1:o-1,i?o===t.length?o:this.checkClassicCollection(t,o,i):o<0?o:this.checkClassicCollection(t,o,i)},s.prototype.checkClassicItem=function(t,o,i){return t[parseInt(o.toString(),10)].displayOptions&e.DisplayMode.Classic?o:(o=i?o+1:o-1,i?o===t.length?o:this.checkClassicItem(t,o,i):o<0?o:this.checkClassicItem(t,o,i))},s.prototype.checkLargeToMedium=function(t,o,i,r,n,s){var a=this;void 0===s&&(s=!1);var l=o.groups[parseInt(i.toString(),10)];if(l.isCollapsed&&!s)return!1;var c=function(e){return 1===e.items.length&&p(e.items[0])},p=function(t){return t.allowedSizes&e.RibbonItemSize.Medium&&t.activeSize===e.RibbonItemSize.Large},u=function(e,t,o,i){var r=a.createElement("div",{className:"e-ribbon-shrink "+lt,id:e+"_shrink_container"+o,attrs:{"data-start":o.toString(),"data-end":i.toString()}});return t.parentElement.insertBefore(r,t),s||r.setAttribute("data-large-width",n.offsetWidth.toString()),r},d=function(o,r){for(var l=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[0],c=n.querySelector("#"+l.items[parseInt(o.toString(),10)].id+jt),p=s?n.querySelector("#"+l.id+"_shrink_container"+o):u(l.id,c,o,r),d=o;d<=r;d++){var h=l.items[parseInt(d.toString(),10)];if(h.displayOptions&e.DisplayMode.Classic){var b=n.querySelector("#"+h.id+jt);p.appendChild(b),h.setProperties({activeSize:e.RibbonItemSize.Medium},!0),h.type===e.RibbonItemType.GroupButton&&"Classic"===a.activeLayout?a.setItemSize(b.querySelector("#"+h.id+Vt),h):a.setItemSize(b.querySelector("#"+h.id),h)}}},h=function(o,r){for(var l=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)],c=n.querySelector("#"+l.collections[parseInt(o.toString(),10)].id),p=s?n.querySelector("#"+l.id+"_shrink_container"+o):u(l.id,c,o,r),d=o;d<=r;d++){var h=l.collections[parseInt(d.toString(),10)],b=n.querySelector("#"+h.id);p.appendChild(b),h.items[0].setProperties({activeSize:e.RibbonItemSize.Medium},!0),h.items[0].type===e.RibbonItemType.GroupButton&&"Classic"===a.activeLayout?a.setItemSize(b.querySelector("#"+h.items[0].id+Vt),h.items[0]):a.setItemSize(b.querySelector("#"+h.items[0].id),h.items[0])}};if(l.orientation===e.ItemOrientation.Column)for(var b=l.collections.length-1;b>0;b--){if((m=(b=this.checkClassicCollection(l.collections,b,!1))-1)>=0&&c(l.collections[parseInt(b.toString(),10)]))if((m=this.checkClassicCollection(l.collections,m,!1))>=0&&c(l.collections[parseInt(m.toString(),10)])){if((y=m-1)>=0&&(y=this.checkClassicCollection(l.collections,y,!1)),y>=0&&c(l.collections[parseInt(y.toString(),10)])?h(y,b):h(m,b),b=y,!s&&r.offsetWidth>n.offsetWidth)return!0}else b=m}else if(this.checkValidCollectionLength(l.collections)){var f=l.collections[0];for(b=f.items.length-1;b>0;b--){var m;if((m=(b=this.checkClassicItem(f.items,b,!1))-1)>=0&&p(f.items[parseInt(b.toString(),10)]))if((m=this.checkClassicItem(f.items,m,!1))>=0&&p(f.items[parseInt(m.toString(),10)])){var y;if((y=m-1)>=0&&(y=this.checkClassicItem(f.items,y,!1)),y>=0&&p(f.items[parseInt(y.toString(),10)])?d(y,b):d(m,b),b=y,!s&&r.offsetWidth>n.offsetWidth)return!0}else b=m}}return!1},s.prototype.checkMediumToSmall=function(t,o,i,r,n,s){var a=this;void 0===s&&(s=!1);var l=o.groups[parseInt(i.toString(),10)];if(l.isCollapsed&&!s)return!1;var c=l.orientation,p=n.querySelector("#"+l.id).querySelectorAll(".e-ribbon-shrink"),u=function(t){return t.allowedSizes&e.RibbonItemSize.Small&&t.activeSize===e.RibbonItemSize.Medium},d=function(o,r,s,l){void 0===l&&(l=null);var c=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[parseInt(o.toString(),10)],p=function(t){var o=c.items[parseInt(t.toString(),10)];if(o.displayOptions&e.DisplayMode.Classic){var i=n.querySelector("#"+o.id);o.setProperties({activeSize:e.RibbonItemSize.Small},!0),o.type===e.RibbonItemType.GroupButton&&(i=n.querySelector("#"+o.id+"_grpbtn")),a.setItemSize(i,o)}};p(r),l&&p(l),p(s)},h=function(o,r,l,c){void 0===c&&(c=null);var u=a.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)];s||p[parseInt(o.toString(),10)].setAttribute("data-medium-width",n.offsetWidth.toString());var d=function(t){var o=u.collections[parseInt(t.toString(),10)];if(o.items[0].displayOptions&e.DisplayMode.Classic){var i=n.querySelector("#"+o.items[0].id);o.items[0].setProperties({activeSize:e.RibbonItemSize.Small},!0),o.items[0].type===e.RibbonItemType.GroupButton&&(i=n.querySelector("#"+o.items[0].id+Vt)),a.setItemSize(i,o.items[0])}};d(r),c&&d(c),d(l)},b=function(e){if(!s){n.querySelector("#"+e).setAttribute("data-medium-width",n.offsetWidth.toString())}};if(c===e.ItemOrientation.Column){if(p.length>0)for(var f=p.length-1;f>=0;f--){var m=parseInt(p[parseInt(f.toString(),10)].getAttribute("data-start"),10),y=parseInt(p[parseInt(f.toString(),10)].getAttribute("data-end"),10),v=this.checkClassicCollection(l.collections,m+1,!1);if(u(l.collections[parseInt(m.toString(),10)].items[0])&&u(l.collections[parseInt(v.toString(),10)].items[0])&&(y===v?h(f,m,y):u(l.collections[parseInt(y.toString(),10)].items[0])&&h(f,m,y,v),!s&&r.offsetWidth>n.offsetWidth))return!0}for(f=l.collections.length-1;f>=0;f--){for(var g=l.collections[parseInt(f.toString(),10)],S=[],I=0;I<g.items.length;I++)g.items[parseInt(I.toString(),10)].displayOptions&e.DisplayMode.Classic&&S.push(I);if(S.length>1&&u(g.items[S[0]])&&u(g.items[S[1]])&&(2===S.length?(b(g.id),d(f,S[0],S[1])):u(g.items[S[2]])&&(b(g.id),d(f,S[0],S[2],S[1])),!s&&r.offsetWidth>n.offsetWidth))return!0}}else if(this.checkValidCollectionLength(l.collections)){if(p.length>0)for(f=p.length-1;f>=0;f--){var C=p[parseInt(f.toString(),10)];m=parseInt(C.getAttribute("data-start"),10),y=parseInt(C.getAttribute("data-end"),10),g=l.collections[0],v=this.checkClassicItem(g.items,m+1,!1);if(u(l.collections[0].items[parseInt(m.toString(),10)])&&u(l.collections[0].items[parseInt(v.toString(),10)])&&(y===v?(b(C.id),d(0,m,y)):u(l.collections[0].items[parseInt(y.toString(),10)])&&(b(C.id),d(0,m,y,v)),!s&&r.offsetWidth>n.offsetWidth))return!0}}else for(f=l.collections.length-1;f>=0;f--)for(v=(g=l.collections[parseInt(f.toString(),10)]).items.length-1;v>=0;v--)if(!((v=this.checkClassicItem(g.items,v,!1))<0)){var O=g.items[parseInt(v.toString(),10)];if(u(O)&&(O.type!==e.RibbonItemType.GroupButton?b(O.id):b(O.id+Vt),d(f,v,v),!s&&r.offsetWidth>n.offsetWidth))return!0}return!1},s.prototype.checkGroupExpanding=function(e,t,o,i){for(var r=!1,n=this.tabs[parseInt(e.toString(),10)],s=0;!r&&s<n.groups.length;s++)r=i?this.checkSmallToMedium(e,n,s,t,o,!1,!0):this.checkMediumToLarge(e,n,s,t,o,!1,!0);return r},s.prototype.checkSmallToMedium=function(t,o,i,r,n,s,a){var l=this,c=o.groups[parseInt(i.toString(),10)],p=c.orientation,u=n.querySelector("#"+c.id).querySelectorAll(".e-ribbon-shrink"),d=function(t){return t.allowedSizes&e.RibbonItemSize.Medium&&t.activeSize===e.RibbonItemSize.Small},h=function(o,r,n){var s=l.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections[parseInt(o.toString(),10)].items[parseInt(r.toString(),10)];if(s.displayOptions&e.DisplayMode.Classic){var a=n.id===s.id?n:n.querySelector("#"+s.id);s.setProperties({activeSize:e.RibbonItemSize.Medium},!0),s.type===e.RibbonItemType.GroupButton&&(a=document.querySelector("#"+s.id+Vt)),l.setItemSize(a,s)}},b=function(o){var r=l.tabs[parseInt(t.toString(),10)].groups[parseInt(i.toString(),10)].collections,s=r[parseInt(o.toString(),10)].items[0];if(s.displayOptions&e.DisplayMode.Classic){var a=n.querySelector("#"+r[parseInt(o.toString(),10)].items[0].id);r[parseInt(o.toString(),10)].items[0].setProperties({activeSize:e.RibbonItemSize.Medium},!0),s.type===e.RibbonItemType.GroupButton&&(a=n.querySelector("#"+r[parseInt(o.toString(),10)].items[0].id+Vt)),l.setItemSize(a,r[parseInt(o.toString(),10)].items[0])}};if(p===e.ItemOrientation.Row){if(!this.checkValidCollectionLength(c.collections))for(var f=0;f<c.collections.length;f++)for(var m=c.collections[parseInt(f.toString(),10)],y=0;y<m.items.length;y++)if((y=this.checkClassicItem(m.items,y,!0))!==m.items.length){var v=m.items[parseInt(y.toString(),10)];if(d(v)){var g=n.querySelector("#"+v.id);"GroupButton"===v.type&&(g=n.querySelector("#"+v.id+Vt));if((S=(O=g.getAttribute("data-medium-width"))?parseInt(O,10):null)&&(s||r.offsetWidth>S))h(f,y,g),s&&!a||g.removeAttribute("data-medium-width");else if(S)return!0}}}else for(f=0;f<c.collections.length;f++)if(c.collections[parseInt(f.toString(),10)].items.length>1){m=c.collections[parseInt(f.toString(),10)];for(var S=(O=(g=n.querySelector("#"+m.id)).getAttribute("data-medium-width"))?parseInt(O,10):null,I=[],C=0;C<m.items.length;C++)m.items[parseInt(C.toString(),10)].displayOptions&e.DisplayMode.Classic&&I.push(C);if(I.length>1&&S&&(s||r.offsetWidth>S))h(f,I[0],g),h(f,I[1],g),3===I.length&&h(f,I[2],g),s&&!a||g.removeAttribute("data-medium-width");else if(S)return!0}if(u.length>0)for(f=0;f<u.length;f++){var O,B=u[parseInt(f.toString(),10)];if((S=(O=B.getAttribute("data-medium-width"))?parseInt(O,10):null)&&(s||r.offsetWidth>S)){var w=parseInt(B.getAttribute("data-start"),10),D=parseInt(B.getAttribute("data-end"),10);if(p===e.ItemOrientation.Row){m=c.collections[0],y=this.checkClassicItem(m.items,w+1,!0);h(0,w,B),h(0,y,B),y!==D&&h(0,D,B)}else{var P=this.checkClassicCollection(c.collections,w+1,!0);b(w),b(P),P!==D&&b(D)}s&&!a||B.removeAttribute("data-medium-width")}else if(S)return!0}return!1},s.prototype.checkMediumToLarge=function(o,i,r,n,s,a,l){var c=this,p=i.groups[parseInt(r.toString(),10)],u=p.orientation,d=s.querySelector("#"+p.id).querySelectorAll(".e-ribbon-shrink");if(0===d.length)return!1;for(var h=function(i,n,s,p){var u=c.tabs[parseInt(o.toString(),10)].groups[parseInt(r.toString(),10)].collections[0].items,d=function(t){var o=u[parseInt(t.toString(),10)];if(o.displayOptions&e.DisplayMode.Classic){var i=s.querySelector("#"+o.id+jt),r=i.querySelector("#"+o.id);o.setProperties({activeSize:e.RibbonItemSize.Large},!0),o.type===e.RibbonItemType.GroupButton&&(r=i.querySelector("#"+o.id+Vt)),c.setItemSize(r,o),s.insertAdjacentElement("beforebegin",i)}};d(i),p&&d(p),d(n),a&&!l||t.remove(s)},b=function(i,n,s,p){var u=c.tabs[parseInt(o.toString(),10)].groups[parseInt(r.toString(),10)].collections,d=function(t){var o=u[parseInt(t.toString(),10)];if(o.items[0].displayOptions&e.DisplayMode.Classic){var i=s.querySelector("#"+o.id),r=i.querySelector("#"+o.items[0].id);o.items[0].setProperties({activeSize:e.RibbonItemSize.Large},!0),o.items[0].type===e.RibbonItemType.GroupButton&&(r=i.querySelector("#"+o.items[0].id+Vt)),c.setItemSize(r,o.items[0]),s.insertAdjacentElement("beforebegin",i)}};d(i),p&&d(p),d(n),a&&!l||t.remove(s)},f=0;f<d.length;f++){var m=d[parseInt(f.toString(),10)],y=m.getAttribute("data-large-width"),v=y?parseInt(y,10):null;if(v&&(a||n.offsetWidth>v)){var g=parseInt(m.getAttribute("data-start"),10),S=parseInt(m.getAttribute("data-end"),10);if(u===e.ItemOrientation.Row){var I=p.collections[0],C=this.checkClassicItem(I.items,g+1,!0);C===S?h(g,S,m):h(g,S,m,C)}else{var O=this.checkClassicCollection(p.collections,g+1,!0);O===S?b(g,S,m):b(g,S,m,O)}a&&!l||m.removeAttribute("data-large-width")}else if(v)return!0}return!1},s.prototype.handleContentSize=function(e,t){var o=e.closest("."+Qe);t?o.classList.add(ht):o.classList.remove(ht)},s.prototype.setItemSize=function(o,i){if(o){var r=o.closest("."+at);i.type===e.RibbonItemType.Button?this.ribbonButtonModule.updateButtonSize(o,i):i.type===e.RibbonItemType.DropDown?this.ribbonDropDownModule.updateDropDownSize(o,i):i.type===e.RibbonItemType.SplitButton?this.ribbonSplitButtonModule.updateSplitButtonSize(o,i):i.type===e.RibbonItemType.Template?(t.remove(o),this.createTemplateContent(i,r)):i.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.updateGroupButtonSize(o,i),r.classList.remove(ht,pt,ut,dt),i.activeSize===e.RibbonItemSize.Large?r.classList.add(pt,ht):r.classList.add(i.activeSize===e.RibbonItemSize.Medium?ut:dt)}},s.prototype.createOverflowDropdown=function(e,t,o){var i=this.getGroupResizeOrder(!0,e);if(0!==i.length)for(var r=function(r){var s=i[parseInt(r.toString(),10)],a=n.tabObj.element.querySelector("#"+s.id);a.setAttribute("data-expanded-width",o.offsetWidth.toString());var c=a.querySelector("#"+s.id+jt),p=n.createElement("div",{className:tt+" "+pt,id:s.id+At+jt});a.insertBefore(p,c);var u=l(n.tabs[parseInt(e.toString(),10)].groups,function(e){return e.id===s.id}),d=n.tabs[parseInt(e.toString(),10)];n.checkSmallToMedium(e,d,u,t,o,!0,!1),n.checkMediumToLarge(e,d,u,t,o,!0,!1);var h=n.ribbonDropDownModule.createOverFlowDropDown(s.id,s.header,s.groupIconCss,c,p,n.enableRtl);n.tabs[parseInt(e.toString(),10)].groups[parseInt(u.toString(),10)].setProperties({isCollapsed:!0},!0);for(var b=0;b<s.collections.length;b++)for(var f=s.collections[parseInt(b.toString(),10)],m=c.querySelector("#"+f.id),y=0;y<f.items.length;y++){var v=f.items[parseInt(y.toString(),10)],g=m.querySelector("#"+v.id+jt);null!==g&&(n.handleContentSize(g),n.addOverflowEvents(v,g,h))}},n=this,s=0;s<i.length&&t.offsetWidth<o.offsetWidth;s++)r(s)},s.prototype.removeOverflowDropdown=function(e,t,o,i){void 0===o&&(o=!1);var r=this.getGroupResizeOrder(!1,i);if(0===r.length)return!1;for(var n=function(n){var a=r[parseInt(n.toString(),10)],c=s.tabObj.element.querySelector("#"+a.id);if(!c)return"break";var p=parseInt(c.getAttribute("data-expanded-width"),10);if(!o&&e.offsetWidth<p)return{value:!0};s.removeDropdown(a.id);var u=l(s.tabs[parseInt(i.toString(),10)].groups,function(e){return e.id===a.id});s.tabs[parseInt(i.toString(),10)].groups[parseInt(u.toString(),10)].setProperties({isCollapsed:!1},!0);var d=s.tabs[parseInt(i.toString(),10)];s.checkLargeToMedium(i,d,u,e,t,!0),s.checkMediumToSmall(i,d,u,e,t,!0);for(var h=0;h<a.collections.length;h++)for(var b=a.collections[parseInt(h.toString(),10)],f=c.querySelector("#"+b.id),m=0;m<b.items.length;m++){var y=b.items[parseInt(m.toString(),10)],v=f.querySelector("#"+y.id+jt);null!==v&&(s.handleContentSize(v,!0),s.removeOverflowEvent(y,v))}},s=this,a=0;a<r.length;a++){var c=n(a);if("object"==typeof c)return c.value;if("break"===c)break}return!1},s.prototype.removeDropdown=function(e){var o=this.tabObj.element.querySelector("#"+e+At+Nt);if(o){var i=o.parentElement;this.ribbonDropDownModule.removeOverFlowDropDown(o),t.remove(i)}},s.prototype.getGroupResizeOrder=function(e,o){var i=this,r=this.tabs[parseInt(o.toString(),10)].groups;return(r=r.filter(function(o){return"Classic"!==i.activeLayout||(t.isUndefined(o.isCollapsible)||o.isCollapsible)&&(e&&t.isUndefined(o.isCollapsed)||!t.isUndefined(o.isCollapsed)&&e!==o.isCollapsed)})).sort(function(e,t){return e.priority-t.priority}),e?r.reverse():r},s.prototype.destroyScroll=function(){this.scrollModule&&(this.scrollModule.destroy(),this.scrollModule=null)},s.prototype.clearOverflowDropDown=function(e){var t=this.tabObj.element.querySelector("#"+this.tabs[parseInt(e.toString(),10)].id+zt);if(t){var o=t.closest("."+He);"Simplified"===this.activeLayout?this.removeSimplfiedOverflow(t,o,e,!0):this.removeOverflowDropdown(t,o,!0,e)}},s.prototype.ribbonTabSelecting=function(e){var o=this;this.currentControlIndex=0;var i=e.selectingItem.getAttribute("data-id"),r=e.previousItem.getAttribute("data-id"),n=l(this.tabs,function(e){return e.id===i}),s=l(this.tabs,function(e){return e.id===r});n=-1===n?this.selectedTab:n;var a={cancel:e.cancel,isInteracted:e.isInteracted,previousIndex:s,selectedIndex:n};this.trigger("tabSelecting",a,function(e){if(!e.cancel){o.destroyScroll(),o.isAddRemove||-1===s||o.clearOverflowDropDown(s);var i=o.tabObj.items[parseInt(n.toString(),10)].content;if(!i.querySelector("."+Fe)&&0!==o.tabs[parseInt(n.toString(),10)].groups.length){var r=o.createGroups(o.tabs[parseInt(n.toString(),10)].groups,n);t.append(r,i)}}})},s.prototype.createTabItems=function(e){for(var t=this,o=[],i=0;i<e.length;i++){var r=e[parseInt(i.toString(),10)],n=this.createElement("span",{innerHTML:r.header,id:r.id+_t});n.onclick=function(){t.minimize(!1)},n.ondblclick=function(){t.minimize(!0)};var s={header:{text:n},id:r.id,cssClass:r.cssClass},a=this.createElement("div",{className:s.cssClass,id:r.id+zt});a.classList.add(xe),s.content=a,o.push(s)}return o},s.prototype.renderInitialTab=function(e){var o=this.createGroups(this.tabs[parseInt(e.toString(),10)].groups,e),i=this.tabObj.items[parseInt(e.toString(),10)].content;t.append(o,i),"Simplified"===this.activeLayout&&this.element.classList.add(Ot);var r=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);this.checkOverflow(this.selectedTab,r)},s.prototype.addOverflowButton=function(e){var o=this,i=this.createElement("button",{id:e}),n=this.createElement("div",{className:Ne,attrs:{tabindex:"0"}}),s=new r.DropDownButton({iconCss:Oe,cssClass:"e-caret-hide "+ot,target:n,locale:this.locale,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence,beforeOpen:function(e){var t={element:e.element,event:e.event,cancel:e.cancel};o.trigger("overflowPopupOpen",t,function(t){t.cancel&&(e.cancel=!0)})},beforeClose:function(e){var i=e.event?t.closest(e.event.target,"."+Re):null,r={element:e.element,event:e.event,cancel:e.cancel};o.trigger("overflowPopupClose",r,function(t){(i||t.cancel)&&(e.cancel=!0)})}},i);this.element.classList.add(Ge),g(n,this);var a;return i.onkeydown=i.onclick=function(){o.itemIndex=-1,a=!i.classList.contains("e-ribbon-overall-of-btn")},n.onkeydown=function(e){return o.upDownKeyHandler(e,n,a),o},s},s.prototype.upDownKeyHandler=function(e,o,i){var r;if(i)r=o.getElementsByClassName("e-ribbon-item");else{r=o.querySelector(".e-ribbon-of-tab.e-ribbon-active").getElementsByClassName("e-ribbon-item")}var s,a=r[!this.itemIndex||this.itemIndex<0?0:this.itemIndex].querySelector(".e-control").classList.contains("e-combobox")?r[!this.itemIndex||this.itemIndex<0?0:this.itemIndex].querySelector(".e-combobox"):null;(null===a||"Tab"===e.key||this.itemIndex<0)&&("ArrowDown"===e.key||!e.shiftKey&&"Tab"===e.key?!this.itemIndex&&0!==this.itemIndex||this.itemIndex<0||this.itemIndex===r.length-1?(this.itemIndex=0,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!0),a&&"Tab"===e.key&&(e.preventDefault(),r[this.itemIndex].querySelector(".e-control").focus())):this.itemIndex<r.length-1&&this.itemIndex>=0&&(this.itemIndex++,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!0)):("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(null!==a&&"Tab"!==e.key||(this.itemIndex&&-1!==this.itemIndex?this.itemIndex<=r.length-1&&this.itemIndex>0&&(this.itemIndex--,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!1)):(this.itemIndex=r.length-1,s=r[this.itemIndex].closest(".e-ribbon-item"),this.findDisabledItem(s,r,!1),a&&e.shiftKey&&"Tab"===e.key&&(e.preventDefault(),r[this.itemIndex].querySelector(".e-control").focus())))),o.setAttribute("index",this.itemIndex.toString()));var l=parseInt(o.getAttribute("index"),10),c=r[parseInt(l.toString(),10)]?r[parseInt(l.toString(),10)].querySelector(".e-control").getAttribute("data-control"):null;if(("ArrowDown"===e.key||"ArrowUp"===e.key||" "===e.key||"Tab"===e.key)&&("ColorPicker"===c?("Tab"===e.key&&e.preventDefault(),r[parseInt(l.toString(),10)].querySelector(".e-split-colorpicker").focus()):("Tab"===e.key&&e.preventDefault(),r[parseInt(l.toString(),10)].querySelector(".e-control").focus())," "===e.key&&"CheckBox"===c)){var p=r[parseInt(l.toString(),10)].querySelector(".e-control"),u=t.getComponent(p,n.CheckBox);this.itemIndex=-1,u.click()}"SplitButton"!==c||"ArrowRight"!==e.key&&"ArrowLeft"!==e.key||("ArrowRight"===e.key&&(this.enableRtl?r[parseInt(l.toString(),10)].querySelector(".e-control").focus():r[parseInt(l.toString(),10)].querySelector(".e-dropdown-btn").focus()),"ArrowLeft"===e.key&&(this.enableRtl?r[parseInt(l.toString(),10)].querySelector(".e-dropdown-btn").focus():r[parseInt(l.toString(),10)].querySelector(".e-control").focus())),"Enter"===e.key&&(this.itemIndex=-1)},s.prototype.findDisabledItem=function(e,t,o){for(;e&&e.classList.contains("e-disabled");)o?this.itemIndex===t.length-1&&t[this.itemIndex].closest(".e-ribbon-item").classList.contains("e-disabled")&&(this.itemIndex=-1):0===this.itemIndex&&t[this.itemIndex].closest(".e-ribbon-item").classList.contains("e-disabled")&&(this.itemIndex=t.length),o?this.itemIndex++:this.itemIndex--,e=t[this.itemIndex].closest(".e-ribbon-item")},s.prototype.removeOverflowButton=function(e){if(e){var t=e.element;S(e.target),e.destroy(),t.remove()}},s.prototype.removeOverflowEvent=function(e,t){if(t)switch(e.type){case"Button":this.ribbonButtonModule.removeOverFlowEvents(e,t);break;case"DropDown":this.ribbonDropDownModule.removeOverFlowEvents(e,t);break;case"SplitButton":this.ribbonSplitButtonModule.removeOverFlowEvents(e,t);break;case"CheckBox":this.ribbonCheckBoxModule.removeOverFlowEvents(e,t);break;case"ColorPicker":this.ribbonColorPickerModule.removeOverFlowEvents(e,t);break;case"ComboBox":this.ribbonComboBoxModule.removeOverFlowEvents(e,t);break;case"GroupButton":this.ribbonGroupButtonModule.removeOverFlowEvents(e,t)}},s.prototype.createGroupContainer=function(e,t){var o=this.createElement("div",{className:Je,id:e+jt}),i=this.createElement("div",{className:et,id:e+_t,innerHTML:t});return o.append(i),o},s.prototype.addExpandCollapse=function(){var e=this;this.collapseButton=this.createElement("span",{className:_e+" "+Ie,id:this.tabObj.element.id+Et,attrs:{tabindex:"0",type:"button","aria-label":"Layout Switcher",role:"button"}}),this.collapseButton.onclick=function(){e.toggleLayout()},this.collapseButton.onkeydown=function(t){"Enter"===t.key&&e.toggleLayout()},this.element.classList.add(ze),"Simplified"===this.activeLayout&&this.collapseButton.classList.add(qe),this.tabObj.element.appendChild(this.collapseButton)},s.prototype.removeExpandCollapse=function(){var e=this,o=l(this.tooltipData,function(t){return t.id===e.collapseButton.id});-1!==o&&this.tooltipData.splice(o,1),this.element.classList.remove(ze),t.remove(this.tabObj.element.querySelector("."+_e)),this.collapseButton=null},s.prototype.reRenderTabs=function(e){this.destroyScroll(),this.checkID(this.tabs,"tab",this.element.id);for(var o in e){for(var i=parseInt(o,10),r=e[parseInt(i.toString(),10)],n=!1,s=0;s<this.tabObj.items.length;s++)if(this.tabs[parseInt(i.toString(),10)].id===this.tabObj.items[parseInt(s.toString(),10)].id){n=!0;break}if(!n){this.destroyTabItems(this.tabsInternal),this.tabsInternal=this.tabs.slice(),this.validateItemSize();var a=this.createTabItems(this.tabs);this.selectedTab>=this.tabs.length&&(this.selectedTab=this.tabs.length-1),this.tabObj.setProperties({items:a,selectedItem:this.selectedTab});break}var l=this.tabs[parseInt(i.toString(),10)].groups,c=this.tabObj.element,p=this.tabs[parseInt(i.toString(),10)];p.setProperties(r,!0),this.setProperties({groups:this.checkID(p.groups,"group",p.id)},!0),this.validateItemSize();var u=this.tabObj.items[parseInt(i.toString(),10)].content;if(l&&(r.header&&(this.tabObj.items[parseInt(i.toString(),10)].header.text.innerText=p.header),r.cssClass&&(this.tabObj.items[parseInt(i.toString(),10)].cssClass&&(u.classList.remove(this.tabObj.items[parseInt(i.toString(),10)].cssClass),c.querySelector(".e-active").classList.remove(this.tabObj.items[parseInt(i.toString(),10)].cssClass)),u.classList.add(p.cssClass),c.querySelector(".e-active").classList.add(p.cssClass)),r.groups)){for(var d=0,h=l;d<h.length;d++){for(var b=h[d],f=b.isCollapsed?u.querySelector("#"+b.id+At+Nt):null,m=0,y=b.collections;m<y.length;m++)for(var v=0,g=y[m].items;v<g.length;v++){var S=g[v],I=f?this.ribbonDropDownModule.getDDBItemElement(f,S.id):u.querySelector("#"+S.id);I&&this.destroyFunction(S,I)}f&&this.ribbonDropDownModule.removeOverFlowDropDown(f)}u.querySelectorAll(".e-ribbon-group").forEach(function(e){e.remove()});var C=this.createGroups(p.groups,i);t.append(C,u)}}var O=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt);this.checkOverflow(this.selectedTab,O)},s.prototype.switchLayout=function(){this.currentControlIndex=0,this.destroyScroll(),this.collapseButton.classList.toggle(qe,"Simplified"===this.activeLayout),this.element.classList.toggle(Ot,"Simplified"===this.activeLayout);for(var o=0;o<=this.tabs.length-1;o++){var i=o;if(""!==this.tabObj.items[parseInt(i.toString(),10)].content.innerHTML){var n=this.tabs[parseInt(i.toString(),10)],s=this.tabs[parseInt(i.toString(),10)].groups,a=this.tabObj.element.querySelector("#"+this.tabs[parseInt(i.toString(),10)].id+zt),l=a.closest("."+He);if("Simplified"===this.activeLayout)for(var c=0;c<s.length;c++){var p=s[parseInt(c.toString(),10)],u=s[parseInt(c.toString(),10)].orientation;p.isCollapsed?(p.setProperties({isCollapsed:!1},!0),this.removeDropdown(p.id)):(this.checkSmallToMedium(i,n,c,l,a,!0,!1),this.checkMediumToLarge(i,n,c,l,a,!0,!1));for(var d=l.querySelector("#"+p.id),h=(D=d.querySelector("#"+p.id+jt)).querySelectorAll(".e-ribbon-shrink"),b=0;b<h.length;b++)h[parseInt(b.toString(),10)].remove();(L=D.querySelector("#"+p.id+_t)).remove();(P=D.querySelector("#"+p.id+zt)).classList.replace(lt,ct),P.classList.remove(ht);for(var f=0;f<p.collections.length;f++){var m=p.collections[parseInt(f.toString(),10)];(E=D.querySelector("#"+m.id)).classList.replace(lt,ct);for(var y=0;y<m.items.length;y++){for(var v=m.items,g=m.items[parseInt(y.toString(),10)],S=!0;S&&g.displayOptions===e.DisplayMode.Classic;){y++;var I=D.querySelector("#"+g.id+jt),C=I.querySelector("#"+g.id);this.destroyFunction(g,C),I.remove(),y<v.length?g=v[parseInt(y.toString(),10)]:S=!1}if(!S)break;var O=g.allowedSizes===e.RibbonItemSize.Large||g.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;O=!(g.displayOptions&e.DisplayMode.Simplified)&&g.displayOptions&e.DisplayMode.Overflow?e.RibbonItemSize.Medium:O;var B=void 0;if(g.displayOptions&e.DisplayMode.Classic){if(B=D.querySelector("#"+g.id+jt),g.displayOptions===(e.DisplayMode.Classic|e.DisplayMode.Overflow)&&(this.createOverflowPopup(g,i,p.enableGroupOverflow,p.id,p.header,B,D),g.type!==e.RibbonItemType.DropDown&&g.type!==e.RibbonItemType.SplitButton&&g.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(g,B,p.enableGroupOverflow,!0)),g.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.switchGroupButton(g,B),g.setProperties({activeSize:O},!0),B){C=B.querySelector("#"+g.id);this.setItemSize(C,g)}}else B=this.createItems([g],u,p.id,p.header,p.enableGroupOverflow,i,D)[0],g.displayOptions&e.DisplayMode.Simplified&&E.append(B)}}p.enableGroupOverflow||d.querySelector("."+at)||d.classList.add("e-ribbon-emptyCollection")}else{this.element.classList.remove(Ge);for(var w=0;w<s.length;w++){p=s[parseInt(w.toString(),10)],u=s[parseInt(w.toString(),10)].orientation;var D,P=(D=l.querySelector("#"+p.id+jt)).querySelector("#"+p.id+zt),L=this.createElement("div",{className:$e,id:p.id+_t,innerHTML:p.header});D.appendChild(L),"Row"===u&&P.classList.replace(ct,lt),P.classList.add(ht);for(f=0;f<p.collections.length;f++){var R=void 0,k=void 0;if(p.enableGroupOverflow){var T=D.querySelector("#"+p.id+xt);T&&(k=(R=t.getInstance(T,r.DropDownButton)).target)}else(R=this.overflowDDB)&&(k=this.overflowDDB.target);m=p.collections[parseInt(f.toString(),10)];var E=D.querySelector("#"+m.id);"Column"===u&&E.classList.replace(ct,lt);for(y=0;y<m.items.length;y++){for(v=m.items,g=m.items[parseInt(y.toString(),10)],S=!0;S&&!(g.displayOptions&e.DisplayMode.Classic);){y++;B=void 0;if((g.displayOptions&e.DisplayMode.Simplified||g.displayOptions&e.DisplayMode.Overflow)&&null!==(B=g.displayOptions&e.DisplayMode.Simplified?D.querySelector("#"+g.id+jt):k.querySelector("#"+g.id+jt))){var M=B.querySelector("#"+g.id);this.destroyFunction(g,M),B.remove()}y<v.length?g=v[parseInt(y.toString(),10)]:S=!1}if(!S)break;if(g.displayOptions&(e.DisplayMode.Simplified|e.DisplayMode.Overflow)){!(B=D.querySelector("#"+g.id+jt))&&k&&(B=k.querySelector("#"+g.id+jt),g.type!==e.RibbonItemType.DropDown&&g.type!==e.RibbonItemType.SplitButton&&g.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(g,B,p.enableGroupOverflow,!1),this.removeOverflowEvent(g,B)),g.type===e.RibbonItemType.GroupButton&&this.ribbonGroupButtonModule.switchGroupButton(g,B),B&&E.append(B)}else{var B=this.createItems([g],u,p.id,p.header,p.enableGroupOverflow,i)[0];E.append(B)}C=D.querySelector("#"+g.id);g.type===e.RibbonItemType.GroupButton&&(C=D.querySelector("#"+g.id+Vt));var x=g.allowedSizes&e.RibbonItemSize.Large?e.RibbonItemSize.Large:g.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;g.setProperties({activeSize:x},!0),this.setItemSize(C,g)}p.enableGroupOverflow&&R&&0===k.childElementCount&&this.removeOverflowButton(R)}}}this.selectedTab===i&&this.checkOverflow(i,a)}}"Classic"===this.activeLayout&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)},s.prototype.createLauncherIcon=function(e,o){var i=this,r=this.createElement("div",{className:rt+" "+(this.launcherIconCss?this.launcherIconCss:nt),id:e+qt,attrs:{tabindex:"0",type:"button","aria-label":"Launcher Icon",role:"button"}});o.appendChild(r),o.classList.add(it),t.EventHandler.add(r,"click",this.launcherIconClicked.bind(this,e),this),t.EventHandler.add(r,"keydown",function(t){"Enter"===t.key&&i.launcherIconClicked(e)},this)},s.prototype.launcherIconClicked=function(e){var t={groupId:e};this.trigger("launcherIconClick",t)},s.prototype.createGroups=function(e,o){for(var i=[],r=0;r<e.length;r++){var n=e[parseInt(r.toString(),10)],s=n.orientation,a=this.createElement("div",{className:n.cssClass,id:n.id});a.classList.add(Fe),i.push(a);var l=this.createElement("div",{className:n.cssClass,id:n.id+jt});l.classList.add(Ze),a.appendChild(l);var c=this.createElement("div",{className:"Simplified"===this.activeLayout?Qe:Qe+" "+ht,id:n.id+zt});if(c.classList.add("Column"===s||"Simplified"===this.activeLayout?ct:lt),l.appendChild(c),"Classic"===this.activeLayout){var p=this.createElement("div",{className:$e,id:n.id+_t,innerHTML:n.header});l.appendChild(p)}n.showLauncherIcon&&this.createLauncherIcon(n.id,l);var u=this.createCollection(n.collections,n.orientation,n.id,n.header,n.enableGroupOverflow,o,l);t.append(u,c);for(var d=!0,h=0;h<u.length;h++)if(d)for(var b=0;b<u[parseInt(h.toString(),10)].children.length;b++)if(!u[parseInt(h.toString(),10)].children[parseInt(b.toString(),10)].classList.contains("e-hidden")){d=!1;break}d&&a.classList.add("e-hide-group"),"Simplified"!==this.activeLayout||n.enableGroupOverflow||a.querySelector("."+at)||a.classList.add("e-ribbon-emptyCollection");var f=this.initialPropsData[parseInt(o.toString(),10)];f&&(f.hiddenGroups&&f.hiddenGroups.length&&this.updateGroupProps("hiddenGroups",f,a),f.disabledGroups&&f.disabledGroups.length&&this.updateGroupProps("disabledGroups",f,a))}return this.initialPropsData[parseInt(o.toString(),10)]&&delete this.initialPropsData[parseInt(o.toString(),10)],i},s.prototype.updateGroupProps=function(e,t,o){-1!==t[e].indexOf(o.id)&&("hiddenGroups"===e?o.classList.add("e-hidden"):o.classList.add("e-disabled"))},s.prototype.validateItemSize=function(){for(var t=0;t<this.tabs.length;t++)for(var o=this.tabs[parseInt(t.toString(),10)].groups,i=0;i<o.length;i++)for(var r=o[parseInt(i.toString(),10)].collections,n=o[parseInt(i.toString(),10)].orientation,s=0;s<r.length;s++)for(var a=r[parseInt(s.toString(),10)].items,l=0;l<a.length;l++){var c=a[parseInt(l.toString(),10)];if(c.allowedSizes&&0!==c.allowedSizes||c.setProperties({allowedSizes:e.RibbonItemSize.Small|e.RibbonItemSize.Medium|e.RibbonItemSize.Large},!0),"ColorPicker"===c.type&&c.allowedSizes!==e.RibbonItemSize.Small)c.setProperties({allowedSizes:e.RibbonItemSize.Small},!0);else if("ComboBox"!==c.type&&"CheckBox"!==c.type||c.allowedSizes===e.RibbonItemSize.Medium){if(("Column"===n&&a.length>1||"Row"===n&&r.length>1)&&c.allowedSizes&e.RibbonItemSize.Large){var p=c.allowedSizes&(e.RibbonItemSize.Small|e.RibbonItemSize.Medium);p=p||e.RibbonItemSize.Medium,c.setProperties({allowedSizes:p},!0)}}else c.setProperties({allowedSizes:e.RibbonItemSize.Medium},!0);var u=c.allowedSizes&e.RibbonItemSize.Large?e.RibbonItemSize.Large:c.allowedSizes&e.RibbonItemSize.Medium?e.RibbonItemSize.Medium:e.RibbonItemSize.Small;c.setProperties({activeSize:u},!0)}},s.prototype.createCollection=function(e,o,i,r,n,s,a){for(var l=[],c=0;c<e.length;c++){var p=e[parseInt(c.toString(),10)],u=this.createElement("div",{className:p.cssClass,id:p.id});u.classList.add(st),u.classList.add("Column"!==o||"Simplified"===this.activeLayout?ct:lt),l.push(u);var d=this.createItems(p.items,o,i,r,n,s,a);if(t.append(d,u),"Row"===o&&2===c)break}return l},s.prototype.createRibbonItem=function(e,t){switch(e.type){case"Button":this.ribbonButtonModule.createButton(e,t);break;case"DropDown":this.ribbonDropDownModule.createDropDown(e,t);break;case"SplitButton":this.ribbonSplitButtonModule.createSplitButton(e,t);break;case"CheckBox":this.ribbonCheckBoxModule.createCheckBox(e,t);break;case"ColorPicker":this.ribbonColorPickerModule.createColorPicker(e,t);break;case"ComboBox":this.ribbonComboBoxModule.createComboBox(e,t);break;case"Template":this.createTemplateContent(e,t);break;case"GroupButton":this.ribbonGroupButtonModule.createGroupButton(e,t)}},s.prototype.createItems=function(t,o,i,r,n,s,a){for(var l,c=[],p=0;p<t.length;p++){for(var u=t[parseInt(p.toString(),10)],d=!0;d&&("Simplified"===this.activeLayout&&!(u.displayOptions&(e.DisplayMode.Simplified|e.DisplayMode.Overflow))||"Classic"===this.activeLayout&&!(u.displayOptions&e.DisplayMode.Classic));)++p<t.length?u=t[parseInt(p.toString(),10)]:d=!1;if(!d)break;var h=this.createElement("div",{className:u.cssClass,id:u.id+jt});(l=h.classList).add.apply(l,[at].concat(u.disabled?[we]:[])),u.ribbonTooltipSettings&&y(u.ribbonTooltipSettings)&&(h.classList.add(yt),this.tooltipData.push({id:h.id,data:u.ribbonTooltipSettings}));var b=u.activeSize;"Simplified"===this.activeLayout&&(b=u.allowedSizes===e.RibbonItemSize.Large||u.allowedSizes&e.RibbonItemSize.Medium||u.displayOptions===e.DisplayMode.Overflow?e.RibbonItemSize.Medium:e.RibbonItemSize.Small,u.setProperties({activeSize:b},!0)),b&e.RibbonItemSize.Large?h.classList.add(pt,ht):h.classList.add(b&e.RibbonItemSize.Medium?ut:dt);var f=this.initialPropsData[parseInt(s.toString(),10)];if(f&&f.hiddenItems&&f.hiddenItems.length){-1!==f.hiddenItems.indexOf(u.id)&&h.classList.add("e-hidden")}if(this.createRibbonItem(u,h),"Simplified"!==this.activeLayout||u.displayOptions!==e.DisplayMode.Overflow&&u.displayOptions!==(e.DisplayMode.Classic|e.DisplayMode.Overflow)?c.push(h):(this.createOverflowPopup(u,s,n,i,r,h,a),u.type!==e.RibbonItemType.DropDown&&u.type!==e.RibbonItemType.SplitButton&&u.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(u,h,n,!0)),"Column"===o&&2===p)break}return c},s.prototype.createHelpPaneTemplate=function(){if(this.helpPaneTemplate){var e="helpPaneTemplate";this.clearTemplate([e]),this.ribbonTempEle=this.createElement("div",{className:ft,id:this.element.id+Ut});var o=c(this.helpPaneTemplate);t.append(o({},this,e,"helpPaneTemplate",this.isStringTemplate),this.ribbonTempEle);var i=this.tabObj.element;i.querySelector(".e-toolbar").after(this.ribbonTempEle),i.style.setProperty(Xt,this.ribbonTempEle.offsetWidth+"px"),this.renderReactTemplates()}},s.prototype.createTemplateContent=function(e,t){var o=this.createElement("div",{className:e.cssClass?bt+" "+e.cssClass:bt,id:e.id});e.disabled&&(o.classList.add(we),o.setAttribute("disabled","")),t.appendChild(o),this.renderItemTemplate(e,o)},s.prototype.renderItemTemplate=function(o,i){var r="ribbon"+o.id+"itemTemplate";this.clearTemplate([r]);var n=c(o.itemTemplate);t.append(n({activeSize:e.RibbonItemSize[o.activeSize]},this,r,o.id+"itemTemplate",this.isStringTemplate),i),this.renderReactTemplates()},s.prototype.checkID=function(e,t,o){for(var i="tab"===t?"_tab":"group"===t?"_group":"collection"===t?"_collection":"_item",r=0;r<e.length;r++){var n=e[parseInt(r.toString(),10)];switch(n.id||n.setProperties({id:o+i+this.idIndex++},!0),t){case"tab":n.setProperties({groups:this.checkID(n.groups,"group",n.id)},!0);break;case"group":n.setProperties({collections:this.checkID(n.collections,"collection",n.id)},!0);break;case"collection":n.setProperties({items:this.checkID(n.items,"item",n.id)},!0)}}return e},s.prototype.updateCommonProperty=function(o){this.tabObj.setProperties(o),this.ribbonFileMenuModule&&this.ribbonFileMenuModule.setCommonProperties(o),this.ribbonBackstageModule&&this.ribbonBackstageModule.setCommonProperties(o);for(var i=0;i<this.tabs.length;i++){var n=this.tabs[parseInt(i.toString(),10)],s=this.tabObj.items[parseInt(i.toString(),10)].content;if(s.querySelector("."+Fe))for(var a=0,l=n.groups;a<l.length;a++){var c=l[a],p=void 0,u=void 0;this.activeLayout===e.RibbonLayout.Classic?p=c.isCollapsed?s.querySelector("#"+c.id+At+Nt):null:(u=(p=c.enableGroupOverflow?s.querySelector("#"+c.id+xt):null)?t.getComponent(p,r.DropDownButton):this.overflowDDB)&&(I(u.target,o),u.setProperties(o));for(var d=0,h=c.collections;d<h.length;d++)for(var f=0,m=h[d].items;f<m.length;f++){var y=m[f],v=null;if(this.activeLayout===e.RibbonLayout.Classic?y.displayOptions&e.DisplayMode.Classic&&(v=p?this.ribbonDropDownModule.getDDBItemElement(p,y.id):y.type===e.RibbonItemType.GroupButton?s.querySelector("#"+y.id+Vt):s.querySelector("#"+y.id)):(v=y.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+y.id):null)||(v=u.target.querySelector("#"+y.id),"DropDown"===y.type&&this.updatePopupItems(y,u.target,c.enableGroupOverflow,!0)),v){var g=this.getItemModuleName(y);if("template"!==g)if("group-btn"===g&&"Classic"===this.activeLayout)for(var S=0;S<y.groupButtonSettings.items.length;S++){b(v.querySelector("#"+y.id+Vt+S),"btn",o)}else if("group-btn"===g&&"Simplified"===this.activeLayout){b(v,"dropdown-btn",o);for(var C=0;C<y.groupButtonSettings.items.length;C++){b(document.querySelector("#"+y.id+Vt+C),"btn",o)}}else b(v,g,o);else t.isNullOrUndefined(o.enableRtl)||v.classList.toggle(De,o.enableRtl)}}}}},s.prototype.removeLauncherIcon=function(e,o,i){var r=e+jt,n=o?this.ribbonDropDownModule.getDDBItemElement(o,r):i.querySelector("#"+r);if(n){n.classList.remove(it);var s=n.querySelector("#"+e+qt);t.remove(s)}},s.prototype.destroyTabItems=function(o){for(var i=0;i<o.length;i++)for(var n=o[parseInt(i.toString(),10)],s=this.tabObj.items[parseInt(i.toString(),10)].content,a=0,l=n.groups;a<l.length;a++){var c=l[a],p=void 0,u=void 0;this.activeLayout===e.RibbonLayout.Classic?(p=c.isCollapsed?s.querySelector("#"+c.id+At+Nt):null,c.showLauncherIcon&&this.removeLauncherIcon(c.id,p,s)):u=(p=c.enableGroupOverflow?s.querySelector("#"+c.id+xt):null)?t.getComponent(p,r.DropDownButton):this.overflowDDB;for(var d=0,h=c.collections;d<h.length;d++)for(var b=0,f=h[d].items;b<f.length;b++){var m=f[b],y=void 0;this.activeLayout===e.RibbonLayout.Classic?m.displayOptions&e.DisplayMode.Classic&&(y=p?this.ribbonDropDownModule.getDDBItemElement(p,m.id):s.querySelector("#"+m.id),m.type===e.RibbonItemType.GroupButton&&(y=p?this.ribbonDropDownModule.getDDBItemElement(p,m.id+Vt):s.querySelector("#"+m.id+Vt))):(y=m.displayOptions&e.DisplayMode.Simplified?s.querySelector("#"+m.id):null)||(y=u?u.target.querySelector("#"+m.id):null),y&&this.destroyFunction(m,y)}this.activeLayout===e.RibbonLayout.Classic&&p?this.ribbonDropDownModule.removeOverFlowDropDown(p):this.activeLayout===e.RibbonLayout.Simplified&&c.enableGroupOverflow&&p&&this.removeOverflowButton(u)}this.overflowDDB&&(this.removeOverflowButton(this.overflowDDB),this.overflowDDB=null)},s.prototype.destroyFunction=function(e,t){var o=this.getItemModuleName(e);if("colorpicker"===o)this.ribbonColorPickerModule.unwireColorPickerEvents(t);else if("group-btn"===o){if("Classic"===this.activeLayout)for(var i=0;i<e.groupButtonSettings.items.length;i++){var r=t.querySelector("#"+e.id+Vt+i);r&&h(r,"btn")}else this.ribbonGroupButtonModule.destroyDropDown(e);var n=function(t){if(e.groupButtonSettings.items[parseInt(t.toString(),10)].ribbonTooltipSettings){var o=e.id+Vt+t,i=l(s.tooltipData,function(e){return e.id===o});-1!==i&&s.tooltipData.splice(i,1)}},s=this;for(i=0;i<e.groupButtonSettings.items.length;i++)n(i)}else"template"!==o&&h(t,o);if(e.ribbonTooltipSettings){var a=l(this.tooltipData,function(t){return t.id===e.id+jt});-1!==a&&this.tooltipData.splice(a,1)}"GroupButton"===e.type&&this.ribbonGroupButtonModule.destroyDropDown(e)},s.prototype.getItemModuleName=function(e){switch(e.type){case"Button":return"btn";case"DropDown":return"dropdown-btn";case"SplitButton":return"split-btn";case"CheckBox":return"checkbox";case"ColorPicker":return"colorpicker";case"ComboBox":return"combobox";case"GroupButton":return"group-btn";default:return"template"}},s.prototype.clearOverflowResize=function(){this.destroyScroll(),this.clearOverflowDropDown(this.selectedTab);for(var e=this.tabs[this.selectedTab],t=this.tabObj.element.querySelector("#"+this.tabs[this.selectedTab].id+zt),o=t.closest("."+He),i=0;i<e.groups.length;i++)this.checkSmallToMedium(this.selectedTab,e,i,o,t,!0,!0),this.checkMediumToLarge(this.selectedTab,e,i,o,t,!0,!0)},s.prototype.refreshLayout=function(){this.resizeHandler()},s.prototype.selectTab=function(e){var t=l(this.tabs,function(t){return t.id===e});this.setProperties({selectedTab:t})},s.prototype.showTab=function(e){this.showHideTab(e,!1)},s.prototype.hideTab=function(e){this.showHideTab(e,!0)},s.prototype.showHideTab=function(e,t){var o=l(this.tabs,function(t){return t.id===e});-1!==o&&this.tabObj.hideTab(o,t)},s.prototype.enableTab=function(e){this.enableDisableTab(e,!0)},s.prototype.disableTab=function(e){this.enableDisableTab(e,!1)},s.prototype.enableDisableTab=function(e,t){var o=l(this.tabs,function(t){return t.id===e});-1!==o&&this.tabObj.enableTab(o,t)},s.prototype.addTab=function(e,t,o){var i=t?l(this.tabs,function(e){return e.id===t}):-1;i=-1===i?this.tabs.length:i+(o?1:0),this.tabsInternal=this.tabs.slice(),this.tabsInternal.splice(i,0,e),this.setProperties({tabs:this.tabsInternal},!0),this.checkID([this.tabs[parseInt(i.toString(),10)]],"tab",this.element.id),this.tabsInternal=this.tabs.slice(),this.validateItemSize();var r=this.createTabItems([e]);this.tabObj.addTab(r,i)},s.prototype.removeTab=function(t){var o=l(this.tabs,function(e){return e.id===t});if(-1!==o){var i=this.tabObj.items[parseInt(o.toString(),10)].content,r=this.tabs[parseInt(o.toString(),10)].groups;if(r&&""!==i.innerHTML)for(var n=0,s=r;n<s.length;n++){for(var a=s[n],c=a.isCollapsed?i.querySelector("#"+a.id+At+Nt):null,p=0,u=a.collections;p<u.length;p++)for(var d=0,h=u[p].items;d<h.length;d++){var b=h[d],f=c?this.ribbonDropDownModule.getDDBItemElement(c,b.id):i.querySelector("#"+b.id);b.type===e.RibbonItemType.GroupButton&&"Classic"===this.activeLayout&&(f=c?this.ribbonDropDownModule.getDDBItemElement(c,b.id+Vt):i.querySelector("#"+b.id+Vt)),f&&this.destroyFunction(b,f)}c&&this.ribbonDropDownModule.removeOverFlowDropDown(c)}o===this.selectedTab&&(this.isAddRemove=!0),this.tabsInternal=this.tabs.slice(),this.tabsInternal.splice(o,1),this.setProperties({tabs:this.tabsInternal},!0),this.tabObj.removeTab(o)}},s.prototype.addGroup=function(e,t,o,i){var r=l(this.tabs,function(t){return t.id===e});if(-1!==r){this.selectedTab===r&&this.clearOverflowResize();var n=this.tabs[parseInt(r.toString(),10)],s=n.groups.slice(),a=o?l(s,function(e){return e.id===o}):-1;a=-1===a?s.length:a+(i?1:0),s.splice(a,0,t),n.setProperties({groups:s},!0),this.checkID([n.groups[parseInt(a.toString(),10)]],"group",e),this.validateItemSize();var c=this.tabObj.items[parseInt(r.toString(),10)].content;if(""!==c.innerHTML){var p=this.createGroups([n.groups[parseInt(a.toString(),10)]],r)[0],u=o?c.querySelector("#"+o):null;u?u.insertAdjacentElement(i?"afterend":"beforebegin",p):c.append(p)}this.selectedTab===r&&this.refreshLayout()}},s.prototype.removeGroup=function(o){var i=d(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;i.group.showLauncherIcon&&this.removeLauncherIcon(i.group.id,null,n),this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);for(var l=0,c=i.group.collections;l<c.length;l++)for(var p=0,u=c[l].items;p<u.length;p++){var h=u[p];this.removeItemElement(n,h,a)}if(this.activeLayout===e.RibbonLayout.Simplified)if(i.group.enableGroupOverflow)0===a.target.childElementCount&&this.removeOverflowButton(a);else{var b=a.target.querySelector("#"+i.group.id+jt);b&&1===b.childElementCount&&b.remove();var f=a.target.querySelector("#"+this.tabs[parseInt(i.tabIndex.toString(),10)].id+At);f&&0===f.childElementCount&&f.remove()}var m=n.querySelector("#"+o);m&&m.remove()}var y=this.tabs[i.tabIndex].groups.slice();y.splice(i.groupIndex,1),this.tabs[i.tabIndex].setProperties({groups:y},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.hideGroup=function(e){this.showHideGroup(e,!0)},s.prototype.showGroup=function(e){this.showHideGroup(e,!1)},s.prototype.showHideGroup=function(e,o){var i,n=d(this.tabs,e);if(n){var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+e);if(a?o?a.classList.add("e-hidden"):a.classList.remove("e-hidden"):this.updateInitialProps(n.tabIndex,e,"hiddenGroups",o),this.overflowDDB){var l=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);if(n.group.enableGroupOverflow){var c=s.querySelector("#"+e+xt);c&&(i=t.getInstance(c,r.DropDownButton).target),i&&(o?i.classList.add("e-hidden"):i.classList.remove("e-hidden"))}else if(l){var p=l.querySelector("#"+e+jt);p&&(o?p.classList.add("e-hidden"):p.classList.remove("e-hidden"))}}this.refreshLayout()}},s.prototype.disableGroup=function(e){this.enableDisableGroup(e,!0)},s.prototype.enableGroup=function(e){this.enableDisableGroup(e,!1)},s.prototype.enableDisableGroup=function(e,o){var i,n=d(this.tabs,e);if(n){var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+e);if(a?o?a.classList.add("e-disabled"):a.classList.remove("e-disabled"):this.updateInitialProps(n.tabIndex,e,"disabledGroups",o),this.overflowDDB){var l=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);if(n.group.enableGroupOverflow){var c=s.querySelector("#"+e+xt);c&&(i=t.getInstance(c,r.DropDownButton).target),i&&(o?i.classList.add("e-disabled"):i.classList.remove("e-disabled"))}else if(l){var p=l.querySelector("#"+e+jt);p&&(o?p.classList.add("e-disabled"):p.classList.remove("e-disabled"))}}}},s.prototype.addCollection=function(e,t,o,i){var r=d(this.tabs,e);if(r&&("Row"!==r.group.orientation||3!==r.group.collections.length)){this.selectedTab===r.tabIndex&&this.clearOverflowResize();var n=r.group.collections.slice(),s=o?l(n,function(e){return e.id===o}):-1;s=-1===s?n.length:s+(i?1:0),n.splice(s,0,t),r.group.setProperties({collections:n},!0),this.checkID([r.group.collections[parseInt(s.toString(),10)]],"collection",e),this.validateItemSize();var a=this.tabObj.items[r.tabIndex].content;if(""!==a.innerHTML){var c=r.group.collections[parseInt(s.toString(),10)],p=this.createCollection([c],r.group.orientation,r.group.id,r.group.header,r.group.enableGroupOverflow,r.tabIndex)[0];r.group.isCollapsed&&(a=this.ribbonDropDownModule.getOverflowDropDownPopup(r,a));var u=o?a.querySelector("#"+o):null;u?u.insertAdjacentElement(i?"afterend":"beforebegin",p):a.querySelector("#"+e+zt).append(p)}this.selectedTab===r.tabIndex&&this.refreshLayout()}},s.prototype.removeCollection=function(o){var i=u(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);for(var l=0,c=i.collection.items;l<c.length;l++){var p=c[l];this.removeItemElement(n,p,a)}var d=n.querySelector("#"+o);d&&d.remove()}var h=i.group,b=h.collections.slice();b.splice(i.collectionIndex,1),h.setProperties({collections:b},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.addItem=function(e,t,o,i){var r=u(this.tabs,e);if(r&&("Column"!==r.group.orientation||3!==r.collection.items.length)){this.selectedTab===r.tabIndex&&this.clearOverflowResize();var n=r.collection.items.slice(),s=o?l(n,function(e){return e.id===o}):-1;s=-1===s?n.length:s+(i?1:0),n.splice(s,0,t),r.collection.setProperties({items:n},!0),this.checkID([r.collection.items[parseInt(s.toString(),10)]],"item",e),this.validateItemSize();var a=this.tabObj.items[r.tabIndex].content,c=a.querySelector("#"+r.group.id+jt);if(""!==a.innerHTML){var p=r.collection.items[parseInt(s.toString(),10)],d=this.createItems([p],r.group.orientation,r.group.id,r.group.header,r.group.enableGroupOverflow,r.tabIndex,c)[0];r.group.isCollapsed&&(a=this.ribbonDropDownModule.getOverflowDropDownPopup(r,a));var h=o?a.querySelector("#"+o):null;h?h.closest("."+at).insertAdjacentElement(i?"afterend":"beforebegin",d):d&&a.querySelector("#"+e).append(d)}this.selectedTab===r.tabIndex&&this.refreshLayout()}},s.prototype.removeItem=function(o){var i=p(this.tabs,o);if(i){this.selectedTab===i.tabIndex&&this.clearOverflowResize();var n=this.tabObj.items[i.tabIndex].content;if(""!==n.innerHTML){var s=void 0,a=void 0;this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=i.group.enableGroupOverflow?n.querySelector("#"+i.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB);var l=i.item;this.removeItemElement(n,l,a)}var c=i.collection,u=c.items;u.splice(i.itemIndex,1),c.setProperties({items:u},!0),this.selectedTab===i.tabIndex&&this.refreshLayout()}},s.prototype.hideItem=function(e){this.showHideItem(e,!0)},s.prototype.showItem=function(e){this.showHideItem(e,!1)},s.prototype.showHideItem=function(e,o){var i=p(this.tabs,e);if(i){var r;if(r="GroupButton"===i.item.type?m(this,e+Vt,i):m(this,e,i)){var n=t.closest(r,".e-ribbon-item");o?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),this.checkHiddenItems(i.group,o,i.tabIndex),this.refreshLayout()}else this.updateInitialProps(i.tabIndex,e,"hiddenItems",o)}},s.prototype.updateInitialProps=function(e,t,o,i){var r=this.initialPropsData[parseInt(e.toString(),10)];if(r||(this.initialPropsData[parseInt(e.toString(),10)]={},r=this.initialPropsData[parseInt(e.toString(),10)]),r){r[o]||(r[o]=[]);var n=r[o].indexOf(t);i?-1===n&&r[o].push(t):(-1!==n&&r[o].splice(n,1),0===r[o].length&&delete r[o],0===Object.keys(r).length&&delete this.initialPropsData[parseInt(e.toString(),10)])}},s.prototype.checkHiddenItems=function(e,t,o){var i,r=!0,n=this.tabObj.items[parseInt(o.toString(),10)].content,s=n.querySelector("#"+e.id);if(t){for(var a=0;a<e.collections.length;a++)if(r)for(var l=e.collections[parseInt(a.toString(),10)],c=0;c<l.items.length;c++){var u=l.items[parseInt(c.toString(),10)],d=void 0;if("GroupButton"===u.type){var h=p(this.tabs,u.id);d=m(this,u.id+Vt,h)}else d=m(this,u.id);if(!(d?d.closest(".e-ribbon-item"):null).classList.contains("e-hidden")){r=!1;break}}r&&(s.classList.add("e-hide-group"),this.checkOverflowItems(t,n,e.enableGroupOverflow,o,e.id))}else s.classList.remove("e-hide-group"),this.checkOverflowItems(t,n,e.enableGroupOverflow,o,e.id);if("Simplified"===this.activeLayout&&!e.enableGroupOverflow){var b=s.querySelectorAll("."+at);b&&(i=this.checkEmptyCollection(b),s.classList[i?"add":"remove"]("e-ribbon-emptyCollection"))}},s.prototype.checkOverflowItems=function(e,o,i,n,s){var a;if(i){var l=o.querySelector("#"+s+xt);l&&(a=t.getInstance(l,r.DropDownButton).target),a&&(e?a.classList.add("e-hide-group"):a.classList.remove("e-hide-group"))}else if(this.overflowDDB){var c=this.overflowDDB.target.querySelector("#"+this.tabs[parseInt(n.toString(),10)].id+At);if(c){var p=c.querySelector("#"+s+jt);p&&(e?p.classList.add("e-hide-group"):p.classList.remove("e-hide-group"))}}},s.prototype.updateTab=function(o){var i=o.id,r=l(this.tabs,function(e){return e.id===i});if(-1!==r){var n=this.tabObj.items[parseInt(r.toString(),10)].content,s=this.tabs[parseInt(r.toString(),10)].groups,a=this.tabObj.element;if(s&&""!==n.innerHTML&&(o.cssClass&&this.tabs[parseInt(r.toString(),10)].cssClass&&(n.classList.remove(this.tabs[parseInt(r.toString(),10)].cssClass),a.querySelector(".e-active").classList.remove(this.tabs[parseInt(r.toString(),10)].cssClass)),o.groups)){for(var c=0,p=s;c<p.length;c++){for(var u=p[c],d=u.isCollapsed?n.querySelector("#"+u.id+At+Nt):null,h=0,b=u.collections;h<b.length;h++)for(var f=0,m=b[h].items;f<m.length;f++){var y=m[f],v=d?this.ribbonDropDownModule.getDDBItemElement(d,y.id):n.querySelector("#"+y.id);y.type===e.RibbonItemType.GroupButton&&"Classic"===this.activeLayout&&(v=d?this.ribbonDropDownModule.getDDBItemElement(d,y.id+Vt):n.querySelector("#"+y.id+Vt)),v&&this.destroyFunction(y,v)}d&&this.ribbonDropDownModule.removeOverFlowDropDown(d)}n.querySelectorAll(".e-ribbon-group").forEach(function(e){e.remove()})}r===this.selectedTab&&(this.isAddRemove=!0);var g=this.tabs[parseInt(r.toString(),10)];if(g.setProperties(o,!0),this.setProperties({groups:this.checkID(g.groups,"group",g.id)},!0),this.validateItemSize(),""===n.innerHTML){if(o.groups){var S=this.createGroups(g.groups,r);t.append(S,n)}this.selectedTab===r&&this.refreshLayout(),o.cssClass&&(n.classList.add(g.cssClass),a.querySelector(".e-active").classList.add(g.cssClass)),o.header&&(a.querySelector("#"+i+_t).innerText=g.header)}}},s.prototype.updateGroup=function(o){var i=o.id,n=d(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s,a,l=this.tabObj.items[n.tabIndex].content,c=l.querySelector("#"+i),p=c.querySelector("#"+o.id+jt);if(""!==l.innerHTML){if(n.group.showLauncherIcon&&this.removeLauncherIcon(n.group.id,null,l),this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=n.group.enableGroupOverflow?l.querySelector("#"+n.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB),o.cssClass&&n.group.cssClass&&(c.classList.remove(n.group.cssClass),p&&p.classList.remove(n.group.cssClass)),(o.collections||o.orientation)&&(n.group.collections||n.group.orientation)){for(var u=0,h=n.group.collections;u<h.length;u++)for(var b=0,f=h[u].items;b<f.length;b++){var m=f[b];this.removeItemElement(l,m,a)}if(c.querySelectorAll(".e-ribbon-collection").forEach(function(e){e.remove()}),o.orientation){var y=(I=p.querySelector(".e-ribbon-group-content")).classList.value.match(/(e-ribbon-[column|row]+)/g);y&&t.removeClass([I],y)}}if(this.activeLayout===e.RibbonLayout.Simplified)if(n.group.enableGroupOverflow)0===a.target.childElementCount&&this.removeOverflowButton(a);else{var v=a.target.querySelector("#"+n.group.id+jt);v&&1===v.childElementCount&&v.remove();var g=a.target.querySelector("#"+this.tabs[parseInt(n.tabIndex.toString(),10)].id+At);g&&0===g.childElementCount&&g.remove()}}var S=n.group;if(S.setProperties(o,!0),S.setProperties({collections:this.checkID(S.collections,"collection",S.id)},!0),this.validateItemSize(),""!==l.innerHTML){if(o.showLauncherIcon&&this.createLauncherIcon(S.id,p),o.collections||o.orientation){var I;(I=p.querySelector(".e-ribbon-group-content")).classList.add("Column"===S.orientation||"Simplified"===this.activeLayout?ct:lt);var C=this.createCollection(S.collections,S.orientation,S.id,S.header,S.enableGroupOverflow,n.tabIndex,p);t.append(C,I)}if(this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&(c.classList.add(S.cssClass),p&&p.classList.add(S.cssClass)),o.header)if(this.activeLayout!==e.RibbonLayout.Simplified||o.enableGroupOverflow)if(this.activeLayout!==e.RibbonLayout.Classic||S.isCollapsed){if(this.activeLayout===e.RibbonLayout.Classic&&S.isCollapsed){var O=c.querySelector("#"+S.id+At+Nt);(B=t.getInstance(O,r.DropDownButton).target.querySelector("#"+o.id+_t))&&(B.innerText=S.header)}}else c.querySelector(".e-ribbon-group-header").innerText=S.header;else{var B;(B=a.target.querySelector("#"+o.id+_t))&&(B.innerText=S.header)}}}},s.prototype.updateCollection=function(o){var i=o.id,n=u(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s=this.tabObj.items[n.tabIndex].content,a=s.querySelector("#"+i);if(""!==s.innerHTML){var l=void 0,c=void 0;if(this.activeLayout===e.RibbonLayout.Simplified&&(c=(l=n.group.enableGroupOverflow?s.querySelector("#"+n.group.id+xt):null)?t.getComponent(l,r.DropDownButton):this.overflowDDB),o.cssClass&&n.collection.cssClass&&a.classList.remove(n.collection.cssClass),o.items&&n.collection.items)for(var p=0,d=n.collection.items;p<d.length;p++){var h=d[p];this.removeItemElement(s,h,c)}}var b=n.collection;if(b.setProperties(o,!0),b.setProperties({items:this.checkID(b.items,"item",b.id)},!0),this.validateItemSize(),""!==s.innerHTML&&o.items){var f=s.querySelector("#"+n.group.id+jt),m=this.createItems(b.items,n.group.orientation,n.group.id,n.group.header,n.group.enableGroupOverflow,n.tabIndex,f);t.append(m,a)}this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&a.classList.add(b.cssClass)}},s.prototype.updateItem=function(o){var i=o.id,n=p(this.tabs,i);if(n){this.selectedTab===n.tabIndex&&this.clearOverflowResize();var s,a,l=this.tabObj.items[n.tabIndex].content,c=l.querySelector("#"+n.group.id).querySelector("#"+n.group.id+jt),u=null,d=null;if(""!==l.innerHTML){if(this.activeLayout===e.RibbonLayout.Simplified&&(a=(s=n.group.enableGroupOverflow?l.querySelector("#"+n.group.id+xt):null)?t.getComponent(s,r.DropDownButton):this.overflowDDB),this.activeLayout===e.RibbonLayout.Simplified&&n.item.displayOptions===e.DisplayMode.Overflow){if(u=a.target.querySelector("#"+i+jt),d=a.target.querySelector("#"+i),o.displayOptions&&o.displayOptions!==e.DisplayMode.Overflow){var h=c.querySelector("#"+n.collection.id);h&&h.appendChild(u)}}else u=c.querySelector("#"+i+jt),d=l.querySelector("#"+i),"GroupButton"===n.item.type&&this.activeLayout===e.RibbonLayout.Classic&&(d=l.querySelector("#"+i+Vt)),this.activeLayout===e.RibbonLayout.Simplified&&o.displayOptions===e.DisplayMode.Overflow&&(this.createOverflowPopup(n.item,n.tabIndex,n.group.enableGroupOverflow,n.group.id,n.group.header,u,c),n.item.type!==e.RibbonItemType.DropDown&&n.item.type!==e.RibbonItemType.SplitButton&&o.type!==e.RibbonItemType.GroupButton||this.updatePopupItems(n.item,u,n.group.enableGroupOverflow,!0));o.cssClass&&n.item.cssClass&&u.classList.remove(n.item.cssClass),this.destroyFunction(n.item,d),d.remove();var b=u.classList.value.match(/(e-ribbon-[large|medium|small]+-item)/g);b&&t.removeClass([u],b)}var f=n.item;if(f.setProperties(o,!0),this.validateItemSize(),""!==l.innerHTML){u=this.activeLayout!==e.RibbonLayout.Simplified||f.displayOptions!==e.DisplayMode.Overflow?c.querySelector("#"+i+jt):a.target.querySelector("#"+i+jt),f.ribbonTooltipSettings&&y(f.ribbonTooltipSettings)&&(u.classList.add(yt),this.tooltipData.push({id:u.id,data:f.ribbonTooltipSettings}));var m=f.activeSize;"Simplified"===this.activeLayout&&(m=f.allowedSizes===e.RibbonItemSize.Large||f.allowedSizes&e.RibbonItemSize.Medium||f.displayOptions===e.DisplayMode.Overflow?e.RibbonItemSize.Medium:e.RibbonItemSize.Small,f.setProperties({activeSize:m},!0)),m&e.RibbonItemSize.Large?u.classList.add(pt,ht):u.classList.add(m&e.RibbonItemSize.Medium?ut:dt),this.createRibbonItem(f,u),"Simplified"===this.activeLayout&&n.group.enableGroupOverflow&&0===a.target.childElementCount&&this.removeOverflowButton(a),this.selectedTab===n.tabIndex&&this.refreshLayout(),o.cssClass&&u.classList.add(f.cssClass),this.enableDisableItem(f.id,f.disabled)}}},s.prototype.removeItemElement=function(t,o,i){var r=null;this.activeLayout===e.RibbonLayout.Classic?(r=o.displayOptions&e.DisplayMode.Classic?t.querySelector("#"+o.id):null,"GroupButton"===o.type&&(r=o.displayOptions&e.DisplayMode.Classic?t.querySelector("#"+o.id+Vt):null)):(r=o.displayOptions&e.DisplayMode.Simplified?t.querySelector("#"+o.id):null)||(r=i.target.querySelector("#"+o.id)),r&&(this.destroyFunction(o,r),"GroupButton"===o.type&&this.activeLayout===e.RibbonLayout.Simplified?document.getElementById(o.id+jt).remove():r.closest("#"+o.id+jt).remove())},s.prototype.enableItem=function(e){this.enableDisableItem(e,!1)},s.prototype.disableItem=function(e){this.enableDisableItem(e,!0)},s.prototype.enableDisableItem=function(e,o){var i=p(this.tabs,e);if(i){i.item.setProperties({disabled:o},!0);var r;if(r="GroupButton"===i.item.type?m(this,e+Vt,i):m(this,e,i)){t.closest(r,".e-ribbon-item").classList.toggle(we,i.item.disabled);var n=this.getItemModuleName(i.item);if("template"!==n)if("group-btn"===n&&"Simplified"===this.activeLayout){f(r,"dropdown-btn",o);for(var s=0;s<i.item.groupButtonSettings.items.length;s++){f(document.querySelector("#"+e+Vt+s),"btn",o)}}else if("group-btn"===n&&"Classic"===this.activeLayout)for(s=0;s<i.item.groupButtonSettings.items.length;s++){f(r.querySelector("#"+e+Vt+s),"btn",o)}else f(r,n,o);else r.classList.toggle(we,o),r.toggleAttribute("disabled",o)}}},s.prototype.unwireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler)},s.prototype.destroy=function(){this.keyboardModuleRibbon.destroy(),this.keyboardModuleRibbon=null,S(this.element),this.destroyTabItems(this.tabs),this.hideLayoutSwitcher||this.removeExpandCollapse(),this.collapseButton=void 0,this.scrollModule&&this.scrollModule.destroy(),this.ribbonTempEle&&(t.remove(this.ribbonTempEle),this.ribbonTempEle=null),i.prototype.destroy.call(this),this.tabObj.destroy(),this.tabObj=void 0,this.initialPropsData={},t.remove(this.element.querySelector("#"+this.element.id+"_tab")),this.element.style.removeProperty(Kt),this.element.style.removeProperty(Xt),this.element.style.removeProperty("width"),this.cssClass&&t.removeClass([this.element],this.cssClass.split(" ")),this.element.classList.remove(De,Ot,Ge,ze,We,"e-rbn"),this.unwireEvents()},s.prototype.onPropertyChanged=function(e,o){for(var i,n,s=0,a=Object.keys(e);s<a.length;s++){switch(a[s]){case"activeLayout":this.switchLayout();break;case"cssClass":o.cssClass&&(i=this.element.classList).remove.apply(i,o.cssClass.split(" ")),e.cssClass&&(n=this.element.classList).add.apply(n,e.cssClass.split(" "));break;case"isMinimized":this.element.classList.toggle(We,this.isMinimized),this.tabObj.element.querySelector(".e-content").style.display=this.isMinimized?"none":"block",this.isMinimized||this.refreshLayout();break;case"locale":this.updateCommonProperty({locale:this.locale});break;case"enablePersistence":this.updateCommonProperty({enablePersistence:this.enablePersistence});break;case"enableRtl":this.element.classList.toggle(De,this.enableRtl),this.updateCommonProperty({enableRtl:e.enableRtl}),this.scrollModule&&this.scrollModule.setProperties({enableRtl:e.enableRtl});break;case"launcherIconCss":for(var l=0;l<this.tabs.length;l++){var c=this.tabObj.items[parseInt(l.toString(),10)].content,p=this.tabs[parseInt(l.toString(),10)];if(c.querySelector("."+Fe))for(var u=0,d=p.groups;u<d.length;u++){var h=d[u];if(h.showLauncherIcon){var b=rt+" "+(this.launcherIconCss||nt);if(h.isCollapsed){var f=c.querySelector("#"+h.id+At+Nt);t.getComponent(f,r.DropDownButton).target.querySelector("#"+h.id+qt).className=b}else{(f=c.querySelector("#"+h.id+qt)).className=b}}}}break;case"selectedTab":this.tabObj.setProperties({selectedItem:e.selectedTab});break;case"tabAnimation":this.tabObj.setProperties({animation:e.tabAnimation});break;case"tabs":this.reRenderTabs(e.tabs);break;case"width":this.element.style.width=t.formatUnit(e.width),this.refreshLayout();break;case"fileMenu":this.ribbonFileMenuModule&&this.ribbonFileMenuModule.updateFileMenu(this.fileMenu);this.tabObj.tbObj.refreshOverflow();break;case"backStageMenu":this.ribbonBackstageModule&&this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);this.tabObj.tbObj.refreshOverflow();break;case"helpPaneTemplate":this.ribbonTempEle&&(t.remove(this.ribbonTempEle),this.ribbonTempEle=null,this.tabObj.element.style.setProperty(Xt,"0px")),this.helpPaneTemplate&&this.createHelpPaneTemplate();this.tabObj.tbObj.refreshOverflow();break;case"hideLayoutSwitcher":this.hideLayoutSwitcher?this.removeExpandCollapse():this.addExpandCollapse()}}};var a;return io([t.Property("Classic")],s.prototype,"activeLayout",void 0),io([t.Property("")],s.prototype,"cssClass",void 0),io([t.Complex({},pe)],s.prototype,"fileMenu",void 0),io([t.Complex({},ge)],s.prototype,"backStageMenu",void 0),io([t.Property("")],s.prototype,"launcherIconCss",void 0),io([t.Property(!1)],s.prototype,"isMinimized",void 0),io([t.Property("en-us")],s.prototype,"locale",void 0),io([t.Property(0)],s.prototype,"selectedTab",void 0),io([t.Complex({},o.TabAnimationSettings)],s.prototype,"tabAnimation",void 0),io([t.Collection([],ae)],s.prototype,"tabs",void 0),io([t.Property("100%")],s.prototype,"width",void 0),io([t.Property("")],s.prototype,"helpPaneTemplate",void 0),io([t.Property(!1)],s.prototype,"hideLayoutSwitcher",void 0),io([t.Event()],s.prototype,"tabSelecting",void 0),io([t.Event()],s.prototype,"tabSelected",void 0),io([t.Event()],s.prototype,"ribbonExpanding",void 0),io([t.Event()],s.prototype,"ribbonCollapsing",void 0),io([t.Event()],s.prototype,"launcherIconClick",void 0),io([t.Event()],s.prototype,"created",void 0),io([t.Event()],s.prototype,"overflowPopupOpen",void 0),io([t.Event()],s.prototype,"overflowPopupClose",void 0),s=a=io([t.NotifyPropertyChanges],s)}(t.Component),no=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"ribbonFileMenu"},e.prototype.destroy=function(){this.fileMenuDDB&&this.destroyDDB(),this.parent=null},e.prototype.createFileMenu=function(e){var t=this;if(e.visible){this.ddbElement=this.parent.createElement("button",{id:this.parent.element.id+"_filemenu"});var o=this.parent.tabObj.element,i=o.querySelector(".e-toolbar");o.insertBefore(this.ddbElement,i),this.fileMenuDDB=new r.DropDownButton({content:e.text,enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-file-menu e-caret-hide",created:function(){o.style.setProperty(Kt,t.ddbElement.offsetWidth+"px")},beforeClose:this.ddbBeforeEvent.bind(this,!1),beforeOpen:this.ddbBeforeEvent.bind(this,!0),close:this.ddbAfterEvent.bind(this,!1),open:this.ddbAfterEvent.bind(this,!0)},this.ddbElement),this.parent.fileMenu.popupTemplate?this.fileMenuDDB.setProperties({target:this.parent.fileMenu.popupTemplate}):this.createRibbonMenu(e),this.parent.tabObj.refreshActiveTabBorder(),this.addFileMenuTooltip(e)}},e.prototype.addFileMenuTooltip=function(e){y(e.ribbonTooltipSettings)&&(this.ddbElement.classList.add(yt),this.parent.tooltipData.push({id:this.ddbElement.id,data:e.ribbonTooltipSettings}))},e.prototype.ddbBeforeEvent=function(e,t){!e&&t.event&&t.event.target.closest(".e-ribbon-menu")&&(t.cancel=!0);var o=e?this.parent.fileMenu.beforeOpen:this.parent.fileMenu.beforeClose;if(o){var i={cancel:t.cancel,element:t.element,event:t.event};o.call(this,i),t.cancel=i.cancel}},e.prototype.ddbAfterEvent=function(e,t){(e?this.fileMenuDDB.target:this.fileMenuDDB.element).focus();var o=e?this.parent.fileMenu.open:this.parent.fileMenu.close;if(o){var i={element:t.element};o.call(this,i)}},e.prototype.cloneMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];t.push({iconCss:i.iconCss,id:i.id,separator:i.separator,text:i.text,url:i.url,items:this.cloneMenuItem(i.items)})}return t},e.prototype.createRibbonMenu=function(e){var i=this,r=this.parent.createElement("ul",{id:this.parent.element.id+Wt});this.fileMenuDDB.setProperties({target:r}),this.menuctrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:"e-ribbon-menu",animationSettings:e.animationSettings,items:this.cloneMenuItem(e.menuItems),showItemOnClick:e.showItemOnClick,template:e.itemTemplate,beforeClose:this.menuBeforeEvent.bind(this,!1),beforeOpen:this.menuBeforeEvent.bind(this,!0),beforeItemRender:this.beforeItemRender.bind(this),onClose:this.menuAfterEvent.bind(this,!1),onOpen:this.menuAfterEvent.bind(this,!0),select:this.menuSelect.bind(this)},r),t.EventHandler.add(r,"keydown",function(e){"Tab"===e.key&&i.fileMenuDDB.toggle()},this)},e.prototype.menuBeforeEvent=function(e,t){var o=e?this.parent.fileMenu.beforeOpen:this.parent.fileMenu.beforeClose;if(o){var i={cancel:t.cancel,element:t.element,event:t.event,items:t.items,parentItem:t.parentItem};o.call(this,i),t.cancel=i.cancel}},e.prototype.menuAfterEvent=function(e,t){var o=e?this.parent.fileMenu.open:this.parent.fileMenu.close;if(o){var i={element:t.element,items:t.items,parentItem:t.parentItem};o.call(this,i)}},e.prototype.beforeItemRender=function(e){var t=this.parent.fileMenu.beforeItemRender;if(t){var o={element:e.element,item:e.item};t.call(this,o)}},e.prototype.menuSelect=function(e){var t=this.parent.fileMenu.select;if(t){var o={element:e.element,item:e.item,event:e.event};t.call(this,o),e.element.classList.contains("e-menu-caret-icon")||this.fileMenuDDB.toggle()}},e.prototype.setCommonProperties=function(e){this.fileMenuDDB&&(this.fileMenuDDB.setProperties(e),this.menuctrl&&this.menuctrl.setProperties(e))},e.prototype.updateFileMenu=function(e){e.visible?this.fileMenuDDB?(e.text&&(this.fileMenuDDB.setProperties({content:e.text}),this.parent.tabObj.element.style.setProperty(Kt,this.ddbElement.offsetWidth+"px")),e.popupTemplate?(this.menuctrl&&this.destroyMenu(),this.fileMenuDDB.setProperties({target:e.popupTemplate})):this.menuctrl?this.menuctrl.setProperties({animationSettings:e.animationSettings,items:this.cloneMenuItem(e.menuItems),showItemOnClick:e.showItemOnClick,template:e.itemTemplate}):this.createRibbonMenu(e),this.removeFileMenuTooltip(),this.addFileMenuTooltip(e)):this.createFileMenu(e):this.fileMenuDDB&&this.destroyDDB(),this.parent.tabObj.refreshActiveTabBorder()},e.prototype.destroyMenu=function(){this.menuctrl&&(this.menuctrl.destroy(),this.menuctrl=null)},e.prototype.destroyDDB=function(){this.removeFileMenuTooltip();this.parent.tabObj.element.style.removeProperty(Kt),this.destroyMenu(),this.fileMenuDDB.destroy(),this.fileMenuDDB=null,t.remove(this.ddbElement),this.ddbElement=null},e.prototype.removeFileMenuTooltip=function(){var e=this,t=l(this.parent.tooltipData,function(t){return t.id===e.ddbElement.id});-1!==t&&(this.ddbElement.classList.remove(yt),this.parent.tooltipData.splice(t,1))},e.prototype.addItems=function(e,t,o,i){o?this.menuctrl.insertAfter(e,t,i):this.menuctrl.insertBefore(e,t,i),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.removeItems=function(e,t){this.menuctrl.removeItems(e,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.enableItems=function(e,t){this.menuctrl.enableItems(e,!0,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.disableItems=function(e,t){this.menuctrl.enableItems(e,!1,t),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e.prototype.setItem=function(e,t,o){this.menuctrl.setItem(e,t,o),this.menuctrl.refresh(),this.parent.fileMenu.setProperties({menuItems:this.menuctrl.items},!0)},e}(),so=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),ao=function(e){function i(t){var o=e.call(this)||this;return o.parent=t,o}return so(i,e),i.prototype.render=function(){},i.prototype.preRender=function(){},i.prototype.getPersistData=function(){return""},i.prototype.onPropertyChanged=function(){},i.prototype.getModuleName=function(){return"ribbonBackstage"},i.prototype.destroy=function(){this.backstageButton&&this.destroyDDB(),this.parent=null},i.prototype.createBackStage=function(e){var o=this;if(e.visible){this.backstageButtonEle=this.parent.createElement("button",{id:this.parent.element.id+Gt});var i=this.parent.tabObj.element,r=i.querySelector(".e-toolbar");if(i.insertBefore(this.backstageButtonEle,r),this.backstageButton=new n.Button({content:e.text,enableRtl:this.parent.enableRtl,cssClass:Pt,created:function(){i.style.setProperty(Kt,o.backstageButtonEle.offsetWidth+"px")}},this.backstageButtonEle),this.createBackStagePopup(e),this.parent.backStageMenu.template)this.createBackStageTemplate(this.parent.backStageMenu.template);else{for(var s=0,a=0,l=0;l<e.items.length;l++){e.items[parseInt(l.toString(),10)].isFooter?s++:a++}a>0&&this.createBackstageMenu(e,!1),s>0&&this.createBackstageMenu(e,!0),this.menuCtrl&&this.checkMenuItems(this.menuCtrl.items),this.footerMenuCtrl&&this.checkMenuItems(this.footerMenuCtrl.items)}this.backstageButtonEle.onclick=function(t){t.stopPropagation(),o.showBackstage(),o.popupHTMLElement.classList.add(wt);var i=o.menuWrapper.querySelector(".e-menu-item.e-selected");i&&i.classList.remove("e-selected");for(var r=0;r<e.items.length;r++){var n=e.items[parseInt(r.toString(),10)];if(!n.isFooter&&o.menuCtrl.items[0].text===n.text){var s=o.popupHTMLElement.querySelector("#"+o.menuCtrl.items[0].id);s&&(s.classList.add("e-selected"),s.focus()),o.createBackStageContent(o.menuCtrl.items[0].id,n.content);break}}},this.parent.tabObj.refreshActiveTabBorder(),this.addBackStageMenuTooltip(e),t.EventHandler.add(document,"click",this.onClickEvent,this)}},i.prototype.onClickEvent=function(e){var t=e.target;this.popupHTMLElement.contains(t)||this.hideBackstage()},i.prototype.addBackStageMenuTooltip=function(e){y(e.ribbonTooltipSettings)&&(this.backstageButtonEle.classList.add(yt),this.parent.tooltipData.push({id:this.backstageButtonEle.id,data:e.ribbonTooltipSettings}))},i.prototype.checkMenuItems=function(e){for(var t=0;t<e.length;t++){var o=e[parseInt(t.toString(),10)];if(!o.iconCss){this.popupHTMLElement.querySelector("#"+o.id).classList.add("e-blankicon")}}},i.prototype.createBackStagePopup=function(e){var t=this;this.popupHTMLElement=this.parent.createElement("div",{id:this.parent.element.id+Ht,className:Bt});e.target?(e.target instanceof HTMLElement?e.target:document.querySelector(e.target)).appendChild(this.popupHTMLElement):this.parent.element.appendChild(this.popupHTMLElement),this.popupEle=new a.Popup(this.popupHTMLElement,{height:e.height,width:e.width,relateTo:e.target||this.parent.element,enableRtl:this.parent.enableRtl}),this.parent.enableRtl&&this.updatePopupPositionOnRtl(this.parent.enableRtl),this.popupHTMLElement.onkeydown=function(e){"Escape"===e.code&&t.hideBackstage()},this.hideBackstage()},i.prototype.updatePopupPositionOnRtl=function(e){var t=this.popupHTMLElement.style;e?(t.right=t.left,t.left="unset"):(t.left=t.right,t.right="unset")},i.prototype.createBackstageMenu=function(e,t){var i=this;if(this.popupHTMLElement.querySelector("#"+this.parent.element.id+"_wrapper")||(this.menuWrapper=this.parent.createElement("div",{id:this.parent.element.id+"_wrapper",className:kt}),this.popupHTMLElement.appendChild(this.menuWrapper)),e.backButton.visible&&!t){var r=this.parent.createElement("button",{id:this.parent.element.id+"_close",className:"e-ribbon-close-btn"});this.closeBtn=new n.Button({content:e.backButton.text,iconCss:e.backButton.iconCss?e.backButton.iconCss:Ce,enableRtl:this.parent.enableRtl},r),this.menuWrapper.append(r),r.onclick=function(){i.popupHTMLElement.classList.remove(wt),i.hideBackstage(),i.isBackButtonClicked=!0}}this.popupHTMLElement.querySelector("#"+this.parent.element.id+"_itemswrapper")||(this.itemsWrapperEle=this.parent.createElement("div",{id:this.parent.element.id+"_itemswrapper",className:Tt}),this.menuWrapper.append(this.itemsWrapperEle));var s;t?(s=this.parent.createElement("ul",{id:this.parent.element.id+Ft}),this.itemsWrapperEle.appendChild(s)):(this.ulMenuElem=this.parent.createElement("ul",{id:this.parent.element.id+"_menulist"}),this.itemsWrapperEle.appendChild(this.ulMenuElem)),t?this.footerMenuCtrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:Lt,items:this.cloneFooterMenuItem(e.items),select:this.menuSelect.bind(this,e)},s):this.menuCtrl=new o.Menu({orientation:"Vertical",enableRtl:this.parent.enableRtl,cssClass:Lt,items:this.cloneMenuItem(e.items),select:this.menuSelect.bind(this,e)},this.ulMenuElem)},i.prototype.cloneMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];i.isFooter||t.push({id:i.id,iconCss:i.iconCss,separator:i.separator,text:i.text})}return t},i.prototype.cloneFooterMenuItem=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[parseInt(o.toString(),10)];i.isFooter&&t.push({id:i.id,iconCss:i.iconCss,separator:i.separator,text:i.text})}return t},i.prototype.createBackStageContent=function(e,o){var i="backstageContent";this.clearTemplate([i]),this.backstageContentEle?(this.backstageContentEle.innerHTML="",this.backstageContentEle.id=e+zt):this.backstageContentEle=this.parent.createElement("div",{id:e+zt,className:Dt});var r=c(o);return t.append(r({},this,i,"backstageContent",this.parent.isStringTemplate),this.backstageContentEle),o&&this.popupHTMLElement.append(this.backstageContentEle),this.renderReactTemplates(),r},i.prototype.createBackStageTemplate=function(e){var o="backstageTemplate";this.clearTemplate([o]),this.backstageTempEle=this.parent.createElement("div",{id:this.parent.element.id+Gt+"_template",className:Rt});var i=c(e);return t.append(i({},this,o,"backstageTemplate",this.parent.isStringTemplate),this.backstageTempEle),this.popupHTMLElement.append(this.backstageTempEle),this.renderReactTemplates(),i},i.prototype.menuSelect=function(e,t){for(var o=0;o<e.items.length;o++){var i=e.items[parseInt(o.toString(),10)];if(i.text===t.item.text){this.contentItem=i;break}}this.createBackStageContent(t.item.id,this.contentItem.content);var r={cancel:!1,target:t.element,item:this.contentItem,isBackButton:this.isBackButtonClicked};this.contentItem.backStageItemClick&&this.contentItem.backStageItemClick.call(this,r)},i.prototype.setCommonProperties=function(e){this.backstageButton&&(this.backstageButton.setProperties(e),this.popupEle&&(this.popupEle.setProperties(e),this.popupHTMLElement&&this.updatePopupPositionOnRtl(e.enableRtl),this.menuCtrl&&(this.menuCtrl.setProperties(e),this.closeBtn&&this.closeBtn.setProperties(e))))},i.prototype.updateBackStageMenu=function(e){if(e.visible)if(this.backstageButton){if(e.text&&(this.backstageButton.setProperties({content:e.text}),this.parent.tabObj.element.style.setProperty(Kt,this.backstageButtonEle.offsetWidth+"px")),this.popupEle&&this.popupEle.setProperties({height:e.height,width:e.width,target:e.target||this.parent.element}),e.template)this.backstageTempEle&&(t.remove(this.backstageTempEle),this.backstageTempEle=null),this.createBackStageTemplate(e.template);else if(this.menuCtrl&&this.menuCtrl.setProperties({items:this.cloneMenuItem(e.items)}),this.footerMenuCtrl)this.footerMenuCtrl.setProperties({items:this.cloneFooterMenuItem(e.items)});else{for(var o=0,i=0,r=0;r<e.items.length;r++){e.items[parseInt(r.toString(),10)].isFooter?o++:i++}i>0&&this.createBackstageMenu(e,!1),o>0&&this.createBackstageMenu(e,!0)}this.removeBackstageMenuTooltip(),this.addBackStageMenuTooltip(e)}else this.createBackStage(e);else this.backstageButton&&this.destroyDDB();this.parent.tabObj.refreshActiveTabBorder()},i.prototype.destroyMenu=function(){this.menuCtrl&&(this.menuCtrl.destroy(),this.menuCtrl=null)},i.prototype.destroyDDB=function(){this.removeBackstageMenuTooltip();this.parent.tabObj.element.style.removeProperty(Kt),this.destroyMenu(),this.backstageButton.destroy(),this.backstageButton=null,t.remove(this.backstageButtonEle),this.backstageButtonEle=null,t.EventHandler.remove(document,"click",this.onClickEvent)},i.prototype.removeBackstageMenuTooltip=function(){var e=this,t=l(this.parent.tooltipData,function(t){return t.id===e.backstageButtonEle.id});-1!==t&&(this.backstageButtonEle.classList.remove(yt),this.parent.tooltipData.splice(t,1))},i.prototype.addBackstageItems=function(e,t,o,i){for(var r=0;r<e.length;r++){(a=e[parseInt(r.toString(),10)]).isFooter?o?this.footerMenuCtrl.insertAfter(e,t,i):this.footerMenuCtrl.insertBefore(e,t,i):o?this.menuCtrl.insertAfter(e,t,i):this.menuCtrl.insertBefore(e,t,i)}var n=[].concat(this.menuCtrl.items,this.footerMenuCtrl.items),s=this.parent.backStageMenu;for(r=0;r<s.items.length;r++)for(var a=s.items[parseInt(r.toString(),10)],l=0;l<n.length;l++){var c=n[parseInt(l.toString(),10)];if(a.text===c.text){c.content=a.content;break}}this.parent.backStageMenu.setProperties({items:n},!0)},i.prototype.removeBackstageItems=function(e,t){this.menuCtrl.removeItems(e,t),this.footerMenuCtrl.removeItems(e,t);var o=[].concat(this.menuCtrl.items,this.footerMenuCtrl.items);this.parent.backStageMenu.setProperties({items:o},!0)},i.prototype.showBackstage=function(){this.popupEle.show()},i.prototype.hideBackstage=function(){this.popupEle.element.classList.contains(wt)&&this.popupEle.element.classList.remove(wt),this.popupEle.hide()},i}(t.Component);e.Ribbon=ro,e.ITEM_VERTICAL_CENTER=Se,e.EXPAND_COLLAPSE_ICON=Ie,e.BACKSTAGE_CLOSE_ICON=Ce,e.OVERFLOW_ICON=Oe,e.VERTICAL_DDB=Be,e.DISABLED_CSS=we,e.RTL_CSS=De,e.RIBBON_HOVER=Pe,e.RIBBON_CONTROL=Le,e.RIBBON_POPUP_CONTROL=Re,e.RIBBON_POPUP_OPEN=ke,e.SPACE=" ",e.HORIZONTAL_SCROLLBAR=Te,e.HIDE_CSS=Ee,e.RIBBON_TAB="e-ribbon-tab",e.RIBBON_TAB_ACTIVE=Me,e.RIBBON_TAB_ITEM=xe,e.RIBBON_COLLAPSE_BUTTON=_e,e.RIBBON_EXPAND_BUTTON=qe,e.RIBBON_COLLAPSIBLE=ze,e.RIBBON_OVERALL_OF_BUTTON=je,e.RIBBON_GROUP_OF_BUTTON=Ae,e.RIBBON_OVERFLOW_TARGET=Ne,e.RIBBON_OVERFLOW=Ge,e.TAB_CONTENT=He,e.RIBBON_MINIMIZE=We,e.RIBBON_GROUP=Fe,e.RIBBON_SINGLE_BUTTON_SELECTION=Ue,e.RIBBON_MULTIPLE_BUTTON_SELECTION=Ve,e.RIBBON_GROUP_BUTTON=Ke,e.RIBBON_GROUP_BUTTON_OVERFLOW_POPUP=Xe,e.RIBBON_GROUP_CONTAINER=Ze,e.RIBBON_OF_TAB_CONTAINER=Ye,e.RIBBON_OF_GROUP_CONTAINER=Je,e.RIBBON_GROUP_CONTENT=Qe,e.RIBBON_GROUP_HEADER=$e,e.RIBBON_OVERFLOW_HEADER=et,e.RIBBON_GROUP_OVERFLOW=tt,e.RIBBON_GROUP_OVERFLOW_DDB=ot,e.RIBBON_LAUNCHER=it,e.RIBBON_LAUNCHER_ICON_ELE=rt,e.RIBBON_LAUNCHER_ICON=nt,e.RIBBON_COLLECTION=st,e.RIBBON_ITEM=at,e.RIBBON_ROW=lt,e.RIBBON_COLUMN=ct,e.RIBBON_LARGE_ITEM=pt,e.RIBBON_MEDIUM_ITEM=ut,e.RIBBON_SMALL_ITEM=dt,e.RIBBON_CONTENT_HEIGHT=ht,e.DROPDOWNBUTTON="e-dropdown-btn",e.DROPDOWNBUTTON_HIDE="e-caret-hide",e.RIBBON_TEMPLATE=bt,e.RIBBON_HELP_TEMPLATE=ft,e.RIBBON_TOOLTIP=mt,e.RIBBON_TOOLTIP_TARGET=yt,e.RIBBON_TOOLTIP_TITLE=vt,e.RIBBON_TOOLTIP_CONTENT=gt,e.RIBBON_TOOLTIP_ICON=St,e.RIBBON_TOOLTIP_CONTAINER=It,e.RIBBON_TEXT_CONTAINER=Ct,e.RIBBON_SIMPLIFIED_MODE=Ot,e.RIBBON_BACKSTAGE_POPUP=Bt,e.RIBBON_BACKSTAGE_OPEN=wt,e.RIBBON_BACKSTAGE_CONTENT=Dt,e.RIBBON_SELECTED_CONTENT="e-ribbon-selected-content",e.RIBBON_BACKSTAGE=Pt,e.RIBBON_BACKSTAGE_MENU=Lt,e.RIBBON_BACKSTAGE_TEMPLATE=Rt,e.RIBBON_BACKSTAGE_MENU_WRAPPER=kt,e.RIBBON_BACKSTAGE_ITEMS_WRAPPER=Tt,e.RIBBON_BACKSTAGE_TEXT_MENU="e-blankicon",e.TAB_ID="_tab",e.GROUP_ID="_group",e.COLLECTION_ID="_collection",e.ITEM_ID="_item",e.COLLAPSE_BUTTON_ID=Et,e.OVRLOF_BUTTON_ID=Mt,e.GROUPOF_BUTTON_ID=xt,e.HEADER_ID=_t,e.LAUNCHER_ID=qt,e.CONTENT_ID=zt,e.CONTAINER_ID=jt,e.OVERFLOW_ID=At,e.DROPDOWN_ID=Nt,e.RIBBON_FILE_MENU_ID="_filemenu",e.RIBBON_BACKSTAGE_MENU_ID=Gt,e.RIBBON_BACKSTAGE_POPUP_ID=Ht,e.RIBBON_FILE_MENU_LIST=Wt,e.RIBBON_MENU_LIST="_menulist",e.RIBBON_FOOTER_MENU_LIST=Ft,e.RIBBON_HELP_PANE_TEMPLATE_ID=Ut,e.RIBBON_GROUP_BUTTON_ID=Vt,e.RIBBON_FILE_MENU_WIDTH=Kt,e.RIBBON_HELP_PANE_TEMPLATE_WIDTH=Xt,e.getIndex=l,e.getTemplateFunction=c,e.getItem=p,e.getCollection=u,e.getGroup=d,e.destroyControl=h,e.updateCommonProperty=b,e.updateControlDisabled=f,e.getItemElement=m,e.isTooltipPresent=y,e.setToolTipContent=v,e.createTooltip=g,e.destroyTooltip=S,e.updateTooltipProp=I,e.setCustomAttributes=C,e.RibbonTab=ae,e.RibbonGroup=re,e.RibbonCollection=te,e.RibbonItem=Q,e.RibbonButtonSettings=w,e.RibbonCheckBoxSettings=L,e.RibbonColorPickerSettings=T,e.RibbonComboBoxSettings=x,e.RibbonDropDownSettings=z,e.RibbonSplitButtonSettings=N,e.FileMenuSettings=pe,e.BackStageMenu=ge,e.BackstageBackButton=he,e.BackstageItem=me,e.RibbonTooltip=W,e.RibbonGroupButtonSettings=Z,e.RibbonGroupButtonItem=V,e.RibbonButton=Zt,e.RibbonCheckBox=Yt,e.RibbonColorPicker=Jt,e.RibbonComboBox=Qt,e.RibbonDropDown=$t,e.RibbonSplitButton=eo,e.RibbonGroupButton=to,e.RibbonFileMenu=no,e.RibbonBackstage=ao,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
11
|
//# sourceMappingURL=ej2-ribbon.umd.min.js.map
|