@openui5/sap.f 1.142.0 → 1.143.0

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.
Files changed (166) hide show
  1. package/REUSE.toml +1 -1
  2. package/THIRDPARTY.txt +2 -2
  3. package/package.json +6 -6
  4. package/src/sap/f/.library +1 -1
  5. package/src/sap/f/Avatar.js +1 -1
  6. package/src/sap/f/AvatarGroup.js +1 -1
  7. package/src/sap/f/AvatarGroupItem.js +1 -1
  8. package/src/sap/f/CalendarAppointmentInCard.js +1 -1
  9. package/src/sap/f/CalendarInCard.js +1 -1
  10. package/src/sap/f/Card.js +1 -1
  11. package/src/sap/f/CardBase.js +1 -1
  12. package/src/sap/f/DynamicPage.js +1 -1
  13. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  14. package/src/sap/f/DynamicPageHeader.js +1 -1
  15. package/src/sap/f/DynamicPageTitle.js +1 -1
  16. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  18. package/src/sap/f/FlexibleColumnLayoutData.js +1 -1
  19. package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +1 -1
  20. package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +1 -1
  21. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  22. package/src/sap/f/GridContainer.js +1 -1
  23. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  24. package/src/sap/f/GridContainerSettings.js +2 -2
  25. package/src/sap/f/GridList.js +1 -1
  26. package/src/sap/f/GridListItem.js +1 -1
  27. package/src/sap/f/IllustratedMessage.js +1 -1
  28. package/src/sap/f/Illustration.js +1 -1
  29. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  30. package/src/sap/f/ProductSwitch.js +1 -1
  31. package/src/sap/f/ProductSwitchItem.js +1 -1
  32. package/src/sap/f/SearchManager.js +1 -1
  33. package/src/sap/f/ShellBar.js +6 -1
  34. package/src/sap/f/SidePanel.js +1 -1
  35. package/src/sap/f/SidePanelItem.js +1 -1
  36. package/src/sap/f/cards/BaseHeader.js +1 -1
  37. package/src/sap/f/cards/Header.js +1 -1
  38. package/src/sap/f/cards/NumericHeader.js +1 -1
  39. package/src/sap/f/cards/NumericIndicators.js +1 -1
  40. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  41. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  42. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  43. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  44. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  45. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  46. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  47. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  48. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  49. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  50. package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
  51. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  52. package/src/sap/f/dnd/GridDragOver.js +1 -1
  53. package/src/sap/f/dnd/GridDropInfo.js +1 -1
  54. package/src/sap/f/gen/ui5/webcomponents/dist/Avatar.js +2 -2
  55. package/src/sap/f/gen/ui5/webcomponents/dist/Button.js +2 -2
  56. package/src/sap/f/gen/ui5/webcomponents/dist/Label.js +2 -2
  57. package/src/sap/f/gen/ui5/webcomponents/dist/ListItemGroup.js +2 -2
  58. package/src/sap/f/gen/ui5/webcomponents/dist/Menu.js +10 -10
  59. package/src/sap/f/gen/ui5/webcomponents/dist/MenuItem.js +2 -2
  60. package/src/sap/f/gen/ui5/webcomponents.js +208 -214
  61. package/src/sap/f/gen/ui5/webcomponents_base.js +26 -32
  62. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/IllustratedMessage.js +4 -4
  63. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationList.js +3 -3
  64. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListGroupItem.js +2 -2
  65. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListItem.js +2 -2
  66. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/Search.js +2 -2
  67. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItem.js +2 -2
  68. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemGroup.js +1 -1
  69. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemShowMore.js +2 -2
  70. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchMessageArea.js +2 -2
  71. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchScope.js +1 -1
  72. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBar.js +3 -3
  73. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarBranding.js +1 -1
  74. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarItem.js +2 -2
  75. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSearch.js +1 -1
  76. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSpacer.js +1 -1
  77. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenu.js +11 -11
  78. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuAccount.js +2 -2
  79. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuItem.js +2 -2
  80. package/src/sap/f/gen/ui5/webcomponents_fiori.js +95 -101
  81. package/src/sap/f/library.js +2 -2
  82. package/src/sap/f/messagebundle_hr.properties +1 -1
  83. package/src/sap/f/messagebundle_id.properties +1 -1
  84. package/src/sap/f/semantic/AddAction.js +1 -1
  85. package/src/sap/f/semantic/CloseAction.js +1 -1
  86. package/src/sap/f/semantic/CopyAction.js +1 -1
  87. package/src/sap/f/semantic/DeleteAction.js +1 -1
  88. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  89. package/src/sap/f/semantic/EditAction.js +1 -1
  90. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  91. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  92. package/src/sap/f/semantic/FlagAction.js +1 -1
  93. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  94. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  95. package/src/sap/f/semantic/MainAction.js +1 -1
  96. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  97. package/src/sap/f/semantic/NegativeAction.js +1 -1
  98. package/src/sap/f/semantic/PositiveAction.js +1 -1
  99. package/src/sap/f/semantic/PrintAction.js +1 -1
  100. package/src/sap/f/semantic/SemanticButton.js +1 -1
  101. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  102. package/src/sap/f/semantic/SemanticControl.js +1 -1
  103. package/src/sap/f/semantic/SemanticPage.js +1 -1
  104. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  105. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  106. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  107. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  108. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  109. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  110. package/src/sap/f/shellBar/CoPilot.js +1 -1
  111. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  112. package/src/sap/f/shellBar/Search.js +1 -1
  113. package/src/sap/f/themes/base/Card.less +8 -0
  114. package/src/sap/f/themes/base/SidePanel.less +2 -1
  115. package/src/sap/f/thirdparty/Avatar.js +1 -1
  116. package/src/sap/f/thirdparty/BusyIndicator.js +4 -4
  117. package/src/sap/f/thirdparty/Button.js +1 -1
  118. package/src/sap/f/thirdparty/Button2.js +4 -4
  119. package/src/sap/f/thirdparty/FocusableElements.js +1 -1
  120. package/src/sap/f/thirdparty/Icon.js +7 -7
  121. package/src/sap/f/thirdparty/Icons.js +24 -24
  122. package/src/sap/f/thirdparty/IllustratedMessage.js +1 -1
  123. package/src/sap/f/thirdparty/Label.js +1 -1
  124. package/src/sap/f/thirdparty/Link.js +4 -4
  125. package/src/sap/f/thirdparty/List.js +8 -8
  126. package/src/sap/f/thirdparty/ListItemAdditionalText.css.js +1 -1
  127. package/src/sap/f/thirdparty/ListItemBase.js +3 -3
  128. package/src/sap/f/thirdparty/ListItemCustom.js +22 -22
  129. package/src/sap/f/thirdparty/ListItemGroup.js +7 -7
  130. package/src/sap/f/thirdparty/Menu.js +1 -1
  131. package/src/sap/f/thirdparty/MenuItem.js +1 -1
  132. package/src/sap/f/thirdparty/MenuItem2.js +9 -9
  133. package/src/sap/f/thirdparty/NotificationList.js +1 -1
  134. package/src/sap/f/thirdparty/NotificationListGroupItem.js +1 -1
  135. package/src/sap/f/thirdparty/NotificationListItem.js +1 -1
  136. package/src/sap/f/thirdparty/NotificationListItemBase.js +2 -2
  137. package/src/sap/f/thirdparty/ResponsivePopover.js +15 -15
  138. package/src/sap/f/thirdparty/SearchItem.css.js +1 -1
  139. package/src/sap/f/thirdparty/SearchItem.js +1 -1
  140. package/src/sap/f/thirdparty/SearchItemGroup.js +1 -1
  141. package/src/sap/f/thirdparty/SearchItemShowMore.js +1 -1
  142. package/src/sap/f/thirdparty/SearchMessageArea.js +1 -1
  143. package/src/sap/f/thirdparty/SearchScope.js +1 -1
  144. package/src/sap/f/thirdparty/ShellBar.js +1 -1
  145. package/src/sap/f/thirdparty/ShellBarBranding.js +1 -1
  146. package/src/sap/f/thirdparty/ShellBarItem.js +1 -1
  147. package/src/sap/f/thirdparty/ShellBarSearch.js +1 -1
  148. package/src/sap/f/thirdparty/ShellBarSearch2.js +24 -24
  149. package/src/sap/f/thirdparty/ShellBarSpacer.js +1 -1
  150. package/src/sap/f/thirdparty/Tag.js +6 -6
  151. package/src/sap/f/thirdparty/Text.js +4 -4
  152. package/src/sap/f/thirdparty/Title.js +3 -3
  153. package/src/sap/f/thirdparty/UserMenu.js +1 -1
  154. package/src/sap/f/thirdparty/UserMenuAccount.js +2 -2
  155. package/src/sap/f/thirdparty/UserMenuItem.js +1 -1
  156. package/src/sap/f/thirdparty/_dynamics/InputSuggestions.js +1 -1
  157. package/src/sap/f/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate.js +1 -1
  158. package/src/sap/f/thirdparty/information.js +10 -10
  159. package/src/sap/f/thirdparty/overflow.js +2 -2
  160. package/src/sap/f/thirdparty/parameters-bundle.css2.js +1 -1
  161. package/src/sap/f/thirdparty/slim-arrow-down.js +4 -4
  162. package/src/sap/f/thirdparty/webcomponents-base.js +2 -4296
  163. package/src/sap/f/thirdparty/webcomponents-fiori.js +1 -142
  164. package/src/sap/f/thirdparty/webcomponents.js +4452 -11
  165. package/ui5-build.yaml +1 -0
  166. package/src/sap/f/thirdparty/webcomponents-base2.js +0 -7
@@ -1,7 +1,32 @@
1
- sap.ui.define(['require', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdparty/Icons'], (function (require, webcomponentsBase, Icons) { 'use strict';
1
+ sap.ui.define(['require', 'exports', 'sap/f/thirdparty/Icons'], (function (require, exports, Icons) { 'use strict';
2
+
3
+ const p$5=t=>{const e=t.prototype.openEnd;t.prototype.openEnd=function(){return this._mAttributes.popover&&delete this._mAttributes.popover,e.apply(this)};};
4
+
5
+ var e$a = "[data-sap-ui-popup][popover]{border:none;overflow:visible;margin:0}";
6
+
7
+ const o$9=()=>{Icons.S("data-ui5-popup-styles")||Icons.c$1(e$a,"data-ui5-popup-styles");};
8
+
9
+ const n$g=Icons.m("AllOpenedPopupsRegistry",{openedRegistry:[]}),l$9=e=>{n$g.openedRegistry.push(e);},u$6=e=>{const t=n$g.openedRegistry.findIndex(o=>o.instance===e);t>-1&&n$g.openedRegistry.splice(t,1);},g$4=()=>n$g.openedRegistry[n$g.openedRegistry.length-1].instance,f$6=e=>{for(let t=n$g.openedRegistry.length-1;t>=0;t--){const o=n$g.openedRegistry[t];if(o.type!=="OpenUI5")return false;if(o.instance===e)break}return true},h$2=e=>{e.setAttribute("popover","manual"),e.showPopover();},v$4=e=>{e.hasAttribute("popover")&&(e.hidePopover(),e.removeAttribute("popover"));},a$b=(e=document)=>e.querySelector(":popover-open")?true:Array.from(e.querySelectorAll("*")).some(t=>{const o=t.shadowRoot;return o&&a$b(o)}),O$3=e=>{const t=e.prototype.open;e.prototype.open=function(...p){t.apply(this,p);const s=a$b();if(["OPENING","OPEN"].includes(this.getOpenState())&&s){const r=this.getContent();if(r){const i=r instanceof HTMLElement?r:r?.getDomRef();i&&h$2(i);}}l$9({type:"OpenUI5",instance:this});};},m$8=e=>{const t=e.prototype._closed;e.prototype._closed=function(...p){const s=this.getContent(),c=s instanceof HTMLElement?s:s?.getDomRef();t.apply(this,p),c&&v$4(c),u$6(this);};},I$3=e=>{const t=e.prototype.onFocusEvent;e.prototype.onFocusEvent=function(p){f$6(this)&&t.call(this,p);};},P$2=()=>{const e=new CSSStyleSheet;e.replaceSync(".sapMPopup-CTX:popover-open { inset: unset; }"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e];},E$1=e=>{o$9(),O$3(e),m$8(e),P$2(),I$3(e);};
10
+
11
+ let a$a = class a{static isAtLeastVersion116(){if(!window.sap.ui.version)return true;const e=window.sap.ui.version.split(".");return !e||e.length<2?false:parseInt(e[0])>1||parseInt(e[1])>=116}static isOpenUI5Detected(){return typeof window.sap?.ui?.require=="function"}static init(){return a.isOpenUI5Detected()?(a.initPromise||(a.initPromise=new Promise(t=>{window.sap.ui.require(["sap/ui/core/Core"],async e=>{const i=()=>{let n=["sap/ui/core/Popup","sap/ui/core/Patcher","sap/ui/core/LocaleData"];a.isAtLeastVersion116()&&(n=[...n,"sap/base/i18n/Formatting","sap/base/i18n/Localization","sap/ui/core/ControlBehavior","sap/ui/core/Theming","sap/ui/core/date/CalendarUtils"]),window.sap.ui.require(n,(o,r)=>{p$5(r),E$1(o),t();});};a.isAtLeastVersion116()?(await e.ready(),i()):e.attachInit(i);});})),a.initPromise):Promise.resolve()}static getConfigurationSettingsObject(){if(!a.isOpenUI5Detected())return {};if(a.isAtLeastVersion116()){const n=window.sap.ui.require("sap/ui/core/ControlBehavior"),o=window.sap.ui.require("sap/base/i18n/Localization"),r=window.sap.ui.require("sap/ui/core/Theming"),s=window.sap.ui.require("sap/base/i18n/Formatting"),c=window.sap.ui.require("sap/ui/core/date/CalendarUtils");return {animationMode:n.getAnimationMode(),language:o.getLanguage(),theme:r.getTheme(),themeRoot:r.getThemeRoot(),rtl:o.getRTL(),timezone:o.getTimezone(),calendarType:s.getCalendarType(),formatSettings:{firstDayOfWeek:c.getWeekConfigurationValues().firstDayOfWeek,legacyDateCalendarCustomizing:s.getCustomIslamicCalendarData?.()??s.getLegacyDateCalendarCustomizing?.()}}}const e=window.sap.ui.require("sap/ui/core/Core").getConfiguration(),i=window.sap.ui.require("sap/ui/core/LocaleData");return {animationMode:e.getAnimationMode(),language:e.getLanguage(),theme:e.getTheme(),themeRoot:e.getThemeRoot(),rtl:e.getRTL(),timezone:e.getTimezone(),calendarType:e.getCalendarType(),formatSettings:{firstDayOfWeek:i?i.getInstance(e.getLocale()).getFirstDayOfWeek():void 0,legacyDateCalendarCustomizing:e.getFormatSettings().getLegacyDateCalendarCustomizing()}}}static getLocaleDataObject(){if(!a.isOpenUI5Detected())return;const t=window.sap.ui.require("sap/ui/core/LocaleData");if(a.isAtLeastVersion116()){const n=window.sap.ui.require("sap/base/i18n/Localization");return t.getInstance(n.getLanguageTag())._get()}const i=window.sap.ui.require("sap/ui/core/Core").getConfiguration();return t.getInstance(i.getLocale())._get()}static _listenForThemeChange(){if(a.isAtLeastVersion116()){const t=window.sap.ui.require("sap/ui/core/Theming");t.attachApplied(()=>{Icons.u$1(t.getTheme());});}else {const t=window.sap.ui.require("sap/ui/core/Core"),e=t.getConfiguration();t.attachThemeChanged(()=>{Icons.u$1(e.getTheme());});}}static attachListeners(){a.isOpenUI5Detected()&&a._listenForThemeChange();}static cssVariablesLoaded(){if(!a.isOpenUI5Detected())return;const t=[...document.head.children].find(e=>e.id==="sap-ui-theme-sap.ui.core");return t?!!t.href.match(/\/css(-|_)variables\.css/)||!!t.href.match(/\/library\.css/):false}static addOpenedPopup(t){l$9(t);}static removeOpenedPopup(t){u$6(t);}static getTopmostPopup(){return g$4()}};Icons.s("OpenUI5Support",a$a);
12
+
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ var t$7;const i$9=globalThis.trustedTypes,s$e=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$9=`lit$${(Math.random()+"").slice(9)}$`,o$8="?"+e$9,n$f=`<${o$8}>`,l$8=document,h$1=(t="")=>l$8.createComment(t),r$5=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d$4=Array.isArray,u$5=t=>{var i;return d$4(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c$6=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$3=/-->/g,a$9=/>/g,f$5=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_$2=/'/g,m$7=/"/g,g$3=/^(?:script|style|textarea|title)$/i,p$4=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p$4(1),y$3=p$4(2),b$7=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),T=new WeakMap,A$1=l$8.createTreeWalker(l$8,129,null,false),C$3=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?"<svg>":"",d=c$6;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c$6?"!--"===u[1]?d=v$3:void 0!==u[1]?d=a$9:void 0!==u[2]?(g$3.test(u[2])&&(h=RegExp("</"+u[2],"g")),d=f$5):void 0!==u[3]&&(d=f$5):d===f$5?">"===u[0]?(d=null!=h?h:c$6,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f$5:'"'===u[3]?m$7:_$2):d===m$7||d===_$2?d=f$5:d===v$3||d===a$9?d=c$6:(d=f$5,h=void 0);const y=d===f$5&&t[i+1].startsWith("/>")?" ":"";r+=d===c$6?s+n$f:p>=0?(l.push(o),s.slice(0,p)+"$lit$"+s.slice(p)+e$9+y):s+e$9+(-2===p?(l.push(void 0),i):y);}const u=r+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return [void 0!==s$e?s$e.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C$3(t,s);if(this.el=E.createElement(v,n),A$1.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes);}for(;null!==(l=A$1.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(e$9)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+"$lit$").split(e$9),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?M$1:"?"===i[1]?H:"@"===i[1]?I$2:S$1});}else c.push({type:6,index:r});}for(const i of t)l.removeAttribute(i);}if(g$3.test(l.tagName)){const t=l.textContent.split(e$9),s=t.length-1;if(s>0){l.textContent=i$9?i$9.emptyScript:"";for(let i=0;i<s;i++)l.append(t[i],h$1()),A$1.nextNode(),c.push({type:2,index:++r});l.append(t[s],h$1());}}}else if(8===l.nodeType)if(l.data===o$8)c.push({type:2,index:r});else {let t=-1;for(;-1!==(t=l.data.indexOf(e$9,t+1));)c.push({type:7,index:r}),t+=e$9.length-1;}r++;}}static createElement(t,i){const s=l$8.createElement("template");return s.innerHTML=t,s}}function P$1(t,i,s=t,e){var o,n,l,h;if(i===b$7)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r$5(i)?void 0:i._$litDirective$;return (null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,false),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P$1(t,d._$AS(t,i.values),d,e)),i}let V$1 = class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l$8).importNode(s,true);A$1.currentNode=o;let n=A$1.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N$1(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r];}h!==(null==d?void 0:d.index)&&(n=A$1.nextNode(),h++);}return o}m(t){let i=0;for(const s of this.v) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let N$1 = class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o;}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P$1(this,t,i),r$5(t)?t===w||null==t||""===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b$7&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):u$5(t)?this.S(t):this.$(t);}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t));}$(t){this._$AH!==w&&r$5(this._$AH)?this._$AA.nextSibling.data=t:this.k(l$8.createTextNode(t)),this._$AH=t;}T(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else {const t=new V$1(o,this),i=t.p(this.options);t.m(s),this.k(i),this._$AH=t;}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}S(t){d$4(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.M(h$1()),this.M(h$1()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t));}};let S$1 = class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w;}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=false;if(void 0===o)t=P$1(this,t,i,0),n=!r$5(t)||t!==this._$AH&&t!==b$7,n&&(this._$AH=t);else {const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P$1(this,e[s+l],i,l),h===b$7&&(h=this._$AH[l]),n||(n=!r$5(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h;}n&&!e&&this.C(t);}C(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"");}};let M$1 = class M extends S$1{constructor(){super(...arguments),this.type=3;}C(t){this.element[this.name]=t===w?void 0:t;}};const k$1=i$9?i$9.emptyScript:"";class H extends S$1{constructor(){super(...arguments),this.type=4;}C(t){t&&t!==w?this.element.setAttribute(this.name,k$1):this.element.removeAttribute(this.name);}}let I$2 = class I extends S$1{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5;}_$AI(t,i=this){var s;if((t=null!==(s=P$1(this,t,i,0))&&void 0!==s?s:w)===b$7)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t);}};class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){P$1(this,t);}}const z=window.litHtmlPolyfillSupport;null==z||z(E,N$1),(null!==(t$7=globalThis.litHtmlVersions)&&void 0!==t$7?t$7:globalThis.litHtmlVersions=[]).push("2.2.2");
19
+
20
+ /**
21
+ * @license
22
+ * Copyright 2020 Google LLC
23
+ * SPDX-License-Identifier: BSD-3-Clause
24
+ */const o$7=Symbol.for(""),e$8=t=>{var r,e;if((null===(r=t)||void 0===r?void 0:r.r)===o$7)return null===(e=t)||void 0===e?void 0:e._$litStatic$},i$8=t=>({_$litStatic$:t,r:o$7}),a$8=new Map,s$d=t=>(r,...o)=>{const i=o.length;let l,s;const n=[],u=[];let c,v=0,$=false;for(;v<i;){for(c=r[v];v<i&&void 0!==(s=o[v],l=e$8(s));)c+=l+r[++v],$=true;u.push(s),n.push(c),v++;}if(v===i&&n.push(r[i]),$){const t=n.join("$$lit$$");void 0===(r=a$8.get(t))&&(n.raw=n,a$8.set(t,r=n)),o=u;}return t(r,...o)},n$e=s$d($),u$4=s$d(y$3);
25
+
26
+ let t$6 = class t{static{this.html=n$e;}static{this.svg=u$4;}static{this.unsafeStatic=i$8;}};Icons.s("LitStatic",t$6);
2
27
 
3
28
  // @ts-nocheck
4
- const loadThemeProperties$1 = async (themeName) => {
29
+ const loadThemeProperties$2 = async (themeName) => {
5
30
  switch (themeName) {
6
31
  case "sap_fiori_3": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-theming-sap-fiori_3-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css4'], resolve, reject); })).default;
7
32
  case "sap_fiori_3_dark": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-theming-sap-fiori_3_dark-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css5'], resolve, reject); })).default;
@@ -14,18 +39,18 @@ sap.ui.define(['require', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdpar
14
39
  default: throw "unknown theme";
15
40
  }
16
41
  };
17
- const loadAndCheck$1 = async (themeName) => {
18
- const data = await loadThemeProperties$1(themeName);
42
+ const loadAndCheck$2 = async (themeName) => {
43
+ const data = await loadThemeProperties$2(themeName);
19
44
  if (typeof data === "string" && data.endsWith(".json")) {
20
45
  throw new Error(`[themes] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build. Check the "Assets" documentation for more information.`);
21
46
  }
22
47
  return data;
23
48
  };
24
49
  ["sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_hcb", "sap_horizon_hcw"]
25
- .forEach(themeName => Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "t" + "h" + "e" + "m" + "i" + "n" + "g", themeName, loadAndCheck$1));
50
+ .forEach(themeName => Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "t" + "h" + "e" + "m" + "i" + "n" + "g", themeName, loadAndCheck$2));
26
51
 
27
52
  // @ts-nocheck
28
- const loadThemeProperties = async (themeName) => {
53
+ const loadThemeProperties$1 = async (themeName) => {
29
54
  switch (themeName) {
30
55
  case "sap_fiori_3": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-sap-fiori_3-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css12'], resolve, reject); })).default;
31
56
  case "sap_fiori_3_dark": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-sap-fiori_3_dark-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css13'], resolve, reject); })).default;
@@ -38,18 +63,18 @@ sap.ui.define(['require', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdpar
38
63
  default: throw "unknown theme";
39
64
  }
40
65
  };
41
- const loadAndCheck = async (themeName) => {
42
- const data = await loadThemeProperties(themeName);
66
+ const loadAndCheck$1 = async (themeName) => {
67
+ const data = await loadThemeProperties$1(themeName);
43
68
  if (typeof data === "string" && data.endsWith(".json")) {
44
69
  throw new Error(`[themes] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build. Check the "Assets" documentation for more information.`);
45
70
  }
46
71
  return data;
47
72
  };
48
73
  ["sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_hcb", "sap_horizon_hcw"]
49
- .forEach(themeName => Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", themeName, loadAndCheck));
74
+ .forEach(themeName => Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", themeName, loadAndCheck$1));
50
75
 
51
76
  // @ts-nocheck
52
- const importMessageBundle = async (localeId) => {
77
+ const importMessageBundle$1 = async (localeId) => {
53
78
  switch (localeId) {
54
79
  case "ar": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-messagebundle-ar" */ 'sap/f/thirdparty/_dynamics/messagebundle_ar'], resolve, reject); })).default;
55
80
  case "bg": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-messagebundle-bg" */ 'sap/f/thirdparty/_dynamics/messagebundle_bg'], resolve, reject); })).default;
@@ -105,6 +130,149 @@ sap.ui.define(['require', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdpar
105
130
  default: throw "unknown locale";
106
131
  }
107
132
  };
133
+ const importAndCheck$1 = async (localeId) => {
134
+ const data = await importMessageBundle$1(localeId);
135
+ if (typeof data === "string" && data.endsWith(".json")) {
136
+ throw new Error(`[i18n] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build. Check the "Assets" documentation for more information.`);
137
+ }
138
+ return data;
139
+ };
140
+ const localeIds$1 = ["ar",
141
+ "bg",
142
+ "ca",
143
+ "cnr",
144
+ "cs",
145
+ "cy",
146
+ "da",
147
+ "de",
148
+ "el",
149
+ "en",
150
+ "en_GB",
151
+ "en_US_sappsd",
152
+ "en_US_saprigi",
153
+ "en_US_saptrc",
154
+ "es",
155
+ "es_MX",
156
+ "et",
157
+ "fi",
158
+ "fr",
159
+ "fr_CA",
160
+ "hi",
161
+ "hr",
162
+ "hu",
163
+ "id",
164
+ "it",
165
+ "iw",
166
+ "ja",
167
+ "kk",
168
+ "ko",
169
+ "lt",
170
+ "lv",
171
+ "mk",
172
+ "ms",
173
+ "nl",
174
+ "no",
175
+ "pl",
176
+ "pt",
177
+ "pt_PT",
178
+ "ro",
179
+ "ru",
180
+ "sh",
181
+ "sk",
182
+ "sl",
183
+ "sr",
184
+ "sv",
185
+ "th",
186
+ "tr",
187
+ "uk",
188
+ "vi",
189
+ "zh_CN",
190
+ "zh_TW",];
191
+ localeIds$1.forEach(localeId => {
192
+ Icons.$("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", localeId, importAndCheck$1);
193
+ });
194
+
195
+ // @ts-nocheck
196
+ const loadThemeProperties = async (themeName) => {
197
+ switch (themeName) {
198
+ case "sap_fiori_3": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-fiori_3-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css20'], resolve, reject); })).default;
199
+ case "sap_fiori_3_dark": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-fiori_3_dark-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css21'], resolve, reject); })).default;
200
+ case "sap_fiori_3_hcb": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-fiori_3_hcb-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css22'], resolve, reject); })).default;
201
+ case "sap_fiori_3_hcw": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-fiori_3_hcw-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css23'], resolve, reject); })).default;
202
+ case "sap_horizon": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-horizon-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css24'], resolve, reject); })).default;
203
+ case "sap_horizon_dark": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-horizon_dark-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css25'], resolve, reject); })).default;
204
+ case "sap_horizon_hcb": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-horizon_hcb-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css26'], resolve, reject); })).default;
205
+ case "sap_horizon_hcw": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-sap-horizon_hcw-parameters-bundle" */ 'sap/f/thirdparty/_dynamics/parameters-bundle.css27'], resolve, reject); })).default;
206
+ default: throw "unknown theme";
207
+ }
208
+ };
209
+ const loadAndCheck = async (themeName) => {
210
+ const data = await loadThemeProperties(themeName);
211
+ if (typeof data === "string" && data.endsWith(".json")) {
212
+ throw new Error(`[themes] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build. Check the "Assets" documentation for more information.`);
213
+ }
214
+ return data;
215
+ };
216
+ ["sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_hcb", "sap_horizon_hcw"]
217
+ .forEach(themeName => Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "f" + "i" + "o" + "r" + "i", themeName, loadAndCheck));
218
+
219
+ // @ts-nocheck
220
+ const importMessageBundle = async (localeId) => {
221
+ switch (localeId) {
222
+ case "ar": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ar" */ 'sap/f/thirdparty/_dynamics/messagebundle_ar2'], resolve, reject); })).default;
223
+ case "bg": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-bg" */ 'sap/f/thirdparty/_dynamics/messagebundle_bg2'], resolve, reject); })).default;
224
+ case "ca": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ca" */ 'sap/f/thirdparty/_dynamics/messagebundle_ca2'], resolve, reject); })).default;
225
+ case "cnr": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-cnr" */ 'sap/f/thirdparty/_dynamics/messagebundle_cnr2'], resolve, reject); })).default;
226
+ case "cs": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-cs" */ 'sap/f/thirdparty/_dynamics/messagebundle_cs2'], resolve, reject); })).default;
227
+ case "cy": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-cy" */ 'sap/f/thirdparty/_dynamics/messagebundle_cy2'], resolve, reject); })).default;
228
+ case "da": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-da" */ 'sap/f/thirdparty/_dynamics/messagebundle_da2'], resolve, reject); })).default;
229
+ case "de": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-de" */ 'sap/f/thirdparty/_dynamics/messagebundle_de2'], resolve, reject); })).default;
230
+ case "el": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-el" */ 'sap/f/thirdparty/_dynamics/messagebundle_el2'], resolve, reject); })).default;
231
+ case "en": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-en" */ 'sap/f/thirdparty/_dynamics/messagebundle_en2'], resolve, reject); })).default;
232
+ case "en_GB": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-en_GB" */ 'sap/f/thirdparty/_dynamics/messagebundle_en_GB2'], resolve, reject); })).default;
233
+ case "en_US_sappsd": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-en_US_sappsd" */ 'sap/f/thirdparty/_dynamics/messagebundle_en_US_sappsd2'], resolve, reject); })).default;
234
+ case "en_US_saprigi": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-en_US_saprigi" */ 'sap/f/thirdparty/_dynamics/messagebundle_en_US_saprigi2'], resolve, reject); })).default;
235
+ case "en_US_saptrc": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-en_US_saptrc" */ 'sap/f/thirdparty/_dynamics/messagebundle_en_US_saptrc2'], resolve, reject); })).default;
236
+ case "es": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-es" */ 'sap/f/thirdparty/_dynamics/messagebundle_es2'], resolve, reject); })).default;
237
+ case "es_MX": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-es_MX" */ 'sap/f/thirdparty/_dynamics/messagebundle_es_MX2'], resolve, reject); })).default;
238
+ case "et": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-et" */ 'sap/f/thirdparty/_dynamics/messagebundle_et2'], resolve, reject); })).default;
239
+ case "fi": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-fi" */ 'sap/f/thirdparty/_dynamics/messagebundle_fi2'], resolve, reject); })).default;
240
+ case "fr": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-fr" */ 'sap/f/thirdparty/_dynamics/messagebundle_fr2'], resolve, reject); })).default;
241
+ case "fr_CA": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-fr_CA" */ 'sap/f/thirdparty/_dynamics/messagebundle_fr_CA2'], resolve, reject); })).default;
242
+ case "hi": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-hi" */ 'sap/f/thirdparty/_dynamics/messagebundle_hi2'], resolve, reject); })).default;
243
+ case "hr": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-hr" */ 'sap/f/thirdparty/_dynamics/messagebundle_hr2'], resolve, reject); })).default;
244
+ case "hu": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-hu" */ 'sap/f/thirdparty/_dynamics/messagebundle_hu2'], resolve, reject); })).default;
245
+ case "id": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-id" */ 'sap/f/thirdparty/_dynamics/messagebundle_id2'], resolve, reject); })).default;
246
+ case "it": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-it" */ 'sap/f/thirdparty/_dynamics/messagebundle_it2'], resolve, reject); })).default;
247
+ case "iw": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-iw" */ 'sap/f/thirdparty/_dynamics/messagebundle_iw2'], resolve, reject); })).default;
248
+ case "ja": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ja" */ 'sap/f/thirdparty/_dynamics/messagebundle_ja2'], resolve, reject); })).default;
249
+ case "kk": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-kk" */ 'sap/f/thirdparty/_dynamics/messagebundle_kk2'], resolve, reject); })).default;
250
+ case "ko": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ko" */ 'sap/f/thirdparty/_dynamics/messagebundle_ko2'], resolve, reject); })).default;
251
+ case "lt": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-lt" */ 'sap/f/thirdparty/_dynamics/messagebundle_lt2'], resolve, reject); })).default;
252
+ case "lv": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-lv" */ 'sap/f/thirdparty/_dynamics/messagebundle_lv2'], resolve, reject); })).default;
253
+ case "mk": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-mk" */ 'sap/f/thirdparty/_dynamics/messagebundle_mk2'], resolve, reject); })).default;
254
+ case "ms": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ms" */ 'sap/f/thirdparty/_dynamics/messagebundle_ms2'], resolve, reject); })).default;
255
+ case "nl": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-nl" */ 'sap/f/thirdparty/_dynamics/messagebundle_nl2'], resolve, reject); })).default;
256
+ case "no": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-no" */ 'sap/f/thirdparty/_dynamics/messagebundle_no2'], resolve, reject); })).default;
257
+ case "pl": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-pl" */ 'sap/f/thirdparty/_dynamics/messagebundle_pl2'], resolve, reject); })).default;
258
+ case "pt": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-pt" */ 'sap/f/thirdparty/_dynamics/messagebundle_pt2'], resolve, reject); })).default;
259
+ case "pt_PT": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-pt_PT" */ 'sap/f/thirdparty/_dynamics/messagebundle_pt_PT2'], resolve, reject); })).default;
260
+ case "ro": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ro" */ 'sap/f/thirdparty/_dynamics/messagebundle_ro2'], resolve, reject); })).default;
261
+ case "ru": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-ru" */ 'sap/f/thirdparty/_dynamics/messagebundle_ru2'], resolve, reject); })).default;
262
+ case "sh": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-sh" */ 'sap/f/thirdparty/_dynamics/messagebundle_sh2'], resolve, reject); })).default;
263
+ case "sk": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-sk" */ 'sap/f/thirdparty/_dynamics/messagebundle_sk2'], resolve, reject); })).default;
264
+ case "sl": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-sl" */ 'sap/f/thirdparty/_dynamics/messagebundle_sl2'], resolve, reject); })).default;
265
+ case "sr": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-sr" */ 'sap/f/thirdparty/_dynamics/messagebundle_sr2'], resolve, reject); })).default;
266
+ case "sv": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-sv" */ 'sap/f/thirdparty/_dynamics/messagebundle_sv2'], resolve, reject); })).default;
267
+ case "th": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-th" */ 'sap/f/thirdparty/_dynamics/messagebundle_th2'], resolve, reject); })).default;
268
+ case "tr": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-tr" */ 'sap/f/thirdparty/_dynamics/messagebundle_tr2'], resolve, reject); })).default;
269
+ case "uk": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-uk" */ 'sap/f/thirdparty/_dynamics/messagebundle_uk2'], resolve, reject); })).default;
270
+ case "vi": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-vi" */ 'sap/f/thirdparty/_dynamics/messagebundle_vi2'], resolve, reject); })).default;
271
+ case "zh_CN": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-zh_CN" */ 'sap/f/thirdparty/_dynamics/messagebundle_zh_CN2'], resolve, reject); })).default;
272
+ case "zh_TW": return (await new Promise(function (resolve, reject) { require([/* webpackChunkName: "ui5-webcomponents-fiori-messagebundle-zh_TW" */ 'sap/f/thirdparty/_dynamics/messagebundle_zh_TW2'], resolve, reject); })).default;
273
+ default: throw "unknown locale";
274
+ }
275
+ };
108
276
  const importAndCheck = async (localeId) => {
109
277
  const data = await importMessageBundle(localeId);
110
278
  if (typeof data === "string" && data.endsWith(".json")) {
@@ -164,7 +332,4280 @@ sap.ui.define(['require', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdpar
164
332
  "zh_CN",
165
333
  "zh_TW",];
166
334
  localeIds.forEach(localeId => {
167
- Icons.$$1("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", localeId, importAndCheck);
335
+ Icons.$("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "f" + "i" + "o" + "r" + "i", localeId, importAndCheck);
168
336
  });
169
337
 
338
+ const t$5=new WeakMap;let a$7 = class a{static get tasks(){return t$5}static enqueue(s,e){t$5.has(s)||t$5.set(s,[]),t$5.get(s).push(e);}static run(s,e){return t$5.has(s)||t$5.set(s,[]),e().then(()=>{const T=t$5.get(s);if(T.length>0)return a.run(s,T.shift());t$5.delete(s);})}static push(s,e){t$5.get(s)?a.enqueue(s,e):a.run(s,e);}};
339
+
340
+ const f$4=e=>{let n=null,a=false,i,o,r;const m=new Promise((t,c)=>{r=u=>{n=n||u;const d=u-n,l=e.duration-d;if(d<=e.duration){const s=1-l/e.duration;e.advance(s),a||(i=requestAnimationFrame(r));}else e.advance(1),t();},o=()=>{a=true,cancelAnimationFrame(i),c(new Error("animation stopped"));};}).catch(t=>t);return a$7.push(e.element,()=>(typeof e.beforeStart=="function"&&e.beforeStart(),requestAnimationFrame(r),new Promise(t=>{m.then(()=>t());}))),{promise:()=>m,stop:()=>o}},v$2=400;
341
+
342
+ const n$d=(r,c,a)=>{let o,l;return f$4({beforeStart:()=>{o=r.scrollLeft,l=r.scrollTop;},duration:v$2,element:r,advance:t=>{r.scrollLeft=o+t*c,r.scrollTop=l+t*a;}})};
343
+
344
+ const b$6=t=>{let o,a,d,r,s,p,g,y,n,l,h,T;const B=f$4({beforeStart:()=>{t.style.display="block",o=getComputedStyle(t),a=parseFloat(o.paddingTop),d=parseFloat(o.paddingBottom),r=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),p=parseFloat(o.height),g=t.style.overflow,y=t.style.paddingTop,n=t.style.paddingBottom,l=t.style.marginTop,h=t.style.marginBottom,T=t.style.height,t.style.overflow="hidden",t.style.paddingTop="0",t.style.paddingBottom="0",t.style.marginTop="0",t.style.marginBottom="0",t.style.height="0";},duration:v$2,element:t,advance:i=>{t.style.display="block",t.style.paddingTop=`${a*i}px`,t.style.paddingBottom=`${d*i}px`,t.style.marginTop=`${r*i}px`,t.style.marginBottom=`${s*i}px`,t.style.height=`${p*i}px`;}});return B.promise().then(()=>{t.style.overflow=g,t.style.paddingTop=y,t.style.paddingBottom=n,t.style.marginTop=l,t.style.marginBottom=h,t.style.height=T;}),B};
345
+
346
+ const u$3=o=>{let i,a,r,d,n,s,p,g,e,l,y,m;const h=f$4({beforeStart:()=>{const t=o;i=getComputedStyle(t),a=parseFloat(i.paddingTop),r=parseFloat(i.paddingBottom),d=parseFloat(i.marginTop),n=parseFloat(i.marginBottom),s=parseFloat(i.height),p=t.style.overflow,g=t.style.paddingTop,e=t.style.paddingBottom,l=t.style.marginTop,y=t.style.marginBottom,m=t.style.height,t.style.overflow="hidden";},duration:v$2,element:o,advance:t=>{o.style.paddingTop=`${a-a*t}px`,o.style.paddingBottom=`${r-r*t}px`,o.style.marginTop=`${d-d*t}px`,o.style.marginBottom=`${n-n*t}px`,o.style.height=`${s-s*t}px`;}});return h.promise().then(t=>{t instanceof Error||(o.style.overflow=p,o.style.paddingTop=g,o.style.paddingBottom=e,o.style.marginTop=l,o.style.marginBottom=y,o.style.height=m,o.style.display="none");}),h};
347
+
348
+ let n$c;Icons.i$1(()=>{n$c=void 0;});const d$3=()=>(n$c===void 0&&(n$c=Icons.C$1()),n$c),m$6=o=>{Object.values(Icons.u).includes(o)&&(n$c=o);};
349
+
350
+ var s$c=(i=>(i.Gregorian="Gregorian",i.Islamic="Islamic",i.Japanese="Japanese",i.Buddhist="Buddhist",i.Persian="Persian",i))(s$c||{});
351
+
352
+ let n$b;Icons.i$1(()=>{n$b=void 0;});const i$7=()=>(n$b===void 0&&(n$b=Icons.D$1()),n$b&&n$b in s$c?n$b:s$c.Gregorian);
353
+
354
+ let t$4;let a$6 = class a{static getLegacyDateCalendarCustomizing(){return t$4===void 0&&(t$4=Icons.M()),t$4.legacyDateCalendarCustomizing||[]}};Icons.s("LegacyDateFormats",a$6);
355
+
356
+ let e$7;Icons.i$1(()=>{e$7=void 0;});const n$a=()=>(e$7===void 0&&(e$7=Icons.M()),e$7.firstDayOfWeek),i$6=Icons.n$1("LegacyDateFormats"),m$5=i$6?a$6.getLegacyDateCalendarCustomizing:()=>[];
357
+
358
+ var s$b = ":host{justify-content:center;align-items:center;display:flex;color:var(--sapList_TextColor);background-color:var(--sapList_Background);font-family:var(--sapFontFamily);height:var(--sapElement_LineHeight);border-bottom:var(--sapList_BorderWidth) solid var(--sapList_BorderColor);opacity:.8;position:absolute;padding:0 1rem;top:-1000px;left:-1000px}";
359
+
360
+ const e$6={key:"DRAG_DROP_MULTIPLE_TEXT",defaultText:"{0} items"};
361
+
362
+ const l$7=2;let a$5=null;const g$2=e=>{a$5=e;},d$2=()=>{a$5=null;},p$3=()=>a$5,u$2=async e=>{const t=document.createElement("div"),n=await Icons.f$2("@ui5/webcomponents-base"),r=t.attachShadow({mode:"open"}),o=new CSSStyleSheet;return o.replaceSync(s$b),r.adoptedStyleSheets=[o],r.textContent=n.getText(e$6,e),t},m$4=async(e,t)=>{if(e<l$7){console.warn(`Cannot start multiple drag with count ${e}. Minimum is ${l$7}.`);return}if(!t.dataTransfer)return;const n=await u$2(e);document.body.appendChild(n),t.dataTransfer.setDragImage(n,0,0),requestAnimationFrame(()=>{n.remove();});},D$2={setDraggedElement:g$2,clearDraggedElement:d$2,getDraggedElement:p$3,startMultipleDrag:m$4};
363
+
364
+ const c$5=["value-changed","click"];let e$5;Icons.i$1(()=>{e$5=void 0;});const s$a=t=>c$5.includes(t),l$6=t=>{const n=o$6();return !(typeof n!="boolean"&&n.events&&n.events.includes&&n.events.includes(t))},o$6=()=>(e$5===void 0&&(e$5=Icons.F()),e$5),f$3=t=>{e$5=t;},a$4=t=>{const n=o$6();return s$a(t)?false:n===true?true:!l$6(t)};
365
+
366
+ const m$3=(a={})=>e=>{if(Object.prototype.hasOwnProperty.call(e,"metadata")||(e.metadata={}),typeof a=="string"){e.metadata.tag=a;return}const{tag:i,languageAware:o,themeAware:r,cldr:s,fastNavigation:l,formAssociated:n,shadowRootOptions:d}=a;e.metadata.tag=i,o&&(e.metadata.languageAware=o),s&&(e.metadata.cldr=s),r&&(e.metadata.themeAware=r),l&&(e.metadata.fastNavigation=l),n&&(e.metadata.formAssociated=n),d&&(e.metadata.shadowRootOptions=d),["renderer","template","styles","dependencies"].forEach(t=>{a[t]&&Object.defineProperty(e,t,{get:()=>a[t]});});};
367
+
368
+ const b$5=(n,e={})=>t=>{Object.prototype.hasOwnProperty.call(t,"metadata")||(t.metadata={});const a=t.metadata;a.events||(a.events={});const l=a.events;l[n]||(e.bubbles=!!e.bubbles,e.cancelable=!!e.cancelable,l[n]=e);};
369
+
370
+ const s$9=o=>(p,r)=>{const t=p.constructor;Object.prototype.hasOwnProperty.call(t,"metadata")||(t.metadata={});const e=t.metadata;e.properties||(e.properties={});const a=e.properties;a[r]||(a[r]=o??{});};
371
+
372
+ const d$1=e=>(l,a)=>{const r=l.constructor;Object.prototype.hasOwnProperty.call(r,"metadata")||(r.metadata={});const o=r.metadata;o.slots||(o.slots={});const t=o.slots;if(e&&e.default&&t.default)throw new Error("Only one slot can be the default slot.");const n=e&&e.default?"default":a;e=e||{type:HTMLElement},e.type||(e.type=HTMLElement),t[n]||(t[n]=e),e.default&&(delete t.default.default,t.default.propertyName=a),r.metadata.managedSlots=true;};
373
+
374
+ const y$2={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,NUMPAD_PLUS:107,NUMPAD_MINUS:109,F4:115,F8:119,F10:121,PLUS:187,MINUS:219},b$4=o=>(o.key?o.key==="Enter":o.keyCode===y$2.ENTER)&&!a$3(o),i$5=o=>(o.key?o.key==="Enter":o.keyCode===y$2.ENTER)&&e$4(o,false,false,true),C$2=o=>e$4(o,true,false,false),A=o=>(o.key?o.key==="Spacebar"||o.key===" ":o.keyCode===y$2.SPACE)&&!a$3(o),K=o=>(o.key?o.key==="Spacebar"||o.key===" ":o.keyCode===y$2.SPACE)&&e$4(o,false,false,true),D$1=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y$2.ARROW_LEFT)&&!a$3(o),R$2=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y$2.ARROW_RIGHT)&&!a$3(o),P=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y$2.ARROW_UP)&&!a$3(o),_$1=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y$2.ARROW_DOWN)&&!a$3(o),O$2=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y$2.ARROW_UP)&&e$4(o,false,false,true),N=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y$2.ARROW_DOWN)&&e$4(o,false,false,true),h=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y$2.ARROW_LEFT)&&e$4(o,false,false,true),I$1=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y$2.ARROW_RIGHT)&&e$4(o,false,false,true),M=o=>(o.key?o.key==="Home":o.keyCode===y$2.HOME)&&!a$3(o),n$9=o=>(o.key?o.key==="End":o.keyCode===y$2.END)&&!a$3(o),m$2=o=>(o.key?o.key==="Escape"||o.key==="Esc":o.keyCode===y$2.ESCAPE)&&!a$3(o),x=o=>(o.key?o.key==="Tab":o.keyCode===y$2.TAB)&&!a$3(o),V=o=>(o.key?o.key==="Tab":o.keyCode===y$2.TAB)&&e$4(o,false,false,true),Q=o=>(o.key?o.key==="Backspace":o.keyCode===y$2.BACKSPACE)&&!a$3(o),X=o=>(o.key?o.key==="Delete":o.keyCode===y$2.DELETE)&&!a$3(o),j=o=>(o.key?o.key==="PageUp":o.keyCode===y$2.PAGE_UP)&&!a$3(o),q=o=>(o.key?o.key==="PageDown":o.keyCode===y$2.PAGE_DOWN)&&!a$3(o),ao=o=>(o.key?o.key==="+":o.keyCode===y$2.PLUS)||o.keyCode===y$2.NUMPAD_PLUS&&!a$3(o),so=o=>(o.key?o.key==="-":o.keyCode===y$2.MINUS)||o.keyCode===y$2.NUMPAD_MINUS&&!a$3(o),ko=o=>o.key?s$8(o)||Ao(o):o.keyCode===y$2.F4&&!a$3(o)||o.keyCode===y$2.ARROW_DOWN&&e$4(o,false,true,false),ro=o=>o.key==="F2"&&!a$3(o),s$8=o=>o.key==="F4"&&!a$3(o),Eo=o=>(o.key?o.key==="F10":o.keyCode===y$2.F10)&&e$4(o,false,false,true),Co=o=>(o.key?o.key==="F8":o.keyCode===y$2.F8)&&e$4(o,true,true,false),Ao=o=>(o.key==="ArrowDown"||o.key==="Down"||o.key==="ArrowUp"||o.key==="Up")&&e$4(o,false,true,false),Ko=o=>o.key==="Shift"||o.keyCode===y$2.SHIFT,a$3=o=>o.shiftKey||o.altKey||k(o),k=o=>!!(o.metaKey||o.ctrlKey),e$4=(o,r,l,E)=>o.shiftKey===E&&o.altKey===l&&k(o)===r;
375
+
376
+ const t$3=()=>{let e=document.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e};
377
+
378
+ var r$4=(l=>(l.Auto="Auto",l.Vertical="Vertical",l.Horizontal="Horizontal",l.Paging="Paging",l))(r$4||{});
379
+
380
+ var l$5=(c=>(c.Static="Static",c.Cyclic="Cyclic",c))(l$5||{});
381
+
382
+ const s$7=new Map,o$5=new Map,n$8=new Map,c$4=e=>{if(!s$7.has(e)){const a=b$3(e.split("-"));s$7.set(e,a);}return s$7.get(e)},l$4=e=>{if(!o$5.has(e)){const a=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();o$5.set(e,a);}return o$5.get(e)},p$2=e=>l$4(e),b$3=e=>e.map((a,t)=>t===0?a.toLowerCase():a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(""),C$1=e=>{const a=n$8.get(e);if(a)return a;const t=c$4(e),r=t.charAt(0).toUpperCase()+t.slice(1);return n$8.set(e,r),r};
383
+
384
+ const o$4=t=>{if(!(t instanceof HTMLElement))return "default";const e=t.getAttribute("slot");if(e){const r=e.match(/^(.+?)-\d+$/);return r?r[1]:e}return "default"},n$7=t=>t instanceof HTMLSlotElement?t.assignedNodes({flatten:true}).filter(e=>e instanceof HTMLElement):[t],s$6=t=>t.reduce((e,r)=>e.concat(n$7(r)),[]);
385
+
386
+ let p$1 = class p{constructor(t){this.metadata=t;}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={};if(this.slotsAreManaged()){const o=this.getSlots();for(const[e,s]of Object.entries(o)){const n=s.propertyName||e;t[n]=[],t[c$4(n)]=t[n];}}return this._initialState=t,t}static validateSlotValue(t,a){return g$1(t,a)}getPureTag(){return this.metadata.tag||""}getTag(){const t=this.metadata.tag;if(!t)return "";const a=Icons.g$1(t);return a?`${t}-${a}`:t}hasAttribute(t){const a=this.getProperties()[t];return a.type!==Object&&a.type!==Array&&!a.noAttribute}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(l$4)}canSlotText(){return this.getSlots().default?.type===Node}hasSlots(){return !!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.values(this.getSlots()).some(t=>t.individualSlots)}slotsAreManaged(){return !!this.metadata.managedSlots}supportsF6FastNavigation(){return !!this.metadata.fastNavigation}getProperties(){return this.metadata.properties||(this.metadata.properties={}),this.metadata.properties}getEvents(){return this.metadata.events||(this.metadata.events={}),this.metadata.events}getSlots(){return this.metadata.slots||(this.metadata.slots={}),this.metadata.slots}isLanguageAware(){return !!this.metadata.languageAware}isThemeAware(){return !!this.metadata.themeAware}needsCLDR(){return !!this.metadata.cldr}getShadowRootOptions(){return this.metadata.shadowRootOptions||{}}isFormAssociated(){return !!this.metadata.formAssociated}shouldInvalidateOnChildChange(t,a,o){const e=this.getSlots()[t].invalidateOnChildChange;if(e===void 0)return false;if(typeof e=="boolean")return e;if(typeof e=="object"){if(a==="property"){if(e.properties===void 0)return false;if(typeof e.properties=="boolean")return e.properties;if(Array.isArray(e.properties))return e.properties.includes(o);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if(a==="slot"){if(e.slots===void 0)return false;if(typeof e.slots=="boolean")return e.slots;if(Array.isArray(e.slots))return e.slots.includes(o);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}getI18n(){return this.metadata.i18n||(this.metadata.i18n={}),this.metadata.i18n}};const g$1=(r,t)=>(r&&n$7(r).forEach(a=>{if(!(a instanceof t.type))throw new Error(`The element is not of type ${t.type.toString()}`)}),r);
387
+
388
+ const r$3=()=>Icons.m("CustomStyle.eventProvider",new Icons.i$2),n$6="CustomCSSChange",i$4=t=>{r$3().attachEvent(n$6,t);},u$1=t=>r$3().fireEvent(n$6,t),c$3=()=>Icons.m("CustomStyle.customCSSFor",{});let s$5;i$4(t=>{s$5||Icons.C$2({tag:t});});const g=(t,e)=>{const o=c$3();o[t]||(o[t]=[]),o[t].push(e),s$5=true;try{u$1(t);}finally{s$5=false;}return Icons.C$2({tag:t})},l$3=t=>{const e=c$3();return e[t]?e[t].join(""):""};
389
+
390
+ const e$3=t=>Array.isArray(t)?t.filter(r=>!!r).flat(10).join(" "):t;
391
+
392
+ const e$2=new Map;i$4(t=>{e$2.delete(`${t}_normal`);});const y$1=t=>{const o=t.getMetadata().getTag(),n=`${o}_normal`,s=Icons.n$1("OpenUI5Enablement");if(!e$2.has(n)){let l="";s&&(l=e$3(s.getBusyIndicatorStyles()));const a=l$3(o)||"",m=`${e$3(t.styles)} ${a} ${l}`;e$2.set(n,m);}return e$2.get(n)};
393
+
394
+ const e$1=new Map;i$4(t=>{e$1.delete(`${t}_normal`);});const s$4=t=>{const n=`${t.getMetadata().getTag()}_normal`;if(!e$1.has(n)){const a=y$1(t),o=new CSSStyleSheet;o.replaceSync(a),e$1.set(n,[o]);}return e$1.get(n)};
395
+
396
+ const s$3=o=>{const e=o.constructor,t=o.shadowRoot;if(!t){console.warn("There is no shadow root to update");return}t.adoptedStyleSheets=s$4(e),e.renderer(o,t);};
397
+
398
+ const r$2=[],o$3=t=>r$2.some(s=>t.startsWith(s));
399
+
400
+ const t$2=new WeakMap,n$5=(e,o,r)=>{const s=new MutationObserver(o);t$2.set(e,s),s.observe(e,r);},b$2=e=>{const o=t$2.get(e);o&&(o.disconnect(),t$2.delete(e));};
401
+
402
+ const r$1=t=>t.matches(":dir(rtl)")?"rtl":"ltr";
403
+
404
+ const s$2=["disabled","title","hidden","role","draggable"],r=e=>s$2.includes(e)||e.startsWith("aria")?true:![HTMLElement,Element,Node].some(t=>t.prototype.hasOwnProperty(e));
405
+
406
+ const n$4=(t,r)=>{if(t.length!==r.length)return false;for(let e=0;e<t.length;e++)if(t[e]!==r[e])return false;return true};
407
+
408
+ const n$3=(e,t)=>e.call(t);
409
+
410
+ const o$2=t=>{s$1(t)&&e(t);},e=t=>{if(t._internals?.form){if(n$2(t),!t.name){t._internals?.setFormValue(null);return}t._internals.setFormValue(t.formFormattedValue);}},n$2=async t=>{if(t._internals?.form)if(t.formValidity&&Object.keys(t.formValidity).some(r=>r)){const r=await t.formElementAnchor?.();t._internals.setValidity(t.formValidity,t.formValidityMessage,r);}else t._internals.setValidity({});},i$3=t=>{t._internals?.form?.requestSubmit();},m$1=t=>{t._internals?.form?.reset();},s$1=t=>"formFormattedValue"in t&&"name"in t;
411
+
412
+ const f$2=new Map,s=new Map,i$2=new Map,D=new Set;let d=false;const O$1={iw:"he",ji:"yi",in:"id"},l$2=t=>{d||(console.warn(`[LocaleData] Supported locale "${t}" not configured, import the "Assets.js" module from the webcomponents package you are using.`),d=true);},R$1=(t,e,n)=>{t=t&&O$1[t]||t,t==="no"&&(t="nb"),t==="zh"&&!e&&(n==="Hans"?e="CN":n==="Hant"&&(e="TW")),(t==="sh"||t==="sr"&&n==="Latn")&&(t="sr",e="Latn");let r=`${t}_${e}`;return Icons.l.includes(r)?s.has(r)?r:(l$2(r),Icons.r$1):(r=t,Icons.l.includes(r)?s.has(r)?r:(l$2(r),Icons.r$1):Icons.r$1)},m=(t,e)=>{f$2.set(t,e);},_=t=>{if(!i$2.get(t)){const e=s.get(t);if(!e)throw new Error(`CLDR data for locale ${t} is not loaded!`);i$2.set(t,e(t));}return i$2.get(t)},u=async(t,e,n)=>{const r=R$1(t,e,n),p=Icons.n$1("OpenUI5Support");if(p){const o=p.getLocaleDataObject();if(o){m(r,o);return}}try{const o=await _(r);m(r,o);}catch(o){const c=o;D.has(c.message)||(D.add(c.message),console.error(c.message));}},C=(t,e)=>{s.set(t,e);};C("en",async()=>(await fetch("https://sdk.openui5.org/1.120.17/resources/sap/ui/core/cldr/en.json")).json()),Icons.t(()=>{const t=Icons.s$1();return u(t.getLanguage(),t.getRegion(),t.getScript())});
413
+
414
+ let it=0;const R=new Map,I=new Map,O={fromAttribute(c,f){return f===Boolean?c!==null:f===Number?c===null?void 0:parseFloat(c):c},toAttribute(c,f){return f===Boolean?c?"":null:f===Object||f===Array||c==null?null:String(c)}};function y(c){this._suppressInvalidation||this.constructor.getMetadata().isLanguageAware()&&Icons.s$2()||(this.onInvalidation(c),this._changedState.push(c),Icons.l$1(this),this._invalidationEventProvider.fireEvent("invalidate",{...c,target:this}));}function at(c,f){do{const t=Object.getOwnPropertyDescriptor(c,f);if(t)return t;c=Object.getPrototypeOf(c);}while(c&&c!==HTMLElement.prototype)}let b$1 = class b extends HTMLElement{constructor(){super();this.__shouldHydrate=false;this._rendered=false;const t=this.constructor;this._changedState=[],this._suppressInvalidation=true,this._inDOM=false,this._fullyConnected=false,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new Icons.i$2,this._componentStateFinalizedEventProvider=new Icons.i$2;let e;this._domRefReadyPromise=new Promise(n=>{e=n;}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o);}}),this._internals=this.attachInternals(),this._initShadowRoot();}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.shadowRoot?this.__shouldHydrate=true:this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this));}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren();}get _id(){return this.__id||(this.__id=`ui5wc_${++it}`),this.__id}render(){const t=this.constructor.template;return n$3(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&!this.hasAttribute("data-sap-ui-fastnavgroup")&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=true,e&&(this._startObservingDOMChildren(),await this._processChildren()),t.asyncFinished||await t.definePromise,this._inDOM&&(Icons.c$2(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=true,this.onEnterDOM());}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=false,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=false),this._domRefReadyPromise._deferredResolve(),Icons.h$1(this);}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:true,subtree:n,characterData:n};n$5(this,this._processChildren.bind(this),o);}_stopObservingDOMChildren(){b$2(this);}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots();}async _updateSlots(){const t=this.constructor,e$1=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,a=new Map;for(const[l,u]of Object.entries(e$1)){const d=u.propertyName||l;a.set(d,l),o.set(d,[...this._state[d]]),this._clearSlot(l,u);}const r=new Map,i=new Map,h=n.map(async(l,u)=>{const d=o$4(l),g=e$1[d];if(g===void 0){if(d!=="default"){const p=Object.keys(e$1).join(", ");console.warn(`Unknown slotName: ${d}, ignoring`,l,`Valid values are: ${p}`);}return}if(g.individualSlots){const p=(r.get(d)||0)+1;r.set(d,p),l._individualSlot=`${d}-${p}`;}if(l instanceof HTMLElement){const p=l.localName;if(p.includes("-")&&!o$3(p)){if(!customElements.get(p)){const L=customElements.whenDefined(p);let E=R.get(p);E||(E=new Promise(U=>setTimeout(U,1e3)),R.set(p,E)),await Promise.race([L,E]);}customElements.upgrade(l);}}if(l=t.getMetadata().constructor.validateSlotValue(l,g),v$1(l)&&g.invalidateOnChildChange){const p=this._getChildChangeListener(d);l.attachInvalidate.call(l,p);}l instanceof HTMLSlotElement&&this._attachSlotChange(l,d,!!g.invalidateOnChildChange);const C=g.propertyName||d;i.has(C)?i.get(C).push({child:l,idx:u}):i.set(C,[{child:l,idx:u}]);});await Promise.all(h),i.forEach((l,u)=>{this._state[u]=l.sort((d,g)=>d.idx-g.idx).map(d=>d.child),this._state[c$4(u)]=this._state[u];});let _=false;for(const[l,u]of Object.entries(e$1)){const d=u.propertyName||l;n$4(o.get(d),this._state[d])||(y.call(this,{type:"slot",name:a.get(d),reason:"children"}),_=true,t.getMetadata().isFormAssociated()&&e(this));}_||y.call(this,{type:"slot",name:"default",reason:"textcontent"});}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(v$1(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a);}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t);}),this._state[s]=[],this._state[c$4(s)]=this._state[s];}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t);}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t);}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&y.call(this,{type:"slot",name:t,reason:"childchange",child:e.target});}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),a=t.replace(/^ui5-/,""),r=c$4(a);if(o.hasOwnProperty(r)){const i=o[r];n=(i.converter??O).fromAttribute(s,i.type),this[r]=n;}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&o$2(this);}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t],a=l$4(t),i=(o.converter||O).toAttribute(e,o.type);this._doNotSyncAttributes.add(a),i==null?this.removeAttribute(a):this.setAttribute(a,i),this._doNotSyncAttributes.delete(a);}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const a=this._slotsAssignedNodes.get(t);a&&a.forEach(i=>{if(v$1(i)){const h=this._getChildChangeListener(e);i.detachInvalidate.call(i,h);}});const r=s$6([t]);this._slotsAssignedNodes.set(t,r),r.forEach(i=>{if(v$1(i)){const h=this._getChildChangeListener(e);i.attachInvalidate.call(i,h);}});}});}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e));}_onSlotChange(t){y.call(this,{type:"slot",name:t,reason:"slotchange"});}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s]);}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n;}),this.initializedProperties.clear()),this._suppressInvalidation=true;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized");}finally{this._suppressInvalidation=false;}this._changedState=[],t._needsShadowDOM()&&s$3(this),this._rendered=true,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering();}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot);});}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this||!this.isConnected?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t);}fireEvent(t,e,s=false,n=true){const o=this._fireEvent(t,e,s,n),a=C$1(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}fireDecoratorEvent(t,e){const s=this.getEventData(t),n=s?s.cancelable:false,o=s?s.bubbles:false,a=this._fireEvent(t,e,n,o),r=C$1(t);return r!==t?a&&this._fireEvent(r,e,n,o):a}_fireEvent(t,e,s=false,n=true){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:false,bubbles:n,cancelable:s}),a=this.dispatchEvent(o);if(a$4(t))return a;const r=new CustomEvent(t,{detail:e,composed:false,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&a}getEventData(t){return this.constructor.getMetadata().getEvents()[t]}getSlottedNodes(t){return s$6(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t);}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t);}get effectiveDir(){return Icons.n$2(this.constructor),r$1(this)}get isUI5Element(){return true}get isUI5AbstractElement(){return !this.constructor._needsShadowDOM()}get classes(){return {}}get accessibilityInfo(){}static get observedAttributes(){return this.getMetadata().getAttributesList()}static get tagsToScope(){const t=this.getMetadata().getPureTag(),e=this.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(Icons.i$3);return Icons.i$3(t)&&e.push(t),e}static _needsShadowDOM(){return !!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e$1=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){r(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const a=at(t,n);let r$1;a?.set&&(r$1=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(h){const _=this.constructor,l=i?i.call(this):this._state[n];if(l!==h){if(r$1?r$1.call(this,h):this._state[n]=h,y.call(this,{type:"property",name:n,newValue:h,oldValue:l}),this._rendered){const d=i?i.call(this):this._state[n];this._updateAttribute(n,d);}_.getMetadata().isFormAssociated()&&e(this);}}});}if(e$1){const n=this.getMetadata().getSlots();for(const[o,a]of Object.entries(n)){r(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const r$1=a.propertyName||o,i={get(){return this._state[r$1]!==void 0?this._state[r$1]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,r$1,i),r$1!==c$4(r$1)&&Object.defineProperty(t,c$4(r$1),i);}}}static{this.metadata={};}static{this.styles="";}static get dependencies(){return []}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);I.set(this,t);}static getUniqueDependencies(){return I.has(this)||this.cacheUniqueDependencies(),I.get(this)||[]}static async onDefine(){return Promise.resolve()}static fetchI18nBundles(){return Promise.all(Object.entries(this.getMetadata().getI18n()).map(t=>{const{bundleName:e}=t[1];return Icons.f$2(e)}))}static fetchCLDR(){return this.getMetadata().needsCLDR()?u(Icons.s$1().getLanguage(),Icons.s$1().getRegion(),Icons.s$1().getScript()):Promise.resolve()}static{this.i18nBundleStorage={};}static get i18nBundles(){return this.i18nBundleStorage}static define(){const t=async()=>{await Icons.b$1();const o=await Promise.all([this.fetchI18nBundles(),this.fetchCLDR(),this.onDefine()]),[a]=o;Object.entries(this.getMetadata().getI18n()).forEach((r,i)=>{const h=r[1].bundleName;this.i18nBundleStorage[h]=a[i];}),this.asyncFinished=true;};this.definePromise=t();const e=this.getMetadata().getTag(),s=Icons.w$1(e),n=customElements.get(e);return n&&!s?Icons.$$1(e):n||(this._generateAccessors(),Icons.h$2(e),customElements.define(e,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==b;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=Icons.e({},...t);return this._metadata=new p$1(s),this._metadata}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}};const v$1=c=>"isUI5Element"in c;
415
+
416
+ let f$1 = class f{constructor(e,t){if(!e.isUI5Element)throw new Error("The root web component must be a UI5 Element instance");if(this.rootWebComponent=e,this.rootWebComponent.addEventListener("keydown",this._onkeydown.bind(this)),this._initBound=this._init.bind(this),this.rootWebComponent.attachComponentStateFinalized(this._initBound),typeof t.getItemsCallback!="function")throw new Error("getItemsCallback is required");this._getItems=t.getItemsCallback,this._currentIndex=t.currentIndex||0,this._rowSize=t.rowSize||1,this._behavior=t.behavior||l$5.Static,this._navigationMode=t.navigationMode||r$4.Auto,this._affectedPropertiesNames=t.affectedPropertiesNames||[],this._skipItemsSize=t.skipItemsSize||null;}setCurrentItem(e){const t=this._getItems().indexOf(e);if(t===-1){console.warn("The provided item is not managed by ItemNavigation",e);return}this._currentIndex=t,this._applyTabIndex();}setRowSize(e){this._rowSize=e;}_init(){this._getItems().forEach((e,t)=>{e.forcedTabIndex=t===this._currentIndex?"0":"-1";});}_onkeydown(e){if(!this._canNavigate())return;const t=this._navigationMode===r$4.Horizontal||this._navigationMode===r$4.Auto,i=this._navigationMode===r$4.Vertical||this._navigationMode===r$4.Auto,s=this.rootWebComponent.effectiveDir==="rtl";if(s&&D$1(e)&&t)this._handleRight();else if(s&&R$2(e)&&t)this._handleLeft();else if(D$1(e)&&t)this._handleLeft();else if(R$2(e)&&t)this._handleRight();else if(P(e)&&i)this._handleUp();else if(_$1(e)&&i)this._handleDown();else if(M(e))this._handleHome();else if(n$9(e))this._handleEnd();else if(j(e))this._handlePageUp();else if(q(e))this._handlePageDown();else return;e.preventDefault(),this._applyTabIndex(),this._focusCurrentItem();}_handleUp(){const e=this._getItems().length;if(this._currentIndex-this._rowSize>=0){this._currentIndex-=this._rowSize;return}if(this._behavior===l$5.Cyclic){const t=this._currentIndex%this._rowSize,i=t===0?this._rowSize-1:t-1,s=Math.ceil(e/this._rowSize);let o=i+(s-1)*this._rowSize;o>e-1&&(o-=this._rowSize),this._currentIndex=o;}else this._currentIndex=0;}_handleDown(){const e=this._getItems().length;if(this._currentIndex+this._rowSize<e){this._currentIndex+=this._rowSize;return}if(this._behavior===l$5.Cyclic){const i=(this._currentIndex%this._rowSize+1)%this._rowSize;this._currentIndex=i;}else this._currentIndex=e-1;}_handleLeft(){const e=this._getItems().length;if(this._currentIndex>0){this._currentIndex-=1;return}this._behavior===l$5.Cyclic&&(this._currentIndex=e-1);}_handleRight(){const e=this._getItems().length;if(this._currentIndex<e-1){this._currentIndex+=1;return}this._behavior===l$5.Cyclic&&(this._currentIndex=0);}_handleHome(){const e=this._rowSize>1?this._rowSize:this._getItems().length;this._currentIndex-=this._currentIndex%e;}_handleEnd(){const e=this._rowSize>1?this._rowSize:this._getItems().length;this._currentIndex+=e-1-this._currentIndex%e;}_handlePageUp(){this._rowSize>1||this._handlePageUpFlat();}_handlePageDown(){this._rowSize>1||this._handlePageDownFlat();}_handlePageUpFlat(){if(this._skipItemsSize===null){this._currentIndex-=this._currentIndex;return}this._currentIndex+1>this._skipItemsSize?this._currentIndex-=this._skipItemsSize:this._currentIndex-=this._currentIndex;}_handlePageDownFlat(){if(this._skipItemsSize===null){this._currentIndex=this._getItems().length-1;return}this._getItems().length-this._currentIndex-1>this._skipItemsSize?this._currentIndex+=this._skipItemsSize:this._currentIndex=this._getItems().length-1;}_applyTabIndex(){const e=this._getItems();for(let t=0;t<e.length;t++)e[t].forcedTabIndex=t===this._currentIndex?"0":"-1";this._affectedPropertiesNames.forEach(t=>{const i=this.rootWebComponent[t];this.rootWebComponent[t]=Array.isArray(i)?[...i]:{...i};});}_focusCurrentItem(){const e=this._getCurrentItem();e&&e.focus();}_canNavigate(){const e=this._getCurrentItem(),t=t$3();return e&&e===t}_getCurrentItem(){const e=this._getItems();if(!e.length)return;for(;this._currentIndex>=e.length;)this._currentIndex-=this._rowSize;this._currentIndex<0&&(this._currentIndex=0);const t=e[this._currentIndex];if(!t)return;if(v$1(t))return t.getFocusDomRef();const i=this.rootWebComponent.getDomRef();if(i&&t.id)return i.querySelector(`[id="${t.id}"]`)}};
417
+
418
+ let n$1;const l$1=new Map,a$2=()=>(n$1||(n$1=new window.ResizeObserver(r=>{window.requestAnimationFrame(()=>{r.forEach(t=>{const s=l$1.get(t.target);s&&Promise.all(s.map(e=>e()));});});})),n$1),c$2=(r,t)=>{const s=l$1.get(r)||[];s.length||a$2().observe(r),l$1.set(r,[...s,t]);},b=(r,t)=>{const s=l$1.get(r)||[];if(s.length===0)return;const e=s.filter(o=>o!==t);e.length===0?(a$2().unobserve(r),l$1.delete(r)):l$1.set(r,e);};class f{static register(t,s){let e=t;v$1(e)&&(e=e.getDomRef()),e instanceof HTMLElement?c$2(e,s):console.warn("Cannot register ResizeHandler for element",t);}static deregister(t,s){let e=t;v$1(e)&&(e=e.getDomRef()),e instanceof HTMLElement?b(e,s):console.warn("Cannot deregister ResizeHandler for element",t);}}
419
+
420
+ const l="scroll",p=Icons.l$2()?"touchend":"mouseup";class v extends Icons.i$2{constructor(t){super();this.supportsTouch=Icons.l$2();this.containerComponent=t,this.mouseMove=this.ontouchmove.bind(this),this.mouseUp=this.ontouchend.bind(this),this.touchStart=this.ontouchstart.bind(this),this.supportsTouch=Icons.l$2(),this.cachedValue={dragX:0,dragY:0},this.startX=0,this.startY=0,this.supportsTouch?(t.addEventListener("touchstart",this.touchStart,{passive:true}),t.addEventListener("touchmove",this.mouseMove,{passive:true}),t.addEventListener("touchend",this.mouseUp,{passive:true})):t.addEventListener("mousedown",this.touchStart,{passive:true});}set scrollContainer(t){this._container=t;}get scrollContainer(){return this._container}async scrollTo(t,e,s=0,o=0){let r=this.scrollContainer.clientHeight>0&&this.scrollContainer.clientWidth>0;for(;!r&&s>0;)await new Promise(n=>{setTimeout(()=>{r=this.scrollContainer.clientHeight>0&&this.scrollContainer.clientWidth>0,s--,n();},o);});this._container.scrollLeft=t,this._container.scrollTop=e;}move(t,e,s){if(s){this._container.scrollLeft+=t,this._container.scrollTop+=e;return}if(this._container)return n$d(this._container,t,e)}getScrollLeft(){return this._container.scrollLeft}getScrollTop(){return this._container.scrollTop}_isTouchInside(t){let e=null;this.supportsTouch&&t instanceof TouchEvent&&(e=t.touches[0]);const s=this._container.getBoundingClientRect(),o=this.supportsTouch?e.clientX:t.x,r=this.supportsTouch?e.clientY:t.y;return o>=s.left&&o<=s.right&&r>=s.top&&r<=s.bottom}ontouchstart(t){let e=null;this.supportsTouch&&t instanceof TouchEvent&&(e=t.touches[0]),e?(this.startX=e.pageX,this.startY=e.pageY):(document.addEventListener("mouseup",this.mouseUp,{passive:true}),document.addEventListener("mousemove",this.mouseMove,{passive:true})),e&&(this._prevDragX=e.pageX,this._prevDragY=e.pageY),t instanceof MouseEvent&&(this._prevDragX=t.x,this._prevDragY=t.y),this._canScroll=this._isTouchInside(t);}ontouchmove(t){if(!this._canScroll)return;const e=this._container,s=this.supportsTouch?t.touches[0]:null,o=this.supportsTouch?s.pageX:t.x,r=this.supportsTouch?s.pageY:t.y;e.scrollLeft+=this._prevDragX-o,e.scrollTop+=this._prevDragY-r,this.fireEvent(l,{isLeft:o>this._prevDragX,isRight:o<this._prevDragX}),this.cachedValue.dragX=this._prevDragX,this.cachedValue.dragY=this._prevDragY,this._prevDragX=o,this._prevDragY=r;}ontouchend(t){if(this.supportsTouch){const h=Math.abs(t.changedTouches[0].pageX-this.startX),c=Math.abs(t.changedTouches[0].pageY-this.startY);if(h<10&&c<10)return}if(!this._canScroll)return;const e=this._container,s=this.supportsTouch?t.changedTouches[0].pageX:t.x,o=this.supportsTouch?t.changedTouches[0].pageY:t.y;e.scrollLeft+=this._prevDragX-s,e.scrollTop+=this._prevDragY-o;const n=s===this._prevDragX?this.cachedValue.dragX:s;this.fireEvent(p,{isLeft:n<this._prevDragX,isRight:n>this._prevDragX}),this._prevDragX=s,this._prevDragY=o,this.supportsTouch||(document.removeEventListener("mousemove",this.mouseMove),document.removeEventListener("mouseup",this.mouseUp));}}
421
+
422
+ const n=new Icons.i$2,t$1="directionChange",a$1=e=>{n.attachEvent(t$1,e);},c$1=e=>{n.detachEvent(t$1,e);},o$1=()=>n.fireEvent(t$1,void 0);
423
+
424
+ const i$1=async()=>{const e=o$1();await Promise.all(e),await Icons.C$2({rtlAware:true});};
425
+
426
+ // TODO-evo:assert on node throws an error if the assertion is violated
427
+
428
+ /**
429
+ * A simple assertion mechanism that logs a message when a given condition is not met.
430
+ *
431
+ * <b>Note:</b> Calls to this method might be removed when the JavaScript code
432
+ * is optimized during build. Therefore, callers should not rely on any side effects
433
+ * of this method.
434
+ *
435
+ * @function
436
+ * @since 1.58
437
+ * @alias module:sap/base/assert
438
+ * @param {boolean} bResult Result of the checked assertion
439
+ * @param {string|function():any} vMessage Message that will be logged when the result is <code>false</code>.
440
+ * In case this is a function, the return value of the function will be displayed. This can be used to execute
441
+ * complex code only if the assertion fails.
442
+ * @public
443
+ * @SecSink {1|SECRET} Could expose secret data in logs
444
+ *
445
+ */ /*!
446
+ * OpenUI5
447
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
448
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
449
+ */
450
+
451
+ var fnAssert = function (bResult, vMessage) {
452
+ if (!bResult) {
453
+ var sMessage = vMessage;
454
+ /*eslint-disable no-console */
455
+ console.assert(bResult, sMessage);
456
+ /*eslint-enable no-console */
457
+ }
458
+ };
459
+
460
+ // validation regexes
461
+ /*!
462
+ * OpenUI5
463
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
464
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
465
+ */
466
+
467
+ var rBasicUrl = /^(?:([^:\/?#]+):)?((?:[\/\\]{2,}((?:\[[^\]]+\]|[^\/?#:]+))(?::([0-9]+))?)?([^?#]*))(?:\?([^#]*))?(?:#(.*))?$/;
468
+ var rCheckPath = /^([a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*$/i;
469
+ var rCheckQuery = /^([a-z0-9-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*$/i;
470
+ var rCheckFragment = rCheckQuery;
471
+ var rCheckMail = /^([a-z0-9!$'*+:^_`{|}~-]|%[0-9a-f]{2})+(?:\.([a-z0-9!$'*+:^_`{|}~-]|%[0-9a-f]{2})+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;
472
+ var rCheckIPv4 = /^([0-9]{1,3}\.){3}[0-9]{1,3}$/;
473
+ var rCheckValidIPv4 = /^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/;
474
+ var rCheckIPv6 = /^\[[^\]]+\]$/;
475
+ var rCheckValidIPv6 = /^\[(((([0-9a-f]{1,4}:){6}|(::([0-9a-f]{1,4}:){5})|(([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4})|((([0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){3})|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2})|((([0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:)|((([0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::))(([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))|((([0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::))\]$/i;
476
+ var rCheckHostName = /^([a-z0-9]([a-z0-9\-]*[a-z0-9])?\.)*[a-z0-9]([a-z0-9\-]*[a-z0-9])?$/i;
477
+ var rSpecialSchemeURLs = /^((?:ftp|https?|wss?):)([\s\S]+)$/;
478
+
479
+ /* eslint-disable no-control-regex */
480
+ var rCheckWhitespaces = /[\u0009\u000A\u000D]/;
481
+
482
+ /**
483
+ * Registry to manage allowed URLs and validate against them.
484
+ *
485
+ * @namespace
486
+ * @since 1.85
487
+ * @alias module:sap/base/security/URLListValidator
488
+ * @public
489
+ */
490
+ var oURLListValidator = {};
491
+
492
+ /**
493
+ * Creates a new URLListValidator.Entry object
494
+ *
495
+ * @param {string} [protocol] The protocol of the URL, can be falsy to allow all protocols for an entry e.g. "", "http", "mailto"
496
+ * @param {string} [host] The host of the URL, can be falsy to allow all hosts. A wildcard asterisk can be set at the beginning, e.g. "examples.com", "*.example.com"
497
+ * @param {string} [port] The port of the URL, can be falsy to allow all ports, e.g. "", "8080"
498
+ * @param {string} [path] the path of the URL, path of the url, can be falsy to allow all paths. A wildcard asterisk can be set at the end, e.g. "/my-example*", "/my-news"
499
+ * @returns {module:sap/base/security/URLListValidator.Entry|object}
500
+ * @private
501
+ */
502
+ oURLListValidator._createEntry = function (protocol, host, port, path) {
503
+ return new URLListValidatorEntry(protocol, host, port, path);
504
+ };
505
+
506
+ /**
507
+ * Entry object of the URLListValidator.
508
+ *
509
+ * @public
510
+ * @typedef {object} module:sap/base/security/URLListValidator.Entry
511
+ * @property {string} [protocol] The protocol of the URL, can be falsy to allow all protocols for an entry e.g. "", "http", "mailto"
512
+ * @property {string} [host] The host of the URL, can be falsy to allow all hosts. A wildcard asterisk can be set at the beginning, e.g. "examples.com", "*.example.com"
513
+ * @property {string} [port] The port of the URL, can be falsy to allow all ports, e.g. "", "8080"
514
+ * @property {string} [path] the path of the URL, path of the url, can be falsy to allow all paths. A wildcard asterisk can be set at the end, e.g. "/my-example*", "/my-news"
515
+ */
516
+ function URLListValidatorEntry(protocol, host, port, path) {
517
+ Object.defineProperties(this, {
518
+ protocol: {
519
+ value: protocol && protocol.toUpperCase(),
520
+ enumerable: true
521
+ },
522
+ host: {
523
+ value: host && host.toUpperCase(),
524
+ enumerable: true
525
+ },
526
+ port: {
527
+ value: port,
528
+ enumerable: true
529
+ },
530
+ path: {
531
+ value: path,
532
+ enumerable: true
533
+ }
534
+ });
535
+ }
536
+
537
+ /**
538
+ * The internally managed allowed entries.
539
+ * @private
540
+ */
541
+ var aAllowedEntries = [];
542
+
543
+ /**
544
+ * Clears the allowed entries for URL validation.
545
+ * This makes all URLs allowed.
546
+ *
547
+ * @public
548
+ */
549
+ oURLListValidator.clear = function () {
550
+ aAllowedEntries = [];
551
+ };
552
+
553
+ /**
554
+ * Adds an allowed entry.
555
+ *
556
+ * Note:
557
+ * Adding the first entry to the list of allowed entries will disallow all URLs but the ones matching the newly added entry.
558
+ *
559
+ * <b>Note</b>:
560
+ * It is strongly recommended to set a path only in combination with an origin (never set a path alone).
561
+ * There's almost no case where checking only the path of a URL would allow to ensure its validity.
562
+ *
563
+ * @param {string} [protocol] The protocol of the URL, can be falsy to allow all protocols for an entry e.g. "", "http", "mailto"
564
+ * @param {string} [host] The host of the URL, can be falsy to allow all hosts. A wildcard asterisk can be set at the beginning, e.g. "examples.com", "*.example.com"
565
+ * @param {string} [port] The port of the URL, can be falsy to allow all ports, e.g. "", "8080"
566
+ * @param {string} [path] the path of the URL, path of the url, can be falsy to allow all paths. A wildcard asterisk can be set at the end, e.g. "/my-example*", "/my-news"
567
+ * @public
568
+ */
569
+ oURLListValidator.add = function (protocol, host, port, path) {
570
+ var oEntry = this._createEntry(protocol, host, port, path);
571
+ aAllowedEntries.push(oEntry);
572
+ };
573
+
574
+ /**
575
+ * Deletes an entry from the allowed entries.
576
+ *
577
+ * Note:
578
+ * Deleting the last entry from the list of allowed entries will allow all URLs.
579
+ *
580
+ * @param {module:sap/base/security/URLListValidator.Entry} oEntry The entry to be deleted
581
+ * @private
582
+ */
583
+ oURLListValidator._delete = function (oEntry) {
584
+ aAllowedEntries.splice(aAllowedEntries.indexOf(oEntry), 1);
585
+ };
586
+
587
+ /**
588
+ * Gets the list of allowed entries.
589
+ *
590
+ * @returns {module:sap/base/security/URLListValidator.Entry[]} The allowed entries
591
+ * @public
592
+ */
593
+ oURLListValidator.entries = function () {
594
+ return aAllowedEntries.slice();
595
+ };
596
+
597
+ /**
598
+ * Validates a URL. Check if it's not a script or other security issue.
599
+ *
600
+ * <b>Note</b>:
601
+ * It is strongly recommended to validate only absolute URLs. There's almost no case
602
+ * where checking only the path of a URL would allow to ensure its validity.
603
+ * For compatibility reasons, this API cannot automatically resolve URLs relative to
604
+ * <code>document.baseURI</code>, but callers should do so. In that case, and when the
605
+ * allow list is not empty, an entry for the origin of <code>document.baseURI</code>
606
+ * must be added to the allow list.
607
+ *
608
+ * <h3>Details</h3>
609
+ * Splits the given URL into components and checks for allowed characters according to RFC 3986:
610
+ *
611
+ * <pre>
612
+ * authority = [ userinfo "@" ] host [ ":" port ]
613
+ * userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
614
+ * host = IP-literal / IPv4address / reg-name
615
+ *
616
+ * IP-literal = "[" ( IPv6address / IPvFuture ) "]"
617
+ * IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
618
+ * IPv6address = 6( h16 ":" ) ls32
619
+ * / "::" 5( h16 ":" ) ls32
620
+ * / [ h16 ] "::" 4( h16 ":" ) ls32
621
+ * / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
622
+ * / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
623
+ * / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
624
+ * / [ *4( h16 ":" ) h16 ] "::" ls32
625
+ * / [ *5( h16 ":" ) h16 ] "::" h16
626
+ * / [ *6( h16 ":" ) h16 ] "::"
627
+ * ls32 = ( h16 ":" h16 ) / IPv4address
628
+ * ; least-significant 32 bits of address
629
+ * h16 = 1*4HEXDIG
630
+ * ; 16 bits of address represented in hexadecimal
631
+ *
632
+ * IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
633
+ * dec-octet = DIGIT ; 0-9
634
+ * / %x31-39 DIGIT ; 10-99
635
+ * / "1" 2DIGIT ; 100-199
636
+ * / "2" %x30-34 DIGIT ; 200-249
637
+ * / "25" %x30-35 ; 250-255
638
+ *
639
+ * reg-name = *( unreserved / pct-encoded / sub-delims )
640
+ *
641
+ * pct-encoded = "%" HEXDIG HEXDIG
642
+ * reserved = gen-delims / sub-delims
643
+ * gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
644
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
645
+ * / "*" / "+" / "," / ";" / "="
646
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
647
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
648
+ *
649
+ * path = path-abempty ; begins with "/" or is empty
650
+ * / path-absolute ; begins with "/" but not "//"
651
+ * / path-noscheme ; begins with a non-colon segment
652
+ * / path-rootless ; begins with a segment
653
+ * / path-empty ; zero characters
654
+ *
655
+ * path-abempty = *( "/" segment )
656
+ * path-absolute = "/" [ segment-nz *( "/" segment ) ]
657
+ * path-noscheme = segment-nz-nc *( "/" segment )
658
+ * path-rootless = segment-nz *( "/" segment )
659
+ * path-empty = 0<pchar>
660
+ * segment = *pchar
661
+ * segment-nz = 1*pchar
662
+ * segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
663
+ * ; non-zero-length segment without any colon ":"
664
+ *
665
+ * query = *( pchar / "/" / "?" )
666
+ *
667
+ * fragment = *( pchar / "/" / "?" )
668
+ * </pre>
669
+ *
670
+ * For the hostname component, we are checking for valid DNS hostnames according to RFC 952 / RFC 1123:
671
+ *
672
+ * <pre>
673
+ * hname = name *("." name)
674
+ * name = let-or-digit ( *( let-or-digit-or-hyphen ) let-or-digit )
675
+ * </pre>
676
+ *
677
+ *
678
+ * When the URI uses the protocol 'mailto:', the address part is additionally checked
679
+ * against the most commonly used parts of RFC 6068:
680
+ *
681
+ * <pre>
682
+ * mailtoURI = "mailto:" [ to ] [ hfields ]
683
+ * to = addr-spec *("," addr-spec )
684
+ * hfields = "?" hfield *( "&" hfield )
685
+ * hfield = hfname "=" hfvalue
686
+ * hfname = *qchar
687
+ * hfvalue = *qchar
688
+ * addr-spec = local-part "@" domain
689
+ * local-part = dot-atom-text // not accepted: quoted-string
690
+ * domain = dot-atom-text // not accepted: "[" *dtext-no-obs "]"
691
+ * dtext-no-obs = %d33-90 / ; Printable US-ASCII
692
+ * %d94-126 ; characters not including
693
+ * ; "[", "]", or "\"
694
+ * qchar = unreserved / pct-encoded / some-delims
695
+ * some-delims = "!" / "$" / "'" / "(" / ")" / "*"
696
+ * / "+" / "," / ";" / ":" / "@"
697
+ *
698
+ * Note:
699
+ * A number of characters that can appear in &lt;addr-spec> MUST be
700
+ * percent-encoded. These are the characters that cannot appear in
701
+ * a URI according to [STD66] as well as "%" (because it is used for
702
+ * percent-encoding) and all the characters in gen-delims except "@"
703
+ * and ":" (i.e., "/", "?", "#", "[", and "]"). Of the characters
704
+ * in sub-delims, at least the following also have to be percent-
705
+ * encoded: "&", ";", and "=". Care has to be taken both when
706
+ * encoding as well as when decoding to make sure these operations
707
+ * are applied only once.
708
+ *
709
+ * </pre>
710
+ *
711
+ * When a list of allowed entries has been configured using {@link #add},
712
+ * any URL that passes the syntactic checks above, additionally will be tested against
713
+ * the content of this list.
714
+ *
715
+ * @param {string} sUrl URL to be validated
716
+ * @return {boolean} true if valid, false if not valid
717
+ * @public
718
+ */
719
+ oURLListValidator.validate = function (sUrl) {
720
+ // Test for not allowed whitespaces
721
+ if (typeof sUrl === "string") {
722
+ if (rCheckWhitespaces.test(sUrl)) {
723
+ return false;
724
+ }
725
+ }
726
+
727
+ // for 'special' URLs without a given base URL, the whatwg spec allows any number of slashes.
728
+ // As the rBasicUrl regular expression cannot handle 'special' URLs, the URL is modified upfront,
729
+ // if it wouldn't be recognized by the regex.
730
+ // See https://url.spec.whatwg.org/#scheme-state (case 2.6.)
731
+ var result = rSpecialSchemeURLs.exec(sUrl);
732
+ if (result && !/^[\/\\]{2}/.test(result[2])) {
733
+ sUrl = result[1] + "//" + result[2];
734
+ }
735
+ result = rBasicUrl.exec(sUrl);
736
+ if (!result) {
737
+ return false;
738
+ }
739
+ var sProtocol = result[1],
740
+ sBody = result[2],
741
+ sHost = result[3],
742
+ sPort = result[4],
743
+ sPath = result[5],
744
+ sQuery = result[6],
745
+ sHash = result[7];
746
+
747
+ // protocol
748
+ if (sProtocol) {
749
+ sProtocol = sProtocol.toUpperCase();
750
+ if (aAllowedEntries.length <= 0) {
751
+ // no allowed entries -> check for default protocols
752
+ if (!/^(https?|ftp)/i.test(sProtocol)) {
753
+ return false;
754
+ }
755
+ }
756
+ }
757
+
758
+ // Host -> validity check for IP address or hostname
759
+ if (sHost) {
760
+ if (rCheckIPv4.test(sHost)) {
761
+ if (!rCheckValidIPv4.test(sHost)) {
762
+ //invalid ipv4 address
763
+ return false;
764
+ }
765
+ } else if (rCheckIPv6.test(sHost)) {
766
+ if (!rCheckValidIPv6.test(sHost)) {
767
+ //invalid ipv6 address
768
+ return false;
769
+ }
770
+ } else if (!rCheckHostName.test(sHost)) {
771
+ // invalid host name
772
+ return false;
773
+ }
774
+ sHost = sHost.toUpperCase();
775
+ }
776
+
777
+ // Path -> split for "/" and check if forbidden characters exist
778
+ if (sPath) {
779
+ if (sProtocol === "MAILTO") {
780
+ var aAddresses = sBody.split(",");
781
+ for (var i = 0; i < aAddresses.length; i++) {
782
+ if (!rCheckMail.test(aAddresses[i])) {
783
+ // forbidden character found
784
+ return false;
785
+ }
786
+ }
787
+ } else {
788
+ var aComponents = sPath.split("/");
789
+ for (var i = 0; i < aComponents.length; i++) {
790
+ if (!rCheckPath.test(aComponents[i])) {
791
+ // forbidden character found
792
+ return false;
793
+ }
794
+ }
795
+ }
796
+ }
797
+
798
+ // query
799
+ if (sQuery) {
800
+ if (!rCheckQuery.test(sQuery)) {
801
+ // forbidden character found
802
+ return false;
803
+ }
804
+ }
805
+
806
+ // hash
807
+ if (sHash) {
808
+ if (!rCheckFragment.test(sHash)) {
809
+ // forbidden character found
810
+ return false;
811
+ }
812
+ }
813
+
814
+ //filter allowed entries
815
+ if (aAllowedEntries.length > 0) {
816
+ var bFound = false;
817
+ for (var i = 0; i < aAllowedEntries.length; i++) {
818
+ if (!sProtocol || !aAllowedEntries[i].protocol || sProtocol == aAllowedEntries[i].protocol) {
819
+ // protocol OK
820
+ var bOk = false;
821
+ if (sHost && aAllowedEntries[i].host && /^\*/.test(aAllowedEntries[i].host)) {
822
+ // check for wildcard search at begin
823
+ if (!aAllowedEntries[i]._hostRegexp) {
824
+ var sHostEscaped = aAllowedEntries[i].host.slice(1).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
825
+ aAllowedEntries[i]._hostRegexp = RegExp(sHostEscaped + "$");
826
+ }
827
+ var rFilter = aAllowedEntries[i]._hostRegexp;
828
+ if (rFilter.test(sHost)) {
829
+ bOk = true;
830
+ }
831
+ } else if (!sHost || !aAllowedEntries[i].host || sHost == aAllowedEntries[i].host) {
832
+ bOk = true;
833
+ }
834
+ if (bOk) {
835
+ // host OK
836
+ if (!sHost && !sPort || !aAllowedEntries[i].port || sPort == aAllowedEntries[i].port) {
837
+ // port OK
838
+ if (aAllowedEntries[i].path && /\*$/.test(aAllowedEntries[i].path)) {
839
+ // check for wildcard search at end
840
+ if (!aAllowedEntries[i]._pathRegexp) {
841
+ var sPathEscaped = aAllowedEntries[i].path.slice(0, -1).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
842
+ aAllowedEntries[i]._pathRegexp = RegExp("^" + sPathEscaped);
843
+ }
844
+ var rFilter = aAllowedEntries[i]._pathRegexp;
845
+ if (rFilter.test(sPath)) {
846
+ bFound = true;
847
+ }
848
+ } else if (!aAllowedEntries[i].path || sPath == aAllowedEntries[i].path) {
849
+ // path OK
850
+ bFound = true;
851
+ }
852
+ }
853
+ }
854
+ }
855
+ if (bFound) {
856
+ break;
857
+ }
858
+ }
859
+ if (!bFound) {
860
+ return false;
861
+ }
862
+ }
863
+ return true;
864
+ };
865
+
866
+ var cajaHtmlSanitizer = {};
867
+
868
+ var hasRequiredCajaHtmlSanitizer;
869
+
870
+ function requireCajaHtmlSanitizer () {
871
+ if (hasRequiredCajaHtmlSanitizer) return cajaHtmlSanitizer;
872
+ hasRequiredCajaHtmlSanitizer = 1;
873
+ (function() {
874
+ /* Copyright Google Inc.
875
+ * Licensed under the Apache Licence Version 2.0
876
+ * Autogenerated at Tue May 22 10:18:21 PDT 2012
877
+ * \@overrides window
878
+ * \@provides cssSchema, CSS_PROP_BIT_QUANTITY, CSS_PROP_BIT_HASH_VALUE, CSS_PROP_BIT_NEGATIVE_QUANTITY, CSS_PROP_BIT_QSTRING_CONTENT, CSS_PROP_BIT_QSTRING_URL, CSS_PROP_BIT_HISTORY_INSENSITIVE, CSS_PROP_BIT_Z_INDEX, CSS_PROP_BIT_ALLOWED_IN_LINK */
879
+ /**
880
+ * @const
881
+ * @type {number}
882
+ */
883
+ var CSS_PROP_BIT_QUANTITY = 1;
884
+ /**
885
+ * @const
886
+ * @type {number}
887
+ */
888
+ var CSS_PROP_BIT_HASH_VALUE = 2;
889
+ /**
890
+ * @const
891
+ * @type {number}
892
+ */
893
+ var CSS_PROP_BIT_NEGATIVE_QUANTITY = 4;
894
+ /**
895
+ * @const
896
+ * @type {number}
897
+ */
898
+ var CSS_PROP_BIT_QSTRING_CONTENT = 8;
899
+ /**
900
+ * @const
901
+ * @type {number}
902
+ */
903
+ var CSS_PROP_BIT_QSTRING_URL = 16;
904
+ /**
905
+ * @const
906
+ * @type {number}
907
+ */
908
+ var CSS_PROP_BIT_Z_INDEX = 64;
909
+ /**
910
+ * @const
911
+ * @type {number}
912
+ */
913
+ var CSS_PROP_BIT_ALLOWED_IN_LINK = 128;
914
+ var cssSchema = (function () {
915
+ var s = [
916
+ 'rgb(?:\\(\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)\\s*,\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)\\s*,\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)|a\\(\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)\\s*,\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)\\s*,\\s*(?:\\d+|0|\\d+(?:\\.\\d+)?%)\\s*,\\s*(?:\\d+|0(?:\\.\\d+)?|\\.\\d+|1(?:\\.0+)?|0|\\d+(?:\\.\\d+)?%)) *\\)'
917
+ ], c = [ /^ *$/i, RegExp('^ *(?:\\s*' + s[ 0 ] + '|(?:\\s*' + s[ 0 ] +
918
+ ')?)+ *$', 'i'), RegExp('^ *\\s*' + s[ 0 ] + ' *$', 'i'),
919
+ RegExp('^ *\\s*' + s[ 0 ] + '\\s*' + s[ 0 ] + ' *$', 'i') ], L = [ [
920
+ 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige',
921
+ 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown',
922
+ 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral',
923
+ 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue',
924
+ 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkkhaki',
925
+ 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred',
926
+ 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray',
927
+ 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray',
928
+ 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia',
929
+ 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green',
930
+ 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory',
931
+ 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon',
932
+ 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow',
933
+ 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen',
934
+ 'lightskyblue', 'lightslategray', 'lightsteelblue', 'lightyellow',
935
+ 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine',
936
+ 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',
937
+ 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise',
938
+ 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose',
939
+ 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab',
940
+ 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen',
941
+ 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru',
942
+ 'pink', 'plum', 'powderblue', 'purple', 'red', 'rosybrown',
943
+ 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen',
944
+ 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray',
945
+ 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato',
946
+ 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow',
947
+ 'yellowgreen' ], [ 'all-scroll', 'col-resize', 'crosshair', 'default',
948
+ 'e-resize', 'hand', 'help', 'move', 'n-resize', 'ne-resize', 'no-drop',
949
+ 'not-allowed', 'nw-resize', 'pointer', 'progress', 'row-resize',
950
+ 's-resize', 'se-resize', 'sw-resize', 'text', 'vertical-text',
951
+ 'w-resize', 'wait' ], [ '-moz-inline-box', '-moz-inline-stack',
952
+ 'block', 'inline', 'inline-block', 'inline-table', 'list-item',
953
+ 'run-in', 'table', 'table-caption', 'table-cell', 'table-column',
954
+ 'table-column-group', 'table-footer-group', 'table-header-group',
955
+ 'table-row', 'table-row-group' ], [ 'armenian', 'circle', 'decimal',
956
+ 'decimal-leading-zero', 'disc', 'georgian', 'lower-alpha',
957
+ 'lower-greek', 'lower-latin', 'lower-roman', 'square', 'upper-alpha',
958
+ 'upper-latin', 'upper-roman' ], [ '100', '200', '300', '400', '500',
959
+ '600', '700', '800', '900', 'bold', 'bolder', 'lighter' ], [
960
+ 'condensed', 'expanded', 'extra-condensed', 'extra-expanded',
961
+ 'narrower', 'semi-condensed', 'semi-expanded', 'ultra-condensed',
962
+ 'ultra-expanded', 'wider' ], [ 'behind', 'center-left', 'center-right',
963
+ 'far-left', 'far-right', 'left-side', 'leftwards', 'right-side',
964
+ 'rightwards' ], [ 'large', 'larger', 'small', 'smaller', 'x-large',
965
+ 'x-small', 'xx-large', 'xx-small' ], [ '-moz-pre-wrap', '-o-pre-wrap',
966
+ '-pre-wrap', 'nowrap', 'pre', 'pre-line', 'pre-wrap' ], [ 'dashed',
967
+ 'dotted', 'double', 'groove', 'outset', 'ridge', 'solid' ], [
968
+ 'baseline', 'middle', 'sub', 'super', 'text-bottom', 'text-top' ], [
969
+ 'caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar'
970
+ ], [ 'fast', 'faster', 'slow', 'slower', 'x-fast', 'x-slow' ], [ 'above',
971
+ 'below', 'higher', 'level', 'lower' ], [ 'border-box', 'contain',
972
+ 'content-box', 'cover', 'padding-box' ], [ 'cursive', 'fantasy',
973
+ 'monospace', 'sans-serif', 'serif' ], [ 'loud', 'silent', 'soft',
974
+ 'x-loud', 'x-soft' ], [ 'no-repeat', 'repeat-x', 'repeat-y', 'round',
975
+ 'space' ], [ 'blink', 'line-through', 'overline', 'underline' ], [
976
+ 'high', 'low', 'x-high', 'x-low' ], [ 'absolute', 'relative', 'static'
977
+ ], [ 'capitalize', 'lowercase', 'uppercase' ], [ 'child', 'female',
978
+ 'male' ], [ 'bidi-override', 'embed' ], [ 'bottom', 'top' ], [ 'clip',
979
+ 'ellipsis' ], [ 'continuous', 'digits' ], [ 'hide', 'show' ], [
980
+ 'inside', 'outside' ], [ 'italic', 'oblique' ], [ 'left', 'right' ], [
981
+ 'ltr', 'rtl' ], [ 'no-content', 'no-display' ], [ 'suppress',
982
+ 'unrestricted' ], [ 'thick', 'thin' ], [ ',' ], [ '/' ], [ 'always' ],
983
+ [ 'auto' ], [ 'avoid' ], [ 'both' ], [ 'break-word' ], [ 'center' ], [
984
+ 'code' ], [ 'collapse' ], [ 'fixed' ], [ 'hidden' ], [ 'inherit' ], [
985
+ 'inset' ], [ 'invert' ], [ 'justify' ], [ 'local' ], [ 'medium' ], [
986
+ 'mix' ], [ 'none' ], [ 'normal' ], [ 'once' ], [ 'repeat' ], [ 'scroll'
987
+ ], [ 'separate' ], [ 'small-caps' ], [ 'spell-out' ], [ 'transparent' ],
988
+ [ 'visible' ] ];
989
+ return {
990
+ '-moz-border-radius': {
991
+ 'cssExtra': c[ 0 ],
992
+ 'cssPropBits': 5,
993
+ 'cssLitGroup': [ L[ 36 ] ]
994
+ },
995
+ '-moz-border-radius-bottomleft': {
996
+ 'cssExtra': c[ 0 ],
997
+ 'cssPropBits': 5
998
+ },
999
+ '-moz-border-radius-bottomright': {
1000
+ 'cssExtra': c[ 0 ],
1001
+ 'cssPropBits': 5
1002
+ },
1003
+ '-moz-border-radius-topleft': {
1004
+ 'cssExtra': c[ 0 ],
1005
+ 'cssPropBits': 5
1006
+ },
1007
+ '-moz-border-radius-topright': {
1008
+ 'cssExtra': c[ 0 ],
1009
+ 'cssPropBits': 5
1010
+ },
1011
+ '-moz-box-shadow': {
1012
+ 'cssExtra': c[ 1 ],
1013
+ 'cssAlternates': [ 'boxShadow' ],
1014
+ 'cssPropBits': 7,
1015
+ 'cssLitGroup': [ L[ 0 ], L[ 35 ], L[ 48 ], L[ 54 ] ]
1016
+ },
1017
+ '-moz-opacity': {
1018
+ 'cssPropBits': 1,
1019
+ 'cssLitGroup': [ L[ 47 ] ]
1020
+ },
1021
+ '-moz-outline': {
1022
+ 'cssExtra': c[ 3 ],
1023
+ 'cssPropBits': 7,
1024
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1025
+ 49 ], L[ 52 ], L[ 54 ] ]
1026
+ },
1027
+ '-moz-outline-color': {
1028
+ 'cssExtra': c[ 2 ],
1029
+ 'cssPropBits': 2,
1030
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 49 ] ]
1031
+ },
1032
+ '-moz-outline-style': {
1033
+ 'cssPropBits': 0,
1034
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1035
+ },
1036
+ '-moz-outline-width': {
1037
+ 'cssPropBits': 5,
1038
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1039
+ },
1040
+ '-o-text-overflow': {
1041
+ 'cssPropBits': 0,
1042
+ 'cssLitGroup': [ L[ 25 ] ]
1043
+ },
1044
+ '-webkit-border-bottom-left-radius': {
1045
+ 'cssExtra': c[ 0 ],
1046
+ 'cssPropBits': 5
1047
+ },
1048
+ '-webkit-border-bottom-right-radius': {
1049
+ 'cssExtra': c[ 0 ],
1050
+ 'cssPropBits': 5
1051
+ },
1052
+ '-webkit-border-radius': {
1053
+ 'cssExtra': c[ 0 ],
1054
+ 'cssPropBits': 5,
1055
+ 'cssLitGroup': [ L[ 36 ] ]
1056
+ },
1057
+ '-webkit-border-radius-bottom-left': {
1058
+ 'cssExtra': c[ 0 ],
1059
+ 'cssPropBits': 5
1060
+ },
1061
+ '-webkit-border-radius-bottom-right': {
1062
+ 'cssExtra': c[ 0 ],
1063
+ 'cssPropBits': 5
1064
+ },
1065
+ '-webkit-border-radius-top-left': {
1066
+ 'cssExtra': c[ 0 ],
1067
+ 'cssPropBits': 5
1068
+ },
1069
+ '-webkit-border-radius-top-right': {
1070
+ 'cssExtra': c[ 0 ],
1071
+ 'cssPropBits': 5
1072
+ },
1073
+ '-webkit-border-top-left-radius': {
1074
+ 'cssExtra': c[ 0 ],
1075
+ 'cssPropBits': 5
1076
+ },
1077
+ '-webkit-border-top-right-radius': {
1078
+ 'cssExtra': c[ 0 ],
1079
+ 'cssPropBits': 5
1080
+ },
1081
+ '-webkit-box-shadow': {
1082
+ 'cssExtra': c[ 1 ],
1083
+ 'cssAlternates': [ 'boxShadow' ],
1084
+ 'cssPropBits': 7,
1085
+ 'cssLitGroup': [ L[ 0 ], L[ 35 ], L[ 48 ], L[ 54 ] ]
1086
+ },
1087
+ 'azimuth': {
1088
+ 'cssPropBits': 5,
1089
+ 'cssLitGroup': [ L[ 6 ], L[ 30 ], L[ 42 ], L[ 47 ] ]
1090
+ },
1091
+ 'background': {
1092
+ 'cssExtra': RegExp('^ *(?:\\s*' + s[ 0 ] + '){0,2} *$', 'i'),
1093
+ 'cssPropBits': 23,
1094
+ 'cssLitGroup': [ L[ 0 ], L[ 14 ], L[ 17 ], L[ 24 ], L[ 30 ], L[ 35 ],
1095
+ L[ 36 ], L[ 38 ], L[ 42 ], L[ 45 ], L[ 47 ], L[ 51 ], L[ 54 ], L[ 57
1096
+ ], L[ 58 ], L[ 62 ] ]
1097
+ },
1098
+ 'background-attachment': {
1099
+ 'cssExtra': c[ 0 ],
1100
+ 'cssPropBits': 0,
1101
+ 'cssLitGroup': [ L[ 35 ], L[ 45 ], L[ 51 ], L[ 58 ] ]
1102
+ },
1103
+ 'background-color': {
1104
+ 'cssExtra': c[ 2 ],
1105
+ 'cssPropBits': 130,
1106
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1107
+ },
1108
+ 'background-image': {
1109
+ 'cssExtra': c[ 0 ],
1110
+ 'cssPropBits': 16,
1111
+ 'cssLitGroup': [ L[ 35 ], L[ 54 ] ]
1112
+ },
1113
+ 'background-position': {
1114
+ 'cssExtra': c[ 0 ],
1115
+ 'cssPropBits': 5,
1116
+ 'cssLitGroup': [ L[ 24 ], L[ 30 ], L[ 35 ], L[ 42 ] ]
1117
+ },
1118
+ 'background-repeat': {
1119
+ 'cssExtra': c[ 0 ],
1120
+ 'cssPropBits': 0,
1121
+ 'cssLitGroup': [ L[ 17 ], L[ 35 ], L[ 57 ] ]
1122
+ },
1123
+ 'border': {
1124
+ 'cssExtra': c[ 3 ],
1125
+ 'cssPropBits': 7,
1126
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1127
+ 52 ], L[ 54 ], L[ 62 ] ]
1128
+ },
1129
+ 'border-bottom': {
1130
+ 'cssExtra': c[ 3 ],
1131
+ 'cssPropBits': 7,
1132
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1133
+ 52 ], L[ 54 ], L[ 62 ] ]
1134
+ },
1135
+ 'border-bottom-color': {
1136
+ 'cssExtra': c[ 2 ],
1137
+ 'cssPropBits': 2,
1138
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1139
+ },
1140
+ 'border-bottom-left-radius': {
1141
+ 'cssExtra': c[ 0 ],
1142
+ 'cssPropBits': 5
1143
+ },
1144
+ 'border-bottom-right-radius': {
1145
+ 'cssExtra': c[ 0 ],
1146
+ 'cssPropBits': 5
1147
+ },
1148
+ 'border-bottom-style': {
1149
+ 'cssPropBits': 0,
1150
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1151
+ },
1152
+ 'border-bottom-width': {
1153
+ 'cssPropBits': 5,
1154
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1155
+ },
1156
+ 'border-collapse': {
1157
+ 'cssPropBits': 0,
1158
+ 'cssLitGroup': [ L[ 44 ], L[ 47 ], L[ 59 ] ]
1159
+ },
1160
+ 'border-color': {
1161
+ 'cssExtra': RegExp('^ *(?:\\s*' + s[ 0 ] + '){1,4} *$', 'i'),
1162
+ 'cssPropBits': 2,
1163
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1164
+ },
1165
+ 'border-left': {
1166
+ 'cssExtra': c[ 3 ],
1167
+ 'cssPropBits': 7,
1168
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1169
+ 52 ], L[ 54 ], L[ 62 ] ]
1170
+ },
1171
+ 'border-left-color': {
1172
+ 'cssExtra': c[ 2 ],
1173
+ 'cssPropBits': 2,
1174
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1175
+ },
1176
+ 'border-left-style': {
1177
+ 'cssPropBits': 0,
1178
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1179
+ },
1180
+ 'border-left-width': {
1181
+ 'cssPropBits': 5,
1182
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1183
+ },
1184
+ 'border-radius': {
1185
+ 'cssExtra': c[ 0 ],
1186
+ 'cssPropBits': 5,
1187
+ 'cssLitGroup': [ L[ 36 ] ]
1188
+ },
1189
+ 'border-right': {
1190
+ 'cssExtra': c[ 3 ],
1191
+ 'cssPropBits': 7,
1192
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1193
+ 52 ], L[ 54 ], L[ 62 ] ]
1194
+ },
1195
+ 'border-right-color': {
1196
+ 'cssExtra': c[ 2 ],
1197
+ 'cssPropBits': 2,
1198
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1199
+ },
1200
+ 'border-right-style': {
1201
+ 'cssPropBits': 0,
1202
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1203
+ },
1204
+ 'border-right-width': {
1205
+ 'cssPropBits': 5,
1206
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1207
+ },
1208
+ 'border-spacing': {
1209
+ 'cssExtra': c[ 0 ],
1210
+ 'cssPropBits': 5,
1211
+ 'cssLitGroup': [ L[ 47 ] ]
1212
+ },
1213
+ 'border-style': {
1214
+ 'cssPropBits': 0,
1215
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1216
+ },
1217
+ 'border-top': {
1218
+ 'cssExtra': c[ 3 ],
1219
+ 'cssPropBits': 7,
1220
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1221
+ 52 ], L[ 54 ], L[ 62 ] ]
1222
+ },
1223
+ 'border-top-color': {
1224
+ 'cssExtra': c[ 2 ],
1225
+ 'cssPropBits': 2,
1226
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 62 ] ]
1227
+ },
1228
+ 'border-top-left-radius': {
1229
+ 'cssExtra': c[ 0 ],
1230
+ 'cssPropBits': 5
1231
+ },
1232
+ 'border-top-right-radius': {
1233
+ 'cssExtra': c[ 0 ],
1234
+ 'cssPropBits': 5
1235
+ },
1236
+ 'border-top-style': {
1237
+ 'cssPropBits': 0,
1238
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1239
+ },
1240
+ 'border-top-width': {
1241
+ 'cssPropBits': 5,
1242
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1243
+ },
1244
+ 'border-width': {
1245
+ 'cssPropBits': 5,
1246
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1247
+ },
1248
+ 'bottom': {
1249
+ 'cssPropBits': 5,
1250
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1251
+ },
1252
+ 'box-shadow': {
1253
+ 'cssExtra': c[ 1 ],
1254
+ 'cssPropBits': 7,
1255
+ 'cssLitGroup': [ L[ 0 ], L[ 35 ], L[ 48 ], L[ 54 ] ]
1256
+ },
1257
+ 'caption-side': {
1258
+ 'cssPropBits': 0,
1259
+ 'cssLitGroup': [ L[ 24 ], L[ 47 ] ]
1260
+ },
1261
+ 'clear': {
1262
+ 'cssPropBits': 0,
1263
+ 'cssLitGroup': [ L[ 30 ], L[ 40 ], L[ 47 ], L[ 54 ] ]
1264
+ },
1265
+ 'clip': {
1266
+ 'cssExtra':
1267
+ /^ *\s*rect\(\s*(?:0|[+\-]?\d+(?:\.\d+)?(?:[cem]m|ex|in|p[ctx])|auto)\s*,\s*(?:0|[+\-]?\d+(?:\.\d+)?(?:[cem]m|ex|in|p[ctx])|auto)\s*,\s*(?:0|[+\-]?\d+(?:\.\d+)?(?:[cem]m|ex|in|p[ctx])|auto)\s*,\s*(?:0|[+\-]?\d+(?:\.\d+)?(?:[cem]m|ex|in|p[ctx])|auto) *\) *$/i,
1268
+ 'cssPropBits': 0,
1269
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1270
+ },
1271
+ 'color': {
1272
+ 'cssExtra': c[ 2 ],
1273
+ 'cssPropBits': 130,
1274
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ] ]
1275
+ },
1276
+ 'content': { 'cssPropBits': 0 },
1277
+ 'counter-increment': {
1278
+ 'cssExtra': c[ 0 ],
1279
+ 'cssPropBits': 5,
1280
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1281
+ },
1282
+ 'counter-reset': {
1283
+ 'cssExtra': c[ 0 ],
1284
+ 'cssPropBits': 5,
1285
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1286
+ },
1287
+ 'cue': {
1288
+ 'cssPropBits': 16,
1289
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1290
+ },
1291
+ 'cue-after': {
1292
+ 'cssPropBits': 16,
1293
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1294
+ },
1295
+ 'cue-before': {
1296
+ 'cssPropBits': 16,
1297
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1298
+ },
1299
+ 'cursor': {
1300
+ 'cssExtra': c[ 0 ],
1301
+ 'cssPropBits': 144,
1302
+ 'cssLitGroup': [ L[ 1 ], L[ 35 ], L[ 38 ], L[ 47 ] ]
1303
+ },
1304
+ 'direction': {
1305
+ 'cssPropBits': 0,
1306
+ 'cssLitGroup': [ L[ 31 ], L[ 47 ] ]
1307
+ },
1308
+ 'display': {
1309
+ 'cssPropBits': 32,
1310
+ 'cssLitGroup': [ L[ 2 ], L[ 47 ], L[ 54 ] ]
1311
+ },
1312
+ 'elevation': {
1313
+ 'cssPropBits': 5,
1314
+ 'cssLitGroup': [ L[ 13 ], L[ 47 ] ]
1315
+ },
1316
+ 'empty-cells': {
1317
+ 'cssPropBits': 0,
1318
+ 'cssLitGroup': [ L[ 27 ], L[ 47 ] ]
1319
+ },
1320
+ 'filter': {
1321
+ 'cssExtra':
1322
+ /^ *(?:\s*alpha\(\s*opacity\s*=\s*(?:0|\d+(?:\.\d+)?%|[+\-]?\d+(?:\.\d+)?) *\))+ *$/i,
1323
+ 'cssPropBits': 32
1324
+ },
1325
+ 'float': {
1326
+ 'cssAlternates': [ 'cssFloat', 'styleFloat' ],
1327
+ 'cssPropBits': 32,
1328
+ 'cssLitGroup': [ L[ 30 ], L[ 47 ], L[ 54 ] ]
1329
+ },
1330
+ 'font': {
1331
+ 'cssExtra': c[ 0 ],
1332
+ 'cssPropBits': 9,
1333
+ 'cssLitGroup': [ L[ 4 ], L[ 7 ], L[ 11 ], L[ 15 ], L[ 29 ], L[ 35 ], L[
1334
+ 36 ], L[ 47 ], L[ 52 ], L[ 55 ], L[ 60 ] ]
1335
+ },
1336
+ 'font-family': {
1337
+ 'cssExtra': c[ 0 ],
1338
+ 'cssPropBits': 8,
1339
+ 'cssLitGroup': [ L[ 15 ], L[ 35 ], L[ 47 ] ]
1340
+ },
1341
+ 'font-size': {
1342
+ 'cssPropBits': 1,
1343
+ 'cssLitGroup': [ L[ 7 ], L[ 47 ], L[ 52 ] ]
1344
+ },
1345
+ 'font-stretch': {
1346
+ 'cssPropBits': 0,
1347
+ 'cssLitGroup': [ L[ 5 ], L[ 55 ] ]
1348
+ },
1349
+ 'font-style': {
1350
+ 'cssPropBits': 0,
1351
+ 'cssLitGroup': [ L[ 29 ], L[ 47 ], L[ 55 ] ]
1352
+ },
1353
+ 'font-variant': {
1354
+ 'cssPropBits': 0,
1355
+ 'cssLitGroup': [ L[ 47 ], L[ 55 ], L[ 60 ] ]
1356
+ },
1357
+ 'font-weight': {
1358
+ 'cssPropBits': 0,
1359
+ 'cssLitGroup': [ L[ 4 ], L[ 47 ], L[ 55 ] ],
1360
+ // ##### BEGIN: MODIFIED BY SAP
1361
+ 'cssLitNumeric': true
1362
+ // ##### END: MODIFIED BY SAP
1363
+ },
1364
+ 'height': {
1365
+ 'cssPropBits': 37,
1366
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1367
+ },
1368
+ 'left': {
1369
+ 'cssPropBits': 37,
1370
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1371
+ },
1372
+ 'letter-spacing': {
1373
+ 'cssPropBits': 5,
1374
+ 'cssLitGroup': [ L[ 47 ], L[ 55 ] ]
1375
+ },
1376
+ 'line-height': {
1377
+ 'cssPropBits': 1,
1378
+ 'cssLitGroup': [ L[ 47 ], L[ 55 ] ]
1379
+ },
1380
+ 'list-style': {
1381
+ 'cssPropBits': 16,
1382
+ 'cssLitGroup': [ L[ 3 ], L[ 28 ], L[ 47 ], L[ 54 ] ]
1383
+ },
1384
+ 'list-style-image': {
1385
+ 'cssPropBits': 16,
1386
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1387
+ },
1388
+ 'list-style-position': {
1389
+ 'cssPropBits': 0,
1390
+ 'cssLitGroup': [ L[ 28 ], L[ 47 ] ]
1391
+ },
1392
+ 'list-style-type': {
1393
+ 'cssPropBits': 0,
1394
+ 'cssLitGroup': [ L[ 3 ], L[ 47 ], L[ 54 ] ]
1395
+ },
1396
+ 'margin': {
1397
+ 'cssPropBits': 5,
1398
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1399
+ },
1400
+ 'margin-bottom': {
1401
+ 'cssPropBits': 5,
1402
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1403
+ },
1404
+ 'margin-left': {
1405
+ 'cssPropBits': 5,
1406
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1407
+ },
1408
+ 'margin-right': {
1409
+ 'cssPropBits': 5,
1410
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1411
+ },
1412
+ 'margin-top': {
1413
+ 'cssPropBits': 5,
1414
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1415
+ },
1416
+ 'max-height': {
1417
+ 'cssPropBits': 1,
1418
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ], L[ 54 ] ]
1419
+ },
1420
+ 'max-width': {
1421
+ 'cssPropBits': 1,
1422
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ], L[ 54 ] ]
1423
+ },
1424
+ 'min-height': {
1425
+ 'cssPropBits': 1,
1426
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1427
+ },
1428
+ 'min-width': {
1429
+ 'cssPropBits': 1,
1430
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1431
+ },
1432
+ 'opacity': {
1433
+ 'cssPropBits': 33,
1434
+ 'cssLitGroup': [ L[ 47 ] ]
1435
+ },
1436
+ 'outline': {
1437
+ 'cssExtra': c[ 3 ],
1438
+ 'cssPropBits': 7,
1439
+ 'cssLitGroup': [ L[ 0 ], L[ 9 ], L[ 34 ], L[ 46 ], L[ 47 ], L[ 48 ], L[
1440
+ 49 ], L[ 52 ], L[ 54 ] ]
1441
+ },
1442
+ 'outline-color': {
1443
+ 'cssExtra': c[ 2 ],
1444
+ 'cssPropBits': 2,
1445
+ 'cssLitGroup': [ L[ 0 ], L[ 47 ], L[ 49 ] ]
1446
+ },
1447
+ 'outline-style': {
1448
+ 'cssPropBits': 0,
1449
+ 'cssLitGroup': [ L[ 9 ], L[ 46 ], L[ 47 ], L[ 48 ], L[ 54 ] ]
1450
+ },
1451
+ 'outline-width': {
1452
+ 'cssPropBits': 5,
1453
+ 'cssLitGroup': [ L[ 34 ], L[ 47 ], L[ 52 ] ]
1454
+ },
1455
+ 'overflow': {
1456
+ 'cssPropBits': 32,
1457
+ 'cssLitGroup': [ L[ 38 ], L[ 46 ], L[ 47 ], L[ 58 ], L[ 63 ] ]
1458
+ },
1459
+ 'overflow-x': {
1460
+ 'cssPropBits': 0,
1461
+ 'cssLitGroup': [ L[ 32 ], L[ 38 ], L[ 46 ], L[ 58 ], L[ 63 ] ]
1462
+ },
1463
+ 'overflow-y': {
1464
+ 'cssPropBits': 0,
1465
+ 'cssLitGroup': [ L[ 32 ], L[ 38 ], L[ 46 ], L[ 58 ], L[ 63 ] ]
1466
+ },
1467
+ 'padding': {
1468
+ 'cssPropBits': 1,
1469
+ 'cssLitGroup': [ L[ 47 ] ]
1470
+ },
1471
+ 'padding-bottom': {
1472
+ 'cssPropBits': 33,
1473
+ 'cssLitGroup': [ L[ 47 ] ]
1474
+ },
1475
+ 'padding-left': {
1476
+ 'cssPropBits': 33,
1477
+ 'cssLitGroup': [ L[ 47 ] ]
1478
+ },
1479
+ 'padding-right': {
1480
+ 'cssPropBits': 33,
1481
+ 'cssLitGroup': [ L[ 47 ] ]
1482
+ },
1483
+ 'padding-top': {
1484
+ 'cssPropBits': 33,
1485
+ 'cssLitGroup': [ L[ 47 ] ]
1486
+ },
1487
+ 'page-break-after': {
1488
+ 'cssPropBits': 0,
1489
+ 'cssLitGroup': [ L[ 30 ], L[ 37 ], L[ 38 ], L[ 39 ], L[ 47 ] ]
1490
+ },
1491
+ 'page-break-before': {
1492
+ 'cssPropBits': 0,
1493
+ 'cssLitGroup': [ L[ 30 ], L[ 37 ], L[ 38 ], L[ 39 ], L[ 47 ] ]
1494
+ },
1495
+ 'page-break-inside': {
1496
+ 'cssPropBits': 0,
1497
+ 'cssLitGroup': [ L[ 38 ], L[ 39 ], L[ 47 ] ]
1498
+ },
1499
+ 'pause': {
1500
+ 'cssPropBits': 5,
1501
+ 'cssLitGroup': [ L[ 47 ] ]
1502
+ },
1503
+ 'pause-after': {
1504
+ 'cssPropBits': 5,
1505
+ 'cssLitGroup': [ L[ 47 ] ]
1506
+ },
1507
+ 'pause-before': {
1508
+ 'cssPropBits': 5,
1509
+ 'cssLitGroup': [ L[ 47 ] ]
1510
+ },
1511
+ 'pitch': {
1512
+ 'cssPropBits': 5,
1513
+ 'cssLitGroup': [ L[ 19 ], L[ 47 ], L[ 52 ] ]
1514
+ },
1515
+ 'pitch-range': {
1516
+ 'cssPropBits': 5,
1517
+ 'cssLitGroup': [ L[ 47 ] ]
1518
+ },
1519
+ 'play-during': {
1520
+ 'cssExtra': c[ 0 ],
1521
+ 'cssPropBits': 16,
1522
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ], L[ 53 ], L[ 54 ], L[ 57 ] ]
1523
+ },
1524
+ 'position': {
1525
+ 'cssPropBits': 32,
1526
+ 'cssLitGroup': [ L[ 20 ], L[ 47 ] ]
1527
+ },
1528
+ 'quotes': {
1529
+ 'cssExtra': c[ 0 ],
1530
+ 'cssPropBits': 0,
1531
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ] ]
1532
+ },
1533
+ 'richness': {
1534
+ 'cssPropBits': 5,
1535
+ 'cssLitGroup': [ L[ 47 ] ]
1536
+ },
1537
+ 'right': {
1538
+ 'cssPropBits': 37,
1539
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1540
+ },
1541
+ 'speak': {
1542
+ 'cssPropBits': 0,
1543
+ 'cssLitGroup': [ L[ 47 ], L[ 54 ], L[ 55 ], L[ 61 ] ]
1544
+ },
1545
+ 'speak-header': {
1546
+ 'cssPropBits': 0,
1547
+ 'cssLitGroup': [ L[ 37 ], L[ 47 ], L[ 56 ] ]
1548
+ },
1549
+ 'speak-numeral': {
1550
+ 'cssPropBits': 0,
1551
+ 'cssLitGroup': [ L[ 26 ], L[ 47 ] ]
1552
+ },
1553
+ 'speak-punctuation': {
1554
+ 'cssPropBits': 0,
1555
+ 'cssLitGroup': [ L[ 43 ], L[ 47 ], L[ 54 ] ]
1556
+ },
1557
+ 'speech-rate': {
1558
+ 'cssPropBits': 5,
1559
+ 'cssLitGroup': [ L[ 12 ], L[ 47 ], L[ 52 ] ]
1560
+ },
1561
+ 'stress': {
1562
+ 'cssPropBits': 5,
1563
+ 'cssLitGroup': [ L[ 47 ] ]
1564
+ },
1565
+ 'table-layout': {
1566
+ 'cssPropBits': 0,
1567
+ 'cssLitGroup': [ L[ 38 ], L[ 45 ], L[ 47 ] ]
1568
+ },
1569
+ 'text-align': {
1570
+ 'cssPropBits': 0,
1571
+ 'cssLitGroup': [ L[ 30 ], L[ 42 ], L[ 47 ], L[ 50 ] ]
1572
+ },
1573
+ 'text-decoration': {
1574
+ 'cssPropBits': 0,
1575
+ 'cssLitGroup': [ L[ 18 ], L[ 47 ], L[ 54 ] ]
1576
+ },
1577
+ 'text-indent': {
1578
+ 'cssPropBits': 5,
1579
+ 'cssLitGroup': [ L[ 47 ] ]
1580
+ },
1581
+ 'text-overflow': {
1582
+ 'cssPropBits': 0,
1583
+ 'cssLitGroup': [ L[ 25 ] ]
1584
+ },
1585
+ 'text-shadow': {
1586
+ 'cssExtra': c[ 1 ],
1587
+ 'cssPropBits': 7,
1588
+ 'cssLitGroup': [ L[ 0 ], L[ 35 ], L[ 48 ], L[ 54 ] ]
1589
+ },
1590
+ 'text-transform': {
1591
+ 'cssPropBits': 0,
1592
+ 'cssLitGroup': [ L[ 21 ], L[ 47 ], L[ 54 ] ]
1593
+ },
1594
+ 'text-wrap': {
1595
+ 'cssPropBits': 0,
1596
+ 'cssLitGroup': [ L[ 33 ], L[ 54 ], L[ 55 ] ]
1597
+ },
1598
+ 'top': {
1599
+ 'cssPropBits': 37,
1600
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1601
+ },
1602
+ 'unicode-bidi': {
1603
+ 'cssPropBits': 0,
1604
+ 'cssLitGroup': [ L[ 23 ], L[ 47 ], L[ 55 ] ]
1605
+ },
1606
+ 'vertical-align': {
1607
+ 'cssPropBits': 5,
1608
+ 'cssLitGroup': [ L[ 10 ], L[ 24 ], L[ 47 ] ]
1609
+ },
1610
+ 'visibility': {
1611
+ 'cssPropBits': 32,
1612
+ 'cssLitGroup': [ L[ 44 ], L[ 46 ], L[ 47 ], L[ 63 ] ]
1613
+ },
1614
+ 'voice-family': {
1615
+ 'cssExtra': c[ 0 ],
1616
+ 'cssPropBits': 8,
1617
+ 'cssLitGroup': [ L[ 22 ], L[ 35 ], L[ 47 ] ]
1618
+ },
1619
+ 'volume': {
1620
+ 'cssPropBits': 1,
1621
+ 'cssLitGroup': [ L[ 16 ], L[ 47 ], L[ 52 ] ]
1622
+ },
1623
+ 'white-space': {
1624
+ 'cssPropBits': 0,
1625
+ 'cssLitGroup': [ L[ 8 ], L[ 47 ], L[ 55 ] ]
1626
+ },
1627
+ 'width': {
1628
+ 'cssPropBits': 33,
1629
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1630
+ },
1631
+ 'word-spacing': {
1632
+ 'cssPropBits': 5,
1633
+ 'cssLitGroup': [ L[ 47 ], L[ 55 ] ]
1634
+ },
1635
+ 'word-wrap': {
1636
+ 'cssPropBits': 0,
1637
+ 'cssLitGroup': [ L[ 41 ], L[ 55 ] ]
1638
+ },
1639
+ 'z-index': {
1640
+ 'cssPropBits': 69,
1641
+ 'cssLitGroup': [ L[ 38 ], L[ 47 ] ]
1642
+ },
1643
+ 'zoom': {
1644
+ 'cssPropBits': 1,
1645
+ 'cssLitGroup': [ L[ 55 ] ]
1646
+ }
1647
+ };
1648
+ })();
1649
+ if (typeof window !== 'undefined') {
1650
+ window['cssSchema'] = cssSchema;
1651
+ }
1652
+ // Copyright (C) 2011 Google Inc.
1653
+ //
1654
+ // Licensed under the Apache License, Version 2.0 (the "License");
1655
+ // you may not use this file except in compliance with the License.
1656
+ // You may obtain a copy of the License at
1657
+ //
1658
+ // http://www.apache.org/licenses/LICENSE-2.0
1659
+ //
1660
+ // Unless required by applicable law or agreed to in writing, software
1661
+ // distributed under the License is distributed on an "AS IS" BASIS,
1662
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1663
+ // See the License for the specific language governing permissions and
1664
+ // limitations under the License.
1665
+
1666
+ /**
1667
+ * A lexical scannar for CSS3 as defined at http://www.w3.org/TR/css3-syntax .
1668
+ *
1669
+ * @author Mike Samuel <mikesamuel@gmail.com>
1670
+ * \@provides lexCss, decodeCss
1671
+ * \@overrides window
1672
+ */
1673
+
1674
+ var lexCss;
1675
+ var decodeCss;
1676
+
1677
+ (function () {
1678
+
1679
+ /**
1680
+ * Decodes an escape sequence as specified in CSS3 section 4.1.
1681
+ * http://www.w3.org/TR/css3-syntax/#characters
1682
+ * @private
1683
+ */
1684
+ function decodeCssEscape(s) {
1685
+ var i = parseInt(s.substring(1), 16);
1686
+ // If parseInt didn't find a hex diigt, it returns NaN so return the
1687
+ // escaped character.
1688
+ // Otherwise, parseInt will stop at the first non-hex digit so there's no
1689
+ // need to worry about trailing whitespace.
1690
+ if (i > 0xffff) {
1691
+ // A supplemental codepoint.
1692
+ return i -= 0x10000,
1693
+ String.fromCharCode(
1694
+ 0xd800 + (i >> 10),
1695
+ 0xdc00 + (i & 0x3FF));
1696
+ } else if (i == i) {
1697
+ return String.fromCharCode(i);
1698
+ } else if (s[1] < ' ') {
1699
+ // "a backslash followed by a newline is ignored".
1700
+ return '';
1701
+ } else {
1702
+ return s[1];
1703
+ }
1704
+ }
1705
+
1706
+ /**
1707
+ * Returns an equivalent CSS string literal given plain text: foo -> "foo".
1708
+ * @private
1709
+ */
1710
+ function escapeCssString(s, replacer) {
1711
+ return '"' + s.replace(/[\u0000-\u001f\\\"<>]/g, replacer) + '"';
1712
+ }
1713
+
1714
+ /**
1715
+ * Maps chars to CSS escaped equivalents: "\n" -> "\\a ".
1716
+ * @private
1717
+ */
1718
+ function escapeCssStrChar(ch) {
1719
+ return cssStrChars[ch]
1720
+ || (cssStrChars[ch] = '\\' + ch.charCodeAt(0).toString(16) + ' ');
1721
+ }
1722
+
1723
+ /**
1724
+ * Maps chars to URI escaped equivalents: "\n" -> "%0a".
1725
+ * @private
1726
+ */
1727
+ function escapeCssUrlChar(ch) {
1728
+ return cssUrlChars[ch]
1729
+ || (cssUrlChars[ch] = (ch < '\x10' ? '%0' : '%')
1730
+ + ch.charCodeAt(0).toString(16));
1731
+ }
1732
+
1733
+ /**
1734
+ * Mapping of CSS special characters to escaped equivalents.
1735
+ * @private
1736
+ */
1737
+ var cssStrChars = {
1738
+ '\\': '\\\\'
1739
+ };
1740
+
1741
+ /**
1742
+ * Mapping of CSS special characters to URL-escaped equivalents.
1743
+ * @private
1744
+ */
1745
+ var cssUrlChars = {
1746
+ '\\': '%5c'
1747
+ };
1748
+
1749
+ // The comments below are copied from the CSS3 module syntax at
1750
+ // http://www.w3.org/TR/css3-syntax .
1751
+ // These string constants minify out when this is run-through closure
1752
+ // compiler.
1753
+ // Rules that have been adapted have comments prefixed with "Diff:", and
1754
+ // where rules have been combined to avoid back-tracking in the regex engine
1755
+ // or to work around limitations, there is a comment prefixed with
1756
+ // "NewRule:".
1757
+
1758
+ // In the below, we assume CRLF and CR have been normalize to CR.
1759
+
1760
+ // wc ::= #x9 | #xA | #xC | #xD | #x20
1761
+ var WC = '[\\t\\n\\f ]';
1762
+ // w ::= wc*
1763
+ var W = WC + '*';
1764
+ // nl ::= #xA | #xD #xA | #xD | #xC
1765
+ var NL = '[\\n\\f]';
1766
+ // nonascii ::= [#x80-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
1767
+ // NewRule: Supplemental codepoints are represented as surrogate pairs in JS.
1768
+ var SURROGATE_PAIR = '[\\ud800-\\udbff][\\udc00-\\udfff]';
1769
+ var NONASCII = '[\\u0080-\\ud7ff\\ue000-\\ufffd]|' + SURROGATE_PAIR;
1770
+ // unicode ::= '\' [0-9a-fA-F]{1,6} wc?
1771
+ // NewRule: No point in having ESCAPE do (\\x|\\y)
1772
+ var UNICODE_TAIL = '[0-9a-fA-F]{1,6}' + WC + '?';
1773
+ // escape ::= unicode
1774
+ // | '\' [#x20-#x7E#x80-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
1775
+ // NewRule: Below we use escape tail to efficiently match an escape or a
1776
+ // line continuation so we can decode string content.
1777
+ var ESCAPE_TAIL = '(?:' + UNICODE_TAIL
1778
+ + '|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|'
1779
+ + SURROGATE_PAIR + ')';
1780
+ var ESCAPE = '\\\\' + ESCAPE_TAIL;
1781
+ // urlchar ::= [#x9#x21#x23-#x26#x28-#x7E] | nonascii | escape
1782
+ var URLCHAR = '(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|'
1783
+ + NONASCII + '|' + ESCAPE + ')';
1784
+ // stringchar ::= urlchar | #x20 | '\' nl
1785
+ // We ignore mismatched surrogate pairs inside strings, so stringchar
1786
+ // simplifies to a non-(quote|newline|backslash) or backslash any.
1787
+ // Since we normalize CRLF to a single code-unit, there is no special
1788
+ // handling needed for '\\' + CRLF.
1789
+ var STRINGCHAR = '[^\'"\\n\\f\\\\]|\\\\[\\s\\S]';
1790
+ // string ::= '"' (stringchar | "'")* '"' | "'" (stringchar | '"')* "'"
1791
+ var STRING = '"(?:\'|' + STRINGCHAR + ')*"'
1792
+ + '|\'(?:\"|' + STRINGCHAR + ')*\'';
1793
+ // num ::= [0-9]+ | [0-9]* '.' [0-9]+
1794
+ // Diff: We attach signs to num tokens.
1795
+ var NUM = '[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)';
1796
+ // nmstart ::= [a-zA-Z] | '_' | nonascii | escape
1797
+ var NMSTART = '(?:[a-zA-Z_]|' + NONASCII + '|' + ESCAPE + ')';
1798
+ // nmchar ::= [a-zA-Z0-9] | '-' | '_' | nonascii | escape
1799
+ var NMCHAR = '(?:[a-zA-Z0-9_-]|' + NONASCII + '|' + ESCAPE + ')';
1800
+ // ident ::= '-'? nmstart nmchar*
1801
+ var IDENT = '-?' + NMSTART + NMCHAR + '*';
1802
+
1803
+ // NewRule: union of IDENT, ATKEYWORD, HASH, but excluding #[0-9].
1804
+ var WORD_TERM = '(?:@?-?' + NMSTART + '|#)' + NMCHAR + '*';
1805
+ var NUMERIC_VALUE = NUM + '(?:%|' + IDENT + ')?';
1806
+ // URI ::= "url(" w (string | urlchar* ) w ")"
1807
+ var URI = 'url[(]' + W + '(?:' + STRING + '|' + URLCHAR + '*)' + W + '[)]';
1808
+ // UNICODE-RANGE ::= "U+" [0-9A-F?]{1,6} ('-' [0-9A-F]{1,6})?
1809
+ var UNICODE_RANGE = 'U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?';
1810
+ // CDO ::= "<\!--"
1811
+ var CDO = '<\!--';
1812
+ // CDC ::= "-->"
1813
+ var CDC = '-->';
1814
+ // S ::= wc+
1815
+ var S = WC + '+';
1816
+ // COMMENT ::= "/*" [^*]* '*'+ ([^/] [^*]* '*'+)* "/"
1817
+ // Diff: recognizes // comments.
1818
+ var COMMENT = '/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)';
1819
+ // FUNCTION ::= ident '('
1820
+ // Diff: We exclude url explicitly.
1821
+ // TODO: should we be tolerant of "fn ("?
1822
+ // ##### BEGIN: MODIFIED BY SAP
1823
+ // Avoid risk of 'catastrophic backtracking' when unicode escapes are used
1824
+ // var FUNCTION = '(?!url[(])' + IDENT + '[(]';
1825
+ var FUNCTION = '(?!url[(])(?=(' + IDENT + '))\\1[(]';
1826
+ // NewRule: one rule for all the comparison operators.
1827
+ var CMP_OPS = '[~|^$*]=';
1828
+ // CHAR ::= any character not matched by the above rules, except for " or '
1829
+ // Diff: We exclude / and \ since they are handled above to prevent
1830
+ // /* without a following */ from combining when comments are concatenated.
1831
+ var CHAR = '[^"\'\\\\/]|/(?![/*])';
1832
+ // BOM ::= #xFEFF
1833
+ var BOM = '\\uFEFF';
1834
+
1835
+ var CSS_TOKEN = new RegExp([
1836
+ BOM, UNICODE_RANGE, URI, FUNCTION, WORD_TERM, STRING, NUMERIC_VALUE,
1837
+ CDO, CDC, S, COMMENT, CMP_OPS, CHAR].join("|"), 'gi');
1838
+
1839
+ /**
1840
+ * Decodes CSS escape sequences in a CSS string body.
1841
+ */
1842
+ decodeCss = function (css) {
1843
+ return css.replace(
1844
+ new RegExp('\\\\(?:' + ESCAPE_TAIL + '|' + NL + ')', 'g'),
1845
+ decodeCssEscape);
1846
+ };
1847
+
1848
+ /**
1849
+ * Given CSS Text, returns an array of normalized tokens.
1850
+ * @param {string} cssText
1851
+ * @return {Array.<string>} tokens where all ignorable token sequences have
1852
+ * been reduced to a single {@code " "} and all strings and
1853
+ * {@code url(...)} tokens have been normalized to use double quotes as
1854
+ * delimiters and to not otherwise contain double quotes.
1855
+ */
1856
+ lexCss = function (cssText) {
1857
+ cssText = '' + cssText;
1858
+ var tokens = cssText.replace(/\r\n?/g, '\n') // Normalize CRLF & CR to LF.
1859
+ .match(CSS_TOKEN) || [];
1860
+ var j = 0;
1861
+ var last = ' ';
1862
+ for (var i = 0, n = tokens.length; i < n; ++i) {
1863
+ // Normalize all escape sequences. We will have to re-escape some
1864
+ // codepoints in string and url(...) bodies but we already know the
1865
+ // boundaries.
1866
+ // We might mistakenly treat a malformed identifier like \22\20\22 as a
1867
+ // string, but that will not break any valid stylesheets since we requote
1868
+ // and re-escape in string below.
1869
+ var tok = decodeCss(tokens[i]);
1870
+ var len = tok.length;
1871
+ var cc = tok.charCodeAt(0);
1872
+ tok =
1873
+ // All strings should be double quoted, and the body should never
1874
+ // contain a double quote.
1875
+ (cc == '"'.charCodeAt(0) || cc == '\''.charCodeAt(0))
1876
+ ? escapeCssString(tok.substring(1, len - 1), escapeCssStrChar)
1877
+ // A breaking ignorable token should is replaced with a single space.
1878
+ : (cc == '/'.charCodeAt(0) && len > 1 // Comment.
1879
+ || tok == '\\' || tok == CDC || tok == CDO || tok == '\ufeff'
1880
+ // Characters in W.
1881
+ || cc <= ' '.charCodeAt(0))
1882
+ ? ' '
1883
+ // Make sure that all url(...)s are double quoted.
1884
+ : /url\(/i.test(tok)
1885
+ ? 'url(' + escapeCssString(
1886
+ tok.replace(
1887
+ new RegExp('^url\\(' + W + '["\']?|["\']?' + W + '\\)$', 'gi'),
1888
+ ''),
1889
+ escapeCssUrlChar)
1890
+ + ')'
1891
+ // Escapes in identifier like tokens will have been normalized above.
1892
+ : tok;
1893
+ // Merge adjacent space tokens.
1894
+ if (last != tok || tok != ' ') {
1895
+ tokens[j++] = last = tok;
1896
+ }
1897
+ }
1898
+ tokens.length = j;
1899
+ return tokens;
1900
+ };
1901
+ })();
1902
+
1903
+ // Exports for closure compiler.
1904
+ if (typeof window !== 'undefined') {
1905
+ window['lexCss'] = lexCss;
1906
+ window['decodeCss'] = decodeCss;
1907
+ }
1908
+ // Copyright (C) 2011 Google Inc.
1909
+ //
1910
+ // Licensed under the Apache License, Version 2.0 (the "License");
1911
+ // you may not use this file except in compliance with the License.
1912
+ // You may obtain a copy of the License at
1913
+ //
1914
+ // http://www.apache.org/licenses/LICENSE-2.0
1915
+ //
1916
+ // Unless required by applicable law or agreed to in writing, software
1917
+ // distributed under the License is distributed on an "AS IS" BASIS,
1918
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1919
+ // See the License for the specific language governing permissions and
1920
+ // limitations under the License.
1921
+
1922
+ /**
1923
+ * @fileoverview
1924
+ * JavaScript support for client-side CSS sanitization.
1925
+ * The CSS property schema API is defined in CssPropertyPatterns.java which
1926
+ * is used to generate css-defs.js.
1927
+ *
1928
+ * @author mikesamuel@gmail.com
1929
+ * \@requires CSS_PROP_BIT_ALLOWED_IN_LINK
1930
+ * \@requires CSS_PROP_BIT_HASH_VALUE
1931
+ * \@requires CSS_PROP_BIT_NEGATIVE_QUANTITY
1932
+ * \@requires CSS_PROP_BIT_QSTRING_CONTENT
1933
+ * \@requires CSS_PROP_BIT_QSTRING_URL
1934
+ * \@requires CSS_PROP_BIT_QUANTITY
1935
+ * \@requires CSS_PROP_BIT_Z_INDEX
1936
+ * \@requires cssSchema
1937
+ * \@requires decodeCss
1938
+ * \@requires html4
1939
+ * \@overrides window
1940
+ * \@requires parseCssStylesheet
1941
+ * \@provides sanitizeCssProperty
1942
+ * \@provides sanitizeCssSelectors
1943
+ * \@provides sanitizeStylesheet
1944
+ */
1945
+
1946
+ /**
1947
+ * Given a series of normalized CSS tokens, applies a property schema, as
1948
+ * defined in CssPropertyPatterns.java, and sanitizes the tokens in place.
1949
+ * @param property a property name.
1950
+ * @param propertySchema a property of cssSchema as defined by
1951
+ * CssPropertyPatterns.java
1952
+ * @param tokens as parsed by lexCss. Modified in place.
1953
+ * @param opt_naiveUriRewriter a URI rewriter; an object with a "rewrite"
1954
+ * function that takes a URL and returns a safe URL.
1955
+ */
1956
+ var sanitizeCssProperty = (function () {
1957
+ var NOEFFECT_URL = 'url("about:blank")';
1958
+ /**
1959
+ * The set of characters that need to be normalized inside url("...").
1960
+ * We normalize newlines because they are not allowed inside quoted strings,
1961
+ * normalize quote characters, angle-brackets, and asterisks because they
1962
+ * could be used to break out of the URL or introduce targets for CSS
1963
+ * error recovery. We normalize parentheses since they delimit unquoted
1964
+ * URLs and calls and could be a target for error recovery.
1965
+ */
1966
+ var NORM_URL_REGEXP = /[\n\f\r\"\'()*<>]/g;
1967
+ /** The replacements for NORM_URL_REGEXP. */
1968
+ var NORM_URL_REPLACEMENTS = {
1969
+ '\n': '%0a',
1970
+ '\f': '%0c',
1971
+ '\r': '%0d',
1972
+ '"': '%22',
1973
+ '\'': '%27',
1974
+ '(': '%28',
1975
+ ')': '%29',
1976
+ '*': '%2a',
1977
+ '<': '%3c',
1978
+ '>': '%3e'
1979
+ };
1980
+
1981
+
1982
+ function normalizeUrl(s) {
1983
+ if ('string' === typeof s) {
1984
+ return 'url("' + s.replace(NORM_URL_REGEXP, normalizeUrlChar) + '")';
1985
+ } else {
1986
+ return NOEFFECT_URL;
1987
+ }
1988
+ }
1989
+ function normalizeUrlChar(ch) {
1990
+ return NORM_URL_REPLACEMENTS[ch];
1991
+ }
1992
+
1993
+ // From RFC3986
1994
+ var URI_SCHEME_RE = new RegExp(
1995
+ '^' +
1996
+ '(?:' +
1997
+ '([^:\/?# ]+)' + // scheme
1998
+ ':)?'
1999
+ );
2000
+
2001
+ var ALLOWED_URI_SCHEMES = /^(?:https?|mailto)$/i;
2002
+
2003
+ function safeUri(uri, prop, naiveUriRewriter) {
2004
+ if (!naiveUriRewriter) { return null; }
2005
+ var parsed = ('' + uri).match(URI_SCHEME_RE);
2006
+ if (parsed && (!parsed[1] || ALLOWED_URI_SCHEMES.test(parsed[1]))) {
2007
+ return naiveUriRewriter(uri, prop);
2008
+ } else {
2009
+ return null;
2010
+ }
2011
+ }
2012
+
2013
+ function unionArrays(arrs) {
2014
+ var map = {};
2015
+ for (var i = arrs.length; --i >= 0;) {
2016
+ var arr = arrs[i];
2017
+ for (var j = arr.length; --j >= 0;) {
2018
+ map[arr[j]] = ALLOWED_LITERAL;
2019
+ }
2020
+ }
2021
+ return map;
2022
+ }
2023
+
2024
+ /**
2025
+ * Normalize tokens within a function call they can match against
2026
+ * cssSchema[propName].cssExtra.
2027
+ * @return the exclusive end in tokens of the function call.
2028
+ */
2029
+ function normalizeFunctionCall(tokens, start) {
2030
+ var parenDepth = 1, end = start + 1, n = tokens.length;
2031
+ while (end < n && parenDepth) {
2032
+ // TODO: Can URLs appear in functions?
2033
+ var token = tokens[end++];
2034
+ parenDepth += (token === '(' ? 1 : token === ')' ? -1 : 0);
2035
+ }
2036
+ return end;
2037
+ }
2038
+
2039
+ // Used as map value to avoid hasOwnProperty checks.
2040
+ var ALLOWED_LITERAL = {};
2041
+
2042
+ return function (property, propertySchema, tokens, opt_naiveUriRewriter) {
2043
+ var propBits = propertySchema.cssPropBits;
2044
+ // Used to determine whether to treat quoted strings as URLs or
2045
+ // plain text content, and whether unrecognized keywords can be quoted
2046
+ // to treate ['Arial', 'Black'] equivalently to ['"Arial Black"'].
2047
+ var qstringBits = propBits & (
2048
+ CSS_PROP_BIT_QSTRING_CONTENT | CSS_PROP_BIT_QSTRING_URL);
2049
+ // TODO(mikesamuel): Figure out what to do with props like
2050
+ // content that admit both URLs and strings.
2051
+
2052
+ // Used to join unquoted keywords into a single quoted string.
2053
+ var lastQuoted = NaN;
2054
+ var i = 0, k = 0;
2055
+ for (;i < tokens.length; ++i) {
2056
+ // Has the effect of normalizing hex digits, keywords,
2057
+ // and function names.
2058
+ var token = tokens[i].toLowerCase();
2059
+ var cc = token.charCodeAt(0), cc1, cc2, isnum1, isnum2, end;
2060
+ var litGroup, litMap;
2061
+ token = (
2062
+ // Strip out spaces. Normally cssparser.js dumps these, but we
2063
+ // strip them out in case the content doesn't come via cssparser.js.
2064
+ (cc === ' '.charCodeAt(0))
2065
+ ? ''
2066
+ : (cc === '"'.charCodeAt(0))
2067
+ ? ( // Quoted string.
2068
+ (qstringBits === CSS_PROP_BIT_QSTRING_URL && opt_naiveUriRewriter)
2069
+ // Sanitize and convert to url("...") syntax.
2070
+ // Treat url content as case-sensitive.
2071
+ ? (normalizeUrl(
2072
+ safeUri(
2073
+ decodeCss(tokens[i].substring(1, token.length - 1)),
2074
+ property,
2075
+ opt_naiveUriRewriter
2076
+ )
2077
+ ))
2078
+ // Drop if plain text content strings not allowed.
2079
+ : (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT) ? token : '')
2080
+ // Preserve hash color literals if allowed.
2081
+ : (cc === '#'.charCodeAt(0) && /^#(?:[0-9a-f]{3}){1,2}$/.test(token))
2082
+ ? (propBits & CSS_PROP_BIT_HASH_VALUE ? token : '')
2083
+ // ##### BEGIN: MODIFIED BY SAP
2084
+ // : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0))
2085
+ : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0) && !propertySchema.cssLitNumeric)
2086
+ // ##### END: MODIFIED BY SAP
2087
+ // A number starting with a digit.
2088
+ ? ((propBits & CSS_PROP_BIT_QUANTITY)
2089
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
2090
+ ? (token.match(/^\d{1,7}$/) ? token : '')
2091
+ : token)
2092
+ : '')
2093
+ // Normalize quantities so they don't start with a '.' or '+' sign and
2094
+ // make sure they all have an integer component so can't be confused
2095
+ // with a dotted identifier.
2096
+ // This can't be done in the lexer since ".4" is a valid rule part.
2097
+ : (cc1 = token.charCodeAt(1),
2098
+ cc2 = token.charCodeAt(2),
2099
+ isnum1 = '0'.charCodeAt(0) <= cc1 && cc1 <= '9'.charCodeAt(0),
2100
+ isnum2 = '0'.charCodeAt(0) <= cc2 && cc2 <= '9'.charCodeAt(0),
2101
+ // +.5 -> 0.5 if allowed.
2102
+ (cc === '+'.charCodeAt(0)
2103
+ && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2))))
2104
+ ? ((propBits & CSS_PROP_BIT_QUANTITY)
2105
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
2106
+ ? (token.match(/^\+\d{1,7}$/) ? token : '')
2107
+ : ((isnum1 ? '' : '0') + token.substring(1)))
2108
+ : '')
2109
+ // -.5 -> -0.5 if allowed otherwise -> 0 if quantities allowed.
2110
+ : (cc === '-'.charCodeAt(0)
2111
+ && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2)))
2112
+ ? ((propBits & CSS_PROP_BIT_NEGATIVE_QUANTITY)
2113
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
2114
+ ? (token.match(/^\-\d{1,7}$/) ? token : '')
2115
+ : ((isnum1 ? '-' : '-0') + token.substring(1)))
2116
+ : ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' : ''))
2117
+ // .5 -> 0.5 if allowed.
2118
+ : (cc === '.'.charCodeAt(0) && isnum1)
2119
+ ? ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' + token : '')
2120
+ // Handle url("...") by rewriting the body.
2121
+ : ('url(' === token.substring(0, 4))
2122
+ ? ((opt_naiveUriRewriter && (qstringBits & CSS_PROP_BIT_QSTRING_URL))
2123
+ ? normalizeUrl(
2124
+ safeUri(
2125
+ tokens[i].substring(5, token.length - 2),
2126
+ property,
2127
+ opt_naiveUriRewriter
2128
+ )
2129
+ )
2130
+ : '')
2131
+ // Handle func(...) and literal tokens
2132
+ // such as keywords and punctuation.
2133
+ : (
2134
+ // Step 1. Combine func(...) into something that can be compared
2135
+ // against propertySchema.cssExtra.
2136
+ (token.charAt(token.length-1) === '(')
2137
+ && (end = normalizeFunctionCall(tokens, i),
2138
+ // When tokens is
2139
+ // ['x', ' ', 'rgb(', '255', ',', '0', ',', '0', ')', ' ', 'y']
2140
+ // and i is the index of 'rgb(' and end is the index of ')'
2141
+ // splices tokens to where i now is the index of the whole call:
2142
+ // ['x', ' ', 'rgb( 255 , 0 , 0 )', ' ', 'y']
2143
+ tokens.splice(i, end - i,
2144
+ token = tokens.slice(i, end).join(' '))),
2145
+ litGroup = propertySchema.cssLitGroup,
2146
+ litMap = (
2147
+ litGroup
2148
+ ? (propertySchema.cssLitMap
2149
+ // Lazily compute the union from litGroup.
2150
+ || (propertySchema.cssLitMap = unionArrays(litGroup)))
2151
+ : ALLOWED_LITERAL), // A convenient empty object.
2152
+ (litMap[token] === ALLOWED_LITERAL
2153
+ || propertySchema.cssExtra && propertySchema.cssExtra.test(token)))
2154
+ // Token is in the literal map or matches extra.
2155
+ ? token
2156
+ : (/^\w+$/.test(token)
2157
+ && (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT))
2158
+ // Quote unrecognized keywords so font names like
2159
+ // Arial Bold
2160
+ // ->
2161
+ // "Arial Bold"
2162
+ ? (lastQuoted+1 === k
2163
+ // If the last token was also a keyword that was quoted, then
2164
+ // combine this token into that.
2165
+ ? (tokens[lastQuoted] = tokens[lastQuoted]
2166
+ .substring(0, tokens[lastQuoted].length-1) + ' ' + token + '"',
2167
+ token = '')
2168
+ : (lastQuoted = k, '"' + token + '"'))
2169
+ // Disallowed.
2170
+ : '');
2171
+ if (token) {
2172
+ tokens[k++] = token;
2173
+ }
2174
+ }
2175
+ // For single URL properties, if the URL failed to pass the sanitizer,
2176
+ // then just drop it.
2177
+ if (k === 1 && tokens[0] === NOEFFECT_URL) { k = 0; }
2178
+ tokens.length = k;
2179
+ };
2180
+ })();
2181
+
2182
+ /**
2183
+ * Given a series of tokens, returns two lists of sanitized selectors.
2184
+ * @param {Array.<string>} selectors In the form produces by csslexer.js.
2185
+ * @param {string} suffix a suffix that is added to all IDs and which is
2186
+ * used as a CLASS names so that the returned selectors will only match
2187
+ * nodes under one with suffix as a class name.
2188
+ * If suffix is {@code "sfx"}, the selector
2189
+ * {@code ["a", "#foo", " ", "b", ".bar"]} will be namespaced to
2190
+ * {@code [".sfx", " ", "a", "#foo-sfx", " ", "b", ".bar"]}.
2191
+ * @return {Array.<Array.<string>>} an array of length 2 where the zeroeth
2192
+ * element contains history-insensitive selectors and the first element
2193
+ * contains history-sensitive selectors.
2194
+ */
2195
+ function sanitizeCssSelectors(selectors, suffix) {
2196
+ // Produce two distinct lists of selectors to sequester selectors that are
2197
+ // history sensitive (:visited), so that we can disallow properties in the
2198
+ // property groups for the history sensitive ones.
2199
+ var historySensitiveSelectors = [];
2200
+ var historyInsensitiveSelectors = [];
2201
+
2202
+ // Remove any spaces that are not operators.
2203
+ var k = 0, i;
2204
+ for (i = 0; i < selectors.length; ++i) {
2205
+ if (!(selectors[i] == ' '
2206
+ && (selectors[i-1] == '>' || selectors[i+1] == '>'))) {
2207
+ selectors[k++] = selectors[i];
2208
+ }
2209
+ }
2210
+ selectors.length = k;
2211
+
2212
+ // Split around commas. If there is an error in one of the comma separated
2213
+ // bits, we throw the whole away, but the failure of one selector does not
2214
+ // affect others.
2215
+ var n = selectors.length, start = 0;
2216
+ for (i = 0; i < n; ++i) {
2217
+ if (selectors[i] == ',') {
2218
+ processSelector(start, i);
2219
+ start = i+1;
2220
+ }
2221
+ }
2222
+ processSelector(start, n);
2223
+
2224
+
2225
+ function processSelector(start, end) {
2226
+ var historySensitive = false;
2227
+
2228
+ // Space around commas is not an operator.
2229
+ if (selectors[start] === ' ') { ++start; }
2230
+ if (end-1 !== start && selectors[end] === ' ') { --end; }
2231
+
2232
+ // Split the selector into element selectors, content around
2233
+ // space (ancestor operator) and '>' (descendant operator).
2234
+ var out = [];
2235
+ var lastOperator = start;
2236
+ var elSelector = '';
2237
+ for (var i = start; i < end; ++i) {
2238
+ var tok = selectors[i];
2239
+ var isChild = (tok === '>');
2240
+ if (isChild || tok === ' ') {
2241
+ // We've found the end of a single link in the selector chain.
2242
+ // We disallow absolute positions relative to html.
2243
+ elSelector = processElementSelector(lastOperator, i, false);
2244
+ if (!elSelector || (isChild && /^html/i.test(elSelector))) {
2245
+ return;
2246
+ }
2247
+ lastOperator = i+1;
2248
+ out.push(elSelector, isChild ? ' > ' : ' ');
2249
+ }
2250
+ }
2251
+ elSelector = processElementSelector(lastOperator, end, true);
2252
+ if (!elSelector) { return; }
2253
+ out.push(elSelector);
2254
+
2255
+ function processElementSelector(start, end, last) {
2256
+
2257
+ // Split the element selector into three parts.
2258
+ // DIV.foo#bar:hover
2259
+ // ^ ^
2260
+ // el classes pseudo
2261
+ var element, classId, pseudoSelector, tok, elType;
2262
+ element = '';
2263
+ if (start < end) {
2264
+ tok = selectors[start].toLowerCase();
2265
+ if (tok === '*'
2266
+ || (tok === 'body' && start+1 !== end && !last)
2267
+ || ('number' === typeof (elType = html4.ELEMENTS[tok])
2268
+ && !(elType & html4.eflags.UNSAFE))) {
2269
+ ++start;
2270
+ element = tok;
2271
+ }
2272
+ }
2273
+ classId = '';
2274
+ while (start < end) {
2275
+ tok = selectors[start];
2276
+ if (tok.charAt(0) === '#') {
2277
+ if (/^#_|__$|[^#0-9A-Za-z:_\-]/.test(tok)) { return null; }
2278
+ // Rewrite ID elements to include the suffix.
2279
+ classId += tok + '-' + suffix;
2280
+ } else if (tok === '.') {
2281
+ if (++start < end
2282
+ && /^[0-9A-Za-z:_\-]+$/.test(tok = selectors[start])
2283
+ && !/^_|__$/.test(tok)) {
2284
+ classId += '.' + tok;
2285
+ } else {
2286
+ return null;
2287
+ }
2288
+ } else {
2289
+ break;
2290
+ }
2291
+ ++start;
2292
+ }
2293
+ pseudoSelector = '';
2294
+ if (start < end && selectors[start] === ':') {
2295
+ tok = selectors[++start];
2296
+ if (tok === 'visited' || tok === 'link') {
2297
+ if (!/^[a*]?$/.test(element)) {
2298
+ return null;
2299
+ }
2300
+ historySensitive = true;
2301
+ pseudoSelector = ':' + tok;
2302
+ element = 'a';
2303
+ ++start;
2304
+ }
2305
+ }
2306
+ if (start === end) {
2307
+ return element + classId + pseudoSelector;
2308
+ }
2309
+ return null;
2310
+ }
2311
+
2312
+
2313
+ var safeSelector = out.join('');
2314
+ if (/^body\b/.test(safeSelector)) {
2315
+ // Substitute the class that is attached to pseudo body elements for
2316
+ // the body element.
2317
+ safeSelector = '.vdoc-body___.' + suffix + safeSelector.substring(4);
2318
+ } else {
2319
+ // Namespace the selector so that it only matches under
2320
+ // a node with suffix in its CLASS attribute.
2321
+ safeSelector = '.' + suffix + ' ' + safeSelector;
2322
+ }
2323
+
2324
+ (historySensitive
2325
+ ? historySensitiveSelectors
2326
+ : historyInsensitiveSelectors).push(safeSelector);
2327
+ }
2328
+
2329
+ return [historyInsensitiveSelectors, historySensitiveSelectors];
2330
+ }
2331
+
2332
+ var sanitizeStylesheet = (function () {
2333
+ var allowed = {};
2334
+ var cssMediaTypeWhitelist = {
2335
+ 'braille': allowed,
2336
+ 'embossed': allowed,
2337
+ 'handheld': allowed,
2338
+ 'print': allowed,
2339
+ 'projection': allowed,
2340
+ 'screen': allowed,
2341
+ 'speech': allowed,
2342
+ 'tty': allowed,
2343
+ 'tv': allowed
2344
+ };
2345
+
2346
+ /**
2347
+ * Given a series of sanitized tokens, removes any properties that would
2348
+ * leak user history if allowed to style links differently depending on
2349
+ * whether the linked URL is in the user's browser history.
2350
+ * @param {Array.<string>} blockOfProperties
2351
+ */
2352
+ function sanitizeHistorySensitive(blockOfProperties) {
2353
+ var elide = false;
2354
+ for (var i = 0, n = blockOfProperties.length; i < n-1; ++i) {
2355
+ var token = blockOfProperties[i];
2356
+ if (':' === blockOfProperties[i+1]) {
2357
+ elide = !(cssSchema[token].cssPropBits & CSS_PROP_BIT_ALLOWED_IN_LINK);
2358
+ }
2359
+ if (elide) { blockOfProperties[i] = ''; }
2360
+ if (';' === token) { elide = false; }
2361
+ }
2362
+ return blockOfProperties.join('');
2363
+ }
2364
+
2365
+ /**
2366
+ * @param {string} cssText a string containing a CSS stylesheet.
2367
+ * @param {string} suffix a suffix that is added to all IDs and which is
2368
+ * used as a CLASS names so that the returned selectors will only match
2369
+ * nodes under one with suffix as a class name.
2370
+ * If suffix is {@code "sfx"}, the selector
2371
+ * {@code ["a", "#foo", " ", "b", ".bar"]} will be namespaced to
2372
+ * {@code [".sfx", " ", "a", "#foo-sfx", " ", "b", ".bar"]}.
2373
+ * @param {function(string, string)} opt_naiveUriRewriter maps URLs of media
2374
+ * (images, sounds) that appear as CSS property values to sanitized
2375
+ * URLs or null if the URL should not be allowed as an external media
2376
+ * file in sanitized CSS.
2377
+ */
2378
+ return function /*sanitizeStylesheet*/(
2379
+ cssText, suffix, opt_naiveUriRewriter) {
2380
+ var safeCss = void 0;
2381
+ // A stack describing the { ... } regions.
2382
+ // Null elements indicate blocks that should not be emitted.
2383
+ var blockStack = [];
2384
+ // True when the content of the current block should be left off safeCss.
2385
+ var elide = false;
2386
+ parseCssStylesheet(
2387
+ cssText,
2388
+ {
2389
+ startStylesheet: function () {
2390
+ safeCss = [];
2391
+ },
2392
+ endStylesheet: function () {
2393
+ },
2394
+ startAtrule: function (atIdent, headerArray) {
2395
+ if (elide) {
2396
+ atIdent = null;
2397
+ } else if (atIdent === '@media') {
2398
+ headerArray = headerArray.filter(
2399
+ function (mediaType) {
2400
+ return cssMediaTypeWhitelist[mediaType] == allowed;
2401
+ });
2402
+ if (headerArray.length) {
2403
+ safeCss.push(atIdent, headerArray.join(','), '{');
2404
+ } else {
2405
+ atIdent = null;
2406
+ }
2407
+ } else {
2408
+ if (atIdent === '@import') {
2409
+ // TODO: Use a logger instead.
2410
+ if (window.console) {
2411
+ window.console.log(
2412
+ '@import ' + headerArray.join(' ') + ' elided');
2413
+ }
2414
+ }
2415
+ atIdent = null; // Elide the block.
2416
+ }
2417
+ elide = !atIdent;
2418
+ blockStack.push(atIdent);
2419
+ },
2420
+ endAtrule: function () {
2421
+ blockStack.pop();
2422
+ if (!elide) {
2423
+ safeCss.push(';');
2424
+ }
2425
+ checkElide();
2426
+ },
2427
+ startBlock: function () {
2428
+ // There are no bare blocks in CSS, so we do not change the
2429
+ // block stack here, but instead in the events that bracket
2430
+ // blocks.
2431
+ if (!elide) {
2432
+ safeCss.push('{');
2433
+ }
2434
+ },
2435
+ endBlock: function () {
2436
+ if (!elide) {
2437
+ safeCss.push('}');
2438
+ elide = true; // skip any semicolon from endAtRule.
2439
+ }
2440
+ },
2441
+ startRuleset: function (selectorArray) {
2442
+ var historySensitiveSelectors = void 0;
2443
+ var removeHistoryInsensitiveSelectors = false;
2444
+ if (!elide) {
2445
+ var selectors = sanitizeCssSelectors(selectorArray, suffix);
2446
+ var historyInsensitiveSelectors = selectors[0];
2447
+ historySensitiveSelectors = selectors[1];
2448
+ if (!historyInsensitiveSelectors.length
2449
+ && !historySensitiveSelectors.length) {
2450
+ elide = true;
2451
+ } else {
2452
+ var selector = historyInsensitiveSelectors.join(', ');
2453
+ if (!selector) {
2454
+ // If we have only history sensitive selectors,
2455
+ // use an impossible rule so that we can capture the content
2456
+ // for later processing by
2457
+ // history insenstive content for use below.
2458
+ selector = 'head > html';
2459
+ removeHistoryInsensitiveSelectors = true;
2460
+ }
2461
+ safeCss.push(selector, '{');
2462
+ }
2463
+ }
2464
+ blockStack.push(
2465
+ elide
2466
+ ? null
2467
+ // Sometimes a single list of selectors is split in two,
2468
+ // div, a:visited
2469
+ // because we want to allow some properties for DIV that
2470
+ // we don't want to allow for A:VISITED to avoid leaking
2471
+ // user history.
2472
+ // Store the history sensitive selectors and the position
2473
+ // where the block starts so we can later create a copy
2474
+ // of the permissive tokens, and filter it to handle the
2475
+ // history sensitive case.
2476
+ : {
2477
+ historySensitiveSelectors: historySensitiveSelectors,
2478
+ endOfSelectors: safeCss.length - 1, // 1 is open curly
2479
+ removeHistoryInsensitiveSelectors:
2480
+ removeHistoryInsensitiveSelectors
2481
+ });
2482
+ },
2483
+ endRuleset: function () {
2484
+ var rules = blockStack.pop();
2485
+ var propertiesEnd = safeCss.length;
2486
+ if (!elide) {
2487
+ safeCss.push('}');
2488
+ if (rules) {
2489
+ var extraSelectors = rules.historySensitiveSelectors;
2490
+ if (extraSelectors.length) {
2491
+ var propertyGroupTokens = safeCss.slice(rules.endOfSelectors);
2492
+ safeCss.push(extraSelectors.join(', '),
2493
+ sanitizeHistorySensitive(propertyGroupTokens));
2494
+ }
2495
+ }
2496
+ }
2497
+ if (rules && rules.removeHistoryInsensitiveSelectors) {
2498
+ safeCss.splice(
2499
+ // -1 and +1 account for curly braces.
2500
+ rules.endOfSelectors - 1, propertiesEnd + 1);
2501
+ }
2502
+ checkElide();
2503
+ },
2504
+ declaration: function (property, valueArray) {
2505
+ if (!elide) {
2506
+ var schema = cssSchema[property];
2507
+ if (schema) {
2508
+ sanitizeCssProperty(property, schema, valueArray, opt_naiveUriRewriter);
2509
+ if (valueArray.length) {
2510
+ safeCss.push(property, ':', valueArray.join(' '), ';');
2511
+ }
2512
+ }
2513
+ }
2514
+ }
2515
+ });
2516
+ function checkElide() {
2517
+ elide = blockStack.length !== 0
2518
+ && blockStack[blockStack.length-1] !== null;
2519
+ }
2520
+ return safeCss.join('');
2521
+ };
2522
+ })();
2523
+
2524
+ // Exports for closure compiler.
2525
+ if (typeof window !== 'undefined') {
2526
+ window['sanitizeCssProperty'] = sanitizeCssProperty;
2527
+ window['sanitizeCssSelectors'] = sanitizeCssSelectors;
2528
+ window['sanitizeStylesheet'] = sanitizeStylesheet;
2529
+ }
2530
+ // Copyright (C) 2010 Google Inc.
2531
+ //
2532
+ // Licensed under the Apache License, Version 2.0 (the "License");
2533
+ // you may not use this file except in compliance with the License.
2534
+ // You may obtain a copy of the License at
2535
+ //
2536
+ // http://www.apache.org/licenses/LICENSE-2.0
2537
+ //
2538
+ // Unless required by applicable law or agreed to in writing, software
2539
+ // distributed under the License is distributed on an "AS IS" BASIS,
2540
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2541
+ // See the License for the specific language governing permissions and
2542
+ // limitations under the License.
2543
+
2544
+ /**
2545
+ * @fileoverview
2546
+ * Utilities for dealing with CSS source code.
2547
+ *
2548
+ * @author mikesamuel@gmail.com
2549
+ * \@requires lexCss
2550
+ * \@overrides window
2551
+ * \@provides parseCssStylesheet, parseCssDeclarations
2552
+ */
2553
+
2554
+ /**
2555
+ * parseCssStylesheet takes a chunk of CSS text and a handler object with
2556
+ * methods that it calls as below:
2557
+ * <pre>
2558
+ * // At the beginning of a stylesheet.
2559
+ * handler.startStylesheet();
2560
+ *
2561
+ * // For an @foo rule ended by a semicolon: @import "foo.css";
2562
+ * handler.startAtrule('@import', ['"foo.css"']);
2563
+ * handler.endAtrule();
2564
+ *
2565
+ * // For an @foo rule ended with a block. @media print { ... }
2566
+ * handler.startAtrule('@media', ['print']);
2567
+ * handler.startBlock();
2568
+ * // Calls to contents elided. Probably selectors and declarations as below.
2569
+ * handler.endBlock();
2570
+ * handler.endAtrule();
2571
+ *
2572
+ * // For a ruleset: p.clazz q, s { color: blue; }
2573
+ * handler.startRuleset(['p', '.', 'clazz', ' ', 'q', ',', ' ', 's']);
2574
+ * handler.declaration('color', ['blue']);
2575
+ * handler.endRuleset();
2576
+ *
2577
+ * // At the end of a stylesheet.
2578
+ * handler.endStylesheet();
2579
+ * </pre>
2580
+ * When errors are encountered, the parser drops the useless tokens and
2581
+ * attempts to resume parsing.
2582
+ *
2583
+ * @param {string} cssText CSS3 content to parse as a stylesheet.
2584
+ * @param {Object} handler An object like <pre>{
2585
+ * startStylesheet: function () { ... },
2586
+ * endStylesheet: function () { ... },
2587
+ * startAtrule: function (atIdent, headerArray) { ... },
2588
+ * endAtrule: function () { ... },
2589
+ * startBlock: function () { ... },
2590
+ * endBlock: function () { ... },
2591
+ * startRuleset: function (selectorArray) { ... },
2592
+ * endRuleset: function () { ... },
2593
+ * declaration: function (property, valueArray) { ... },
2594
+ * }</pre>
2595
+ */
2596
+ var parseCssStylesheet;
2597
+
2598
+ /**
2599
+ * parseCssDeclarations parses a run of declaration productions as seen in the
2600
+ * body of the HTML5 {@code style} attribute.
2601
+ *
2602
+ * @param {string} cssText CSS3 content to parse as a run of declarations.
2603
+ * @param {Object} handler An object like <pre>{
2604
+ * declaration: function (property, valueArray) { ... },
2605
+ * }</pre>
2606
+ */
2607
+ var parseCssDeclarations;
2608
+
2609
+ (function () {
2610
+ // stylesheet : [ CDO | CDC | S | statement ]*;
2611
+ parseCssStylesheet = function(cssText, handler) {
2612
+ var toks = lexCss(cssText);
2613
+ if (handler.startStylesheet) { handler.startStylesheet(); }
2614
+ for (var i = 0, n = toks.length; i < n;) {
2615
+ // CDO and CDC ("<!--" and "-->") are converted to space by the lexer.
2616
+ i = toks[i] === ' ' ? i+1 : statement(toks, i, n, handler);
2617
+ }
2618
+ if (handler.endStylesheet) { handler.endStylesheet(); }
2619
+ };
2620
+
2621
+ // statement : ruleset | at-rule;
2622
+ function statement(toks, i, n, handler) {
2623
+ if (i < n) {
2624
+ var tok = toks[i];
2625
+ if (tok.charAt(0) === '@') {
2626
+ return atrule(toks, i, n, handler, true);
2627
+ } else {
2628
+ return ruleset(toks, i, n, handler);
2629
+ }
2630
+ } else {
2631
+ return i;
2632
+ }
2633
+ }
2634
+
2635
+ // at-rule : ATKEYWORD S* any* [ block | ';' S* ];
2636
+ function atrule(toks, i, n, handler, blockok) {
2637
+ var start = i++;
2638
+ while (i < n && toks[i] !== '{' && toks[i] !== ';') {
2639
+ ++i;
2640
+ }
2641
+ if (i < n && (blockok || toks[i] === ';')) {
2642
+ var s = start+1, e = i;
2643
+ if (s < n && toks[s] === ' ') { ++s; }
2644
+ if (e > s && toks[e-1] === ' ') { --e; }
2645
+ if (handler.startAtrule) {
2646
+ handler.startAtrule(toks[start].toLowerCase(), toks.slice(s, e));
2647
+ }
2648
+ i = (toks[i] === '{')
2649
+ ? block(toks, i, n, handler)
2650
+ : i+1; // Skip over ';'
2651
+ if (handler.endAtrule) {
2652
+ handler.endAtrule();
2653
+ }
2654
+ }
2655
+ // Else we reached end of input or are missing a semicolon.
2656
+ // Drop the rule on the floor.
2657
+ return i;
2658
+ }
2659
+
2660
+ // block : '{' S* [ any | block | ATKEYWORD S* | ';' S* ]* '}' S*;
2661
+ // Assumes the leading '{' has been verified by callers.
2662
+ function block(toks, i, n, handler) {
2663
+ ++i; // skip over '{'
2664
+ if (handler.startBlock) { handler.startBlock(); }
2665
+ while (i < n) {
2666
+ var ch = toks[i].charAt(0);
2667
+ if (ch == '}') {
2668
+ ++i;
2669
+ break;
2670
+ }
2671
+ if (ch === ' ' || ch === ';') {
2672
+ i = i+1;
2673
+ } else if (ch === '@') {
2674
+ i = atrule(toks, i, n, handler, false);
2675
+ } else if (ch === '{') {
2676
+ i = block(toks, i, n, handler);
2677
+ } else {
2678
+ // Instead of using (any* block) to subsume ruleset we allow either
2679
+ // blocks or rulesets with a non-blank selector.
2680
+ // This is more restrictive but does not require atrule specific
2681
+ // parse tree fixup to realize that the contents of the block in
2682
+ // @media print { ... }
2683
+ // is a ruleset. We just don't care about any block carrying at-rules
2684
+ // whose body content is not ruleset content.
2685
+ i = ruleset(toks, i, n, handler);
2686
+ }
2687
+ }
2688
+ if (handler.endBlock) { handler.endBlock(); }
2689
+ return i;
2690
+ }
2691
+
2692
+ // ruleset : selector? '{' S* declaration? [ ';' S* declaration? ]* '}' S*;
2693
+ function ruleset(toks, i, n, handler) {
2694
+ // toks[s:e] are the selector tokens including internal whitespace.
2695
+ var s = i, e = selector(toks, i, n, true);
2696
+ if (e < 0) {
2697
+ // Skip malformed content per selector calling convention.
2698
+ e = ~e;
2699
+ // Make sure we skip at least one token.
2700
+ return i === e ? e+1 : e;
2701
+ }
2702
+ i = e;
2703
+ // Don't include any trailing space in the selector slice.
2704
+ if (e > s && toks[e-1] === ' ') { --e; }
2705
+ var tok = toks[i];
2706
+ ++i; // Skip over '{'
2707
+ if (tok !== '{') {
2708
+ // Skips past the '{' when there is a malformed input.
2709
+ return i;
2710
+ }
2711
+ if (handler.startRuleset) {
2712
+ handler.startRuleset(toks.slice(s, e));
2713
+ }
2714
+ while (i < n) {
2715
+ tok = toks[i];
2716
+ if (tok === '}') {
2717
+ ++i;
2718
+ break;
2719
+ }
2720
+ if (tok === ' ') {
2721
+ i = i+1;
2722
+ } else {
2723
+ i = declaration(toks, i, n, handler);
2724
+ }
2725
+ }
2726
+ if (handler.endRuleset) {
2727
+ handler.endRuleset();
2728
+ }
2729
+ return i < n ? i+1 : i;
2730
+ }
2731
+
2732
+ // selector : any+;
2733
+ // any : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
2734
+ // | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
2735
+ // | FUNCTION S* any* ')' | DASHMATCH | '(' S* any* ')'
2736
+ // | '[' S* any* ']' ] S*;
2737
+ // A negative return value, rv, indicates the selector was malformed and
2738
+ // the index at which we stopped is ~rv.
2739
+ function selector(toks, i, n, allowSemi) {
2740
+ // The definition of any above can be summed up as
2741
+ // "any run of token except ('[', ']', '(', ')', ':', ';', '{', '}')
2742
+ // or nested runs of parenthesized tokens or square bracketed tokens".
2743
+ // Spaces are significant in the selector.
2744
+ // Selector is used as (selector?) so the below looks for (any*) for
2745
+ // simplicity.
2746
+ var tok;
2747
+ // Keeping a stack pointer actually causes this to minify better since
2748
+ // ".length" and ".push" are a lo of chars.
2749
+ var brackets = [], stackLast = -1;
2750
+ for (;i < n; ++i) {
2751
+ tok = toks[i].charAt(0);
2752
+ if (tok === '[' || tok === '(') {
2753
+ brackets[++stackLast] = tok;
2754
+ } else if ((tok === ']' && brackets[stackLast] === '[') ||
2755
+ (tok === ')' && brackets[stackLast] === '(')) {
2756
+ --stackLast;
2757
+ } else if (tok === '{' || tok === '}' || tok === ';' || tok === '@'
2758
+ || (tok === ':' && !allowSemi)) {
2759
+ break;
2760
+ }
2761
+ }
2762
+ if (stackLast >= 0) {
2763
+ // Returns the bitwise inverse of i+1 to indicate an error in the
2764
+ // token stream so that clients can ignore it.
2765
+ i = ~(i+1);
2766
+ }
2767
+ return i;
2768
+ }
2769
+
2770
+ var ident = /^-?[a-z]/i;
2771
+
2772
+ // declaration : property ':' S* value;
2773
+ // property : IDENT S*;
2774
+ // value : [ any | block | ATKEYWORD S* ]+;
2775
+ function declaration(toks, i, n, handler) {
2776
+ var property = toks[i++];
2777
+ if (!ident.test(property)) {
2778
+ return i+1; // skip one token.
2779
+ }
2780
+ var tok;
2781
+ if (i < n && toks[i] === ' ') { ++i; }
2782
+ if (i == n || toks[i] !== ':') {
2783
+ // skip tokens to next semi or close bracket.
2784
+ while (i < n && (tok = toks[i]) !== ';' && tok !== '}') { ++i; }
2785
+ return i;
2786
+ }
2787
+ ++i;
2788
+ if (i < n && toks[i] === ' ') { ++i; }
2789
+
2790
+ // None of the rules we care about want atrules or blocks in value, so
2791
+ // we look for any+ but that is the same as selector but not zero-length.
2792
+ // This gets us the benefit of not emitting any value with mismatched
2793
+ // brackets.
2794
+ var s = i, e = selector(toks, i, n, false);
2795
+ if (e < 0) {
2796
+ // Skip malformed content per selector calling convention.
2797
+ e = ~e;
2798
+ } else {
2799
+ var value = [], valuelen = 0;
2800
+ for (var j = s; j < e; ++j) {
2801
+ tok = toks[j];
2802
+ if (tok !== ' ') {
2803
+ value[valuelen++] = tok;
2804
+ }
2805
+ }
2806
+ // One of the following is now true:
2807
+ // (1) e is flush with the end of the tokens as in <... style="x:y">.
2808
+ // (2) tok[e] points to a ';' in which case we need to consume the semi.
2809
+ // (3) tok[e] points to a '}' in which case we don't consume it.
2810
+ // (4) else there is bogus unparsed value content at toks[e:].
2811
+ // Allow declaration flush with end for style attr body.
2812
+ if (e < n) { // 2, 3, or 4
2813
+ do {
2814
+ tok = toks[e];
2815
+ if (tok === ';' || tok === '}') { break; }
2816
+ // Don't emit the property if there is questionable trailing content.
2817
+ valuelen = 0;
2818
+ } while (++e < n);
2819
+ if (tok === ';') {
2820
+ ++e;
2821
+ }
2822
+ }
2823
+ if (valuelen && handler.declaration) {
2824
+ // TODO: coerce non-keyword ident tokens to quoted strings.
2825
+ handler.declaration(property.toLowerCase(), value);
2826
+ }
2827
+ }
2828
+ return e;
2829
+ }
2830
+
2831
+ parseCssDeclarations = function(cssText, handler) {
2832
+ var toks = lexCss(cssText);
2833
+ for (var i = 0, n = toks.length; i < n;) {
2834
+ i = toks[i] !== ' ' ? declaration(toks, i, n, handler) : i+1;
2835
+ }
2836
+ };
2837
+ })();
2838
+
2839
+ // Exports for closure compiler.
2840
+ if (typeof window !== 'undefined') {
2841
+ window['parseCssStylesheet'] = parseCssStylesheet;
2842
+ window['parseCssDeclarations'] = parseCssDeclarations;
2843
+ }
2844
+ /*!
2845
+ * OpenUI5
2846
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
2847
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
2848
+ */
2849
+ // Based on coding from the HTML4 Sanitizer by Google Inc.
2850
+ // The HTML Attributes and ELements were reorganized according to the actual HTML5 specification
2851
+ // from the W3C. All types and flags were reviewed again as accurately as possible with HTML4 only
2852
+ // elements removed, you can still see them as comments. All rules which are new or changed from the
2853
+ // old HTML4 file are also marked "new" within the comment. The comments also state which attributes
2854
+ // and elements are assigned to respective types and flags. All rules which were not 100% clear were
2855
+ // analyzed in a way of similarity, so for example "audio" and "video" content behaves like images etc.
2856
+ // URIEFFECTS state if a URL is loaded inplace within a tag where the actual document is in control
2857
+ // of what type of content is loaded like "image" or if a new document is loaded like with "a href".
2858
+ // LOADERTYPES state if content is loaded as sandboxed which means it is loaded within a specific
2859
+ // surroundig player like with video content for example or if it is loaded freely without restrictions.
2860
+ // @overrides window
2861
+ // @provides html4
2862
+
2863
+ var html4 = {};
2864
+ html4.atype = {
2865
+ NONE: 0,
2866
+ URI: 1, //action, cite, data, href, icon, manifest, poster, src
2867
+ URI_FRAGMENT: 11, //usemap
2868
+ SCRIPT: 2, //all event handlers
2869
+ STYLE: 3, //style
2870
+ ID: 4, //id
2871
+ IDREF: 5, //for
2872
+ IDREFS: 6, //headers
2873
+ GLOBAL_NAME: 7, //name of form, iframe, img, map, meta
2874
+ LOCAL_NAME: 8, //name of button, fieldset, input, keygen, object, output, param, select, textarea
2875
+ CLASSES: 9, //class
2876
+ FRAME_TARGET: 10 //formtarget, srcdoc, target
2877
+ };
2878
+
2879
+ html4.ATTRIBS = {
2880
+ '*::accesskey': 0, //NONE
2881
+ '*::class': 9, //CLASSES
2882
+ '*::contenteditable': 0, //NONE new
2883
+ '*::contextmenu': 0, //NONE new
2884
+ '*::dir': 0, //NONE
2885
+ '*::draggable': 0, //NONE new
2886
+ '*::dropzone': 0, //NONE new
2887
+ '*::hidden': 0, //NONE new
2888
+ '*::id': 4, //ID
2889
+ '*::lang': 0, //NONE
2890
+ '*::onabort': 2, //SCRIPT new
2891
+ '*::onblur': 2, //SCRIPT new
2892
+ '*::oncanplay': 2, //SCRIPT new
2893
+ '*::oncanplaythrough': 2, //SCRIPT new
2894
+ '*::onchange': 2, //SCRIPT new
2895
+ '*::onclick': 2, //SCRIPT
2896
+ '*::oncontextmenu': 2, //SCRIPT new
2897
+ '*::oncuechange': 2, //SCRIPT new
2898
+ '*::ondblclick': 2, //SCRIPT
2899
+ '*::ondrag': 2, //SCRIPT new
2900
+ '*::ondragend': 2, //SCRIPT new
2901
+ '*::ondragenter': 2, //SCRIPT new
2902
+ '*::ondragleave': 2, //SCRIPT new
2903
+ '*::ondragover': 2, //SCRIPT new
2904
+ '*::ondragstart': 2, //SCRIPT new
2905
+ '*::ondrop': 2, //SCRIPT new
2906
+ '*::ondurationchange': 2, //SCRIPT new
2907
+ '*::onemptied': 2, //SCRIPT new
2908
+ '*::onended': 2, //SCRIPT new
2909
+ '*::onerror': 2, //SCRIPT new
2910
+ '*::onfocus': 2, //SCRIPT new
2911
+ '*::oninput': 2, //SCRIPT new
2912
+ '*::oninvalid': 2, //SCRIPT new
2913
+ '*::onkeydown': 2, //SCRIPT
2914
+ '*::onkeypress': 2, //SCRIPT
2915
+ '*::onkeyup': 2, //SCRIPT
2916
+ '*::onload': 2, //SCRIPT
2917
+ '*::onloadeddata': 2, //SCRIPT new
2918
+ '*::onloadedmetadata': 2, //SCRIPT new
2919
+ '*::onloadstart': 2, //SCRIPT new
2920
+ '*::onmousedown': 2, //SCRIPT
2921
+ '*::onmousemove': 2, //SCRIPT
2922
+ '*::onmouseout': 2, //SCRIPT
2923
+ '*::onmouseover': 2, //SCRIPT
2924
+ '*::onmouseup': 2, //SCRIPT
2925
+ '*::onmousewheel': 2, //SCRIPT new
2926
+ '*::onpause': 2, //SCRIPT new
2927
+ '*::onplay': 2, //SCRIPT new
2928
+ '*::onplaying': 2, //SCRIPT new
2929
+ '*::onprogress': 2, //SCRIPT new
2930
+ '*::onratechange': 2, //SCRIPT new
2931
+ '*::onreadystatechange': 2, //SCRIPT new
2932
+ '*::onreset': 2, //SCRIPT new
2933
+ '*::onscroll': 2, //SCRIPT new
2934
+ '*::onseeked': 2, //SCRIPT new
2935
+ '*::onseeking': 2, //SCRIPT new
2936
+ '*::onselect': 2, //SCRIPT new
2937
+ '*::onshow': 2, //SCRIPT new
2938
+ '*::onstalled': 2, //SCRIPT new
2939
+ '*::onsubmit': 2, //SCRIPT new
2940
+ '*::onsuspend': 2, //SCRIPT new
2941
+ '*::ontimeupdate': 2, //SCRIPT new
2942
+ '*::onvolumechange': 2, //SCRIPT new
2943
+ '*::onwaiting': 2, //SCRIPT new
2944
+ '*::spellcheck': 0, //NONE new
2945
+ '*::style': 3, //STYLE
2946
+ '*::tabindex': 0, //NONE
2947
+ '*::title': 0, //NONE
2948
+ //--------------------- 'a::accesskey': 0, moved to global
2949
+ //--------------------- 'a::coords': 0,
2950
+ 'a::href': 1, //URI
2951
+ 'a::hreflang': 0, //NONE
2952
+ 'a::media': 0, //NONE new
2953
+ //--------------------- 'a::name': 7,
2954
+ //--------------------- 'a::onblur': 2, moved to global
2955
+ //--------------------- 'a::onfocus': 2, moved to global
2956
+ 'a::rel': 0, //NONE
2957
+ //--------------------- 'a::rev': 0,
2958
+ //--------------------- 'a::shape': 0,
2959
+ //--------------------- 'a::tabindex': 0, moved to global
2960
+ 'a::target': 0, //changed to "0" because of CSN 1918585 2013, original value was 10 FRAME_TARGET but it seems uncritical
2961
+ 'a::type': 0, //NONE
2962
+ //--------------------- 'area::accesskey': 0, moved to global
2963
+ 'area::alt': 0, //NONE
2964
+ 'area::coords': 0, //NONE
2965
+ 'area::href': 1, //URI
2966
+ 'area::hreflang': 0, //NONE new
2967
+ 'area::media': 0, //NONE new
2968
+ //--------------------- 'area::nohref': 0,
2969
+ //--------------------- 'area::onblur': 2, moved to global
2970
+ //--------------------- 'area::onfocus': 2, moved to global
2971
+ 'area::rel': 0, //NONE new
2972
+ 'area::shape': 0, //NONE
2973
+ //--------------------- 'area::tabindex': 0, moved to global
2974
+ 'area::target': 10, //FRAME_TARGET
2975
+ 'area::type': 0, //NONE
2976
+ 'audio::autoplay': 0, //NONE new
2977
+ 'audio::controls': 0, //NONE new
2978
+ 'audio::loop': 0, //NONE new
2979
+ 'audio::mediagroup': 0, //NONE new
2980
+ 'audio::preload': 0, //NONE new
2981
+ 'audio::src': 1, //URI
2982
+ 'base::href': 1, //URI
2983
+ 'base::target': 10, //FRAME_TARGET
2984
+ //--------------------- 'bdo::dir': 0,
2985
+ 'blockquote::cite': 1, //URI
2986
+ 'body::onafterprint': 2, //SCRIPT new
2987
+ 'body::onbeforeprint': 2, //SCRIPT new
2988
+ 'body::onbeforeunload': 2, //SCRIPT new
2989
+ 'body::onblur': 2, //SCRIPT new
2990
+ 'body::onerror': 2, //SCRIPT new
2991
+ 'body::onfocus': 2, //SCRIPT new
2992
+ 'body::onhashchange': 2, //SCRIPT new
2993
+ 'body::onload': 2, //SCRIPT new
2994
+ 'body::onmessage': 2, //SCRIPT new
2995
+ 'body::onoffline': 2, //SCRIPT new
2996
+ 'body::ononline': 2, //SCRIPT new
2997
+ 'body::onpagehide': 2, //SCRIPT new
2998
+ 'body::onpageshow': 2, //SCRIPT new
2999
+ 'body::onpopstate': 2, //SCRIPT new
3000
+ 'body::onredo': 2, //SCRIPT new
3001
+ 'body::onresize': 2, //SCRIPT new
3002
+ 'body::onscroll': 2, //SCRIPT new
3003
+ 'body::onstorage': 2, //SCRIPT new
3004
+ 'body::onundo': 2, //SCRIPT new
3005
+ 'body::onunload': 2, //SCRIPT new
3006
+ //--------------------- 'br::clear': 0,
3007
+ //--------------------- 'button::accesskey': 0, moved to global
3008
+ 'button::autofocus': 0, //NONE new
3009
+ 'button::disabled': 0, //NONE
3010
+ 'button::form': 0, //NONE new
3011
+ 'button::formaction': 1, //URI new
3012
+ 'button::formenctype': 0, //NONE new
3013
+ 'button::formmethod': 0, //NONE new
3014
+ 'button::formnovalidate': 0, //NONE new
3015
+ 'button::formtarget': 10, //FRAME_TARGET new
3016
+ 'button::name': 8, //LOCAL_NAME
3017
+ //--------------------- 'button::onblur': 2,
3018
+ //--------------------- 'button::onfocus': 2,
3019
+ //--------------------- 'button::tabindex': 0, moved to global
3020
+ 'button::type': 0, //NONE
3021
+ 'button::value': 0, //NONE
3022
+ 'canvas::height': 0, //NONE
3023
+ 'canvas::width': 0, //NONE
3024
+ //--------------------- 'caption::align': 0,
3025
+ //--------------------- 'col::align': 0,
3026
+ //--------------------- 'col::char': 0,
3027
+ //--------------------- 'col::charoff': 0,
3028
+ 'col::span': 0, //NONE
3029
+ //--------------------- 'col::valign': 0,
3030
+ //--------------------- 'col::width': 0,
3031
+ //--------------------- 'colgroup::align': 0,
3032
+ //--------------------- 'colgroup::char': 0,
3033
+ //--------------------- 'colgroup::charoff': 0,
3034
+ 'colgroup::span': 0, //NONE
3035
+ //--------------------- 'colgroup::valign': 0,
3036
+ //--------------------- 'colgroup::width': 0,
3037
+ 'command::checked': 0, //NONE new
3038
+ 'command::disabled': 0, //NONE new
3039
+ 'command::icon': 1, //URI new
3040
+ 'command::label': 0, //NONE new
3041
+ 'command::radiogroup': 0, //NONE new
3042
+ 'command::type': 0, //NONE new
3043
+ 'del::cite': 1, //URI
3044
+ 'del::datetime': 0, //NONE
3045
+ 'details::open': 0, //NONE new
3046
+ //--------------------- 'dir::compact': 0,
3047
+ //--------------------- 'div::align': 0,
3048
+ //--------------------- 'dl::compact': 0,
3049
+ 'embed::height': 0, //NONE new
3050
+ 'embed::src': 1, //URI new
3051
+ 'embed::type': 0, //NONE new
3052
+ 'embed::width': 0, //NONE new
3053
+ 'fieldset::disabled': 0, //NONE new
3054
+ 'fieldset::form': 0, //NONE new
3055
+ 'fieldset::name': 8, //LOCAL_NAME new
3056
+ //--------------------- 'font::color': 0,
3057
+ //--------------------- 'font::face': 0,
3058
+ //--------------------- 'font::size': 0,
3059
+ //--------------------- 'form::accept': 0,
3060
+ 'form::accept-charset': 0, //NONE
3061
+ 'form::action': 1, //URI
3062
+ 'form::autocomplete': 0, //NONE
3063
+ 'form::enctype': 0, //NONE
3064
+ 'form::method': 0, //NONE
3065
+ 'form::name': 7, //GLOBAL_NAME
3066
+ 'form::novalidate': 0, //NONE new
3067
+ //--------------------- 'form::onreset': 2,
3068
+ //--------------------- 'form::onsubmit': 2,
3069
+ 'form::target': 10, //FRAME_TARGET
3070
+ //--------------------- 'h1::align': 0,
3071
+ //--------------------- 'h2::align': 0,
3072
+ //--------------------- 'h3::align': 0,
3073
+ //--------------------- 'h4::align': 0,
3074
+ //--------------------- 'h5::align': 0,
3075
+ //--------------------- 'h6::align': 0,
3076
+ //--------------------- 'hr::align': 0,
3077
+ //--------------------- 'hr::noshade': 0,
3078
+ //--------------------- 'hr::size': 0,
3079
+ //--------------------- 'hr::width': 0,
3080
+ 'html:: manifest': 1, //URI new
3081
+ //--------------------- 'iframe::align': 0,
3082
+ //--------------------- 'iframe::frameborder': 0,
3083
+ 'iframe::height': 0, //NONE
3084
+ //--------------------- 'iframe::marginheight': 0,
3085
+ //--------------------- 'iframe::marginwidth': 0,
3086
+ 'iframe::name': 7, //GLOBAL_NAME new
3087
+ 'iframe::sandbox': 0, //NONE new
3088
+ 'iframe::seamless': 0, //NONE new
3089
+ 'iframe::src': 1, //URI new
3090
+ 'iframe::srcdoc': 10, //FRAME_TARGET new
3091
+ 'iframe::width': 0, //NONE
3092
+ //--------------------- 'img::align': 0,
3093
+ 'img::alt': 0, //NONE
3094
+ //--------------------- 'img::border': 0,
3095
+ 'img::height': 0, //NONE
3096
+ //--------------------- 'img::hspace': 0,
3097
+ 'img::ismap': 0, //NONE
3098
+ 'img::name': 7, //GLOBAL_NAME
3099
+ 'img::src': 1, //URI
3100
+ 'img::usemap': 11, //URI_FRAGMENT
3101
+ //--------------------- 'img::vspace': 0,
3102
+ 'img::width': 0, //NONE
3103
+ 'input::accept': 0, //NONE
3104
+ //--------------------- 'input::accesskey': 0, moved to global
3105
+ //--------------------- 'input::align': 0,
3106
+ 'input::alt': 0, //NONE
3107
+ 'input::autocomplete': 0, //NONE
3108
+ 'input::autofocus': 0, //NONE new
3109
+ 'input::checked': 0, //NONE
3110
+ 'input::dirname': 0, //NONE new
3111
+ 'input::disabled': 0, //NONE
3112
+ 'input::form': 0, //NONE new
3113
+ 'input::formaction': 1, //URI new
3114
+ 'input::formenctype': 0, //NONE new
3115
+ 'input::formmethod': 0, //NONE new
3116
+ 'input::formnovalidate': 0, //NONE new
3117
+ 'input::formtarget': 10, //FRAME_TARGET new
3118
+ 'input::height': 0, //NONE new
3119
+ //--------------------- 'input::ismap': 0,
3120
+ 'input::list': 0, //NONE new
3121
+ 'input::max': 0, //NONE new
3122
+ 'input::maxlength': 0, //NONE
3123
+ 'input::min': 0, //NONE new
3124
+ 'input::multiple': 0, //NONE new
3125
+ 'input::name': 8, //LOCAL_NAME
3126
+ //--------------------- 'input::onblur': 2,
3127
+ //--------------------- 'input::onchange': 2,
3128
+ //--------------------- 'input::onfocus': 2,
3129
+ //--------------------- 'input::onselect': 2,
3130
+ 'input::pattern': 0, //NONE new
3131
+ 'input::placeholder': 0, //NONE new
3132
+ 'input::readonly': 0, //NONE
3133
+ 'input::required': 0, //NONE new
3134
+ 'input::step': 0, //NONE new
3135
+ 'input::size': 0, //NONE
3136
+ 'input::src': 1, //URI
3137
+ //--------------------- 'input::tabindex': 0, moved to global
3138
+ 'input::type': 0, //NONE
3139
+ //--------------------- 'input::usemap': 11,
3140
+ 'input::value': 0, //NONE
3141
+ 'input::width': 0, //NONE new
3142
+ 'ins::cite': 1, //URI
3143
+ 'ins::datetime': 0, //NONE
3144
+ //--------------------- 'label::accesskey': 0, moved to global
3145
+ 'keygen::autofocus': 0, //NONE new
3146
+ 'keygen::challenge': 0, //NONE new
3147
+ 'keygen::disabled': 0, //NONE new
3148
+ 'keygen::form': 0, //NONE new
3149
+ 'keygen::keytype': 0, //NONE new
3150
+ 'keygen::name': 8, //LOCAL_NAME new
3151
+ 'label::for': 5, //IDREF
3152
+ 'label::form': 0, //NONE new
3153
+ //--------------------- 'label::onblur': 2,
3154
+ //--------------------- 'label::onfocus': 2,
3155
+ //--------------------- 'legend::accesskey': 0, moved to global
3156
+ //--------------------- 'legend::align': 0,
3157
+ //--------------------- 'li::type': 0,
3158
+ 'link::href': 1, //URI new
3159
+ 'link::hreflang': 0, //NONE new
3160
+ 'link::media': 0, //NONE new
3161
+ 'link::rel': 0, //NONE new
3162
+ 'link::sizes': 0, //NONE new
3163
+ 'link::type': 0, //NONE new
3164
+ 'li::value': 0, //NONE new
3165
+ 'map::name': 7, //GLOBAL_NAME
3166
+ //--------------------- 'menu::compact': 0,
3167
+ 'menu::label': 0, //NONE new
3168
+ 'menu::type': 0, //NONE new
3169
+ 'meta::charset': 0, //NONE new
3170
+ 'meta::content': 0, //NONE new
3171
+ 'meta::http-equiv': 0, //NONE new
3172
+ 'meta::name': 7, //GLOBAL_NAME new
3173
+ 'meter::form': 0, //NONE new
3174
+ 'meter::high': 0, //NONE new
3175
+ 'meter::low': 0, //NONE new
3176
+ 'meter::max': 0, //NONE new
3177
+ 'meter::min': 0, //NONE new
3178
+ 'meter::optimum': 0, //NONE new
3179
+ 'meter::value': 0, //NONE new
3180
+ 'object::data': 1, //URI new
3181
+ 'object::form': 0, //NONE new
3182
+ 'object::height': 0, //NONE new
3183
+ 'object::name': 8, //LOCAL_NAME new
3184
+ 'object::type': 0, //NONE new
3185
+ 'object::usemap': 11, //URI_FRAGMENT new
3186
+ 'object::width': 0, //NONE new
3187
+ //--------------------- 'ol::compact': 0,
3188
+ 'ol::reversed': 0, //NONE new
3189
+ 'ol::start': 0, //NONE
3190
+ //--------------------- 'ol::type': 0,
3191
+ 'optgroup::disabled': 0, //NONE
3192
+ 'optgroup::label': 0, //NONE
3193
+ 'option::disabled': 0, //NONE
3194
+ 'option::label': 0, //NONE
3195
+ 'option::selected': 0, //NONE
3196
+ 'option::value': 0, //NONE
3197
+ 'output::for': 5, //IDREF new
3198
+ 'output::form': 0, //NONE new
3199
+ 'output::name': 8, //LOCAL_NAME new
3200
+ //--------------------- 'p::align': 0,
3201
+ 'param::name': 8, //LOCAL_NAME new
3202
+ 'param::value': 0, //NONE new
3203
+ 'progress::form': 0, //NONE new
3204
+ 'progress::max': 0, //NONE new
3205
+ 'progress::value': 0, //NONE new
3206
+ //--------------------- 'pre::width': 0,
3207
+ 'q::cite': 1, //URI
3208
+ 'script::async': 0, //NONE new
3209
+ 'script::charset': 0, //NONE new
3210
+ 'script::defer': 0, //NONE new
3211
+ 'script::src': 1, //URI new
3212
+ 'script::type': 0, //NONE new
3213
+ 'select::autofocus': 0, //NONE new
3214
+ 'select::disabled': 0, //NONE
3215
+ 'select::form': 0, //NONE new
3216
+ 'select::multiple': 0, //NONE
3217
+ 'select::name': 8, //LOCAL_NAME
3218
+ //--------------------- 'select::onblur': 2,
3219
+ //--------------------- 'select::onchange': 2,
3220
+ //--------------------- 'select::onfocus': 2,
3221
+ 'select::required': 0, //NONE new
3222
+ 'select::size': 0, //NONE
3223
+ //--------------------- 'select::tabindex': 0, moved to global
3224
+ 'source::media': 0, //NONE new
3225
+ 'source::src': 1, //URI new
3226
+ 'source::type': 0, //NONE new
3227
+ 'style::media': 0, //NONE new
3228
+ 'style::scoped': 0, //NONE new
3229
+ 'style::type': 0, //NONE new
3230
+ //--------------------- 'table::align': 0,
3231
+ //--------------------- 'table::bgcolor': 0,
3232
+ 'table::border': 0, //NONE
3233
+ //--------------------- 'table::cellpadding': 0,
3234
+ //--------------------- 'table::cellspacing': 0,
3235
+ //--------------------- 'table::frame': 0,
3236
+ //--------------------- 'table::rules': 0,
3237
+ //--------------------- 'table::summary': 0,
3238
+ //--------------------- 'table::width': 0,
3239
+ //--------------------- 'tbody::align': 0,
3240
+ //--------------------- 'tbody::char': 0,
3241
+ //--------------------- 'tbody::charoff': 0,
3242
+ //--------------------- 'tbody::valign': 0,
3243
+ //--------------------- 'td::abbr': 0,
3244
+ //--------------------- 'td::align': 0,
3245
+ //--------------------- 'td::axis': 0,
3246
+ //--------------------- 'td::bgcolor': 0,
3247
+ //--------------------- 'td::char': 0,
3248
+ //--------------------- 'td::charoff': 0,
3249
+ 'td::colspan': 0, //NONE
3250
+ 'td::headers': 6, //IDREFS
3251
+ //--------------------- 'td::height': 0,
3252
+ //--------------------- 'td::nowrap': 0,
3253
+ 'td::rowspan': 0, //NONE
3254
+ //--------------------- 'td::scope': 0,
3255
+ //--------------------- 'td::valign': 0,
3256
+ //--------------------- 'td::width': 0,
3257
+ //--------------------- 'textarea::accesskey': 0, moved to global
3258
+ 'textarea::autofocus': 0, //NONE new
3259
+ 'textarea::cols': 0, //NONE
3260
+ 'textarea::disabled': 0, //NONE
3261
+ 'textarea::form': 0, //NONE new
3262
+ 'textarea::maxlength': 0, //NONE new
3263
+ 'textarea::name': 8, //LOCAL_NAME
3264
+ //--------------------- 'textarea::onblur': 2,
3265
+ //--------------------- 'textarea::onchange': 2,
3266
+ //--------------------- 'textarea::onfocus': 2,
3267
+ //--------------------- 'textarea::onselect': 2,
3268
+ 'textarea::placeholder': 0, //NONE new
3269
+ 'textarea::readonly': 0, //NONE
3270
+ 'textarea::required': 0, //NONE new
3271
+ 'textarea::rows': 0, //NONE
3272
+ 'textarea::wrap': 0, //NONE new
3273
+ //--------------------- 'textarea::tabindex': 0, moved to global
3274
+ //--------------------- 'tfoot::align': 0,
3275
+ //--------------------- 'tfoot::char': 0,
3276
+ //--------------------- 'tfoot::charoff': 0,
3277
+ //--------------------- 'tfoot::valign': 0,
3278
+ //--------------------- 'th::abbr': 0,
3279
+ //--------------------- 'th::align': 0,
3280
+ //--------------------- 'th::axis': 0,
3281
+ //--------------------- 'th::bgcolor': 0,
3282
+ //--------------------- 'th::char': 0,
3283
+ //--------------------- 'th::charoff': 0,
3284
+ 'th::colspan': 0, //NONE
3285
+ 'th::headers': 6, //IDREFS
3286
+ //--------------------- 'th::height': 0,
3287
+ //--------------------- 'th::nowrap': 0,
3288
+ 'th::rowspan': 0, //NONE
3289
+ 'th::scope': 0, //NONE
3290
+ //--------------------- 'th::valign': 0,
3291
+ //--------------------- 'th::width': 0,
3292
+ //--------------------- 'thead::align': 0,
3293
+ //--------------------- 'thead::char': 0,
3294
+ //--------------------- 'thead::charoff': 0,
3295
+ //--------------------- 'thead::valign': 0,
3296
+ 'time::datetime': 0, //NONE new
3297
+ 'time::pubdate': 0, //NONE new
3298
+ //--------------------- 'tr::align': 0,
3299
+ //--------------------- 'tr::bgcolor': 0,
3300
+ //--------------------- 'tr::char': 0,
3301
+ //--------------------- 'tr::charoff': 0,
3302
+ //--------------------- 'tr::valign': 0,
3303
+ 'track::default': 0, //NONE new
3304
+ 'track::kind': 0, //NONE new
3305
+ 'track::label': 0, //NONE new
3306
+ 'track::src': 1, //URI new
3307
+ 'track::srclang': 0, //NONE new
3308
+ //--------------------- 'ul::compact': 0,
3309
+ //--------------------- 'ul::type': 0
3310
+ 'video::autoplay': 0, //NONE new
3311
+ 'video::controls': 0, //NONE new
3312
+ 'video::height': 0, //NONE new
3313
+ 'video::loop': 0, //NONE new
3314
+ 'video::mediagroup': 0, //NONE new
3315
+ 'video::poster': 1, //URI new
3316
+ 'video::preload': 0, //NONE new
3317
+ 'video::src': 1, //URI new
3318
+ 'video::width': 0 //NONE new
3319
+ };
3320
+ html4.eflags = {
3321
+ OPTIONAL_ENDTAG: 1,
3322
+ EMPTY: 2,
3323
+ CDATA: 4,
3324
+ RCDATA: 8,
3325
+ UNSAFE: 16,
3326
+ FOLDABLE: 32,
3327
+ SCRIPT: 64,
3328
+ STYLE: 128
3329
+ };
3330
+ html4.ELEMENTS = {
3331
+ 'a': 0,
3332
+ 'abbr': 0,
3333
+ //--------------------- 'acronym': 0,
3334
+ 'address': 0,
3335
+ //--------------------- 'applet': 16,
3336
+ 'area': 2, //EMPTY
3337
+ 'article': 0, //new
3338
+ 'aside': 0, //new
3339
+ 'audio': 0, //new
3340
+ 'b': 0,
3341
+ 'base': 18, //EMPTY, UNSAFE
3342
+ //--------------------- 'basefont': 18,
3343
+ 'bdi': 0, //new
3344
+ 'bdo': 0,
3345
+ //--------------------- 'big': 0,
3346
+ 'blockquote': 0,
3347
+ 'body': 49, //OPTIONAL_ENDTAG, UNSAFE, FOLDABLE
3348
+ 'br': 2, //EMPTY
3349
+ 'button': 0,
3350
+ 'canvas': 0,
3351
+ 'caption': 0,
3352
+ //--------------------- 'center': 0,
3353
+ 'cite': 0,
3354
+ 'code': 0,
3355
+ 'col': 2, //EMPTY
3356
+ 'colgroup': 1, //OPTIONAL_ENDTAG
3357
+ 'command': 2, //EMPTY new
3358
+ 'datalist': 0, //new
3359
+ 'dd': 1, //OPTIONAL_ENDTAG
3360
+ 'del': 0,
3361
+ 'details': 0, //new
3362
+ 'dfn': 0,
3363
+ //--------------------- 'dir': 0,
3364
+ 'div': 0,
3365
+ 'dl': 0,
3366
+ 'dt': 1, //OPTIONAL_ENDTAG
3367
+ 'em': 0,
3368
+ 'embed': 18, //EMPTY, UNSAFE new
3369
+ 'fieldset': 0,
3370
+ 'figcaption': 0, //new
3371
+ 'figure': 0, //new
3372
+ //--------------------- 'font': 0,
3373
+ 'footer': 0, //new
3374
+ 'form': 0,
3375
+ //--------------------- 'frame': 18,
3376
+ //--------------------- 'frameset': 16,
3377
+ 'h1': 0,
3378
+ 'h2': 0,
3379
+ 'h3': 0,
3380
+ 'h4': 0,
3381
+ 'h5': 0,
3382
+ 'h6': 0,
3383
+ 'head': 49, //OPTIONAL_ENDTAG, UNSAFE, FOLDABLE
3384
+ 'header': 0, //new
3385
+ 'hgroup': 0, //new
3386
+ 'hr': 2, //EMPTY
3387
+ 'html': 49, //OPTIONAL_ENDTAG, UNSAFE, FOLDABLE
3388
+ 'i': 0,
3389
+ 'iframe': 0, //new
3390
+ 'img': 2,//EMPTY
3391
+ 'input': 2, //EMPTY
3392
+ 'ins': 0,
3393
+ //--------------------- 'isindex': 18,
3394
+ 'kbd': 0,
3395
+ 'keygen': 2, //EMPTY new
3396
+ 'label': 0,
3397
+ 'legend': 0,
3398
+ 'li': 1, //OPTIONAL_ENDTAG
3399
+ 'link': 18, //EMPTY, UNSAFE
3400
+ 'map': 0,
3401
+ 'mark': 0, //new
3402
+ 'menu': 0,
3403
+ 'meta': 18, //EMPTY, UNSAFE
3404
+ 'meter': 0, //new
3405
+ 'nav': 0,
3406
+ //--------------------- 'nobr': 0,
3407
+ //--------------------- 'noembed': 4,
3408
+ //--------------------- 'noframes': 20,
3409
+ 'noscript': 20, //CDATA, UNSAFE
3410
+ 'object': 16, //UNSAFE
3411
+ 'ol': 0,
3412
+ 'optgroup': 1, //OPTIONAL_ENDTAG new !!!!vorher 0
3413
+ 'option': 1, //OPTIONAL_ENDTAG
3414
+ 'output': 0, //new
3415
+ 'p': 1, //OPTIONAL_ENDTAG
3416
+ 'param': 18, //EMPTY, UNSAFE
3417
+ 'pre': 0,
3418
+ 'progress': 0, //new
3419
+ 'q': 0,
3420
+ 'rp': 1, //OPTIONAL_ENDTAG new
3421
+ 'rt': 1, //OPTIONAL_ENDTAG new
3422
+ 'ruby': 0, //new
3423
+ 's': 0,
3424
+ 'samp': 0,
3425
+ 'script': 84, //CDATA, UNSAFE, SCRIPT
3426
+ 'section': 0, //new
3427
+ 'select': 0,
3428
+ 'small': 0,
3429
+ 'source': 2, //EMPTY new
3430
+ 'span': 0,
3431
+ //--------------------- 'strike': 0,
3432
+ 'strong': 0,
3433
+ 'style': 148, //CDATA, UNSAFE, STYLE
3434
+ 'sub': 0,
3435
+ 'summary': 0, //new
3436
+ 'sup': 0,
3437
+ 'table': 0,
3438
+ 'tbody': 1, //OPTIONAL_ENDTAG
3439
+ 'td': 1, //OPTIONAL_ENDTAG
3440
+ 'textarea': 8, //RCDATA
3441
+ 'tfoot': 1, //OPTIONAL_ENDTAG
3442
+ 'th': 1, //OPTIONAL_ENDTAG
3443
+ 'thead': 1, //OPTIONAL_ENDTAG
3444
+ 'time': 0, //new
3445
+ 'title': 24, //RCDATA, UNSAFE
3446
+ 'tr': 1, //OPTIONAL_ENDTAG
3447
+ 'track': 2, //EMPTY new
3448
+ //--------------------- 'tt': 0,
3449
+ 'u': 0,
3450
+ 'ul': 0,
3451
+ 'var': 0,
3452
+ 'video': 0, //new
3453
+ 'wbr': 2 //EMPTY new
3454
+ };
3455
+ html4.ueffects = {
3456
+ NOT_LOADED: 0,
3457
+ SAME_DOCUMENT: 1,
3458
+ NEW_DOCUMENT: 2
3459
+ };
3460
+ html4.URIEFFECTS = {
3461
+ 'a::href': 2, //NEW_DOCUMENT
3462
+ 'area::href': 2, //NEW_DOCUMENT
3463
+ 'audio::src': 1, //SAME_DOCUMENT new
3464
+ 'base::href':2, //NEW_DOCUMENT new
3465
+ 'blockquote::cite': 0, //NOT_LOADED
3466
+ //--------------------- 'body::background': 1,
3467
+ 'button::formaction': 2, //NEW_DOCUMENT new
3468
+ 'command::icon': 1, //SAME_DOCUMENT new
3469
+ 'del::cite': 0, //NOT_LOADED
3470
+ 'embed::src': 1, //SAME_DOCUMENT new
3471
+ 'form::action': 2, //NEW_DOCUMENT
3472
+ 'html:: manifest': 1, //SAME_DOCUMENT new
3473
+ 'iframe::src': 1, //SAME_DOCUMENT new
3474
+ 'img::src': 1, //SAME_DOCUMENT
3475
+ 'input::formaction': 2, //NEW_DOCUMENT new
3476
+ 'input::src': 1, //SAME_DOCUMENT
3477
+ 'ins::cite': 0, //NOT_LOADED
3478
+ 'link::href': 2, //NEW_DOCUMENT new
3479
+ 'object::data': 1, //SAME_DOCUMENT new
3480
+ 'q::cite': 0, //NOT_LOADED
3481
+ 'script::src': 1, //SAME_DOCUMENT new
3482
+ 'source::src': 1, //SAME_DOCUMENT new
3483
+ 'track::src': 1, //SAME_DOCUMENT new
3484
+ 'video::poster': 1, //SAME_DOCUMENT new
3485
+ 'video::src': 1 //SAME_DOCUMENT new
3486
+ };
3487
+ html4.ltypes = {
3488
+ UNSANDBOXED: 2,
3489
+ SANDBOXED: 1,
3490
+ DATA: 0
3491
+ };
3492
+ html4.LOADERTYPES = {
3493
+ 'a::href': 2, //UNSANDBOXED
3494
+ 'area::href': 2, //UNSANDBOXED
3495
+ 'audio::src': 1, //SANDBOXED new
3496
+ 'base::href': 2, //UNSANDBOXED new
3497
+ 'blockquote::cite': 2, //UNSANDBOXED
3498
+ //--------------------- 'body::background': 1,
3499
+ 'button::formaction': 2, //UNSANDBOXED new
3500
+ 'command::icon': 1, //SANDBOXED new
3501
+ 'del::cite': 2, //UNSANDBOXED
3502
+ 'embed::src': 1, //SANDBOXED new
3503
+ 'form::action': 2, //UNSANDBOXED
3504
+ 'html:: manifest': 1, //SANDBOXED new
3505
+ 'iframe::src': 1, //SANDBOXED new
3506
+ 'img::src': 1, //SANDBOXED
3507
+ 'input::formaction': 2, //UNSANDBOXED new
3508
+ 'input::src': 1, //SANDBOXED
3509
+ 'ins::cite': 2, //UNSANDBOXED
3510
+ 'link::href': 2, //UNSANDBOXED new
3511
+ 'object::data': 0, //DATA new
3512
+ 'q::cite': 2, //UNSANDBOXED
3513
+ 'script::src': 1, //SANDBOXED new
3514
+ 'source::src': 1, //SANDBOXED new
3515
+ 'track::src': 1, //SANDBOXED new
3516
+ 'video::poster': 1, //SANDBOXED new
3517
+ 'video::src': 1 //SANDBOXED new
3518
+ };if (typeof window !== 'undefined') {
3519
+ window['html4'] = html4;
3520
+ }// Copyright (C) 2006 Google Inc.
3521
+ //
3522
+ // Licensed under the Apache License, Version 2.0 (the "License");
3523
+ // you may not use this file except in compliance with the License.
3524
+ // You may obtain a copy of the License at
3525
+ //
3526
+ // http://www.apache.org/licenses/LICENSE-2.0
3527
+ //
3528
+ // Unless required by applicable law or agreed to in writing, software
3529
+ // distributed under the License is distributed on an "AS IS" BASIS,
3530
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3531
+ // See the License for the specific language governing permissions and
3532
+ // limitations under the License.
3533
+
3534
+ /**
3535
+ * @fileoverview
3536
+ * An HTML sanitizer that can satisfy a variety of security policies.
3537
+ *
3538
+ * <p>
3539
+ * The HTML sanitizer is built around a SAX parser and HTML element and
3540
+ * attributes schemas.
3541
+ *
3542
+ * If the cssparser is loaded, inline styles are sanitized using the
3543
+ * css property and value schemas. Else they are remove during
3544
+ * sanitization.
3545
+ *
3546
+ * If it exists, uses parseCssDeclarations, sanitizeCssProperty, cssSchema
3547
+ *
3548
+ * @author mikesamuel@gmail.com
3549
+ * @author jasvir@gmail.com
3550
+ * \@requires html4
3551
+ * \@overrides window
3552
+ * \@provides html, html_sanitize
3553
+ */
3554
+
3555
+ /**
3556
+ * \@namespace
3557
+ */
3558
+ var html = (function(html4) {
3559
+
3560
+ // For closure compiler
3561
+ var parseCssDeclarations, sanitizeCssProperty, cssSchema;
3562
+ if ('undefined' !== typeof window) {
3563
+ parseCssDeclarations = window['parseCssDeclarations'];
3564
+ sanitizeCssProperty = window['sanitizeCssProperty'];
3565
+ cssSchema = window['cssSchema'];
3566
+ }
3567
+
3568
+ var lcase;
3569
+ // The below may not be true on browsers in the Turkish locale.
3570
+ if ('script' === 'SCRIPT'.toLowerCase()) {
3571
+ lcase = function(s) { return s.toLowerCase(); };
3572
+ } else {
3573
+ /**
3574
+ * {\@updoc
3575
+ * $ lcase('SCRIPT')
3576
+ * # 'script'
3577
+ * $ lcase('script')
3578
+ * # 'script'
3579
+ * }
3580
+ */
3581
+ lcase = function(s) {
3582
+ return s.replace(
3583
+ /[A-Z]/g,
3584
+ function(ch) {
3585
+ return String.fromCharCode(ch.charCodeAt(0) | 32);
3586
+ });
3587
+ };
3588
+ }
3589
+
3590
+ // The keys of this object must be 'quoted' or JSCompiler will mangle them!
3591
+ var ENTITIES = {
3592
+ 'lt': '<',
3593
+ 'gt': '>',
3594
+ 'amp': '&',
3595
+ 'nbsp': '\xA0',
3596
+ 'quot': '"',
3597
+ 'apos': '\''
3598
+ };
3599
+
3600
+ var decimalEscapeRe = /^#(\d+)$/;
3601
+ var hexEscapeRe = /^#x([0-9A-Fa-f]+)$/;
3602
+ /**
3603
+ * Decodes an HTML entity.
3604
+ *
3605
+ * {\@updoc
3606
+ * $ lookupEntity('lt')
3607
+ * # '<'
3608
+ * $ lookupEntity('GT')
3609
+ * # '>'
3610
+ * $ lookupEntity('amp')
3611
+ * # '&'
3612
+ * $ lookupEntity('nbsp')
3613
+ * # '\xA0'
3614
+ * $ lookupEntity('apos')
3615
+ * # "'"
3616
+ * $ lookupEntity('quot')
3617
+ * # '"'
3618
+ * $ lookupEntity('#xa')
3619
+ * # '\n'
3620
+ * $ lookupEntity('#10')
3621
+ * # '\n'
3622
+ * $ lookupEntity('#x0a')
3623
+ * # '\n'
3624
+ * $ lookupEntity('#010')
3625
+ * # '\n'
3626
+ * $ lookupEntity('#x00A')
3627
+ * # '\n'
3628
+ * $ lookupEntity('Pi') // Known failure
3629
+ * # '\u03A0'
3630
+ * $ lookupEntity('pi') // Known failure
3631
+ * # '\u03C0'
3632
+ * }
3633
+ *
3634
+ * @param {string} name the content between the '&' and the ';'.
3635
+ * @return {string} a single unicode code-point as a string.
3636
+ */
3637
+ function lookupEntity(name) {
3638
+ name = lcase(name); // TODO: &pi; is different from &Pi;
3639
+ if (ENTITIES.hasOwnProperty(name)) { return ENTITIES[name]; }
3640
+ var m = name.match(decimalEscapeRe);
3641
+ if (m) {
3642
+ return String.fromCharCode(parseInt(m[1], 10));
3643
+ } else if (!!(m = name.match(hexEscapeRe))) {
3644
+ return String.fromCharCode(parseInt(m[1], 16));
3645
+ }
3646
+ return '';
3647
+ }
3648
+
3649
+ function decodeOneEntity(_, name) {
3650
+ return lookupEntity(name);
3651
+ }
3652
+
3653
+ var nulRe = /\0/g;
3654
+ function stripNULs(s) {
3655
+ return s.replace(nulRe, '');
3656
+ }
3657
+
3658
+ var entityRe = /&(#\d+|#x[0-9A-Fa-f]+|\w+);/g;
3659
+ /**
3660
+ * The plain text of a chunk of HTML CDATA which possibly containing.
3661
+ *
3662
+ * {\@updoc
3663
+ * $ unescapeEntities('')
3664
+ * # ''
3665
+ * $ unescapeEntities('hello World!')
3666
+ * # 'hello World!'
3667
+ * $ unescapeEntities('1 &lt; 2 &amp;&AMP; 4 &gt; 3&#10;')
3668
+ * # '1 < 2 && 4 > 3\n'
3669
+ * $ unescapeEntities('&lt;&lt <- unfinished entity&gt;')
3670
+ * # '<&lt <- unfinished entity>'
3671
+ * $ unescapeEntities('/foo?bar=baz&copy=true') // & often unescaped in URLS
3672
+ * # '/foo?bar=baz&copy=true'
3673
+ * $ unescapeEntities('pi=&pi;&#x3c0;, Pi=&Pi;\u03A0') // FIXME: known failure
3674
+ * # 'pi=\u03C0\u03c0, Pi=\u03A0\u03A0'
3675
+ * }
3676
+ *
3677
+ * @param {string} s a chunk of HTML CDATA. It must not start or end inside
3678
+ * an HTML entity.
3679
+ */
3680
+ function unescapeEntities(s) {
3681
+ return s.replace(entityRe, decodeOneEntity);
3682
+ }
3683
+
3684
+ var ampRe = /&/g;
3685
+ var looseAmpRe = /&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi;
3686
+ var ltRe = /[<]/g;
3687
+ var gtRe = />/g;
3688
+ var quotRe = /\"/g;
3689
+
3690
+ /**
3691
+ * Escapes HTML special characters in attribute values.
3692
+ *
3693
+ * {\@updoc
3694
+ * $ escapeAttrib('')
3695
+ * # ''
3696
+ * $ escapeAttrib('"<<&==&>>"') // Do not just escape the first occurrence.
3697
+ * # '&#34;&lt;&lt;&amp;&#61;&#61;&amp;&gt;&gt;&#34;'
3698
+ * $ escapeAttrib('Hello <World>!')
3699
+ * # 'Hello &lt;World&gt;!'
3700
+ * }
3701
+ */
3702
+ function escapeAttrib(s) {
3703
+ return ('' + s).replace(ampRe, '&amp;').replace(ltRe, '&lt;')
3704
+ .replace(gtRe, '&gt;').replace(quotRe, '&#34;');
3705
+ }
3706
+
3707
+ /**
3708
+ * Escape entities in RCDATA that can be escaped without changing the meaning.
3709
+ * {\@updoc
3710
+ * $ normalizeRCData('1 < 2 &&amp; 3 > 4 &amp;& 5 &lt; 7&8')
3711
+ * # '1 &lt; 2 &amp;&amp; 3 &gt; 4 &amp;&amp; 5 &lt; 7&amp;8'
3712
+ * }
3713
+ */
3714
+ function normalizeRCData(rcdata) {
3715
+ return rcdata
3716
+ .replace(looseAmpRe, '&amp;$1')
3717
+ .replace(ltRe, '&lt;')
3718
+ .replace(gtRe, '&gt;');
3719
+ }
3720
+
3721
+ // TODO(mikesamuel): validate sanitizer regexs against the HTML5 grammar at
3722
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html
3723
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html
3724
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html
3725
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html
3726
+
3727
+ // We initially split input so that potentially meaningful characters
3728
+ // like '<' and '>' are separate tokens, using a fast dumb process that
3729
+ // ignores quoting. Then we walk that token stream, and when we see a
3730
+ // '<' that's the start of a tag, we use ATTR_RE to extract tag
3731
+ // attributes from the next token. That token will never have a '>'
3732
+ // character. However, it might have an unbalanced quote character, and
3733
+ // when we see that, we combine additional tokens to balance the quote.
3734
+
3735
+ var ATTR_RE = new RegExp(
3736
+ '^\\s*' +
3737
+ '([a-z][a-z-]*)' + // 1 = Attribute name
3738
+ '(?:' + (
3739
+ '\\s*(=)\\s*' + // 2 = Is there a value?
3740
+ '(' + ( // 3 = Attribute value
3741
+ // TODO(felix8a): maybe use backref to match quotes
3742
+ '(\")[^\"]*(\"|$)' + // 4, 5 = Double-quoted string
3743
+ '|' +
3744
+ '(\')[^\']*(\'|$)' + // 6, 7 = Single-quoted string
3745
+ '|' +
3746
+ // Positive lookahead to prevent interpretation of
3747
+ // <foo a= b=c> as <foo a='b=c'>
3748
+ // TODO(felix8a): might be able to drop this case
3749
+ '(?=[a-z][a-z-]*\\s*=)' +
3750
+ '|' +
3751
+ // Unquoted value that isn't an attribute name
3752
+ // (since we didn't match the positive lookahead above)
3753
+ '[^\"\'\\s]*' ) +
3754
+ ')' ) +
3755
+ ')?',
3756
+ 'i');
3757
+
3758
+ var ENTITY_RE = /^(#[0-9]+|#x[0-9a-f]+|\w+);/i;
3759
+
3760
+ // false on IE<=8, true on most other browsers
3761
+ var splitWillCapture = ('a,b'.split(/(,)/).length === 3);
3762
+
3763
+ // bitmask for tags with special parsing, like <script> and <textarea>
3764
+ var EFLAGS_TEXT = html4.eflags.CDATA | html4.eflags.RCDATA;
3765
+
3766
+ /**
3767
+ * Given a SAX-like event handler, produce a function that feeds those
3768
+ * events and a parameter to the event handler.
3769
+ *
3770
+ * The event handler has the form:{@code
3771
+ * {
3772
+ * // Name is an upper-case HTML tag name. Attribs is an array of
3773
+ * // alternating upper-case attribute names, and attribute values. The
3774
+ * // attribs array is reused by the parser. Param is the value passed to
3775
+ * // the saxParser.
3776
+ * startTag: function (name, attribs, param) { ... },
3777
+ * endTag: function (name, param) { ... },
3778
+ * pcdata: function (text, param) { ... },
3779
+ * rcdata: function (text, param) { ... },
3780
+ * cdata: function (text, param) { ... },
3781
+ * startDoc: function (param) { ... },
3782
+ * endDoc: function (param) { ... }
3783
+ * }}
3784
+ *
3785
+ * @param {Object} handler a record containing event handlers.
3786
+ * @return {function(string, Object)} A function that takes a chunk of HTML
3787
+ * and a parameter. The parameter is passed on to the handler methods.
3788
+ */
3789
+ function makeSaxParser(handler) {
3790
+ return function(htmlText, param) {
3791
+ return parse(htmlText, handler, param);
3792
+ };
3793
+ }
3794
+
3795
+ // Parsing strategy is to split input into parts that might be lexically
3796
+ // meaningful (every ">" becomes a separate part), and then recombine
3797
+ // parts if we discover they're in a different context.
3798
+
3799
+ // Note, html-sanitizer filters unknown tags here, even though they also
3800
+ // get filtered out by the sanitizer's handler. This is back-compat
3801
+ // behavior; makeSaxParser is public.
3802
+
3803
+ // TODO(felix8a): Significant performance regressions from -legacy,
3804
+ // tested on
3805
+ // Chrome 18.0
3806
+ // Firefox 11.0
3807
+ // IE 6, 7, 8, 9
3808
+ // Opera 11.61
3809
+ // Safari 5.1.3
3810
+ // Many of these are unusual patterns that are linearly slower and still
3811
+ // pretty fast (eg 1ms to 5ms), so not necessarily worth fixing.
3812
+
3813
+ // TODO(felix8a): "<script> && && && ... <\/script>" is slower on all
3814
+ // browsers. The hotspot is htmlSplit.
3815
+
3816
+ // TODO(felix8a): "<p title='>>>>...'><\/p>" is slower on all browsers.
3817
+ // This is partly htmlSplit, but the hotspot is parseTagAndAttrs.
3818
+
3819
+ // TODO(felix8a): "<a><\/a><a><\/a>..." is slower on IE9.
3820
+ // "<a>1<\/a><a>1<\/a>..." is faster, "<a><\/a>2<a><\/a>2..." is faster.
3821
+
3822
+ // TODO(felix8a): "<p<p<p..." is slower on IE[6-8]
3823
+
3824
+ var continuationMarker = {};
3825
+ function parse(htmlText, handler, param) {
3826
+ var parts = htmlSplit(htmlText);
3827
+ var state = {
3828
+ noMoreGT: false,
3829
+ noMoreEndComments: false
3830
+ };
3831
+ parseCPS(handler, parts, 0, state, param);
3832
+ }
3833
+
3834
+ function continuationMaker(h, parts, initial, state, param) {
3835
+ return function () {
3836
+ parseCPS(h, parts, initial, state, param);
3837
+ };
3838
+ }
3839
+
3840
+ function parseCPS(h, parts, initial, state, param) {
3841
+ try {
3842
+ if (h.startDoc && initial == 0) { h.startDoc(param); }
3843
+ var m, p, tagName;
3844
+ for (var pos = initial, end = parts.length; pos < end;) {
3845
+ var current = parts[pos++];
3846
+ var next = parts[pos];
3847
+ switch (current) {
3848
+ case '&':
3849
+ if (ENTITY_RE.test(next)) {
3850
+ if (h.pcdata) {
3851
+ h.pcdata('&' + next, param, continuationMarker,
3852
+ continuationMaker(h, parts, pos, state, param));
3853
+ }
3854
+ pos++;
3855
+ } else {
3856
+ if (h.pcdata) { h.pcdata("&amp;", param, continuationMarker,
3857
+ continuationMaker(h, parts, pos, state, param));
3858
+ }
3859
+ }
3860
+ break;
3861
+ case '<\/':
3862
+ if (m = /^(\w+)[^\'\"]*/.exec(next)) {
3863
+ if (m[0].length === next.length && parts[pos + 1] === '>') {
3864
+ // fast case, no attribute parsing needed
3865
+ pos += 2;
3866
+ tagName = lcase(m[1]);
3867
+ if (html4.ELEMENTS.hasOwnProperty(tagName)) {
3868
+ if (h.endTag) {
3869
+ h.endTag(tagName, param, continuationMarker,
3870
+ continuationMaker(h, parts, pos, state, param));
3871
+ }
3872
+ }
3873
+ } else {
3874
+ // slow case, need to parse attributes
3875
+ // TODO(felix8a): do we really care about misparsing this?
3876
+ pos = parseEndTag(
3877
+ parts, pos, h, param, continuationMarker, state);
3878
+ }
3879
+ } else {
3880
+ if (h.pcdata) {
3881
+ h.pcdata('&lt;/', param, continuationMarker,
3882
+ continuationMaker(h, parts, pos, state, param));
3883
+ }
3884
+ }
3885
+ break;
3886
+ case '<':
3887
+ if (m = /^(\w+)\s*\/?/.exec(next)) {
3888
+ if (m[0].length === next.length && parts[pos + 1] === '>') {
3889
+ // fast case, no attribute parsing needed
3890
+ pos += 2;
3891
+ tagName = lcase(m[1]);
3892
+ if (html4.ELEMENTS.hasOwnProperty(tagName)) {
3893
+ if (h.startTag) {
3894
+ h.startTag(tagName, [], param, continuationMarker,
3895
+ continuationMaker(h, parts, pos, state, param));
3896
+ }
3897
+ // tags like <script> and <textarea> have special parsing
3898
+ var eflags = html4.ELEMENTS[tagName];
3899
+ if (eflags & EFLAGS_TEXT) {
3900
+ var tag = { name: tagName, next: pos, eflags: eflags };
3901
+ pos = parseText(
3902
+ parts, tag, h, param, continuationMarker, state);
3903
+ }
3904
+ }
3905
+ } else {
3906
+ // slow case, need to parse attributes
3907
+ pos = parseStartTag(
3908
+ parts, pos, h, param, continuationMarker, state);
3909
+ }
3910
+ } else {
3911
+ if (h.pcdata) {
3912
+ h.pcdata('&lt;', param, continuationMarker,
3913
+ continuationMaker(h, parts, pos, state, param));
3914
+ }
3915
+ }
3916
+ break;
3917
+ case '<\!--':
3918
+ // The pathological case is n copies of '<\!--' without '-->', and
3919
+ // repeated failure to find '-->' is quadratic. We avoid that by
3920
+ // remembering when search for '-->' fails.
3921
+ if (!state.noMoreEndComments) {
3922
+ // A comment <\!--x--> is split into three tokens:
3923
+ // '<\!--', 'x--', '>'
3924
+ // We want to find the next '>' token that has a preceding '--'.
3925
+ // pos is at the 'x--'.
3926
+ for (p = pos + 1; p < end; p++) {
3927
+ if (parts[p] === '>' && /--$/.test(parts[p - 1])) { break; }
3928
+ }
3929
+ if (p < end) {
3930
+ pos = p + 1;
3931
+ } else {
3932
+ state.noMoreEndComments = true;
3933
+ }
3934
+ }
3935
+ if (state.noMoreEndComments) {
3936
+ if (h.pcdata) {
3937
+ h.pcdata('&lt;!--', param, continuationMarker,
3938
+ continuationMaker(h, parts, pos, state, param));
3939
+ }
3940
+ }
3941
+ break;
3942
+ case '<\!':
3943
+ if (!/^\w/.test(next)) {
3944
+ if (h.pcdata) {
3945
+ h.pcdata('&lt;!', param, continuationMarker,
3946
+ continuationMaker(h, parts, pos, state, param));
3947
+ }
3948
+ } else {
3949
+ // similar to noMoreEndComment logic
3950
+ if (!state.noMoreGT) {
3951
+ for (p = pos + 1; p < end; p++) {
3952
+ if (parts[p] === '>') { break; }
3953
+ }
3954
+ if (p < end) {
3955
+ pos = p + 1;
3956
+ } else {
3957
+ state.noMoreGT = true;
3958
+ }
3959
+ }
3960
+ if (state.noMoreGT) {
3961
+ if (h.pcdata) {
3962
+ h.pcdata('&lt;!', param, continuationMarker,
3963
+ continuationMaker(h, parts, pos, state, param));
3964
+ }
3965
+ }
3966
+ }
3967
+ break;
3968
+ case '<?':
3969
+ // similar to noMoreEndComment logic
3970
+ if (!state.noMoreGT) {
3971
+ for (p = pos + 1; p < end; p++) {
3972
+ if (parts[p] === '>') { break; }
3973
+ }
3974
+ if (p < end) {
3975
+ pos = p + 1;
3976
+ } else {
3977
+ state.noMoreGT = true;
3978
+ }
3979
+ }
3980
+ if (state.noMoreGT) {
3981
+ if (h.pcdata) {
3982
+ h.pcdata('&lt;?', param, continuationMarker,
3983
+ continuationMaker(h, parts, pos, state, param));
3984
+ }
3985
+ }
3986
+ break;
3987
+ case '>':
3988
+ if (h.pcdata) {
3989
+ h.pcdata("&gt;", param, continuationMarker,
3990
+ continuationMaker(h, parts, pos, state, param));
3991
+ }
3992
+ break;
3993
+ case '':
3994
+ break;
3995
+ default:
3996
+ if (h.pcdata) {
3997
+ h.pcdata(current, param, continuationMarker,
3998
+ continuationMaker(h, parts, pos, state, param));
3999
+ }
4000
+ break;
4001
+ }
4002
+ }
4003
+ if (h.endDoc) { h.endDoc(param); }
4004
+ } catch (e) {
4005
+ if (e !== continuationMarker) { throw e; }
4006
+ }
4007
+ }
4008
+
4009
+ // Split str into parts for the html parser.
4010
+ function htmlSplit(str) {
4011
+ // can't hoist this out of the function because of the re.exec loop.
4012
+ var re = /(<\/|<\!--|<[!?]|[&<>])/g;
4013
+ str += '';
4014
+ if (splitWillCapture) {
4015
+ return str.split(re);
4016
+ } else {
4017
+ var parts = [];
4018
+ var lastPos = 0;
4019
+ var m;
4020
+ while ((m = re.exec(str)) !== null) {
4021
+ parts.push(str.substring(lastPos, m.index));
4022
+ parts.push(m[0]);
4023
+ lastPos = m.index + m[0].length;
4024
+ }
4025
+ parts.push(str.substring(lastPos));
4026
+ return parts;
4027
+ }
4028
+ }
4029
+
4030
+ function parseEndTag(parts, pos, h, param, continuationMarker, state) {
4031
+ var tag = parseTagAndAttrs(parts, pos);
4032
+ // drop unclosed tags
4033
+ if (!tag) { return parts.length; }
4034
+ if (tag.eflags !== void 0) {
4035
+ if (h.endTag) {
4036
+ h.endTag(tag.name, param, continuationMarker,
4037
+ continuationMaker(h, parts, pos, state, param));
4038
+ }
4039
+ }
4040
+ return tag.next;
4041
+ }
4042
+
4043
+ function parseStartTag(parts, pos, h, param, continuationMarker, state) {
4044
+ var tag = parseTagAndAttrs(parts, pos);
4045
+ // drop unclosed tags
4046
+ if (!tag) { return parts.length; }
4047
+ if (tag.eflags !== void 0) {
4048
+ if (h.startTag) {
4049
+ h.startTag(tag.name, tag.attrs, param, continuationMarker,
4050
+ continuationMaker(h, parts, tag.next, state, param));
4051
+ }
4052
+ // tags like <script> and <textarea> have special parsing
4053
+ if (tag.eflags & EFLAGS_TEXT) {
4054
+ return parseText(parts, tag, h, param, continuationMarker, state);
4055
+ }
4056
+ }
4057
+ return tag.next;
4058
+ }
4059
+
4060
+ var endTagRe = {};
4061
+
4062
+ // Tags like <script> and <textarea> are flagged as CDATA or RCDATA,
4063
+ // which means everything is text until we see the correct closing tag.
4064
+ function parseText(parts, tag, h, param, continuationMarker, state) {
4065
+ var end = parts.length;
4066
+ if (!endTagRe.hasOwnProperty(tag.name)) {
4067
+ endTagRe[tag.name] = new RegExp('^' + tag.name + '(?:[\\s\\/]|$)', 'i');
4068
+ }
4069
+ var re = endTagRe[tag.name];
4070
+ var first = tag.next;
4071
+ var p = tag.next + 1;
4072
+ for (; p < end; p++) {
4073
+ if (parts[p - 1] === '<\/' && re.test(parts[p])) { break; }
4074
+ }
4075
+ if (p < end) { p -= 1; }
4076
+ var buf = parts.slice(first, p).join('');
4077
+ if (tag.eflags & html4.eflags.CDATA) {
4078
+ if (h.cdata) {
4079
+ h.cdata(buf, param, continuationMarker,
4080
+ continuationMaker(h, parts, p, state, param));
4081
+ }
4082
+ } else if (tag.eflags & html4.eflags.RCDATA) {
4083
+ if (h.rcdata) {
4084
+ h.rcdata(normalizeRCData(buf), param, continuationMarker,
4085
+ continuationMaker(h, parts, p, state, param));
4086
+ }
4087
+ } else {
4088
+ throw new Error('bug');
4089
+ }
4090
+ return p;
4091
+ }
4092
+
4093
+ // at this point, parts[pos-1] is either "<" or "<\/".
4094
+ function parseTagAndAttrs(parts, pos) {
4095
+ var m = /^(\w+)/.exec(parts[pos]);
4096
+ var tag = { name: lcase(m[1]) };
4097
+ if (html4.ELEMENTS.hasOwnProperty(tag.name)) {
4098
+ tag.eflags = html4.ELEMENTS[tag.name];
4099
+ } else {
4100
+ tag.eflags = void 0;
4101
+ }
4102
+ var buf = parts[pos].substr(m[0].length);
4103
+ // Find the next '>'. We optimistically assume this '>' is not in a
4104
+ // quoted context, and further down we fix things up if it turns out to
4105
+ // be quoted.
4106
+ var p = pos + 1;
4107
+ var end = parts.length;
4108
+ for (; p < end; p++) {
4109
+ if (parts[p] === '>') { break; }
4110
+ buf += parts[p];
4111
+ }
4112
+ if (end <= p) { return void 0; }
4113
+ var attrs = [];
4114
+ while (buf !== '') {
4115
+ m = ATTR_RE.exec(buf);
4116
+ if (!m) {
4117
+ // No attribute found: skip garbage
4118
+ buf = buf.replace(/^[\s\S][^a-z\s]*/, '');
4119
+
4120
+ } else if ((m[4] && !m[5]) || (m[6] && !m[7])) {
4121
+ // Unterminated quote: slurp to the next unquoted '>'
4122
+ var quote = m[4] || m[6];
4123
+ var sawQuote = false;
4124
+ var abuf = [buf, parts[p++]];
4125
+ for (; p < end; p++) {
4126
+ if (sawQuote) {
4127
+ if (parts[p] === '>') { break; }
4128
+ } else if (0 <= parts[p].indexOf(quote)) {
4129
+ sawQuote = true;
4130
+ }
4131
+ abuf.push(parts[p]);
4132
+ }
4133
+ // Slurp failed: lose the garbage
4134
+ if (end <= p) { break; }
4135
+ // Otherwise retry attribute parsing
4136
+ buf = abuf.join('');
4137
+ continue;
4138
+
4139
+ } else {
4140
+ // We have an attribute
4141
+ var aName = lcase(m[1]);
4142
+ var aValue = m[2] ? decodeValue(m[3]) : aName;
4143
+ attrs.push(aName, aValue);
4144
+ buf = buf.substr(m[0].length);
4145
+ }
4146
+ }
4147
+ tag.attrs = attrs;
4148
+ tag.next = p + 1;
4149
+ return tag;
4150
+ }
4151
+
4152
+ function decodeValue(v) {
4153
+ var q = v.charCodeAt(0);
4154
+ if (q === 0x22 || q === 0x27) { // " or '
4155
+ v = v.substr(1, v.length - 2);
4156
+ }
4157
+ return unescapeEntities(stripNULs(v));
4158
+ }
4159
+
4160
+ /**
4161
+ * Returns a function that strips unsafe tags and attributes from html.
4162
+ * @param {function(string, Array.<string>): ?Array.<string>} tagPolicy
4163
+ * A function that takes (tagName, attribs[]), where tagName is a key in
4164
+ * html4.ELEMENTS and attribs is an array of alternating attribute names
4165
+ * and values. It should return a sanitized attribute array, or null to
4166
+ * delete the tag. It's okay for tagPolicy to modify the attribs array,
4167
+ * but the same array is reused, so it should not be held between calls.
4168
+ * @return {function(string, Array)} A function that sanitizes a string of
4169
+ * HTML and appends result strings to the second argument, an array.
4170
+ */
4171
+ function makeHtmlSanitizer(tagPolicy) {
4172
+ var stack;
4173
+ var ignoring;
4174
+ var emit = function (text, out) {
4175
+ if (!ignoring) { out.push(text); }
4176
+ };
4177
+ return makeSaxParser({
4178
+ startDoc: function(_) {
4179
+ stack = [];
4180
+ ignoring = false;
4181
+ },
4182
+ startTag: function(tagName, attribs, out) {
4183
+ if (ignoring) { return; }
4184
+ if (!html4.ELEMENTS.hasOwnProperty(tagName)) { return; }
4185
+ var eflags = html4.ELEMENTS[tagName];
4186
+ if (eflags & html4.eflags.FOLDABLE) {
4187
+ return;
4188
+ }
4189
+ attribs = tagPolicy(tagName, attribs);
4190
+ if (!attribs) {
4191
+ ignoring = !(eflags & html4.eflags.EMPTY);
4192
+ return;
4193
+ }
4194
+ // TODO(mikesamuel): relying on tagPolicy not to insert unsafe
4195
+ // attribute names.
4196
+ if (!(eflags & html4.eflags.EMPTY)) {
4197
+ stack.push(tagName);
4198
+ }
4199
+
4200
+ out.push('<', tagName);
4201
+ for (var i = 0, n = attribs.length; i < n; i += 2) {
4202
+ var attribName = attribs[i],
4203
+ value = attribs[i + 1];
4204
+ if (value !== null && value !== void 0) {
4205
+ out.push(' ', attribName, '="', escapeAttrib(value), '"');
4206
+ }
4207
+ }
4208
+ out.push('>');
4209
+ },
4210
+ endTag: function(tagName, out) {
4211
+ if (ignoring) {
4212
+ ignoring = false;
4213
+ return;
4214
+ }
4215
+ if (!html4.ELEMENTS.hasOwnProperty(tagName)) { return; }
4216
+ var eflags = html4.ELEMENTS[tagName];
4217
+ if (!(eflags & (html4.eflags.EMPTY | html4.eflags.FOLDABLE))) {
4218
+ var index;
4219
+ if (eflags & html4.eflags.OPTIONAL_ENDTAG) {
4220
+ for (index = stack.length; --index >= 0;) {
4221
+ var stackEl = stack[index];
4222
+ if (stackEl === tagName) { break; }
4223
+ if (!(html4.ELEMENTS[stackEl] &
4224
+ html4.eflags.OPTIONAL_ENDTAG)) {
4225
+ // Don't pop non optional end tags looking for a match.
4226
+ return;
4227
+ }
4228
+ }
4229
+ } else {
4230
+ for (index = stack.length; --index >= 0;) {
4231
+ if (stack[index] === tagName) { break; }
4232
+ }
4233
+ }
4234
+ if (index < 0) { return; } // Not opened.
4235
+ for (var i = stack.length; --i > index;) {
4236
+ var stackEl = stack[i];
4237
+ if (!(html4.ELEMENTS[stackEl] &
4238
+ html4.eflags.OPTIONAL_ENDTAG)) {
4239
+ out.push('<\/', stackEl, '>');
4240
+ }
4241
+ }
4242
+ stack.length = index;
4243
+ out.push('<\/', tagName, '>');
4244
+ }
4245
+ },
4246
+ pcdata: emit,
4247
+ rcdata: emit,
4248
+ cdata: emit,
4249
+ endDoc: function(out) {
4250
+ for (; stack.length; stack.length--) {
4251
+ out.push('<\/', stack[stack.length - 1], '>');
4252
+ }
4253
+ }
4254
+ });
4255
+ }
4256
+
4257
+ // From RFC3986
4258
+ var URI_SCHEME_RE = new RegExp(
4259
+ '^' +
4260
+ '(?:' +
4261
+ '([^:\/?# ]+)' + // scheme
4262
+ ':)?'
4263
+ );
4264
+
4265
+ var ALLOWED_URI_SCHEMES = /^(?:https?|mailto)$/i;
4266
+
4267
+ function safeUri(uri, naiveUriRewriter) {
4268
+ if (!naiveUriRewriter) { return null; }
4269
+ var parsed = ('' + uri).match(URI_SCHEME_RE);
4270
+ if (parsed && (!parsed[1] || ALLOWED_URI_SCHEMES.test(parsed[1]))) {
4271
+ return naiveUriRewriter(uri);
4272
+ } else {
4273
+ return null;
4274
+ }
4275
+ }
4276
+
4277
+ /**
4278
+ * Sanitizes attributes on an HTML tag.
4279
+ * @param {string} tagName An HTML tag name in lowercase.
4280
+ * @param {Array.<?string>} attribs An array of alternating names and values.
4281
+ * @param {?function(?string): ?string} opt_naiveUriRewriter A transform to
4282
+ * apply to URI attributes; it can return a new string value, or null to
4283
+ * delete the attribute. If unspecified, URI attributes are deleted.
4284
+ * @param {function(?string): ?string} opt_nmTokenPolicy A transform to apply
4285
+ * to attributes containing HTML names, element IDs, and space-separated
4286
+ * lists of classes; it can return a new string value, or null to delete
4287
+ * the attribute. If unspecified, these attributes are kept unchanged.
4288
+ * @return {Array.<?string>} The sanitized attributes as a list of alternating
4289
+ * names and values, where a null value means to omit the attribute.
4290
+ */
4291
+ function sanitizeAttribs(
4292
+ tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy) {
4293
+ for (var i = 0; i < attribs.length; i += 2) {
4294
+ var attribName = attribs[i];
4295
+ var value = attribs[i + 1];
4296
+ var atype = null, attribKey;
4297
+ if ((attribKey = tagName + '::' + attribName,
4298
+ html4.ATTRIBS.hasOwnProperty(attribKey)) ||
4299
+ (attribKey = '*::' + attribName,
4300
+ html4.ATTRIBS.hasOwnProperty(attribKey))) {
4301
+ atype = html4.ATTRIBS[attribKey];
4302
+ }
4303
+ if (atype !== null) {
4304
+ switch (atype) {
4305
+ case html4.atype.NONE: break;
4306
+ case html4.atype.SCRIPT:
4307
+ value = null;
4308
+ break;
4309
+ case html4.atype.STYLE:
4310
+ if ('undefined' === typeof parseCssDeclarations) {
4311
+ value = null;
4312
+ break;
4313
+ }
4314
+ var sanitizedDeclarations = [];
4315
+ parseCssDeclarations(
4316
+ value,
4317
+ {
4318
+ declaration: function (property, tokens) {
4319
+ var normProp = property.toLowerCase();
4320
+ var schema = cssSchema[normProp];
4321
+ if (!schema) {
4322
+ return;
4323
+ }
4324
+ sanitizeCssProperty(
4325
+ normProp, schema, tokens,
4326
+ opt_naiveUriRewriter);
4327
+ sanitizedDeclarations.push(property + ': ' + tokens.join(' '));
4328
+ }
4329
+ });
4330
+ value = sanitizedDeclarations.length > 0 ? sanitizedDeclarations.join(' ; ') : null;
4331
+ break;
4332
+ case html4.atype.ID:
4333
+ case html4.atype.IDREF:
4334
+ case html4.atype.IDREFS:
4335
+ case html4.atype.GLOBAL_NAME:
4336
+ case html4.atype.LOCAL_NAME:
4337
+ case html4.atype.CLASSES:
4338
+ value = opt_nmTokenPolicy ? opt_nmTokenPolicy(value) : value;
4339
+ break;
4340
+ case html4.atype.URI:
4341
+ value = safeUri(value, opt_naiveUriRewriter);
4342
+ break;
4343
+ case html4.atype.URI_FRAGMENT:
4344
+ if (value && '#' === value.charAt(0)) {
4345
+ value = value.substring(1); // remove the leading '#'
4346
+ value = opt_nmTokenPolicy ? opt_nmTokenPolicy(value) : value;
4347
+ if (value !== null && value !== void 0) {
4348
+ value = '#' + value; // restore the leading '#'
4349
+ }
4350
+ } else {
4351
+ value = null;
4352
+ }
4353
+ break;
4354
+ default:
4355
+ value = null;
4356
+ break;
4357
+ }
4358
+ } else {
4359
+ value = null;
4360
+ }
4361
+ attribs[i + 1] = value;
4362
+ }
4363
+ return attribs;
4364
+ }
4365
+
4366
+ /**
4367
+ * Creates a tag policy that omits all tags marked UNSAFE in html4-defs.js
4368
+ * and applies the default attribute sanitizer with the supplied policy for
4369
+ * URI attributes and NMTOKEN attributes.
4370
+ * @param {?function(?string): ?string} opt_naiveUriRewriter A transform to
4371
+ * apply to URI attributes. If not given, URI attributes are deleted.
4372
+ * @param {function(?string): ?string} opt_nmTokenPolicy A transform to apply
4373
+ * to attributes containing HTML names, element IDs, and space-separated
4374
+ * lists of classes. If not given, such attributes are left unchanged.
4375
+ * @return {function(string, Array.<?string>)} A tagPolicy suitable for
4376
+ * passing to html.sanitize.
4377
+ */
4378
+ function makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy) {
4379
+ return function(tagName, attribs) {
4380
+ if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) {
4381
+ return sanitizeAttribs(
4382
+ tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy);
4383
+ }
4384
+ };
4385
+ }
4386
+
4387
+ /**
4388
+ * Sanitizes HTML tags and attributes according to a given policy.
4389
+ * @param {string} inputHtml The HTML to sanitize.
4390
+ * @param {function(string, Array.<?string>)} tagPolicy A function that
4391
+ * decides which tags to accept and sanitizes their attributes (see
4392
+ * makeHtmlSanitizer above for details).
4393
+ * @return {string} The sanitized HTML.
4394
+ */
4395
+ function sanitizeWithPolicy(inputHtml, tagPolicy) {
4396
+ var outputArray = [];
4397
+ makeHtmlSanitizer(tagPolicy)(inputHtml, outputArray);
4398
+ return outputArray.join('');
4399
+ }
4400
+
4401
+ /**
4402
+ * Strips unsafe tags and attributes from HTML.
4403
+ * @param {string} inputHtml The HTML to sanitize.
4404
+ * @param {?function(?string): ?string} opt_naiveUriRewriter A transform to
4405
+ * apply to URI attributes. If not given, URI attributes are deleted.
4406
+ * @param {function(?string): ?string} opt_nmTokenPolicy A transform to apply
4407
+ * to attributes containing HTML names, element IDs, and space-separated
4408
+ * lists of classes. If not given, such attributes are left unchanged.
4409
+ */
4410
+ function sanitize(inputHtml, opt_naiveUriRewriter, opt_nmTokenPolicy) {
4411
+ var tagPolicy = makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy);
4412
+ return sanitizeWithPolicy(inputHtml, tagPolicy);
4413
+ }
4414
+
4415
+ return {
4416
+ escapeAttrib: escapeAttrib,
4417
+ makeHtmlSanitizer: makeHtmlSanitizer,
4418
+ makeSaxParser: makeSaxParser,
4419
+ makeTagPolicy: makeTagPolicy,
4420
+ normalizeRCData: normalizeRCData,
4421
+ sanitize: sanitize,
4422
+ sanitizeAttribs: sanitizeAttribs,
4423
+ sanitizeWithPolicy: sanitizeWithPolicy,
4424
+ unescapeEntities: unescapeEntities
4425
+ };
4426
+ })(html4);
4427
+
4428
+ var html_sanitize = html.sanitize;
4429
+
4430
+ // Exports for closure compiler. Note this file is also cajoled
4431
+ // for domado and run in an environment without 'window'
4432
+ if (typeof window !== 'undefined') {
4433
+ window['html'] = html;
4434
+ window['html_sanitize'] = html_sanitize;
4435
+ }
4436
+
4437
+ }());
4438
+ return cajaHtmlSanitizer;
4439
+ }
4440
+
4441
+ requireCajaHtmlSanitizer();
4442
+
4443
+ /*!
4444
+ * OpenUI5
4445
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4446
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
4447
+ */
4448
+ /*
4449
+ * IMPORTANT: This is a private module, its API must not be used and is subject to change.
4450
+ * Code other than the OpenUI5 libraries must not introduce dependencies to this module.
4451
+ */
4452
+ /**
4453
+ * Strips unsafe tags and attributes from HTML.
4454
+ *
4455
+ * @function
4456
+ * @since 1.58
4457
+ * @alias module:sap/base/security/sanitizeHTML
4458
+ * @param {string} sHTML the HTML to be sanitized.
4459
+ * @param {object} [mOptions={}] options for the sanitizer
4460
+ * @return {string} sanitized HTML
4461
+ * @private
4462
+ */
4463
+ var fnSanitizeHTML = function (sHTML, mOptions) {
4464
+ fnAssert(window.html && window.html.sanitize, "Sanitizer should have been loaded");
4465
+ mOptions = mOptions || {
4466
+ uriRewriter: function (sUrl) {
4467
+ // by default, we use the URLListValidator to check the URLs
4468
+
4469
+ if (oURLListValidator.validate(sUrl)) {
4470
+ return sUrl;
4471
+ }
4472
+ }
4473
+ };
4474
+ var oTagPolicy = mOptions.tagPolicy || window.html.makeTagPolicy(mOptions.uriRewriter, mOptions.tokenPolicy);
4475
+ return window.html.sanitizeWithPolicy(sHTML, oTagPolicy);
4476
+ };
4477
+
4478
+ const a=new Map,t=new Map;t.set("S",[0,599]),t.set("M",[600,1023]),t.set("L",[1024,1439]),t.set("XL",[1440,1/0]);var S=(e=>(e.RANGE_4STEPS="4Step",e))(S||{});const o=(r,e)=>{a.set(r,e);},c=(r,e=window.innerWidth)=>{let n=a.get(r);n||(n=a.get("4Step"));let g;const s=Math.floor(e);return n.forEach((R,E)=>{s>=R[0]&&s<=R[1]&&(g=E);}),g||[...n.keys()][0]},i={RANGESETS:S,initRangeSet:o,getCurrentRange:c};i.initRangeSet(i.RANGESETS.RANGE_4STEPS,t);
4479
+
4480
+ // animations/
4481
+
4482
+ var PackageModule = /*#__PURE__*/Object.freeze({
4483
+ __proto__: null,
4484
+ EventProvider: Icons.i$2,
4485
+ I18nBundle: Icons.u$2,
4486
+ ItemNavigation: f$1,
4487
+ MediaRange: i,
4488
+ RegisteredIconCollection: Icons.t$1,
4489
+ ResizeHandler: f,
4490
+ ScrollEnablement: v,
4491
+ UI5Element: b$1,
4492
+ URLListValidator: oURLListValidator,
4493
+ addCustomCSS: g,
4494
+ applyDirection: i$1,
4495
+ attachBoot: Icons.P,
4496
+ attachDirectionChange: a$1,
4497
+ attachLanguageChange: Icons.t,
4498
+ attachThemeLoaded: Icons.o$1,
4499
+ cancelRender: Icons.h$1,
4500
+ customElement: m$3,
4501
+ default: b$1,
4502
+ detachDirectionChange: c$1,
4503
+ detachLanguageChange: Icons.r$2,
4504
+ detachThemeLoaded: Icons.n$3,
4505
+ event: b$5,
4506
+ getAnimationMode: d$3,
4507
+ getCalendarType: i$7,
4508
+ getCustomElementsScopingRules: Icons.m$1,
4509
+ getCustomElementsScopingSuffix: Icons.c$3,
4510
+ getDefaultIconCollection: Icons.c$4,
4511
+ getDefaultLanguage: Icons.c$5,
4512
+ getDefaultTheme: Icons.g$2,
4513
+ getEffectiveDir: r$1,
4514
+ getEffectiveIconCollection: Icons.i$4,
4515
+ getEffectiveScopingSuffixForTag: Icons.g$1,
4516
+ getFetchDefaultLanguage: Icons.h$3,
4517
+ getFirstDayOfWeek: n$a,
4518
+ getI18nBundle: Icons.f$2,
4519
+ getLanguage: Icons.l$3,
4520
+ getLegacyDateCalendarCustomizing: m$5,
4521
+ getNoConflict: o$6,
4522
+ getTheme: Icons.r,
4523
+ isAndroid: Icons.P$1,
4524
+ isChrome: Icons.g,
4525
+ isCombi: Icons.m$2,
4526
+ isDesktop: Icons.f,
4527
+ isFirefox: Icons.b$2,
4528
+ isIOS: Icons.w,
4529
+ isPhone: Icons.d,
4530
+ isSafari: Icons.h,
4531
+ isTablet: Icons.a$1,
4532
+ property: s$9,
4533
+ registerCustomI18nBundleGetter: Icons.y$1,
4534
+ registerI18nLoader: Icons.$,
4535
+ registerIconLoader: Icons.C,
4536
+ registerLocaleDataLoader: C,
4537
+ registerThemePropertiesLoader: Icons.p,
4538
+ renderDeferred: Icons.l$1,
4539
+ renderFinished: Icons.f$1,
4540
+ renderImmediately: Icons.c$2,
4541
+ sanitizeHTML: fnSanitizeHTML,
4542
+ scroll: n$d,
4543
+ setAnimationMode: m$6,
4544
+ setCustomElementsScopingRules: Icons.p$1,
4545
+ setCustomElementsScopingSuffix: Icons.l$4,
4546
+ setDefaultIconCollection: Icons.e$1,
4547
+ setFetchDefaultLanguage: Icons.m$3,
4548
+ setLanguage: Icons.L,
4549
+ setNoConflict: f$3,
4550
+ setTheme: Icons.u$1,
4551
+ slideDown: b$6,
4552
+ slideUp: u$3,
4553
+ slot: d$1,
4554
+ startMultipleDrag: m$4,
4555
+ supportsTouch: Icons.l$2
4556
+ });
4557
+
4558
+ Icons.l$4("cc48984a");
4559
+
4560
+ exports.A = A;
4561
+ exports.C = C$2;
4562
+ exports.Co = Co;
4563
+ exports.D = D$1;
4564
+ exports.D$1 = D$2;
4565
+ exports.Eo = Eo;
4566
+ exports.I = I$1;
4567
+ exports.K = K;
4568
+ exports.Ko = Ko;
4569
+ exports.M = M;
4570
+ exports.N = N;
4571
+ exports.O = O$2;
4572
+ exports.P = P;
4573
+ exports.PackageModule = PackageModule;
4574
+ exports.Q = Q;
4575
+ exports.R = R$2;
4576
+ exports.V = V;
4577
+ exports.X = X;
4578
+ exports._ = _$1;
4579
+ exports.ao = ao;
4580
+ exports.b = b$1;
4581
+ exports.b$1 = b$4;
4582
+ exports.b$2 = b$6;
4583
+ exports.d = d$1;
4584
+ exports.d$1 = d$3;
4585
+ exports.f = f;
4586
+ exports.f$1 = f$1;
4587
+ exports.h = h;
4588
+ exports.i = i$5;
4589
+ exports.i$1 = i$3;
4590
+ exports.i$2 = i;
4591
+ exports.j = j;
4592
+ exports.ko = ko;
4593
+ exports.l = l$5;
4594
+ exports.m = m$3;
4595
+ exports.m$1 = m$1;
4596
+ exports.m$2 = m$2;
4597
+ exports.n = n$9;
4598
+ exports.n$1 = n$3;
4599
+ exports.n$2 = n$4;
4600
+ exports.p = p$2;
4601
+ exports.q = q;
4602
+ exports.r = r$4;
4603
+ exports.ro = ro;
4604
+ exports.s = s$9;
4605
+ exports.so = so;
4606
+ exports.t = t$3;
4607
+ exports.u = u$3;
4608
+ exports.v = v$1;
4609
+ exports.x = x;
4610
+
170
4611
  }));