1AppRegistry.registerBundle({applicationId:'limepark.webapp-overlay-button|3.0.3',bundle: {"en":{},"sv":{}}}); 2AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/client/focus-trap',module:function(define){'use strict';function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 3function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 4function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 5function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 6function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 7define(function (require) { 8 /* eslint-disable curly, no-useless-return */ 9 var tabbable = require("/module/client/tabbable"); 10 var activeFocusDelay; 11 var activeFocusTraps = function () { 12 var trapQueue = []; 13 return { 14 activateTrap: function activateTrap(trap) { 15 if (trapQueue.length > 0) { 16 var activeTrap = trapQueue[trapQueue.length - 1]; 17 if (activeTrap !== trap) { 18 activeTrap.pause(); 19 } 20 } 21 var trapIndex = trapQueue.indexOf(trap); 22 if (trapIndex === -1) { 23 trapQueue.push(trap); 24 } else { 25 // move this existing trap to the front of the queue 26 trapQueue.splice(trapIndex, 1); 27 trapQueue.push(trap); 28 } 29 }, 30 deactivateTrap: function deactivateTrap(trap) { 31 var trapIndex = trapQueue.indexOf(trap); 32 if (trapIndex !== -1) { 33 trapQueue.splice(trapIndex, 1); 34 } 35 if (trapQueue.length > 0) { 36 trapQueue[trapQueue.length - 1].unpause(); 37 } 38 } 39 }; 40 }(); 41 function focusTrap(element, userOptions) { 42 var doc = document; 43 var container = typeof element === 'string' ? doc.querySelector(element) : element; 44 var config = _objectSpread({ 45 returnFocusOnDeactivate: true, 46 escapeDeactivates: true 47 }, userOptions); 48 var state = { 49 firstTabbableNode: null, 50 lastTabbableNode: null, 51 nodeFocusedBeforeActivation: null, 52 mostRecentlyFocusedNode: null, 53 active: false, 54 paused: false 55 }; 56 var trap = { 57 activate: activate, 58 deactivate: deactivate, 59 pause: pause, 60 unpause: unpause 61 }; 62 return trap; 63 function activate(activateOptions) { 64 if (state.active) return; 65 updateTabbableNodes(); 66 state.active = true; 67 state.paused = false; 68 state.nodeFocusedBeforeActivation = activateOptions.activeElement || doc.activeElement; 69 var onActivate = activateOptions && activateOptions.onActivate ? activateOptions.onActivate : config.onActivate; 70 if (onActivate) { 71 onActivate(); 72 } 73 addListeners(); 74 return trap; 75 } 76 function deactivate(deactivateOptions) { 77 if (!state.active) return; 78 clearTimeout(activeFocusDelay); 79 removeListeners(); 80 state.active = false; 81 state.paused = false; 82 activeFocusTraps.deactivateTrap(trap); 83 var onDeactivate = deactivateOptions && deactivateOptions.onDeactivate !== undefined ? deactivateOptions.onDeactivate : config.onDeactivate; 84 if (onDeactivate) { 85 onDeactivate(); 86 } 87 var returnFocus = deactivateOptions && deactivateOptions.returnFocus !== undefined ? deactivateOptions.returnFocus : config.returnFocusOnDeactivate; 88 if (returnFocus) { 89 delay(function () { 90 tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)); 91 }); 92 } 93 return trap; 94 } 95 function pause() { 96 if (state.paused || !state.active) return; 97 state.paused = true; 98 removeListeners(); 99 } 100 function unpause() { 101 if (!state.paused || !state.active) return; 102 state.paused = false;
103 updateTabbableNodes(); 104 addListeners(); 105 } 106 function addListeners() { 107 if (!state.active) return; 108 109 // There can be only one listening focus trap at a time 110 activeFocusTraps.activateTrap(trap); 111 112 // Delay ensures that the focused element doesn't capture the event 113 // that caused the focus trap activation. 114 activeFocusDelay = delay(function () { 115 tryFocus(getInitialFocusNode()); 116 }); 117 doc.addEventListener('focusin', checkFocusIn, true); 118 doc.addEventListener('mousedown', checkPointerDown, { 119 capture: true, 120 passive: false 121 }); 122 doc.addEventListener('touchstart', checkPointerDown, { 123 capture: true, 124 passive: false 125 }); 126 doc.addEventListener('click', checkClick, { 127 capture: true, 128 passive: false 129 }); 130 doc.addEventListener('keydown', checkKey, { 131 capture: true, 132 passive: false 133 }); 134 return trap; 135 } 136 function removeListeners() { 137 if (!state.active) return; 138 doc.removeEventListener('focusin', checkFocusIn, true); 139 doc.removeEventListener('mousedown', checkPointerDown, true); 140 doc.removeEventListener('touchstart', checkPointerDown, true); 141 doc.removeEventListener('click', checkClick, true); 142 doc.removeEventListener('keydown', checkKey, true); 143 return trap; 144 } 145 function getNodeForOption(optionName) { 146 var optionValue = config[optionName]; 147 var node = optionValue; 148 if (!optionValue) { 149 return null; 150 } 151 if (typeof optionValue === 'string') { 152 node = doc.querySelector(optionValue); 153 if (!node) { 154 throw new Error('`' + optionName + '` refers to no known node'); 155 } 156 } 157 if (typeof optionValue === 'function') { 158 node = optionValue(); 159 if (!node) { 160 throw new Error('`' + optionName + '` did not return a node'); 161 } 162 } 163 return node; 164 } 165 function getInitialFocusNode() { 166 var node; 167 if (getNodeForOption('initialFocus') !== null) { 168 node = getNodeForOption('initialFocus'); 169 } else if (container.contains(doc.activeElement)) { 170 node = doc.activeElement; 171 } else { 172 node = state.firstTabbableNode || getNodeForOption('fallbackFocus'); 173 } 174 if (!node) { 175 throw new Error('Your focus-trap needs to have at least one focusable element'); 176 } 177 return node; 178 } 179 function getReturnFocusNode(previousActiveElement) { 180 var node = getNodeForOption('setReturnFocus'); 181 return node ? node : previousActiveElement; 182 } 183 184 // This needs to be done on mousedown and touchstart instead of click 185 // so that it precedes the focus event. 186 function checkPointerDown(e) { 187 if (container.contains(e.target)) return; 188 if (config.clickOutsideDeactivates) { 189 deactivate({ 190 returnFocus: !tabbable.isFocusable(e.target) 191 }); 192 return; 193 } 194 // This is needed for mobile devices. 195 // (If we'll only let `click` events through, 196 // then on mobile they will be blocked anyways if `touchstart` is blocked.) 197 if (config.allowOutsideClick && (typeof config.allowOutsideClick === 'boolean' ? config.allowOutsideClick : config.allowOutsideClick(e))) { 198 return; 199 } 200 e.preventDefault(); 201 } 202 203 // In case focus escapes the trap for some strange reason, pull it back in. 204 function checkFocusIn(e) { 205 // In Firefox when you Tab out of an iframe the Document is briefly focused. 206 if (container.contains(e.target) || e.target instanceof Document) { 207 return; 208 } 209 e.stopImmediatePropagation(); 210 tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode()); 211 } 212 function checkKey(e) { 213 if (config.escapeDeactivates !== false && isEscapeEvent(e)) { 214 e.preventDefault(); 215 deactivate(); 216 return; 217 } 218 if (isTabEvent(e)) { 219 checkTab(e); 220 return; 221 } 222 } 223 224 // Hijack Tab events on the first and last focusable nodes of the trap, 225 // in order to prevent focus from escaping. If it escapes for even a 226 // moment it can end up scrolling the page and causing confusion so we 227 // kind of need to capture the action at the keydown phase. 228 function checkTab(e) { 229 updateTabbableNodes(); 230 if (e.shiftKey && e.target === state.firstTabbableNode) { 231 e.preventDefault(); 232 tryFocus(state.lastTabbableNode); 233 return; 234 } 235 if (!e.shiftKey && e.target === state.lastTabbableNode) { 236 e.preventDefault(); 237 tryFocus(state.firstTabbableNode); 238 return; 239 } 240 } 241 function checkClick(e) { 242 if (config.clickOutsideDeactivates) return; 243 if (container.contains(e.target)) return; 244 if (config.allowOutsideClick && (typeof config.allowOutsideClick === 'boolean' ? config.allowOutsideClick : config.allowOutsideClick(e))) { 245 return; 246 } 247 e.preventDefault(); 248 e.stopImmediatePropagation(); 249 } 250 function updateTabbableNodes() { 251 var tabbableNodes = tabbable.tabbable(container); 252 state.firstTabbableNode = tabbableNodes[0] || getInitialFocusNode(); 253 state.lastTabbableNode = tabbableNodes[tabbableNodes.length - 1] || getInitialFocusNode(); 254 } 255 function tryFocus(node) { 256 if (node === doc.activeElement) return; 257 if (!node || !node.focus) { 258 tryFocus(getInitialFocusNode()); 259 return; 260 } 261 node.focus({ 262 preventScroll: !!config.preventScroll 263 }); 264 state.mostRecentlyFocusedNode = node; 265 if (isSelectableInput(node)) { 266 node.select(); 267 } 268 } 269 } 270 function isSelectableInput(node) { 271 return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function'; 272 } 273 function isEscapeEvent(e) { 274 return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27; 275 } 276 function isTabEvent(e) { 277 return e.key === 'Tab' || e.keyCode === 9; 278 } 279 function delay(fn) { 280 return setTimeout(fn, 0); 281 } 282 return { 283 create: focusTrap 284 }; 285});}}); 286AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/common/domid-util',module:function(define){'use strict';function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 287function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {};
287 r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 288function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 289function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 290function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 291define(function (require) { 292 var isClient = typeof window !== 'undefined'; 293 var __req__ = require; 294 var escapeIdentifier = function escapeIdentifier(prefix, identifier) { 295 return prefix + identifier.replace('.', '_'); 296 }; 297 var portletId = function () { 298 if (isClient) { 299 return require('router').portletId; 300 } else { 301 return __req__('PortletContextUtil').getCurrentPortlet().getIdentifier(); 302 } 303 }(); 304 var portletDomId = escapeIdentifier('svid', portletId); 305 var properties = {}; 306 var addProperty = function addProperty(name, value) { 307 var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ID'; 308 properties[name] = value; 309 properties[name + 'Selector'] = type === 'ID' ? '#' + value : '.' + value; 310 }; 311 addProperty('pageHidden', "lp-overlay-page--hidden-".concat(portletDomId), 'CLASS'); 312 addProperty('page', "lp-overlay-page-".concat(portletDomId), 'CLASS'); 313 addProperty('containerVisible', "".concat(portletDomId, "-container--visible"), 'CLASS'); 314 addProperty('button', portletDomId); 315 addProperty('container', portletDomId + '-container'); 316 addProperty('backdrop', portletDomId + '-backdrop'); 317 return _objectSpread({}, properties); 318});}}); 319AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/client/@limepark/event-api_3.0.2/EventApi',module:function(define){'use strict';define(function(require) { 320 var exports = {}; 321 var module = { 322 exports: exports 323 }; 324 325 var _EventApi; 326function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 327function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 328function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 329function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 330function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 331function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 332var DEFAULT_EVENT_PREFIX = 'lp-client-event'; 333var TARGET_ALL = 'LP_CLIENT_EVENT_TARGET_ALL'; 334 335/** 336 * @class EventApi 337 */ 338module.exports = (_EventApi = /*#__PURE__*/function () { 339 /** 340 * Constructor 341 * 342 * @param {Object} opts An object with options 343 * @param {String} [opts.appIdentifier=''] The current app identifier from the manifest. 344 * @param {String} [opts.portletId=''] The current portlet's identifier. 345 */ 346 function EventApi() { 347 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 348 _classCallCheck(this, EventApi); 349 this.appIdentifier = (opts === null || opts === void 0 ? void 0 : opts.appIdentifier) || ''; 350 this.portletIdentifier = (opts === null || opts === void 0 ? void 0 : opts.portletId) || ''; 351 this.eventPrefix = DEFAULT_EVENT_PREFIX; 352 } 353 354 /** 355 * Internal method for building an array with identifiers for this instance. 356 * 357 * @param {String[]} identifiers 358 * @private 359 * @returns String[] 360 */ 361 return _createClass(EventApi, [{ 362 key: "prepareIdentifiers", 363 value: function prepareIdentifiers(identifiers) { 364 identifiers = Array.isArray(identifiers) ? identifiers : [identifiers]; 365 identifiers.push(TARGET_ALL); 366 if (this.appIdentifier && identifiers.indexOf(this.appIdentifier) === -1) { 367 identifiers.push(this.appIdentifier); 368 } 369 if (this.portletIdentifier && identifiers.indexOf(this.portletIdentifier) === -1) { 370 identifiers.push(this.portletIdentifier); 371 } 372 return identifiers.filter(function (ident) { 373 return String(ident || '').trim(); 374 }); 375 } 376 377 /** 378 * Namespaces an event with a prefix. 379 * 380 * @param {string} key Event name to be namespaced. 381 * @returns {string} Namespaced event. 382 */ 383 }, { 384 key: "createEventName", 385 value: function createEventName(key) { 386 return "".concat(this.eventPrefix, ":").concat(key); 387 } 388 389 /** 390 * Registers events on the document and returns a function for deregistering the same events. 391 * 392 * @param {Object} events An object with events where the keys are the event names. 393 * @param {string[]} identifiers An array of identifiers for the app where the events are registered. 394 * @returns {Function} 395 */ 396 }, { 397 key: "registerEvents", 398 value: function registerEvents() { 399 var _this = this; 400 var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 401 var identifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 402 identifiers = this.prepareIdentifiers(identifiers); 403 var listeners = []; 404 var _loop = function _loop(key) { 405 var eventName = _this.createEventName(key); 406 var listener = function listener(e) { 407 if (e.detail.identifier && identifiers.includes(e.detail.identifier)) { 408 events[key].call(null, e.detail.args, { 409 sender: e.detail.sender, 410 fromSelf: e.detail.sender && e.detail.sender === _this.portletIdentifier 411 }); 412 } 413 }; 414 document.addEventListener(eventName, listener); 415 listeners.push({ 416 eventName: eventName, 417 listener: listener 418 }); 419 }; 420 for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) { 421 var key = _Object$keys[_i]; 422 _loop(key); 423 } 424 return function () {
425 listeners.forEach(function (_ref) { 426 var eventName = _ref.eventName, 427 listener = _ref.listener; 428 return document.removeEventListener(eventName, listener); 429 }); 430 }; 431 } 432 433 /** 434 * Trigger an event 435 * 436 * @param {String} identifier An identifier for the event apis to talk to. 437 * @param {String} name The name of the event to be triggered. 438 * @param {Object} args The arguments which the registered event will get. 439 */ 440 }, { 441 key: "triggerEvent", 442 value: function triggerEvent(identifier, name) { 443 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 444 document.dispatchEvent(new CustomEvent(this.createEventName(name), { 445 detail: { 446 identifier: identifier, 447 args: args, 448 sender: this.portletIdentifier 449 } 450 })); 451 } 452 }]); 453}(), _defineProperty(_EventApi, "TARGET_ALL", TARGET_ALL), _EventApi);; 454 455 return module.exports; 456 });}}); 457AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/client/@limepark/event-api_3.0.2/cjs',module:function(define){'use strict';define(function (require) { 458 var app = require('app'); 459 var EventApi = require("/module/client/@limepark/event-api_3.0.2/EventApi"); 460 461 // Default instance. 462 var api = new EventApi({ 463 appIdentifier: app.webAppId, 464 portletId: app.portletId 465 }); 466 467 /** 468 * 469 * @param {string} identifier Identifier for the app to be triggered. 470 * @param {string} name Name of the event. 471 * @param {Object} args Arguments which should be passed to the event. 472 * @returns {Void} 473 */ 474 function triggerEvent(identifier, name) { 475 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 476 return api.triggerEvent(identifier, name, args); 477 } 478 479 /** 480 * Creates events which can be used to communicate with the app. 481 * 482 * @param {Object} events An object with events where the keys are the event names. 483 * @param {string[]} identifiers An array of identifiers for the app where the events are registered. 484 * @returns {Function} Returns a function for deregistering the created events. Useful when registering in React.useEffect(). 485 * @example 486 * // CJS example for old webapps. 487 * define((require) => { 488 * const eventApi = require('@limepark/event-api/cjs'); 489 * 490 * // ... 491 * 492 * return Component.extend({ 493 * onAttached() { 494 * this._removeEventsCallback = eventApi.createEventApi({ 495 * setName ({ name }) { 496 * // ... 497 * } 498 * }); 499 * } 500 * }); 501 * }); 502 */ 503 function createEventApi() { 504 var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 505 var identifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 506 return api.registerEvents(events, identifiers); 507 } 508 return { 509 EventApi: EventApi, 510 triggerEvent: triggerEvent, 511 createEventApi: createEventApi 512 }; 513});}}); 514AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/template/main',module:function(define){define(function(require){var _=require('underscore');return function(obj){ 515var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 516with(obj||{}){ 517__p+='<button class="lp-overlay-button '+ 518((__t=(buttonClasses))==null?'':_.escape(__t))+ 519'">'+ 520((__t=(buttonText))==null?'':__t)+ 521'</button>'; 522} 523return __p; 524};});}}); 525AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/template/overlay',module:function(define){define(function(require){var _=require('underscore');return function(obj){ 526var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 527with(obj||{}){ 528__p+='<div aria-label="'+ 529((__t=(dialogLabel))==null?'':_.escape(__t))+ 530'" class="lp-overlay__container '+ 531((__t=(containerClasses))==null?'':_.escape(__t))+ 532'" role="dialog" aria-hidden="true">\n <div class="lp-overlay__inner">\n <div class="lp-overlay__header">\n '; 533 if (titleText || titleText !== '') { 534__p+='\n <h2 class="lp-overlay__title">'+ 535((__t=(titleText))==null?'':__t)+ 536'</h2>\n '; 537 } 538__p+='\n <button class="lp-overlay__close-button" data-action-close-overlay>'+ 539((__t=(closeButtonText))==null?'':__t)+ 540'</button>\n </div>\n <div class="lp-overlay__content"></div>\n </div>\n</div>'; 541} 542return __p; 543};});}}); 544AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/client/tabbable',module:function(define){'use strict';define(function (require) { 545 /** 546 * Source: https://github.com/focus-trap/tabbable 547 */ 548 var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary']; 549 var candidateSelector = /* #__PURE__ */candidateSelectors.join(','); 550 var matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 551 function tabbable(el, options) { 552 options = options || {}; 553 var regularTabbables = []; 554 var orderedTabbables = []; 555 var candidates = el.querySelectorAll(candidateSelector); 556 if (options.includeContainer) { 557 if (matches.call(el, candidateSelector)) { 558 candidates = Array.prototype.slice.apply(candidates); 559 candidates.unshift(el); 560 } 561 } 562 var candidate; 563 var candidateTabindex; 564 for (var i = 0; i < candidates.length; i++) { 565 candidate = candidates[i]; 566 if (!isNodeMatchingSelectorTabbable(candidate)) { 567 continue; 568 } 569 candidateTabindex = getTabindex(candidate); 570 if (candidateTabindex === 0) { 571 regularTabbables.push(candidate); 572 } else { 573 orderedTabbables.push({ 574 documentOrder: i, 575 tabIndex: candidateTabindex, 576 node: candidate 577 }); 578 } 579 } 580 var tabbableNodes = orderedTabbables.sort(sortOrderedTabbables).map(function (a) { 581 return a.node; 582 }).concat(regularTabbables); 583 return tabbableNodes; 584 } 585 function isNodeMatchingSelectorTabbable(node) { 586 if (!isNodeMatchingSelectorFocusable(node) || isNonTabbableRadio(node) || getTabindex(node) < 0) { 587 return false;
588 } 589 return true; 590 } 591 function isTabbable(node) { 592 if (!node) { 593 throw new Error('No node provided'); 594 } 595 if (matches.call(node, candidateSelector) === false) { 596 return false; 597 } 598 return isNodeMatchingSelectorTabbable(node); 599 } 600 function isNodeMatchingSelectorFocusable(node) { 601 if (node.disabled || isHiddenInput(node) || isHidden(node)) { 602 return false; 603 } 604 return true; 605 } 606 var focusableCandidateSelector = candidateSelectors.concat('iframe').join(','); 607 function isFocusable(node) { 608 if (!node) { 609 throw new Error('No node provided'); 610 } 611 if (matches.call(node, focusableCandidateSelector) === false) { 612 return false; 613 } 614 return isNodeMatchingSelectorFocusable(node); 615 } 616 function getTabindex(node) { 617 var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10); 618 if (!isNaN(tabindexAttr)) { 619 return tabindexAttr; 620 } 621 622 // Browsers do not return `tabIndex` correctly for contentEditable nodes; 623 // so if they don't have a tabindex attribute specifically set, assume it's 0. 624 if (isContentEditable(node)) { 625 return 0; 626 } 627 628 // in Chrome, <audio controls/> and <video controls/> elements get a default 629 // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM, 630 // yet they are still part of the regular tab order; in FF, they get a default 631 // `tabIndex` of 0; since Chrome still puts those elements in the regular tab 632 // order, consider their tab index to be 0 633 if ((node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO') && node.getAttribute('tabindex') === null) { 634 return 0; 635 } 636 return node.tabIndex; 637 } 638 function sortOrderedTabbables(a, b) { 639 return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex; 640 } 641 function isContentEditable(node) { 642 return node.contentEditable === 'true'; 643 } 644 function isInput(node) { 645 return node.tagName === 'INPUT'; 646 } 647 function isHiddenInput(node) { 648 return isInput(node) && node.type === 'hidden'; 649 } 650 function isRadio(node) { 651 return isInput(node) && node.type === 'radio'; 652 } 653 function isNonTabbableRadio(node) { 654 return isRadio(node) && !isTabbableRadio(node); 655 } 656 function getCheckedRadio(nodes, form) { 657 for (var i = 0; i < nodes.length; i++) { 658 if (nodes[i].checked && nodes[i].form === form) { 659 return nodes[i]; 660 } 661 } 662 } 663 function isTabbableRadio(node) { 664 if (!node.name) { 665 return true; 666 } 667 var radioScope = node.form || node.ownerDocument; 668 var radioSet = radioScope.querySelectorAll('input[type="radio"][name="' + node.name + '"]'); 669 var checked = getCheckedRadio(radioSet, node.form); 670 return !checked || checked === node; 671 } 672 function isHidden(node) { 673 // offsetParent being null will allow detecting cases where an element is invisible or inside an invisible element, 674 // as long as the element does not use position: fixed. For them, their visibility has to be checked directly as well. 675 return node.offsetParent === null || getComputedStyle(node).visibility === 'hidden'; 676 } 677 return { 678 tabbable: tabbable, 679 isTabbable: isTabbable, 680 isFocusable: isFocusable 681 }; 682});}}); 683AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/module/common/@limepark/wdu-log_1.0.2/index',module:function(define){'use strict';/** 684 * Logger for use with the webapp dev utils `log` command. 685 * 686 * @module common/wdu-log 687 * @example 688 * const WDULog = require('!limepark:common/wdu-log'); 689 * const log = WDULog.getLogger(__filename); 690 * 691 * function doSomeWork(data) { 692 * log.debug('Trying to calculate data from', data); 693 * var result = calculateData(data); 694 * if (!data) { 695 * log.warn('Unable to calculate result from specified data.'); 696 * return null; 697 * } 698 * 699 * log.debug('Generated result', result); 700 * 701 * // 702 * //... 703 * } 704 */ 705/* globals require, module */ 706(function (root, factory) { 707 if (typeof define === 'function') { 708 // AMD. Register as an anonymous module. 709 define(factory); 710 } else if (typeof module === 'object' && module.exports) { 711 // Node. Does not work with strict CommonJS, but 712 // only CommonJS-like environments that support module.exports, 713 // like Node. 714 module.exports = factory(require); 715 } else { 716 // Browser globals (root is window) 717 root.wduLog = factory(); 718 } 719})(typeof self !== 'undefined' ? self : this, function (require) { 720 var _dereq_ = require; 721 var isBrowser = typeof window !== 'undefined'; 722 var logUtil = isBrowser ? console : _dereq_('LogUtil'); 723 if (isBrowser) { 724 logUtil.debug = logUtil.log; 725 } 726 var buildLogMessage = function buildLogMessage(logTag, message) { 727 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; 728 var messages = ["WDU[M#".concat("limepark.webapp-overlay-button", "/").concat(logTag, "]: ").concat(message)]; 729 if (data) { 730 messages.push("WDU[D#".concat("limepark.webapp-overlay-button", "/").concat(logTag, "]: ").concat(JSON.stringify(data))); 731 } 732 return messages; 733 }; 734 735 /** 736 * Creates a new Logger with a logTag 737 * 738 * @param {string} logTag The log tag 739 * @module server/wdu-log/Logger 740 */ 741 var Logger = function Logger(logTag) { 742 this.LOG_TAG = logTag; 743 }; 744 745 /** 746 * Logs an info message 747 * 748 * @param {String} message The message 749 * @param {Mixed}
749 data Extra data for the message, will be stringified 750 * @memberof module:server/wdu-log/Logger 751 */ 752 Logger.prototype.info = function Logger$$info(message) { 753 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; 754 buildLogMessage(this.LOG_TAG, message, data).forEach(function (m) { 755 return logUtil.info(m); 756 }); 757 }; 758 759 /** 760 * Logs a debug message 761 * 762 * @param {String} message The message 763 * @param {Mixed} data Extra data for the message, will be stringified 764 * @memberof module:server/wdu-log/Logger 765 */ 766 Logger.prototype.debug = function Logger$$debug(message) { 767 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; 768 buildLogMessage(this.LOG_TAG, message, data).forEach(function (m) { 769 return logUtil.debug(m); 770 }); 771 }; 772 773 /** 774 * Logs a warn message 775 * 776 * @param {String} message The message 777 * @param {Mixed} data Extra data for the message, will be stringified 778 * @memberof module:server/wdu-log/Logger 779 */ 780 Logger.prototype.warn = function Logger$$warn(message) { 781 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; 782 buildLogMessage(this.LOG_TAG, message, data).forEach(function (m) { 783 return logUtil.warn(m); 784 }); 785 }; 786 787 /** 788 * Logs an error message 789 * 790 * @param {String} message The message 791 * @param {Mixed} data Extra data for the message, will be stringified 792 * @memberof module:server/wdu-log/Logger 793 */ 794 Logger.prototype.error = function Logger$$error(message) { 795 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; 796 buildLogMessage(this.LOG_TAG, message, data).forEach(function (m) { 797 return logUtil.error(m); 798 }); 799 }; 800 Logger.prototype._debugReportError = function Logger$$_debugReportError(e, filename, fnName, line, col) { 801 try { 802 buildLogMessage(this.LOG_TAG, "An error occured in ".concat(filename, " (").concat(fnName, ":").concat(line, ":").concat(col, ") at ").concat(e.lineNumber, ": ").concat(e.message), e.stack).forEach(function (m) { 803 return logUtil.error(m); 804 }); 805 } catch (ex) { 806 logUtil.error('Error in wdu-log: ' + ex); 807 } 808 }; 809 810 /** 811 * Creates a logger with a specific LogTag 812 * 813 * @param {String} logTag The logTag, typically filename or another unique tag. 814 * @memberof module:server/wdu-log 815 * @returns {module:server/wdu-log/Logger} The logger 816 */ 817 var getLogger = function getLogger(logTag) { 818 return new Logger(logTag); 819 }; 820 return { 821 getLogger: getLogger 822 }; 823});}}); 824AppRegistry.registerModule({applicationId:'limepark.webapp-overlay-button|3.0.3',path:'/main',module:function(define){'use strict';function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 825function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 826function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 827function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 828function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 829define(function (require) { 830 "use strict"; 831 832 var eventApi = require("/module/client/@limepark/event-api_3.0.2/cjs"); 833 var Component = require("Component"); 834 var template = require("/template/main"); 835 var $ = require("jquery"); 836 var overlayTemplate = require("/template/overlay"); 837 var FocusTrap = require("/module/client/focus-trap"); 838 var events = require("events"); 839 var tabbable = require("/module/client/tabbable"); 840 var domId = require("/module/common/domid-util"); 841 var CUSTOM_END_EVENT = "overlayButton:tranimationend"; 842 var CUSTOM_EVENTS_NAMESPACE = "lp-overlay-button"; 843 var KEYBOARD_TYPES = ["search", "date", "datetime-local", "email", "number", "password", "range", "tel", "text", "time", "url"]; 844 var isOnline = function isOnline() { 845 return $("html").hasClass("sv-edit-mode"); 846 }; 847 return Component.extend({ 848 template: template, 849 className: "lp-overlay-button__wrapper", 850 attributes: function attributes() { 851 var attributes = {}; 852 if (this.state.ariaRole) { 853 attributes.role = this.state.ariaRole; 854 } 855 if (this.state.ariaLabel) { 856 attributes["aria-label"] = this.state.ariaLabel; 857 } 858 return attributes; 859 }, 860 events: { 861 dom: { 862 "click button": "handleButtonClick" 863 } 864 }, 865 _triggerCustomEvent: function _triggerCustomEvent(eventName) { 866 this.$el.trigger("".concat(eventName, ".").concat(CUSTOM_EVENTS_NAMESPACE), [this.$el, this._$container]); 867 events.trigger("".concat(CUSTOM_EVENTS_NAMESPACE, ":").concat(eventName), [this.$el, this._$container]); 868 }, 869 _hasMovedContent: false, 870 onAttached: function onAttached() { 871 this._ensureContainer();
872 this._$pageContainer = $("body > div.sv-layout").eq(0).addClass("lp-overlay-page"); 873 this._$pageContainer.attr("aria-hidden", "false"); 874 this._pageContainerHiddenClass = domId.pageHidden; 875 this._$button = this.$("button").attr("aria-controls", this._containerId).attr("aria-expanded", "false"); 876 var inst = this; 877 this._removeEventsCallback = eventApi.createEventApi({ 878 close: function close(_ref) { 879 var _ref$trapOptions = _ref.trapOptions, 880 trapOptions = _ref$trapOptions === void 0 ? {} : _ref$trapOptions; 881 inst._hideContainer({ 882 trapOptions: trapOptions 883 }); 884 }, 885 show: function show(_ref2) { 886 var _ref2$firstFocusNode = _ref2.firstFocusNode, 887 firstFocusNode = _ref2$firstFocusNode === void 0 ? null : _ref2$firstFocusNode; 888 inst._showContainer(firstFocusNode); 889 } 890 }); 891 this._setupAnchorLinkHijacker(); 892 this._ensureBackdrop(); 893 this._setupBreakpointListener(); 894 this._setupReducedMotionListener(); 895 this._setupResizeListener(); 896 }, 897 onDestroy: function onDestroy() { 898 if (this._removeEventsCallback) { 899 this._removeEventsCallback(); 900 this._removeEventsCallback = null; 901 } 902 }, 903 _setupResizeListener: function _setupResizeListener() { 904 var _this = this; 905 $(window).on("resize", function () { 906 _this._$container.height($(window).innerHeight()); 907 }).trigger("resize"); 908 }, 909 _setupAnchorLinkHijacker: function _setupAnchorLinkHijacker() { 910 var _this2 = this; 911 $("body").on("click", 'a[href^="#"]', function (e) { 912 if (!_this2._hasMovedContent) { 913 return; 914 } 915 var $target = $(e.target); 916 var targetId = $target.attr("href"); 917 if (!targetId) { 918 return; 919 } 920 var $anchorTargetElement = null; 921 try { 922 $anchorTargetElement = _this2._$container.find(targetId); 923 } catch (ex) { 924 // not handeled. 925 } 926 if (!$anchorTargetElement || $anchorTargetElement.length === 0) { 927 return; 928 } 929 e.preventDefault(); 930 _this2._showContainer($anchorTargetElement.get(0)); 931 return false; 932 }); 933 }, 934 _ensureBackdrop: function _ensureBackdrop() { 935 this._$backdrop = $("#" + domId.backdrop); 936 if (!this._$backdrop.length) { 937 this._$backdrop = $('<div class="lp-overlay__backdrop" />').hide().attr("id", domId.backdrop); 938 $("body").append(this._$backdrop); 939 } 940 }, 941 _setupReducedMotionListener: function _setupReducedMotionListener() { 942 var _this3 = this; 943 var mql = window.matchMedia("(prefers-reduced-motion: reduce)"); 944 var onMqlChange = function onMqlChange() { 945 if (mql.matches) { 946 _this3._animationDuration = 1; 947 } else { 948 _this3._animationDuration = _this3.state.animationDuration; 949 } 950 }; 951 mql.addListener(onMqlChange); 952 onMqlChange(); 953 }, 954 _setupBreakpointListener: function _setupBreakpointListener() { 955 var _this4 = this; 956 var mqlButton = window.matchMedia(this.state.breakpoints); 957 var onMqlButtonChange = function onMqlButtonChange() { 958 if (mqlButton.matches) { 959 _this4._ensureContent(); 960 if (!isOnline()) { 961 _this4.$el.parent().show(); 962 } 963 } else { 964 if (!isOnline()) { 965 _this4.$el.parent().hide(); 966 } 967 _this4._hideContainer(); 968 _this4._returnContent(); 969 } 970 }; 971 mqlButton.addListener(onMqlButtonChange); 972 onMqlButtonChange(); 973 this.state.elements.reduce(function (elementList, element) { 974 var globalContext = _this4; 975 var $elements = $(element); 976 $elements.each(function () { 977 var mql = window.matchMedia(element.mediaQuery); 978 var onMqlElementChange = function onMqlElementChange() { 979 globalContext._ensureContent(); 980 }; 981 mql.addListener(onMqlElementChange); 982 }); 983 return elementList; 984 }, []); 985 }, 986 _ensureContent: function _ensureContent() { 987 this._returnContent(); 988 this._hasMovedContent = true; 989 var $content = this._$container.find(".lp-overlay__content");
990 this.state.elements.forEach(function (element) { 991 var $elements = $(element.selector); 992 $elements.each(function () { 993 var $elem = $(this); 994 if (window.matchMedia(element.mediaQuery).matches) { 995 var $locationHolder = document.createComment("".concat(element.selector)); 996 $elem.before($locationHolder); 997 $elem.data("orig-location", $locationHolder); 998 $content.append($elem); 999 } 1000 }); 1001 }); 1002 this._triggerCustomEvent("content-moved"); 1003 }, 1004 _returnContent: function _returnContent() { 1005 if (!this._hasMovedContent) { 1006 return; 1007 } 1008 this._hasMovedContent = false; 1009 var $content = this._$container.find(".lp-overlay__content"); 1010 $content.children().each(function () { 1011 var $elem = $(this); 1012 var $locationHolder = $elem.data("orig-location"); 1013 $elem.insertAfter($locationHolder); 1014 $elem.data("orig-location", null); 1015 $locationHolder.remove(); 1016 }); 1017 this._triggerCustomEvent("content-restored"); 1018 }, 1019 _createContainer: function _createContainer() { 1020 var _this5 = this; 1021 var $container = $(overlayTemplate(_objectSpread({}, this.state))).appendTo("body").hide(); 1022 $container.on("click", "[data-action-close-overlay]", function () { 1023 _this5._hideContainer(); 1024 }); 1025 this._$inner = $container.find(".lp-overlay__inner"); 1026 this._$inner.on("transitionend animationend", function (e) { 1027 if (e.target === _this5._$inner.get(0)) { 1028 _this5._$inner.trigger(CUSTOM_END_EVENT); 1029 } 1030 }); 1031 this._containerId = domId.container; 1032 this._containerVisibleClass = domId.containerVisible; 1033 $container.attr("aria-hidden", "true"); 1034 $container.attr("id", this._containerId); 1035 this._focusTrap = FocusTrap.create($container.get(0), { 1036 onDeactivate: function onDeactivate() { 1037 _this5._hideContainer(); 1038 }, 1039 initialFocus: function initialFocus() { 1040 if (_this5._hasInputFocusHack) { 1041 setTimeout(function () { 1042 _this5._inputFocusHackElement.remove(); 1043 }, 20); 1044 } 1045 var focusableNodes = tabbable.tabbable($container.get(0)); 1046 if (focusableNodes.length === 1) { 1047 return focusableNodes[0]; 1048 } 1049 return focusableNodes[1]; 1050 }, 1051 clickOutsideDeactivates: true 1052 }); 1053 return $container; 1054 }, 1055 _addAdvancedInClasses: function _addAdvancedInClasses($container) { 1056 if (!this.state.useAdvancedAnimation) { 1057 return $container; 1058 } 1059 var animationClasses = "animate__animated animate__" + this.state.animationIn; 1060 var $inner = $container.find(".lp-overlay__inner"); 1061 $inner.addClass(animationClasses).one(CUSTOM_END_EVENT, function () { 1062 $inner.removeClass(animationClasses); 1063 }); 1064 return $container; 1065 }, 1066 _addAdvancedOutClasses: function _addAdvancedOutClasses($container) { 1067 if (!this.state.useAdvancedAnimation) { 1068 return $container; 1069 } 1070 var animationClasses = "animate__animated animate__" + this.state.animationOut; 1071 var $inner = $container.find(".lp-overlay__inner"); 1072 $inner.addClass(animationClasses).one(CUSTOM_END_EVENT, function () { 1073 $inner.removeClass(animationClasses); 1074 }); 1075 return $container; 1076 }, 1077 _isKeyboardableInput: function _isKeyboardableInput(elem) { 1078 if (!elem) { 1079 return false; 1080 } 1081 var $elem = $(elem); 1082 if ($elem.prop("tagName") !== "INPUT") { 1083 return false; 1084 } 1085 var type = $elem.attr("type") || "text"; 1086 return KEYBOARD_TYPES.indexOf(type) > -1; 1087 }, 1088 _createInputHackElement: function _createInputHackElement() { 1089 var $fakeInput = $("<input type='text' />").css({ 1090 position: "absolute", 1091 width: "200px", 1092 // zoom properly (iOS) 1093 height: 0, 1094 // hide cursor (font-size: 0 will zoom to quarks level) (iOS) 1095 opacity: 0 // make input transparent :] 1096 }); 1097 $fakeInput.appendTo(this._$container).trigger("focus"); 1098 return $fakeInput; 1099 }, 1100 _isVisible: false, 1101 _animating: false, 1102 _hasInputFocusHack: false, 1103 _inputFocusHackElement: null, 1104 _showContainer: function _showContainer() { 1105 var _tabbable$tabbable, 1106 _this6 = this; 1107 var firstFocusNode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; 1108 if (this._isVisible || this._animating) { 1109 return; 1110 } 1111 var scrollbarWidthPx = window.innerWidth - document.body.clientWidth; 1112 this._animating = true; 1113 $("body").addClass("lp-overlay-body--noscroll"); 1114 $("html").addClass("lp-overlay-html--noscroll").css("margin-right", scrollbarWidthPx); 1115 this._addAdvancedInClasses(this._$container.addClass("lp-overlay__container--visible").show().addClass(this._containerVisibleClass));
1116 this._$pageContainer.addClass("lp-overlay-page--hidden").addClass(domId.page).addClass(this._pageContainerHiddenClass); 1117 if (this.state.usePageTransform) { 1118 if (this.state.animationIn === "slideInDown") { 1119 this._$pageContainer.css("transform", "translateY(" + this._$inner.outerHeight() * this.state.pageTransformPercent + "px)"); 1120 } else if (this.state.animationIn === "slideInUp") { 1121 this._$pageContainer.css("transform", "translateY(-" + this._$inner.outerHeight() * this.state.pageTransformPercent + "px)"); 1122 } else if (this.state.animationIn === "slideInLeft") { 1123 this._$pageContainer.css("transform", "translateX(" + this._$inner.outerWidth() * this.state.pageTransformPercent + "px)"); 1124 } else if (this.state.animationIn === "slideInRight") { 1125 this._$pageContainer.css("transform", "translateX(-" + this._$inner.outerWidth() * this.state.pageTransformPercent + "px)"); 1126 } 1127 } 1128 this._$backdrop.css("height", $(document).height()).fadeIn(this._animationDuration); 1129 this._isVisible = true; 1130 var activeElement = null; 1131 if (this._isKeyboardableInput((_tabbable$tabbable = tabbable.tabbable(this._$container.get(0))) === null || _tabbable$tabbable === void 0 ? void 0 : _tabbable$tabbable[1])) { 1132 if (!firstFocusNode) { 1133 activeElement = document.activeElement; 1134 } 1135 this._hasInputFocusHack = true; 1136 this._inputFocusHackElement = this._createInputHackElement(); 1137 } 1138 this._$inner.one(CUSTOM_END_EVENT, function () { 1139 _this6._$pageContainer.attr("aria-hidden", "true"); 1140 _this6._$container.attr("aria-hidden", "false"); 1141 _this6._$container.attr("aria-modal", "true"); 1142 _this6._$button.attr("aria-expanded", "true"); 1143 _this6._focusTrap.activate({ 1144 initialFocus: firstFocusNode, 1145 activeElement: activeElement 1146 }); 1147 _this6._animating = false; 1148 _this6._triggerCustomEvent("opened"); 1149 }); 1150 this._triggerCustomEvent("open"); 1151 }, 1152 _hideContainer: function _hideContainer() { 1153 var _this7 = this; 1154 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 1155 if (!this._isVisible || this._animating) { 1156 return; 1157 } 1158 this._animating = true; 1159 this._addAdvancedOutClasses(this._$container.removeClass("lp-overlay__container--visible").removeClass(this._containerVisibleClass)); 1160 this._$inner.one(CUSTOM_END_EVENT, function () { 1161 _this7._$container.hide(); 1162 $("body").removeClass("lp-overlay-body--noscroll"); 1163 $("html").removeClass("lp-overlay-html--noscroll").css("margin-right", 0); 1164 _this7._$pageContainer.removeClass(domId.page); 1165 _this7._$pageContainer.attr("aria-hidden", "false"); 1166 _this7._$container.attr("aria-hidden", "true"); 1167 _this7._$container.removeAttr("aria-modal"); 1168 _this7._$button.attr("aria-expanded", "false"); 1169 _this7._focusTrap.deactivate((opts === null || opts === void 0 ? void 0 : opts.trapOptions) || {}); 1170 _this7._animating = false; 1171 _this7._triggerCustomEvent("closed"); 1172 }); 1173 this._$pageContainer.removeClass("lp-overlay-page--hidden").css("transform", "none").removeClass(this._pageContainerHiddenClass); 1174 this._$backdrop.fadeOut(this._animationDuration); 1175 this._isVisible = false; 1176 this._triggerCustomEvent("close"); 1177 }, 1178 _toggleContainer: function _toggleContainer() { 1179 if (!this._isVisible) { 1180 this._showContainer(); 1181 } else { 1182 this._hideContainer(); 1183 } 1184 }, 1185 _ensureContainer: function _ensureContainer() { 1186 if (!this._$container) { 1187 this._$container = this._createContainer(); 1188 } 1189 return this._$container; 1190 }, 1191 handleButtonClick: function handleButtonClick() { 1192 this._ensureContainer(); 1193 this._ensureContent(); 1194 this._toggleContainer(); 1195 }, 1196 filterState: function filterState(state) { 1197 return _objectSpread({}, state); 1198 } 1199 }); 1200});}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.