1/* modules/glyanec/drupal_noty_messages/misc/js/drupal_noty_messages.js */ 2(function ($) { 3 Drupal.behaviors.drupal_noty_messages = { 4 attach: function (context, settings){ 5 if (drupalSettings.drupal_noty_messages){ 6 if (drupalSettings.drupal_noty_messages.items && drupalSettings.drupal_noty_messages.items.length){ 7 for (i in drupalSettings.drupal_noty_messages.items) { 8 if(typeof drupalSettings.drupal_noty_messages.items[i].content != '') { 9 $(this).NotyGenerate(drupalSettings.drupal_noty_messages.items[i].type, drupalSettings.drupal_noty_messages.items[i].content); 10 } 11 } 12 delete drupalSettings.drupal_noty_messages.items; 13 } 14 } 15 }, 16 detach: function (context, settings){ 17 if (drupalSettings.drupal_noty_messages){ 18 if (drupalSettings.drupal_noty_messages.items && drupalSettings.drupal_noty_messages.items.length){ 19 for (i in drupalSettings.drupal_noty_messages.items) { 20 if(typeof drupalSettings.drupal_noty_messages.items[i].content != '') { 21 $(this).NotyGenerate(drupalSettings.drupal_noty_messages.items[i].type, drupalSettings.drupal_noty_messages.items[i].content); 22 } 23 } 24 delete drupalSettings.drupal_noty_messages.items; 25 } 26 } 27 } 28 } 29 $.fn.NotyGenerate = function(type, text){ 30 var n = noty({ 31 text : text, 32 type : type, 33 dismissQueue: true, 34 template : '<div class="noty_message"><div class="noty_text"></div><div class="noty_close"></div></div>', 35 layout : drupalSettings.drupal_noty_messages.settings.position, 36 closeWith : ['button', 'click'], 37 theme : 'relax', 38 killer : false, 39 timeout: drupalSettings.drupal_noty_messages.settings[type], 40 maxVisible : 15, 41 animation : { 42 open : drupalSettings.drupal_noty_messages.settings.open, 43 close : drupalSettings.drupal_noty_messages.settings.close, 44 easing: 'swing', 45 speed : 500 46 } 47 }); 48 if(drupalSettings.drupal_noty_messages.settings.close_all == 1){ 49 n.$bar.click(function(){ 50 $.noty.closeAll(); 51 }); 52 } 53 }; 54})(jQuery); 55/* !modules/glyanec/drupal_noty_messages/misc/js/drupal_noty_messages.js */; 56/* modules/glyanec/drupal_noty_messages/misc/js/jquery.noty.packaged.js */ 57!function(root, factory) { 58 if (typeof define === 'function' && define.amd) { 59 define(['jquery'], factory); 60 } else if (typeof exports === 'object') { 61 module.exports = factory(require('jquery')); 62 } else { 63 factory(root.jQuery); 64 } 65}(this, function($) { 66 67/*! 68 @package noty - jQuery Notification Plugin 69 @version version: 2.4.0 70 @contributors https://github.com/needim/noty/graphs/contributors 71 72 @documentation Examples and Documentation - http://needim.github.com/noty/ 73 74 @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php 75 */ 76 77if (typeof Object.create !== 'function') { 78 Object.create = function (o) { 79 function F() { 80 } 81 82 F.prototype = o; 83 return new F(); 84 }; 85} 86 87var NotyObject = { 88 89 init: function (options) { 90 91 // Mix in the passed in options with the default options 92 this.options = $.extend({}, $.noty.defaults, options); 93 94 this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout]; 95 96 if ($.noty.themes[this.options.theme]) { 97 this.options.theme = $.noty.themes[this.options.theme]; 98 if (this.options.theme.template) 99 this.options.template = this.options.theme.template; 100 101 if (this.options.theme.animation) 102 this.options.animation = this.options.theme.animation; 103 } 104 else { 105 this.options.themeClassName = this.options.theme; 106 } 107 108 this.options = $.extend({}, this.options, this.options.layout.options); 109 110 if (this.options.id) { 111 if ($.noty.store[this.options.id]) { 112 return $.noty.store[this.options.id]; 113 } 114 } else { 115 this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random() * 1000000)); 116 } 117 118 // Build the noty dom initial structure 119 this._build(); 120 121 // return this so we can chain/use the bridge with less code. 122 return this; 123 }, // end init 124 125 _build: function () { 126 127 // Generating noty bar 128 var $bar = $('<div class="noty_bar noty_type_' + this.options.type + '"></div>').attr('id', this.options.id); 129 $bar.append(this.options.template).find('.noty_text').html(this.options.text); 130 131 this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar; 132 133 if (this.options.themeClassName) 134 this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type); 135 136 // Set buttons if available 137 if (this.options.buttons) { 138 139 var $buttons; 140 // Try find container for buttons in presented template, and create it if not found 141 if (this.$bar.find('.noty_buttons').length > 0) { 142 $buttons = this.$bar.find('.noty_buttons'); 143 } else { 144 $buttons = $('<div/>').addClass('noty_buttons'); 145 (this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons); 146 } 147 148 var self = this; 149 150 $.each(this.options.buttons, function (i, button) { 151 var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i) 152 .attr('title', button.title) 153 .appendTo($buttons) 154 .on('click', function (event) { 155 if ($.isFunction(button.onClick)) { 156 button.onClick.call($button, self, event); 157 } 158 }); 159 }); 160 } else { 161 // If buttons is not available, then remove containers if exist 162 this.$bar.find('.noty_buttons').remove(); 163 } 164 165 if (this.options.progressBar && this.options.timeout) { 166 var $progressBar = $('<div/>').addClass('noty_progress_bar'); 167 (this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($progressBar) : this.$bar.append($progressBar); 168 } 169 170 // For easy access 171 this.$message = this.$bar.find('.noty_message'); 172 this.$closeButton = this.$bar.find('.noty_close'); 173 this.$buttons = this.$bar.find('.noty_buttons'); 174 this.$progressBar = this.$bar.find('.noty_progress_bar'); 175 176 $.noty.store[this.options.id] = this; // store noty for api 177 178 }, // end _build 179 180 show: function () { 181 182 var self = this; 183 184 (self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar); 185 186 if (self.options.theme && self.options.theme.style) 187 self.options.theme.style.apply(self); 188 189 ($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {}); 190 191 self.$bar.addClass(self.options.layout.addClass); 192 193 self.options.layout.container.style.apply($(self.options.layout.container.selector), [self.options.within]); 194 195 self.showing = true; 196 197 if (self.options.theme && self.options.theme.style) 198 self.options.theme.callback.onShow.apply(this); 199 200 if ($.inArray('click', self.options.closeWith) > -1) 201 self.$bar.css('cursor', 'pointer').on('click', function (evt) { 202 self.stopPropagation(evt); 203 if (self.options.callback.onCloseClick) { 204 self.options.callback.onCloseClick.apply(self); 205 } 206 self.close(); 207 }); 208 209 if ($.inArray('hover', self.options.closeWith) > -1) 210 self.$bar.one('mouseenter', function () { 211 self.close(); 212 }); 213 214 if ($.inArray('button', self.options.closeWith) > -1) 215 self.$closeButton.one('click', function (evt) { 216 self.stopPropagation(evt); 217 self.close(); 218 }); 219 220 if ($.inArray('button', self.options.closeWith) == -1) 221 self.$closeButton.remove(); 222 223 if (self.options.callback.beforeShow) 224 self.options.callback.beforeShow.apply(self); 225 226 if (typeof self.options.animation.open == 'string') { 227 self.animationTypeOpen = 'css';
228 self.$bar.css('min-height', self.$bar.innerHeight()); 229 self.$bar.on('click', function (e) { 230 self.wasClicked = true; 231 }); 232 self.$bar.show(); 233 234 if (self.options.callback.onShow) 235 self.options.callback.onShow.apply(self); 236 237 self.$bar.addClass(self.options.animation.open).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { 238 if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self); 239 self.showing = false; 240 self.shown = true; 241 self.bindTimeout(); 242 if (self.hasOwnProperty('wasClicked')) { 243 self.$bar.off('click', function (e) { 244 self.wasClicked = true; 245 }); 246 self.close(); 247 } 248 }); 249 250 } else if (typeof self.options.animation.open == 'object' && self.options.animation.open == null) { 251 self.animationTypeOpen = 'none'; 252 self.showing = false; 253 self.shown = true; 254 self.$bar.show(); 255 self.bindTimeout(); 256 257 if (self.options.callback.onShow) 258 self.options.callback.onShow.apply(self); 259 260 self.$bar.queue(function () { 261 if (self.options.callback.afterShow) 262 self.options.callback.afterShow.apply(self); 263 }); 264 265 } else { 266 self.animationTypeOpen = 'anim'; 267 268 if (self.options.callback.onShow) 269 self.options.callback.onShow.apply(self); 270 271 self.$bar.animate( 272 self.options.animation.open, 273 self.options.animation.speed, 274 self.options.animation.easing, 275 function () { 276 if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self); 277 self.showing = false; 278 self.shown = true; 279 self.bindTimeout(); 280 }); 281 } 282 283 return this; 284 285 }, // end show 286 287 bindTimeout: function() { 288 var self = this; 289 // If noty is have a timeout option 290 if (self.options.timeout) { 291 292 if (self.options.progressBar && self.$progressBar) { 293 self.$progressBar.css({ 294 transition: 'all 100ms linear' 295 }); 296 297 self.progressPercentage = (self.$progressBar.width() / (self.options.timeout / 100)); 298 299 self.intervalId = setInterval(function() { 300 self.$progressBar.width((self.$progressBar.width() - self.progressPercentage)); 301 }, 100); 302 } 303 304 self.queueClose(self.options.timeout); 305 self.$bar.on('mouseenter', self.dequeueClose.bind(self)); 306 self.$bar.on('mouseleave', self.queueClose.bind(self, self.options.timeout)); 307 } 308 309 }, 310 311 dequeueClose: function () { 312 if (this.intervalId) { 313 clearInterval(this.intervalId); 314 this.$progressBar.css('width', '100%'); 315 this.intervalId = null; 316 } 317 318 if (!this.closeTimer) return; 319 clearTimeout(this.closeTimer); 320 this.closeTimer = null; 321 }, 322 323 queueClose: function (timeout) { 324 var self = this; 325 326 if (!self.intervalId && self.options.progressBar) { 327 self.intervalId = setInterval(function() { 328 self.$progressBar.width((self.$progressBar.width() - self.progressPercentage)); 329 }, 100); 330 } 331 332 if (this.closeTimer) return; 333 self.closeTimer = window.setTimeout(function () { 334 self.close(); 335 }, timeout); 336 return self.closeTimer 337 }, 338 339 close: function () { 340 if (this.intervalId) { 341 clearInterval(this.intervalId); 342 this.intervalId = null; 343 344 if (this.$progressBar) { 345 this.$progressBar.css('width', '0%'); 346 } 347 } 348 349 if (this.closeTimer) this.dequeueClose(); 350 351 if (this.closed) return; 352 if (this.$bar && this.$bar.hasClass('i-am-closing-now')) return; 353 354 var self = this; 355 356 if (this.showing && (this.animationTypeOpen == 'anim' || this.animationTypeOpen == 'none')) { 357 self.$bar.queue( 358 function () { 359 self.close.apply(self); 360 } 361 ); 362 return; 363 } else if (this.showing && this.animationTypeOpen == 'css') { 364 self.$bar.on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { 365 self.close(); 366 }); 367 } 368 369 if (!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue 370 var queue = []; 371 $.each($.noty.queue, function (i, n) { 372 if (n.options.id != self.options.id) { 373 queue.push(n); 374 } 375 }); 376 $.noty.queue = queue; 377 return; 378 } 379 380 self.$bar.addClass('i-am-closing-now'); 381 382 if (self.options.callback.onClose) { 383 self.options.callback.onClose.apply(self); 384 } 385 386 if (typeof self.options.animation.close == 'string') { 387 self.$bar.removeClass(self.options.animation.open).addClass(self.options.animation.close).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { 388 if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self); 389 self.closeCleanUp(); 390 }); 391 392 } else if (typeof self.options.animation.close == 'object' && self.options.animation.close == null) { 393 self.$bar.dequeue().hide(0, function() { 394 if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self); 395 self.closeCleanUp(); 396 }); 397 398 } else { 399 self.$bar.clearQueue().stop().animate( 400 self.options.animation.close, 401 self.options.animation.speed, 402 self.options.animation.easing, 403 function () { 404 if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self); 405 }) 406 .promise().done(function () { 407 self.closeCleanUp(); 408 }); 409 } 410 411 }, // end close 412 413 closeCleanUp: function () { 414 415 var self = this; 416 417 // Modal Cleaning 418 if (self.options.modal) { 419 $.notyRenderer.setModalCount(-1); 420 if ($.notyRenderer.getModalCount() == 0 && !$.noty.queue.length) $('.noty_modal').fadeOut(self.options.animation.fadeSpeed, function () { 421 $(this).remove(); 422 }); 423 } 424 425 // Layout Cleaning 426 $.notyRenderer.setLayoutCountFor(self, -1); 427 if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove(); 428 429 // Make sure self.$bar has not been removed before attempting to remove it 430 if (typeof self.$bar !== 'undefined' && self.$bar !== null) { 431 432 if (typeof self.options.animation.close == 'string') { 433 self.$bar.css('transition', 'all 10ms ease').css('border', 0).css('margin', 0).height(0); 434 self.$bar.one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function () { 435 self.$bar.remove(); 436 self.$bar = null; 437 self.closed = true; 438 439 if (self.options.theme.callback && self.options.theme.callback.onClose) { 440 self.options.theme.callback.onClose.apply(self); 441 } 442 443 self.handleNext(); 444 }); 445 } else { 446 self.$bar.remove(); 447 self.$bar = null; 448 self.closed = true; 449 450 self.handleNext(); 451 } 452 } else { 453 self.handleNext(); 454 } 455 456 }, // end close clean up 457 458 handleNext: function () { 459 var self = this; 460 461 delete $.noty.store[self.options.id]; // deleting noty from store 462 463 if (self.options.theme.callback && self.options.theme.callback.onClose) { 464 self.options.theme.callback.onClose.apply(self); 465 } 466 467 if (!self.options.dismissQueue) { 468 // Queue render 469 $.noty.ontap = true; 470 471 $.notyRenderer.render(); 472 } 473 474 if (self.options.maxVisible > 0 && self.options.dismissQueue) { 475 $.notyRenderer.render(); 476 } 477 }, 478 479 setText: function (text) { 480 if (!this.closed) { 481 this.options.text = text; 482 this.$bar.find('.noty_text').html(text); 483 } 484 return this; 485 }, 486 487 setType: function (type) { 488 if (!this.closed) { 489 this.options.type = type; 490 this.options.theme.style.apply(this); 491 this.options.theme.callback.onShow.apply(this); 492 } 493 return this; 494 }, 495 496 setTimeout: function (time) { 497 if (!this.closed) { 498 var self = this; 499 this.options.timeout = time; 500 self.$bar.delay(self.options.timeout).promise().done(function () { 501 self.close(); 502 }); 503 } 504 return this; 505 }, 506 507 stopPropagation: function (evt) { 508 evt = evt || window.event; 509 if (typeof evt.stopPropagation !== "undefined") { 510 evt.stopPropagation(); 511 } 512 else { 513 evt.cancelBubble = true; 514 } 515 }, 516 517 closed : false, 518 showing: false, 519 shown : false 520 521}; // end NotyObject 522 523$.notyRenderer = {}; 524 525$.notyRenderer.init = function (options) { 526 527 // Renderer creates a new noty 528 var notification = Object.create(NotyObject).init(options); 529 530 if (notification.options.killer) 531 $.noty.closeAll(); 532 533 (notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification); 534 535 $.notyRenderer.render(); 536 537 return ($.noty.returns == 'object') ? notification : notification.options.id; 538}; 539 540$.notyRenderer.render = function () { 541 542 var instance = $.noty.queue[0]; 543 544 if ($.type(instance) === 'object') { 545 if (instance.options.dismissQueue) { 546 if (instance.options.maxVisible > 0) { 547 if ($(instance.options.layout.container.selector + ' > li').length < instance.options.maxVisible) { 548 $.notyRenderer.show($.noty.queue.shift()); 549 } 550 else { 551 552 } 553 } 554 else { 555 $.notyRenderer.show($.noty.queue.shift()); 556 } 557 } 558 else { 559 if ($.noty.ontap) { 560 $.notyRenderer.show($.noty.queue.shift()); 561 $.noty.ontap = false;
562 } 563 } 564 } 565 else { 566 $.noty.ontap = true; // Queue is over 567 } 568 569}; 570 571$.notyRenderer.show = function (notification) { 572 573 if (notification.options.modal) { 574 $.notyRenderer.createModalFor(notification); 575 $.notyRenderer.setModalCount(+1); 576 } 577 578 // Where is the container? 579 if (notification.options.custom) { 580 if (notification.options.custom.find(notification.options.layout.container.selector).length == 0) { 581 notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new')); 582 } 583 else { 584 notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new'); 585 } 586 } 587 else { 588 if ($(notification.options.layout.container.selector).length == 0) { 589 $('body').append($(notification.options.layout.container.object).addClass('i-am-new')); 590 } 591 else { 592 $(notification.options.layout.container.selector).removeClass('i-am-new'); 593 } 594 } 595 596 $.notyRenderer.setLayoutCountFor(notification, +1); 597 598 notification.show(); 599}; 600 601$.notyRenderer.createModalFor = function (notification) { 602 if ($('.noty_modal').length == 0) { 603 var modal = $('<div/>').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0); 604 605 if (notification.options.theme.modal && notification.options.theme.modal.css) 606 modal.css(notification.options.theme.modal.css); 607 608 modal.prependTo($('body')).fadeIn(notification.options.animation.fadeSpeed); 609 610 if ($.inArray('backdrop', notification.options.closeWith) > -1) 611 modal.on('click', function () { 612 $.noty.closeAll(); 613 }); 614 } 615}; 616 617$.notyRenderer.getLayoutCountFor = function (notification) { 618 return $(notification.options.layout.container.selector).data('noty_layout_count') || 0; 619}; 620 621$.notyRenderer.setLayoutCountFor = function (notification, arg) { 622 return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg); 623}; 624 625$.notyRenderer.getModalCount = function () { 626 return $('.noty_modal').data('noty_modal_count') || 0; 627}; 628 629$.notyRenderer.setModalCount = function (arg) { 630 return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg); 631}; 632 633// This is for custom container 634$.fn.noty = function (options) { 635 options.custom = $(this); 636 return $.notyRenderer.init(options); 637}; 638 639$.noty = {}; 640$.noty.queue = []; 641$.noty.ontap = true; 642$.noty.layouts = {}; 643$.noty.themes = {}; 644$.noty.returns = 'object'; 645$.noty.store = {}; 646 647$.noty.get = function (id) { 648 return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false; 649}; 650 651$.noty.close = function (id) { 652 return $.noty.get(id) ? $.noty.get(id).close() : false; 653}; 654 655$.noty.setText = function (id, text) { 656 return $.noty.get(id) ? $.noty.get(id).setText(text) : false; 657}; 658 659$.noty.setType = function (id, type) { 660 return $.noty.get(id) ? $.noty.get(id).setType(type) : false; 661}; 662 663$.noty.clearQueue = function () { 664 $.noty.queue = []; 665}; 666 667$.noty.closeAll = function () { 668 $.noty.clearQueue(); 669 $.each($.noty.store, function (id, noty) { 670 noty.close(); 671 }); 672}; 673 674var windowAlert = window.alert; 675 676$.noty.consumeAlert = function (options) { 677 window.alert = function (text) { 678 if (options) 679 options.text = text; 680 else 681 options = {text: text}; 682 683 $.notyRenderer.init(options); 684 }; 685}; 686 687$.noty.stopConsumeAlert = function () { 688 window.alert = windowAlert; 689}; 690 691$.noty.defaults = { 692 layout : 'topRight', 693 theme : 'relax', 694 type : 'alert', 695 text : '', 696 progressBar : false, 697 dismissQueue: true, 698 template : '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>', 699 animation : { 700 open : {height: 'toggle'}, 701 close : {height: 'toggle'}, 702 easing : 'swing', 703 speed : 500, 704 fadeSpeed: 'fast' 705 }, 706 timeout : false, 707 force : false, 708 modal : false, 709 maxVisible : 5, 710 killer : false, 711 closeWith : ['click'], 712 callback : { 713 beforeShow : function () { 714 }, 715 onShow : function () { 716 }, 717 afterShow : function () { 718 }, 719 onClose : function () { 720 }, 721 afterClose : function () { 722 }, 723 onCloseClick: function () { 724 } 725 }, 726 buttons : false 727}; 728 729$(window).on('resize', function () { 730 $.each($.noty.layouts, function (index, layout) { 731 layout.container.style.apply($(layout.container.selector)); 732 }); 733}); 734 735// Helpers 736window.noty = function noty(options) { 737 return $.notyRenderer.init(options); 738}; 739 740$.noty.layouts.bottom = { 741 name : 'bottom', 742 options : {}, 743 container: { 744 object : '<ul id="noty_bottom_layout_container" />', 745 selector: 'ul#noty_bottom_layout_container', 746 style : function() { 747 $(this).css({ 748 bottom : 0, 749 left : '5%', 750 position : 'fixed', 751 width : '90%', 752 height : 'auto', 753 margin : 0, 754 padding : 0, 755 listStyleType: 'none', 756 zIndex : 9999999 757 }); 758 } 759 }, 760 parent : { 761 object : '<li />', 762 selector: 'li', 763 css : {} 764 }, 765 css : { 766 display: 'none' 767 }, 768 addClass : '' 769}; 770 771$.noty.layouts.bottomCenter = { 772 name : 'bottomCenter', 773 options : { // overrides options 774 775 }, 776 container: { 777 object : '<ul id="noty_bottomCenter_layout_container" />', 778 selector: 'ul#noty_bottomCenter_layout_container', 779 style : function() { 780 $(this).css({ 781 bottom : 20, 782 left : 0, 783 position : 'fixed', 784 width : '310px', 785 height : 'auto', 786 margin : 0, 787 padding : 0, 788 listStyleType: 'none', 789 zIndex : 10000000 790 }); 791 792 $(this).css({ 793 left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px' 794 }); 795 } 796 }, 797 parent : { 798 object : '<li />', 799 selector: 'li', 800 css : {} 801 }, 802 css : { 803 display: 'none', 804 width : '310px' 805 }, 806 addClass : '' 807}; 808 809 810$.noty.layouts.bottomLeft = { 811 name : 'bottomLeft', 812 options : { // overrides options 813 814 }, 815 container: { 816 object : '<ul id="noty_bottomLeft_layout_container" />', 817 selector: 'ul#noty_bottomLeft_layout_container', 818 style : function() { 819 $(this).css({ 820 bottom : 20, 821 left : 20, 822 position : 'fixed', 823 width : '310px', 824 height : 'auto', 825 margin : 0, 826 padding : 0, 827 listStyleType: 'none', 828 zIndex : 10000000 829 }); 830 831 if(window.innerWidth < 600) { 832 $(this).css({ 833 left: 5 834 }); 835 } 836 } 837 }, 838 parent : { 839 object : '<li />', 840 selector: 'li', 841 css : {} 842 }, 843 css : { 844 display: 'none', 845 width : '310px' 846 }, 847 addClass : '' 848}; 849$.noty.layouts.bottomRight = { 850 name : 'bottomRight', 851 options : { // overrides options 852 853 }, 854 container: { 855 object : '<ul id="noty_bottomRight_layout_container" />', 856 selector: 'ul#noty_bottomRight_layout_container', 857 style : function() { 858 $(this).css({ 859 bottom : 20, 860 right : 20, 861 position : 'fixed', 862 width : '310px', 863 height : 'auto', 864 margin : 0, 865 padding : 0, 866 listStyleType: 'none', 867 zIndex : 10000000 868 }); 869 870 if(window.innerWidth < 600) { 871 $(this).css({ 872 right: 5 873 }); 874 } 875 } 876 }, 877 parent : { 878 object : '<li />', 879 selector: 'li', 880 css : {} 881 }, 882 css : { 883 display: 'none', 884 width : '310px' 885 }, 886 addClass : '' 887}; 888$.noty.layouts.center = { 889 name : 'center', 890 options : { // overrides options 891 892 }, 893 container: { 894 object : '<ul id="noty_center_layout_container" />', 895 selector: 'ul#noty_center_layout_container', 896 style : function() { 897 $(this).css({ 898 position : 'fixed', 899 width : '310px', 900 height : 'auto', 901 margin : 0, 902 padding : 0, 903 listStyleType: 'none', 904 zIndex : 10000000 905 }); 906 907 // getting hidden height 908 var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe'); 909 $("body").append(dupe); 910 dupe.find('.i-am-closing-now').remove(); 911 dupe.find('li').css('display', 'block'); 912 var actual_height = dupe.height(); 913 dupe.remove(); 914 915 if($(this).hasClass('i-am-new')) { 916 $(this).css({ 917 left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px', 918 top : ($(window).height() - actual_height) / 2 + 'px' 919 }); 920 } 921 else { 922 $(this).animate({ 923 left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px', 924 top : ($(window).height() - actual_height) / 2 + 'px' 925 }, 500); 926 } 927 928 } 929 }, 930 parent : { 931 object : '<li />', 932 selector: 'li', 933 css : {} 934 }, 935 css : { 936 display: 'none', 937 width : '310px' 938 }, 939 addClass : '' 940}; 941$.noty.layouts.centerLeft = { 942 name : 'centerLeft', 943 options : { // overrides options 944 945 }, 946 container: { 947 object : '<ul id="noty_centerLeft_layout_container" />', 948 selector: 'ul#noty_centerLeft_layout_container', 949 style : function() { 950 $(this).css({ 951 left : 20, 952 position : 'fixed', 953 width : '310px', 954 height : 'auto', 955 margin : 0, 956 padding : 0, 957 listStyleType: 'none', 958 zIndex : 10000000 959 }); 960 961 // getting hidden height 962 var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe'); 963 $("body").append(dupe); 964 dupe.find('.i-am-closing-now').remove(); 965 dupe.find('li').css('display', 'block'); 966 var actual_height = dupe.height(); 967 dupe.remove(); 968 969 if($(this).hasClass('i-am-new')) { 970 $(this).css({ 971 top: ($(window).height() - actual_height) / 2 + 'px' 972 }); 973 } 974 else { 975 $(this).animate({ 976 top: ($(window).height() - actual_height) / 2 + 'px' 977 }, 500); 978 } 979 980 if(window.innerWidth < 600) { 981 $(this).css({ 982 left: 5 983 }); 984 } 985 986 } 987 }, 988 parent : { 989 object : '<li />', 990 selector: 'li', 991 css : {} 992 }, 993 css : { 994 display: 'none', 995 width : '310px' 996 }, 997 addClass : '' 998}; 999 1000$.noty.layouts.centerRight = { 1001 name : 'centerRight', 1002 options : { // overrides options 1003 1004 }, 1005 container: { 1006 object : '<ul id="noty_centerRight_layout_container" />', 1007 selector: 'ul#noty_centerRight_layout_container', 1008 style : function() { 1009 $(this).css({ 1010 right : 20, 1011 position : 'fixed', 1012 width : '310px', 1013 height : 'auto', 1014 margin : 0, 1015 padding : 0, 1016 listStyleType: 'none', 1017 zIndex : 10000000 1018 }); 1019 1020 // getting hidden height 1021 var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe'); 1022 $("body").append(dupe); 1023 dupe.find('.i-am-closing-now').remove(); 1024 dupe.find('li').css('display', 'block'); 1025 var actual_height = dupe.height(); 1026 dupe.remove(); 1027 1028 if($(this).hasClass('i-am-new')) { 1029 $(this).css({ 1030 top: ($(window).height() - actual_height) / 2 + 'px' 1031 }); 1032 } 1033 else { 1034 $(this).animate({ 1035 top: ($(window).height() - actual_height) / 2 + 'px' 1036 }, 500); 1037 } 1038 1039 if(window.innerWidth < 600) { 1040 $(this).css({ 1041 right: 5 1042 }); 1043 } 1044 1045 } 1046 }, 1047 parent : { 1048 object : '<li />', 1049 selector: 'li', 1050 css : {} 1051 }, 1052 css : { 1053 display: 'none', 1054 width : '310px' 1055 }, 1056 addClass : '' 1057}; 1058$.noty.layouts.inline = { 1059 name : 'inline', 1060 options : {}, 1061 container: { 1062 object : '<ul class="noty_inline_layout_container" />', 1063 selector: 'ul.noty_inline_layout_container', 1064 style : function() { 1065 $(this).css({ 1066 width : '100%', 1067 height : 'auto', 1068 margin : 0, 1069 padding : 0, 1070 listStyleType: 'none', 1071 zIndex : 9999999 1072 }); 1073 } 1074 }, 1075 parent : { 1076 object : '<li />', 1077 selector: 'li', 1078 css : {} 1079 }, 1080 css : { 1081 display: 'none' 1082 }, 1083 addClass : '' 1084}; 1085$.noty.layouts.top = { 1086 name : 'top', 1087 options : {}, 1088 container: { 1089 object : '<ul id="noty_top_layout_container" />', 1090 selector: 'ul#noty_top_layout_container', 1091 style : function() { 1092 $(this).css({ 1093 top : 0, 1094 left : '5%', 1095 position : 'fixed', 1096 width : '90%', 1097 height : 'auto', 1098 margin : 0, 1099 padding : 0, 1100 listStyleType: 'none', 1101 zIndex : 9999999 1102 }); 1103 } 1104 }, 1105 parent : { 1106 object : '<li />', 1107 selector: 'li', 1108 css : {} 1109 }, 1110 css : { 1111 display: 'none' 1112 }, 1113 addClass : '' 1114}; 1115$.noty.layouts.topCenter = { 1116 name : 'topCenter', 1117 options : { // overrides options 1118 1119 }, 1120 container: { 1121 object : '<ul id="noty_topCenter_layout_container" />', 1122 selector: 'ul#noty_topCenter_layout_container', 1123 style : function() { 1124 $(this).css({ 1125 top : 20, 1126 left : 0, 1127 position : 'fixed', 1128 width : '310px', 1129 height : 'auto', 1130 margin : 0, 1131 padding : 0, 1132 listStyleType: 'none', 1133 zIndex : 10000000 1134 }); 1135 1136 $(this).css({ 1137 left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px' 1138 }); 1139 } 1140 }, 1141 parent : { 1142 object : '<li />', 1143 selector: 'li', 1144 css : {} 1145 }, 1146 css : { 1147 display: 'none', 1148 width : '310px' 1149 }, 1150 addClass : '' 1151}; 1152 1153$.noty.layouts.topLeft = { 1154 name : 'topLeft', 1155 options : { // overrides options 1156 1157 }, 1158 container: { 1159 object : '<ul id="noty_topLeft_layout_container" />', 1160 selector: 'ul#noty_topLeft_layout_container', 1161 style : function() { 1162 $(this).css({ 1163 top : 20, 1164 left : 20, 1165 position : 'fixed', 1166 width : '310px', 1167 height
1167 : 'auto', 1168 margin : 0, 1169 padding : 0, 1170 listStyleType: 'none', 1171 zIndex : 10000000 1172 }); 1173 1174 if(window.innerWidth < 600) { 1175 $(this).css({ 1176 left: 5 1177 }); 1178 } 1179 } 1180 }, 1181 parent : { 1182 object : '<li />', 1183 selector: 'li', 1184 css : {} 1185 }, 1186 css : { 1187 display: 'none', 1188 width : '310px' 1189 }, 1190 addClass : '' 1191}; 1192$.noty.layouts.topRight = { 1193 name : 'topRight', 1194 options : { // overrides options 1195 1196 }, 1197 container: { 1198 object : '<ul id="noty_topRight_layout_container" />', 1199 selector: 'ul#noty_topRight_layout_container', 1200 style : function() { 1201 $(this).css({ 1202 top : 20, 1203 right : 20, 1204 position : 'fixed', 1205 width : '310px', 1206 height : 'auto', 1207 margin : 0, 1208 padding : 0, 1209 listStyleType: 'none', 1210 zIndex : 10000000 1211 }); 1212 1213 if(window.innerWidth < 600) { 1214 $(this).css({ 1215 right: 5 1216 }); 1217 } 1218 } 1219 }, 1220 parent : { 1221 object : '<li />', 1222 selector: 'li', 1223 css : {} 1224 }, 1225 css : { 1226 display: 'none', 1227 width : '310px' 1228 }, 1229 addClass : '' 1230}; 1231$.noty.themes.bootstrapTheme = { 1232 name : 'bootstrapTheme', 1233 modal : { 1234 css: { 1235 position : 'fixed', 1236 width : '100%', 1237 height : '100%', 1238 backgroundColor: '#000', 1239 zIndex : 10000, 1240 opacity : 0.6, 1241 display : 'none', 1242 left : 0, 1243 top : 0, 1244 wordBreak : 'break-all' 1245 } 1246 }, 1247 style : function () { 1248 1249 var containerSelector = this.options.layout.container.selector; 1250 $(containerSelector).addClass('list-group'); 1251 1252 this.$closeButton.append('<span aria-hidden="true">×</span><span class="sr-only">Close</span>'); 1253 this.$closeButton.addClass('close'); 1254
1255 this.$bar.addClass("list-group-item").css('padding', '0px').css('position', 'relative'); 1256 1257 this.$progressBar.css({ 1258 position : 'absolute', 1259 left : 0, 1260 bottom : 0, 1261 height : 4, 1262 width : '100%', 1263 backgroundColor: '#000000', 1264 opacity : 0.2, 1265 '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)', 1266 filter : 'alpha(opacity=20)' 1267 }); 1268 1269 switch (this.options.type) { 1270 case 'alert': 1271 case 'notification': 1272 this.$bar.addClass("list-group-item-info"); 1273 break; 1274 case 'warning': 1275 this.$bar.addClass("list-group-item-warning"); 1276 break; 1277 case 'error': 1278 this.$bar.addClass("list-group-item-danger"); 1279 break; 1280 case 'information': 1281 this.$bar.addClass("list-group-item-info"); 1282 break; 1283 case 'success': 1284 this.$bar.addClass("list-group-item-success"); 1285 break; 1286 } 1287 1288 this.$message.css({ 1289 textAlign: 'center', 1290 padding : '8px 10px 9px', 1291 width : 'auto', 1292 position : 'relative' 1293 }); 1294 }, 1295 callback: { 1296 onShow : function () { }, 1297 onClose: function () { } 1298 } 1299}; 1300 1301 1302$.noty.themes.defaultTheme = { 1303 name : 'defaultTheme', 1304 helpers : { 1305 borderFix: function () { 1306 if (this.options.dismissQueue) { 1307 var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector; 1308 switch (this.options.layout.name) { 1309 case 'top': 1310 $(selector).css({borderRadius: '0px 0px 0px 0px'}); 1311 $(selector).last().css({borderRadius: '0px 0px 5px 5px'}); 1312 break; 1313 case 'topCenter': 1314 case 'topLeft': 1315 case 'topRight': 1316 case 'bottomCenter': 1317 case 'bottomLeft': 1318 case 'bottomRight': 1319 case 'center': 1320 case 'centerLeft': 1321 case 'centerRight': 1322 case 'inline': 1323 $(selector).css({borderRadius: '0px 0px 0px 0px'}); 1324 $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'}); 1325 $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); 1326 break; 1327 case 'bottom': 1328 $(selector).css({borderRadius: '0px 0px 0px 0px'}); 1329 $(selector).first().css({borderRadius: '5px 5px 0px 0px'}); 1330 break; 1331 default: 1332 break; 1333 } 1334 } 1335 } 1336 }, 1337 modal : { 1338 css: { 1339 position : 'fixed', 1340 width : '100%', 1341 height : '100%', 1342 backgroundColor: '#000', 1343 zIndex : 10000, 1344 opacity : 0.6, 1345 display : 'none', 1346 left : 0, 1347 top : 0 1348 } 1349 }, 1350 style : function () { 1351 1352 this.$bar.css({ 1353 overflow : 'hidden', 1354 background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAQAAAClM0ndAAAAhklEQVR4AdXO0QrCMBBE0bttkk38/w8WRERpdyjzVOc+HxhIHqJGMQcFFkpYRQotLLSw0IJ5aBdovruMYDA/kT8plF9ZKLFQcgF18hDj1SbQOMlCA4kao0iiXmah7qBWPdxpohsgVZyj7e5I9KcID+EhiDI5gxBYKLBQYKHAQoGFAoEks/YEGHYKB7hFxf0AAAAASUVORK5CYII=') repeat-x scroll left top #fff", 1355 position : 'relative' 1356 }); 1357 1358 this.$progressBar.css({ 1359 position : 'absolute', 1360 left : 0, 1361 bottom : 0, 1362 height : 4, 1363 width : '100%', 1364 backgroundColor: '#000000', 1365 opacity : 0.2, 1366 '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)', 1367 filter : 'alpha(opacity=20)' 1368 }); 1369 1370 this.$message.css({ 1371 textAlign: 'center', 1372 padding : '8px 10px 9px', 1373 width : 'auto', 1374 position : 'relative' 1375 }); 1376 1377 this.$closeButton.css({ 1378 position : 'absolute', 1379 top : 4, right: 4, 1380 width : 10, height: 10, 1381 background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)", 1382 display : 'none', 1383 cursor : 'pointer' 1384 }); 1385 1386 this.$buttons.css({ 1387 padding : 5, 1388 textAlign : 'right', 1389 borderTop : '1px solid #ccc', 1390 backgroundColor: '#fff' 1391 }); 1392 1393 this.$buttons.find('button').css({ 1394 marginLeft: 5 1395 }); 1396 1397 this.$buttons.find('button:first').css({ 1398 marginLeft: 0 1399 }); 1400 1401 this.$bar.on({ 1402 mouseenter: function () { 1403 $(this).find('.noty_close').stop().fadeTo('normal', 1); 1404 }, 1405 mouseleave: function () { 1406 $(this).find('.noty_close').stop().fadeTo('normal', 0); 1407 } 1408 }); 1409 1410 switch (this.options.layout.name) { 1411 case 'top': 1412 this.$bar.css({ 1413 borderRadius: '0px 0px 5px 5px', 1414 borderBottom: '2px solid #eee', 1415 borderLeft : '2px solid #eee', 1416 borderRight : '2px solid #eee', 1417 boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)" 1418 }); 1419 break; 1420 case 'topCenter': 1421 case 'center': 1422 case 'bottomCenter': 1423 case 'inline': 1424 this.$bar.css({ 1425 borderRadius: '5px', 1426 border : '1px solid #eee', 1427 boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)" 1428 }); 1429 this.$message.css({textAlign: 'center'}); 1430 break; 1431 case 'topLeft': 1432 case 'topRight': 1433 case 'bottomLeft': 1434 case 'bottomRight': 1435 case 'centerLeft': 1436 case 'centerRight': 1437 this.$bar.css({ 1438 borderRadius: '5px', 1439 border : '1px solid #eee', 1440 boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)" 1441 }); 1442 this.$message.css({textAlign: 'left'}); 1443 break; 1444 case 'bottom': 1445 this.$bar.css({ 1446 borderRadius: '5px 5px 0px 0px', 1447 borderTop : '2px solid #eee', 1448 borderLeft : '2px solid #eee', 1449 borderRight : '2px solid #eee', 1450 boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)" 1451 }); 1452 break; 1453 default: 1454 this.$bar.css({ 1455 border : '2px solid #eee', 1456 boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)" 1457 }); 1458 break; 1459 } 1460 switch (this.options.type) { 1461 case 'alert': 1462 case 'notification':
1463 this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); 1464 break; 1465 case 'warning': 1466 this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'}); 1467 this.$buttons.css({borderTop: '1px solid #FFC237'}); 1468 break; 1469 case 'error': 1470 this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'}); 1471 this.$message.css({fontWeight: 'bold'}); 1472 this.$buttons.css({borderTop: '1px solid darkred'}); 1473 break; 1474 case 'information': 1475 this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'}); 1476 this.$buttons.css({borderTop: '1px solid #0B90C4'}); 1477 break; 1478 case 'success': 1479 this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'}); 1480 this.$buttons.css({borderTop: '1px solid #50C24E'}); 1481 break; 1482 default: 1483 this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); 1484 break; 1485 } 1486 }, 1487 callback: { 1488 onShow : function () { 1489 $.noty.themes.defaultTheme.helpers.borderFix.apply(this); 1490 }, 1491 onClose: function () { 1492 $.noty.themes.defaultTheme.helpers.borderFix.apply(this); 1493 } 1494 } 1495}; 1496 1497$.noty.themes.metroui = { 1498 name : 'metroui', 1499 helpers : {}, 1500 modal : { 1501 css: { 1502 position : 'fixed', 1503 width : '100%', 1504 height : '100%', 1505 backgroundColor: '#000', 1506 zIndex : 10000, 1507 opacity : 0.6, 1508 display : 'none', 1509 left : 0, 1510 top : 0 1511 } 1512 }, 1513 style : function () { 1514 1515 this.$bar.css({ 1516 overflow : 'hidden', 1517 margin : '4px 0', 1518 borderRadius: '0', 1519 position : 'relative' 1520 }); 1521 1522 this.$progressBar.css({ 1523 position : 'absolute', 1524 left : 0, 1525 bottom : 0, 1526 height : 4, 1527 width : '100%', 1528 backgroundColor: '#000000', 1529 opacity : 0.2, 1530 '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)', 1531 filter : 'alpha(opacity=20)' 1532 }); 1533 1534 this.$message.css({ 1535 textAlign: 'center', 1536 padding : '1.25rem', 1537 width : 'auto', 1538 position : 'relative' 1539 }); 1540 1541 this.$closeButton.css({ 1542 position : 'absolute', 1543 top : '.25rem', right: '.25rem', 1544 width : 10, height: 10, 1545 background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)", 1546 display : 'none', 1547 cursor : 'pointer' 1548 }); 1549 1550 this.$buttons.css({ 1551 padding : 5, 1552 textAlign : 'right', 1553 borderTop : '1px solid #ccc', 1554 backgroundColor: '#fff' 1555 }); 1556 1557 this.$buttons.find('button').css({ 1558 marginLeft: 5 1559 }); 1560 1561 this.$buttons.find('button:first').css({ 1562 marginLeft: 0 1563 }); 1564 1565 this.$bar.on({ 1566 mouseenter: function () { 1567 $(this).find('.noty_close').stop().fadeTo('normal', 1); 1568 }, 1569 mouseleave: function () { 1570 $(this).find('.noty_close').stop().fadeTo('normal', 0); 1571 } 1572 }); 1573 1574 switch (this.options.layout.name) { 1575 case 'top': 1576 this.$bar.css({ 1577 border : 'none', 1578 boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)" 1579 }); 1580 break; 1581 case 'topCenter': 1582 case 'center': 1583 case 'bottomCenter': 1584 case 'inline': 1585 this.$bar.css({ 1586 border : 'none', 1587 boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)" 1588 }); 1589 this.$message.css({textAlign: 'center'}); 1590 break; 1591 case 'topLeft': 1592 case 'topRight': 1593 case 'bottomLeft': 1594 case 'bottomRight': 1595 case 'centerLeft': 1596 case 'centerRight': 1597 this.$bar.css({ 1598 border : 'none', 1599 boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)" 1600 }); 1601 this.$message.css({textAlign: 'left'}); 1602 break; 1603 case 'bottom': 1604 this.$bar.css({ 1605 border : 'none', 1606 boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)" 1607 }); 1608 break; 1609 default: 1610 this.$bar.css({ 1611 border : 'none', 1612 boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)" 1613 }); 1614 break; 1615 } 1616 1617 switch (this.options.type) { 1618 case 'alert': 1619 case 'notification': 1620 this.$bar.css({backgroundColor: '#fff', border: 'none', color: '#1d1d1d'}); 1621 break; 1622 case 'warning': 1623 this.$bar.css({backgroundColor: '#FA6800', border: 'none', color: '#fff'}); 1624 this.$buttons.css({borderTop: '1px solid #FA6800'}); 1625 break; 1626 case 'error': 1627 this.$bar.css({backgroundColor: '#CE352C', border: 'none', color: '#fff'}); 1628 this.$message.css({fontWeight: 'bold'}); 1629 this.$buttons.css({borderTop: '1px solid #CE352C'}); 1630 break; 1631 case 'information': 1632 this.$bar.css({backgroundColor: '#1BA1E2', border: 'none', color: '#fff'}); 1633 this.$buttons.css({borderTop: '1px solid #1BA1E2'}); 1634 break; 1635 case 'success': 1636 this.$bar.css({backgroundColor: '#60A917', border: 'none', color: '#fff'}); 1637 this.$buttons.css({borderTop: '1px solid #50C24E'}); 1638 break; 1639 default: 1640 this.$bar.css({backgroundColor: '#fff', border: 'none', color: '#1d1d1d'}); 1641 break; 1642 } 1643 }, 1644 callback: { 1645 onShow : function () { 1646 1647 }, 1648 onClose: function () { 1649 1650 } 1651 } 1652}; 1653$.noty.themes.relax = { 1654 name : 'relax', 1655 helpers : {}, 1656 modal : { 1657 css: { 1658 position : 'fixed', 1659 width : '100%', 1660 height : '100%', 1661 backgroundColor: '#000', 1662 zIndex : 10000, 1663 opacity : 0.6, 1664 display : 'none', 1665 left : 0, 1666 top : 0 1667 } 1668 }, 1669 style : function () { 1670 1671 this.$bar.css({ 1672 overflow : 'hidden', 1673 margin : '4px 0', 1674 borderRadius: '0', 1675 position : 'relative' 1676 }); 1677 1678 this.$progressBar.css({ 1679 position : 'absolute', 1680 left : 0, 1681 bottom : 0, 1682 height : 4, 1683 width : '100%', 1684 backgroundColor: '#000000', 1685 opacity : 0.2, 1686 '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)', 1687 filter : 'alpha(opacity=20)' 1688 }); 1689 1690 this.$message.css({ 1691 textAlign: 'center', 1692 padding : '15px 25px', 1693 width : 'auto', 1694 position : 'relative' 1695 }); 1696 1697 this.$closeButton.css({ 1698 position : 'absolute', 1699 top : 10, right: 10, 1700 width : 14, height: 14, 1701 background: "url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQgMS40MUwxMi41OSAwTDcgNS41OUwxLjQxIDBMMCAxLjQxTDUuNTkgN0wwIDEyLjU5TDEuNDEgMTRMNyA4LjQxTDEyLjU5IDE0TDE0IDEyLjU5TDguNDEgN0wxNCAxLjQxWiIgZmlsbD0iIzMzMzMzMyIvPjwvc3ZnPg==)", 1702 display : 'none', 1703 cursor : 'pointer' 1704 }); 1705 1706 this.$buttons.css({ 1707 padding : 5, 1708 textAlign : 'right', 1709 borderTop : '1px solid #ccc', 1710 backgroundColor: '#fff' 1711 }); 1712 1713 this.$buttons.find('button').css({ 1714 marginLeft: 5 1715 }); 1716 1717 this.$buttons.find('button:first').css({ 1718 marginLeft: 0 1719 }); 1720 1721 this.$bar.on({ 1722 mouseenter: function () { 1723 $(this).find('.noty_close').stop().fadeTo('normal', 1); 1724 }, 1725 mouseleave: function () { 1726 $(this).find('.noty_close').stop().fadeTo('normal', 0); 1727 } 1728 }); 1729 1730 switch (this.options.layout.name) { 1731 case 'top': 1732 this.$bar.css({ 1733 borderBottom: '2px solid #eee', 1734 borderLeft : '2px solid #eee', 1735 borderRight : '2px solid #eee', 1736 borderTop : '2px solid #eee', 1737 boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)" 1738 }); 1739 break; 1740 case 'topCenter': 1741 case 'center': 1742 case 'bottomCenter': 1743 case 'inline': 1744 this.$bar.css({ 1745 border : '1px solid #eee',
1746 boxShadow: "0px 4px 100px rgba(1, 52, 82, 0.15)" 1747 }); 1748 this.$message.css({textAlign: 'center'}); 1749 break; 1750 case 'topLeft': 1751 case 'topRight': 1752 case 'bottomLeft': 1753 case 'bottomRight': 1754 case 'centerLeft': 1755 case 'centerRight': 1756 this.$bar.css({ 1757 border : '1px solid #eee', 1758 boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)" 1759 }); 1760 this.$message.css({textAlign: 'left'}); 1761 break; 1762 case 'bottom': 1763 this.$bar.css({ 1764 borderTop : '2px solid #eee', 1765 borderLeft : '2px solid #eee', 1766 borderRight : '2px solid #eee', 1767 borderBottom: '2px solid #eee', 1768 boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)" 1769 }); 1770 break; 1771 default: 1772 this.$bar.css({ 1773 border : '2px solid #eee', 1774 boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)" 1775 }); 1776 break; 1777 } 1778 switch (this.options.type) { 1779 case 'alert': 1780 case 'notification': 1781 this.$bar.css({backgroundColor: '#FFF', borderColor: '#dedede', color: '#444'}); 1782 break; 1783 case 'warning': 1784 this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'}); 1785 this.$buttons.css({borderTop: '1px solid #FFC237'}); 1786 break; 1787 case 'error': 1788 this.$bar.css({backgroundColor: 'rgba(255, 255, 255, .9)', borderColor: '#CD202C', color: '#CD202C'}); 1789 //this.$message.css({fontWeight: 'bold'}); 1790 this.$buttons.css({borderTop: '1px solid darkred'}); 1791 break; 1792 case 'information': 1793 this.$bar.css({backgroundColor: 'rgba(87, 183, 226, 1)', borderColor: 'rgba(11, 144, 196, .3)', color: '#FFF'}); 1794 this.$buttons.css({borderTop: '1px solid #0B90C4'}); 1795 break; 1796 case 'success': 1797 this.$bar.css({backgroundColor: 'rgba(144, 238, 144, 1)', borderColor: 'rgba(80, 194, 78, .3)', color: 'darkgreen'}); 1798 this.$buttons.css({borderTop: '1px solid #50C24E'}); 1799 break; 1800 case 'status': 1801 this.$bar.css({backgroundColor: 'rgba(255, 255, 255, .9)', borderColor: '#E8EDF2', color: '#333'}); 1802 this.$buttons.css({borderTop: '1px solid #50C24E'}); 1803 break; 1804 default: 1805 this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); 1806 break; 1807 } 1808 }, 1809 callback: { 1810 onShow : function () { 1811 1812 }, 1813 onClose: function () { 1814 1815 } 1816 } 1817}; 1818 1819$.noty.themes.semanticUI = { 1820 name: 'semanticUI', 1821 1822 template: '<div class="ui message"><div class="content"><div class="header"></div></div></div>', 1823 1824 animation: { 1825 open : { 1826 animation: 'fade', 1827 duration : '800ms' 1828 }, 1829 close: { 1830 animation: 'fade left', 1831 duration : '800ms' 1832 } 1833 }, 1834 1835 modal : { 1836 css: { 1837 position : 'fixed', 1838 width : '100%', 1839 height : '100%', 1840 backgroundColor: '#000', 1841 zIndex : 10000, 1842 opacity : 0.6, 1843 display : 'none', 1844 left : 0, 1845 top : 0 1846 } 1847 }, 1848 style : function () { 1849 this.$message = this.$bar.find('.ui.message'); 1850 1851 this.$message.find('.header').html(this.options.header); 1852 this.$message.find('.content').append(this.options.text); 1853 1854 this.$bar.css({ 1855 margin : '0.5em', 1856 position: 'relative' 1857 }); 1858 1859 if (this.options.icon) { 1860 this.$message.addClass('icon').prepend($('<i/>').addClass(this.options.icon)); 1861 } 1862 1863 this.$progressBar.css({ 1864 position : 'absolute', 1865 left : 0, 1866 bottom : 0, 1867 height : 4, 1868 width : '100%', 1869 backgroundColor: '#000000', 1870 opacity : 0.2, 1871 '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)', 1872 filter : 'alpha(opacity=20)' 1873 }); 1874 1875 switch (this.options.size) { 1876 case 'mini': 1877 this.$message.addClass('mini'); 1878 break; 1879 case 'tiny': 1880 this.$message.addClass('tiny'); 1881 break; 1882 case 'small': 1883 this.$message.addClass('small'); 1884 break; 1885 case 'large': 1886 this.$message.addClass('large'); 1887 break; 1888 case 'big': 1889 this.$message.addClass('big'); 1890 break; 1891 case 'huge': 1892 this.$message.addClass('huge'); 1893 break; 1894 case 'massive': 1895 this.$message.addClass('massive'); 1896 break; 1897 } 1898 1899 switch (this.options.type) { 1900 case 'info': 1901 this.$message.addClass('info'); 1902 break; 1903 case 'warning': 1904 this.$message.addClass('warning'); 1905 break; 1906 case 'error': 1907 this.$message.addClass('error'); 1908 break; 1909 case 'negative': 1910 this.$message.addClass('negative'); 1911 break; 1912 case 'success': 1913 this.$message.addClass('success'); 1914 break; 1915 case 'positive': 1916 this.$message.addClass('positive'); 1917 break; 1918 case 'floating': 1919 this.$message.addClass('floating'); 1920 break; 1921 } 1922 }, 1923 callback: { 1924 onShow : function () { 1925 // Enable transition 1926 this.$bar.addClass('transition'); 1927 // Actual transition 1928 this.$bar.transition(this.options.animation.open); 1929 }, 1930 onClose: function () { 1931 this.$bar.transition(this.options.animation.close); 1932 } 1933 } 1934}; 1935 1936 1937return window.noty; 1938 1939}); 1940/* !modules/glyanec/drupal_noty_messages/misc/js/jquery.noty.packaged.js */; 1941/* modules/ukraine/mcore/misc/mcore.global.js */ 1942(function ($, Drupal) { 1943 Drupal.behaviors.mcore_global = { 1944 attach: function (context, settings) { 1945 if (typeof Inputmask !== 'undefined') { 1946 Inputmask.extendDefaults({ 1947 'removeMaskOnSubmit': false, 1948 'clearIncomplete': true 1949 }); 1950 } 1951 } 1952 } 1953})(jQuery, Drupal); 1954 1955/* !modules/ukraine/mcore/misc/mcore.global.js */; 1956/* core/misc/progress.js */ 1957/** 1958* DO NOT EDIT THIS FILE. 1959* See the following change record for more information, 1960* https://www.drupal.org/node/2815083 1961* @preserve 1962**/ 1963(function ($, Drupal) { 1964 Drupal.theme.progressBar = function (id) { 1965 return "<div id=\"".concat(id, "\" class=\"progress\" aria-live=\"polite\">") + '<div class="progress__label"> </div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description"> </div>' + '</div>'; 1966 }; 1967 Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { 1968 this.id = id; 1969 this.method = method || 'GET'; 1970 this.updateCallback = updateCallback; 1971 this.errorCallback = errorCallback;
1972 this.element = $(Drupal.theme('progressBar', id)); 1973 }; 1974 $.extend(Drupal.ProgressBar.prototype, { 1975 setProgress: function setProgress(percentage, message, label) { 1976 if (percentage >= 0 && percentage <= 100) { 1977 $(this.element).find('div.progress__bar').css('width', "".concat(percentage, "%")); 1978 $(this.element).find('div.progress__percentage').html("".concat(percentage, "%")); 1979 } 1980 $('div.progress__description', this.element).html(message); 1981 $('div.progress__label', this.element).html(label); 1982 if (this.updateCallback) { 1983 this.updateCallback(percentage, message, this); 1984 } 1985 }, 1986 startMonitoring: function startMonitoring(uri, delay) { 1987 this.delay = delay; 1988 this.uri = uri; 1989 this.sendPing(); 1990 }, 1991 stopMonitoring: function stopMonitoring() { 1992 clearTimeout(this.timer); 1993 this.uri = null; 1994 }, 1995 sendPing: function sendPing() { 1996 if (this.timer) { 1997 clearTimeout(this.timer); 1998 } 1999 if (this.uri) { 2000 var pb = this; 2001 var uri = this.uri; 2002 if (uri.indexOf('?') === -1) { 2003 uri += '?'; 2004 } else { 2005 uri += '&'; 2006 } 2007 uri += '_format=json'; 2008 $.ajax({ 2009 type: this.method, 2010 url: uri, 2011 data: '', 2012 dataType: 'json', 2013 success: function success(progress) { 2014 if (progress.status === 0) { 2015 pb.displayError(progress.data); 2016 return; 2017 } 2018 pb.setProgress(progress.percentage, progress.message, progress.label); 2019 pb.timer = setTimeout(function () { 2020 pb.sendPing(); 2021 }, pb.delay); 2022 }, 2023 error: function error(xmlhttp) { 2024 var e = new Drupal.AjaxError(xmlhttp, pb.uri); 2025 pb.displayError("<pre>".concat(e.message, "</pre>")); 2026 } 2027 }); 2028 } 2029 }, 2030 displayError: function displayError(string) { 2031 var error = $('<div class="messages messages--error"></div>').html(string); 2032 $(this.element).before(error).hide(); 2033 if (this.errorCallback) { 2034 this.errorCallback(this); 2035 } 2036 } 2037 }); 2038})(jQuery, Drupal); 2039/* !core/misc/progress.js */; 2040/* core/misc/jquery.once.bc.js */ 2041/** 2042* DO NOT EDIT THIS FILE. 2043* See the following change record for more information, 2044* https://www.drupal.org/node/2815083 2045* @preserve 2046**/ 2047(function ($, once) { 2048 var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256"; 2049 var originalJQOnce = $.fn.once; 2050 var originalJQRemoveOnce = $.fn.removeOnce; 2051 $.fn.once = function jQueryOnce(id) { 2052 Drupal.deprecationError({ 2053 message: "jQuery.once() ".concat(deprecatedMessageSuffix) 2054 }); 2055 return originalJQOnce.apply(this, [id]); 2056 }; 2057 $.fn.removeOnce = function jQueryRemoveOnce(id) { 2058 Drupal.deprecationError({ 2059 message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix) 2060 }); 2061 return originalJQRemoveOnce.apply(this, [id]); 2062 }; 2063 var drupalOnce = once; 2064 function augmentedOnce(id, selector, context) { 2065 originalJQOnce.apply($(selector, context), [id]); 2066 return drupalOnce(id, selector, context); 2067 } 2068 function remove(id, selector, context) { 2069 originalJQRemoveOnce.apply($(selector, context), [id]); 2070 return drupalOnce.remove(id, selector, context); 2071 } 2072 window.once = Object.assign(augmentedOnce, drupalOnce, { 2073 remove: remove 2074 }); 2075})(jQuery, once); 2076/* !core/misc/jquery.once.bc.js */; 2077loadjs=function(){var h=function(){},c={},u={},f={};function o(e,n){if(e){var r=f[e];if(u[e]=n,r)for(;r.length;)r[0](e,n),r.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function d(r,t,s,i){var c,o,e=document,n=s.async,u=(s.numRetries||0)+1,f=s.before||h,l=r.replace(/[\?|#].*$/,""),a=r.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(l)?((o=e.createElement("link")).rel="stylesheet",o.href=a,(c="hideFocus"in o)&&o.relList&&(c=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(l)?(o=e.createElement("img")).src=a:((o=e.createElement("script")).src=r,o.async=void 0===n||n),!(o.onload=o.onerror=o.onbeforeload=function(e){var n=e.type[0];if(c)try{o.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((i+=1)<u)return d(r,t,s,i)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";t(r,n,e.defaultPrevented)})!==f(r,o)&&e.head.appendChild(o)}function r(e,n,r){var t,s;if(n&&n.trim&&(t=n),s=(t?r:n)||{},t){if(t in c)throw"LoadJS";c[t]=!0}function i(n,r){!function(e,t,n){var r,s,i=(e=e.push?e:[e]).length,c=i,o=[];for(r=function(e,n,r){if("e"==n&&o.push(e),"b"==n){if(!r)return;o.push(e)}--i||t(o)},s=0;s<c;s++)d(e[s],r,n)}(e,function(e){l(s,e),n&&l({success:n,error:r},e),o(t,e)},s)}if(s.returnPromise)return new Promise(i);i()}return r.ready=function(e,n){return function(e,r){e=e.push?e:[e];var n,t,s,i=[],c=e.length,o=c;
2077for(n=function(e,n){n.length&&i.push(e),--o||r(i)};c--;)t=e[c],(s=u[t])?n(t,s):(f[t]=f[t]||[]).push(n)}(e,function(e){l(n,e)}),r},r.done=function(e){o(e,[])},r.reset=function(){c={},u={},f={}},r.isDefined=function(e){return e in c},r}();; 2078/* core/misc/ajax.js */ 2079/** 2080* DO NOT EDIT THIS FILE. 2081* See the following change record for more information, 2082* https://www.drupal.org/node/2815083 2083* @preserve 2084**/ 2085function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 2086function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 2087function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 2088function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 2089function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 2090function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 2091(function ($, window, Drupal, drupalSettings, loadjs, _ref) { 2092 var isFocusable = _ref.isFocusable, 2093 tabbable = _ref.tabbable; 2094 Drupal.behaviors.AJAX = { 2095 attach: function attach(context, settings) { 2096 function loadAjaxBehavior(base) { 2097 var elementSettings = settings.ajax[base]; 2098 if (typeof elementSettings.selector === 'undefined') { 2099 elementSettings.selector = "#".concat(base); 2100 } 2101 once('drupal-ajax', $(elementSettings.selector)).forEach(function (el) { 2102 elementSettings.element = el; 2103 elementSettings.base = base; 2104 Drupal.ajax(elementSettings); 2105 }); 2106 } 2107 Object.keys(settings.ajax || {}).forEach(function (base) { 2108 return loadAjaxBehavior(base); 2109 }); 2110 Drupal.ajax.bindAjaxLinks(document.body); 2111 once('ajax', '.use-ajax-submit').forEach(function (el) { 2112 var elementSettings = {}; 2113 elementSettings.url = $(el.form).attr('action'); 2114 elementSettings.setClick = true; 2115 elementSettings.event = 'click'; 2116 elementSettings.progress = { 2117 type: 'throbber' 2118 }; 2119 elementSettings.base = el.id; 2120 elementSettings.element = el; 2121 Drupal.ajax(elementSettings); 2122 }); 2123 }, 2124 detach: function detach(context, settings, trigger) { 2125 if (trigger === 'unload') { 2126 Drupal.ajax.expired().forEach(function (instance) { 2127 Drupal.ajax.instances[instance.instanceIndex] = null; 2128 }); 2129 } 2130 } 2131 }; 2132 Drupal.AjaxError = function (xmlhttp, uri, customMessage) { 2133 var statusCode; 2134 var statusText; 2135 var responseText; 2136 if (xmlhttp.status) { 2137 statusCode = "\n".concat(Drupal.t('An AJAX HTTP error occurred.'), "\n").concat(Drupal.t('HTTP Result Code: !status', { 2138 '!status': xmlhttp.status 2139 })); 2140 } else { 2141 statusCode = "\n".concat(Drupal.t('An AJAX HTTP request terminated abnormally.')); 2142 } 2143 statusCode += "\n".concat(Drupal.t('Debugging information follows.')); 2144 var pathText = "\n".concat(Drupal.t('Path: !uri', { 2145 '!uri': uri 2146 })); 2147 statusText = ''; 2148 try { 2149 statusText = "\n".concat(Drupal.t('StatusText: !statusText', { 2150 '!statusText': xmlhttp.statusText.trim() 2151 })); 2152 } catch (e) {} 2153 responseText = ''; 2154 try { 2155 responseText = "\n".concat(Drupal.t('ResponseText: !responseText', { 2156 '!responseText': xmlhttp.responseText.trim() 2157 })); 2158 } catch (e) {} 2159 responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); 2160 responseText = responseText.replace(/[\n]+\s+/g, '\n'); 2161 var readyStateText = xmlhttp.status === 0 ? "\n".concat(Drupal.t('ReadyState: !readyState', { 2162 '!readyState': xmlhttp.readyState 2163 })) : ''; 2164 customMessage = customMessage ? "\n".concat(Drupal.t('CustomMessage: !customMessage', { 2165 '!customMessage': customMessage 2166 })) : ''; 2167 this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; 2168 this.name = 'AjaxError'; 2169 }; 2170 Drupal.AjaxError.prototype = new Error(); 2171 Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; 2172 Drupal.ajax = function (settings) { 2173 if (arguments.length !== 1) { 2174 throw new Error('Drupal.ajax() function must be called with one configuration object only'); 2175 } 2176 var base = settings.base || false; 2177 var element = settings.element || false; 2178 delete settings.base; 2179 delete settings.element; 2180 if (!settings.progress && !element) { 2181 settings.progress = false;
2182 } 2183 var ajax = new Drupal.Ajax(base, element, settings); 2184 ajax.instanceIndex = Drupal.ajax.instances.length; 2185 Drupal.ajax.instances.push(ajax); 2186 return ajax; 2187 }; 2188 Drupal.ajax.instances = []; 2189 Drupal.ajax.expired = function () { 2190 return Drupal.ajax.instances.filter(function (instance) { 2191 return instance && instance.element !== false && !document.body.contains(instance.element); 2192 }); 2193 }; 2194 Drupal.ajax.bindAjaxLinks = function (element) { 2195 once('ajax', '.use-ajax', element).forEach(function (ajaxLink) { 2196 var $linkElement = $(ajaxLink); 2197 var elementSettings = { 2198 progress: { 2199 type: 'throbber' 2200 }, 2201 dialogType: $linkElement.data('dialog-type'), 2202 dialog: $linkElement.data('dialog-options'), 2203 dialogRenderer: $linkElement.data('dialog-renderer'), 2204 base: $linkElement.attr('id'), 2205 element: ajaxLink 2206 }; 2207 var href = $linkElement.attr('href'); 2208 if (href) { 2209 elementSettings.url = href; 2210 elementSettings.event = 'click'; 2211 } 2212 Drupal.ajax(elementSettings); 2213 }); 2214 }; 2215 Drupal.Ajax = function (base, element, elementSettings) { 2216 var defaults = { 2217 event: element ? 'mousedown' : null, 2218 keypress: true, 2219 selector: base ? "#".concat(base) : null, 2220 effect: 'none', 2221 speed: 'none', 2222 method: 'replaceWith', 2223 progress: { 2224 type: 'throbber', 2225 message: Drupal.t('Please wait...') 2226 }, 2227 submit: { 2228 js: true 2229 } 2230 }; 2231 $.extend(this, defaults, elementSettings); 2232 this.commands = new Drupal.AjaxCommands(); 2233 this.instanceIndex = false; 2234 if (this.wrapper) { 2235 this.wrapper = "#".concat(this.wrapper); 2236 } 2237 this.element = element; 2238 this.element_settings = elementSettings; 2239 this.elementSettings = elementSettings; 2240 if (this.element && this.element.form) { 2241 this.$form = $(this.element.form); 2242 } 2243 if (!this.url) { 2244 var $element = $(this.element); 2245 if ($element.is('a')) { 2246 this.url = $element.attr('href'); 2247 } else if (this.element && element.form) { 2248 this.url = this.$form.attr('action'); 2249 } 2250 } 2251 var originalUrl = this.url; 2252 this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); 2253 if (drupalSettings.ajaxTrustedUrl[originalUrl]) { 2254 drupalSettings.ajaxTrustedUrl[this.url] = true; 2255 } 2256 var ajax = this; 2257 ajax.options = { 2258 url: ajax.url, 2259 data: ajax.submit, 2260 isInProgress: function isInProgress() { 2261 return ajax.ajaxing; 2262 }, 2263 beforeSerialize: function beforeSerialize(elementSettings, options) { 2264 return ajax.beforeSerialize(elementSettings, options); 2265 }, 2266 beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { 2267 ajax.ajaxing = true; 2268 return ajax.beforeSubmit(formValues, elementSettings, options); 2269 }, 2270 beforeSend: function beforeSend(xmlhttprequest, options) { 2271 ajax.ajaxing = true; 2272 return ajax.beforeSend(xmlhttprequest, options); 2273 }, 2274 success: function success(response, status, xmlhttprequest) { 2275 var _this = this; 2276 if (typeof response === 'string') { 2277 response = $.parseJSON(response); 2278 } 2279 if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { 2280 if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { 2281 var customMessage = Drupal.t('The response failed verification so will not be processed.'); 2282 return ajax.error(xmlhttprequest, ajax.url, customMessage); 2283 } 2284 } 2285 return Promise.resolve(ajax.success(response, status)).then(function () { 2286 ajax.ajaxing = false; 2287 $(document).trigger('ajaxSuccess', [xmlhttprequest, _this]); 2288 $(document).trigger('ajaxComplete', [xmlhttprequest, _this]); 2289 if (--$.active === 0) { 2290 $(document).trigger('ajaxStop'); 2291 } 2292 }); 2293 }, 2294 error: function error(xmlhttprequest, status, _error) { 2295 ajax.ajaxing = false; 2296 }, 2297 complete: function complete(xmlhttprequest, status) { 2298 if (status === 'error' || status === 'parsererror') { 2299 return ajax.error(xmlhttprequest, ajax.url); 2300 } 2301 }, 2302 dataType: 'json', 2303 jsonp: false, 2304 type: 'POST' 2305 }; 2306 if (elementSettings.dialog) { 2307 ajax.options.data.dialogOptions = elementSettings.dialog; 2308 } 2309 if (ajax.options.url.indexOf('?') === -1) { 2310 ajax.options.url += '?'; 2311 } else { 2312 ajax.options.url += '&'; 2313 } 2314 var wrapper = "drupal_".concat(elementSettings.dialogType || 'ajax'); 2315 if (elementSettings.dialogRenderer) { 2316 wrapper += ".".concat(elementSettings.dialogRenderer); 2317 } 2318 ajax.options.url += "".concat(Drupal.ajax.WRAPPER_FORMAT, "=").concat(wrapper); 2319 $(ajax.element).on(elementSettings.event, function (event) { 2320 if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { 2321 throw new Error(Drupal.t('The callback URL is not local and n
2321ot trusted: !url', { 2322 '!url': ajax.url 2323 })); 2324 } 2325 return ajax.eventResponse(this, event); 2326 }); 2327 if (elementSettings.keypress) { 2328 $(ajax.element).on('keypress', function (event) { 2329 return ajax.keypressResponse(this, event); 2330 }); 2331 } 2332 if (elementSettings.prevent) { 2333 $(ajax.element).on(elementSettings.prevent, false); 2334 } 2335 }; 2336 Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; 2337 Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; 2338 Drupal.Ajax.prototype.execute = function () { 2339 if (this.ajaxing) { 2340 return; 2341 } 2342 try { 2343 this.beforeSerialize(this.element, this.options); 2344 return $.ajax(this.options); 2345 } catch (e) { 2346 this.ajaxing = false; 2347 window.alert("An error occurred while attempting to process ".concat(this.options.url, ": ").concat(e.message)); 2348 return $.Deferred().reject(); 2349 } 2350 }; 2351 Drupal.Ajax.prototype.keypressResponse = function (element, event) { 2352 var ajax = this; 2353 if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { 2354 event.preventDefault(); 2355 event.stopPropagation(); 2356 $(element).trigger(ajax.elementSettings.event); 2357 } 2358 }; 2359 Drupal.Ajax.prototype.eventResponse = function (element, event) { 2360 event.preventDefault(); 2361 event.stopPropagation(); 2362 var ajax = this; 2363 if (ajax.ajaxing) { 2364 return; 2365 } 2366 try { 2367 if (ajax.$form) { 2368 if (ajax.setClick) { 2369 element.form.clk = element; 2370 } 2371 ajax.$form.ajaxSubmit(ajax.options); 2372 } else { 2373 ajax.beforeSerialize(ajax.element, ajax.options); 2374 $.ajax(ajax.options); 2375 } 2376 } catch (e) { 2377 ajax.ajaxing = false; 2378 window.alert("An error occurred while attempting to process ".concat(ajax.options.url, ": ").concat(e.message)); 2379 } 2380 }; 2381 Drupal.Ajax.prototype.beforeSerialize = function (element, options) { 2382 if (this.$form && document.body.contains(this.$form.get(0))) { 2383 var settings = this.settings || drupalSettings; 2384 Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); 2385 } 2386 options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; 2387 var pageState = drupalSettings.ajaxPageState; 2388 options.data['ajax_page_state[theme]'] = pageState.theme; 2389 options.data['ajax_page_state[theme_token]'] = pageState.theme_token; 2390 options.data['ajax_page_state[libraries]'] = pageState.libraries; 2391 }; 2392 Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {}; 2393 Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { 2394 if (this.$form) { 2395 options.extraData = options.extraData || {}; 2396 options.extraData.ajax_iframe_upload = '1'; 2397 var v = $.fieldValue(this.element); 2398 if (v !== null) { 2399 options.extraData[this.element.name] = v; 2400 } 2401 } 2402 $(this.element).prop('disabled', true); 2403 if (!this.progress || !this.progress.type) { 2404 return; 2405 } 2406 var progressIndicatorMethod = "setProgressIndicator".concat(this.progress.type.slice(0, 1).toUpperCase()).concat(this.progress.type.slice(1).toLowerCase()); 2407 if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { 2408 this[progressIndicatorMethod].call(this); 2409 } 2410 }; 2411 Drupal.theme.ajaxProgressThrobber = function (message) { 2412 var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; 2413 var throbber = '<div class="throbber"> </div>'; 2414 return "<div class=\"ajax-progress ajax-progress-throbber\">".concat(throbber).concat(messageMarkup, "</div>"); 2415 }; 2416 Drupal.theme.ajaxProgressIndicatorFullscreen = function () { 2417 return '<div class="ajax-progress ajax-progress-fullscreen"> </div>'; 2418 }; 2419 Drupal.theme.ajaxProgressMessage = function (message) { 2420 return "<div class=\"message\">".concat(message, "</div>"); 2421 }; 2422 Drupal.theme.ajaxProgressBar = function ($element) { 2423 return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element); 2424 }; 2425 Drupal.Ajax.prototype.setProgressIndicatorBar = function () { 2426 var progressBar = new Drupal.ProgressBar("ajax-progress-".concat(this.element.i
2426d), $.noop, this.progress.method, $.noop); 2427 if (this.progress.message) { 2428 progressBar.setProgress(-1, this.progress.message); 2429 } 2430 if (this.progress.url) { 2431 progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); 2432 } 2433 this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); 2434 this.progress.object = progressBar; 2435 $(this.element).after(this.progress.element); 2436 }; 2437 Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { 2438 this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); 2439 $(this.element).after(this.progress.element); 2440 }; 2441 Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { 2442 this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); 2443 $('body').append(this.progress.element); 2444 }; 2445 Drupal.Ajax.prototype.commandExecutionQueue = function (response, status) { 2446 var _this2 = this; 2447 var ajaxCommands = this.commands; 2448 return Object.keys(response || {}).reduce(function (executionQueue, key) { 2449 return executionQueue.then(function () { 2450 var command = response[key].command; 2451 if (command && ajaxCommands[command]) { 2452 return ajaxCommands[command](_this2, response[key], status); 2453 } 2454 }); 2455 }, Promise.resolve()); 2456 }; 2457 Drupal.Ajax.prototype.success = function (response, status) { 2458 var _this3 = this; 2459 if (this.progress.element) { 2460 $(this.progress.element).remove(); 2461 } 2462 if (this.progress.object) { 2463 this.progress.object.stopMonitoring(); 2464 } 2465 $(this.element).prop('disabled', false); 2466 var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); 2467 var focusChanged = Object.keys(response || {}).some(function (key) { 2468 var _response$key = response[key], 2469 command = _response$key.command, 2470 method = _response$key.method; 2471 return command === 'focusFirst' || command === 'invoke' && method === 'focus'; 2472 }); 2473 return this.commandExecutionQueue(response, status).then(function () { 2474 if (!focusChanged && _this3.element && !$(_this3.element).data('disable-refocus')) { 2475 var target = false;
2476 for (var n = elementParents.length - 1; !target && n >= 0; n--) { 2477 target = document.querySelector("[data-drupal-selector=\"".concat(elementParents[n].getAttribute('data-drupal-selector'), "\"]")); 2478 } 2479 if (target) { 2480 $(target).trigger('focus'); 2481 } 2482 } 2483 if (_this3.$form && document.body.contains(_this3.$form.get(0))) { 2484 var settings = _this3.settings || drupalSettings; 2485 Drupal.attachBehaviors(_this3.$form.get(0), settings); 2486 } 2487 _this3.settings = null; 2488 }).catch(function (error) { 2489 return console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error', { 2490 '!error': error 2491 })); 2492 }); 2493 }; 2494 Drupal.Ajax.prototype.getEffect = function (response) { 2495 var type = response.effect || this.effect; 2496 var speed = response.speed || this.speed; 2497 var effect = {}; 2498 if (type === 'none') { 2499 effect.showEffect = 'show'; 2500 effect.hideEffect = 'hide'; 2501 effect.showSpeed = ''; 2502 } else if (type === 'fade') { 2503 effect.showEffect = 'fadeIn'; 2504 effect.hideEffect = 'fadeOut'; 2505 effect.showSpeed = speed; 2506 } else { 2507 effect.showEffect = "".concat(type, "Toggle"); 2508 effect.hideEffect = "".concat(type, "Toggle"); 2509 effect.showSpeed = speed; 2510 } 2511 return effect; 2512 }; 2513 Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { 2514 if (this.progress.element) { 2515 $(this.progress.element).remove(); 2516 } 2517 if (this.progress.object) { 2518 this.progress.object.stopMonitoring(); 2519 } 2520 $(this.wrapper).show(); 2521 $(this.element).prop('disabled', false); 2522 if (this.$form && document.body.contains(this.$form.get(0))) { 2523 var settings = this.settings || drupalSettings; 2524 Drupal.attachBehaviors(this.$form.get(0), settings); 2525 } 2526 throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); 2527 }; 2528 Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { 2529 return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { 2530 return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); 2531 }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; 2532 }; 2533 Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { 2534 return $('<div></div>').append($elements); 2535 }; 2536 Drupal.AjaxCommands = function () {}; 2537 Drupal.AjaxCommands.prototype = { 2538 insert: function insert(ajax, response) { 2539 var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); 2540 var method = response.method || ajax.method; 2541 var effect = ajax.getEffect(response); 2542 var settings = response.settings || ajax.settings || drupalSettings; 2543 var $newContent = $($.parseHTML(response.data, document, true)); 2544 $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); 2545 switch (method) { 2546 case 'html': 2547 case 'replaceWith': 2548 case 'replaceAll': 2549 case 'empty': 2550 case 'remove': 2551 Drupal.detachBehaviors($wrapper.get(0), settings); 2552 break; 2553 default: 2554 break; 2555 } 2556 $wrapper[method]($newContent); 2557 if (effect.showEffect !== 'show') { 2558 $newContent.hide(); 2559 } 2560 var $ajaxNewContent = $newContent.find('.ajax-new-content'); 2561 if ($ajaxNewContent.length) { 2562 $ajaxNewContent.hide(); 2563 $newContent.show(); 2564 $ajaxNewContent[effect.showEffect](effect.showSpeed); 2565 } else if (effect.showEffect !== 'show') { 2566 $newContent[effect.showEffect](effect.showSpeed); 2567 } 2568 if ($newContent.parents('html').length) { 2569 $newContent.each(function (index, element) { 2570 if (element.nodeType === Node.ELEMENT_NODE) { 2571 Drupal.attachBehaviors(element, settings); 2572 } 2573 }); 2574 } 2575 }, 2576 remove: function remove(ajax, response, status) { 2577 var settings = response.settings || ajax.settings || drupalSettings; 2578 $(response.selector).each(function () { 2579 Drupal.detachBehaviors(this, settings); 2580 }).remove(); 2581 }, 2582 changed: function changed(ajax, response, status) { 2583 var $element = $(response.selector); 2584 if (!$element.hasClass('ajax-changed')) { 2585 $element.addClass('ajax-changed'); 2586 if (response.asterisk) { 2587 $element.find(response.asterisk).append(" <abbr class=\"ajax-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr> ")); 2588 } 2589 } 2590 }, 2591 alert: function alert(ajax, response, status) { 2592 window.alert(response.text); 2593 }, 2594 announce: function announce(ajax, response) { 2595 if (response.priority) { 2596 Drupal.announce(response.text, response.priority); 2597 } else { 2598 Drupal.announce(response.text); 2599 } 2600 }, 2601 redirect: function redirect(ajax, response, status) { 2602 window.location = response.url; 2603 }, 2604 css: function css(ajax, response, status) { 2605 $(response.selector).css(response.argument); 2606 }, 2607 settings: function settings(ajax, response, status) { 2608 var ajaxSettings = drupalSettings.ajax; 2609 if (ajaxSettings) {
2610 Drupal.ajax.expired().forEach(function (instance) { 2611 if (instance.selector) { 2612 var selector = instance.selector.replace('#', ''); 2613 if (selector in ajaxSettings) { 2614 delete ajaxSettings[selector]; 2615 } 2616 } 2617 }); 2618 } 2619 if (response.merge) { 2620 $.extend(true, drupalSettings, response.settings); 2621 } else { 2622 ajax.settings = response.settings; 2623 } 2624 }, 2625 data: function data(ajax, response, status) { 2626 $(response.selector).data(response.name, response.value); 2627 }, 2628 focusFirst: function focusFirst(ajax, response, status) { 2629 var focusChanged = false; 2630 var container = document.querySelector(response.selector); 2631 if (container) { 2632 var tabbableElements = tabbable(container); 2633 if (tabbableElements.length) { 2634 tabbableElements[0].focus(); 2635 focusChanged = true; 2636 } else if (isFocusable(container)) { 2637 container.focus(); 2638 focusChanged = true; 2639 } 2640 } 2641 if (ajax.hasOwnProperty('element') && !focusChanged) { 2642 ajax.element.focus(); 2643 } 2644 }, 2645 invoke: function invoke(ajax, response, status) { 2646 var $element = $(response.selector); 2647 $element[response.method].apply($element, _toConsumableArray(response.args)); 2648 }, 2649 restripe: function restripe(ajax, response, status) { 2650 $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); 2651 }, 2652 update_build_id: function update_build_id(ajax, response, status) { 2653 document.querySelectorAll("input[name=\"form_build_id\"][value=\"".concat(response.old, "\"]")).forEach(function (item) { 2654 item.value = response.new; 2655 }); 2656 }, 2657 add_css: function add_css(ajax, response, status) { 2658 $('head').prepend(response.data); 2659 }, 2660 message: function message(ajax, response) { 2661 var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); 2662 if (response.clearPrevious) { 2663 messages.clear(); 2664 } 2665 messages.add(response.message, response.messageOptions); 2666 }, 2667 add_js: function add_js(ajax, response, status) { 2668 var parentEl = document.querySelector(response.selector || 'body'); 2669 var settings = ajax.settings || drupalSettings; 2670 var allUniqueBundleIds = response.data.map(function (script) { 2671 var uniqueBundleId = script.src + ajax.instanceIndex; 2672 loadjs(script.src, uniqueBundleId, { 2673 async: false, 2674 before: function before(path, scriptEl) { 2675 Object.keys(script).forEach(function (attributeKey) { 2676 scriptEl.setAttribute(attributeKey, script[attributeKey]); 2677 }); 2678 parentEl.appendChild(scriptEl); 2679 return false; 2680 } 2681 }); 2682 return uniqueBundleId; 2683 }); 2684 return new Promise(function (resolve, reject) { 2685 loadjs.ready(allUniqueBundleIds, { 2686 success: function success() { 2687 Drupal.attachBehaviors(parentEl, settings); 2688 resolve(); 2689 }, 2690 error: function error(depsNotFound) { 2691 var message = Drupal.t("The following files could not be loaded: @dependencies", { 2692 '@dependencies': depsNotFound.join(', ') 2693 }); 2694 reject(message); 2695 } 2696 }); 2697 }); 2698 } 2699 }; 2700 var stopEvent = function stopEvent(xhr, settings) { 2701 return xhr.getResponseHeader('X-Drupal-Ajax-Token') === '1' && settings.isInProgress && settings.isInProgress(); 2702 }; 2703 $.extend(true, $.event.special, { 2704 ajaxSuccess: { 2705 trigger: function trigger(event, xhr, settings) { 2706 if (stopEvent(xhr, settings)) { 2707 return false; 2708 } 2709 } 2710 }, 2711 ajaxComplete: { 2712 trigger: function trigger(event, xhr, settings) { 2713 if (stopEvent(xhr, settings)) { 2714 $.active++; 2715 return false; 2716 } 2717 } 2718 } 2719 }); 2720})(jQuery, window, Drupal, drupalSettings, loadjs, window.tabbable); 2721/* !core/misc/ajax.js */; 2722/* themes/nursery/js/common.js */ 2723(function (Drupal) { 2724 "use strict"; 2725 2726 Drupal.behaviors.common_nursery = { 2727 attach: function (context, settings) { 2728 2729 } 2730 } 2731 2732 2733 2734 document.addEventListener('DOMContentLoaded', function() { 2735 const menuButton = document.querySelector('.js-menu-btn'); 2736 const menuButtonPC = document.querySelector('.site-header-btn-pc__wrapper'); 2737 const header = document.querySelector('.site-header'); 2738 const headerPC = document.querySelector('.site-header__bottom'); 2739 const body = document.body; 2740 const isMenuOpen = false;
2741 2742 2743 if (menuButton){ 2744 menuButton.addEventListener('click', function (e) { 2745 e.preventDefault(); 2746 2747 if (header.classList.contains('is-open')) { 2748 menuButton.classList.remove('is-open'); 2749 header.classList.remove('is-open'); 2750 body.classList.remove('is-hidden'); 2751 document.removeEventListener('click', closeMenuOnOutsideClick); 2752 } else { 2753 menuButton.classList.add('is-open'); 2754 header.classList.add('is-open'); 2755 body.classList.add('is-hidden'); 2756 document.addEventListener('click', closeMenuOnOutsideClick); 2757 } 2758 }); 2759 } 2760 2761 2762 menuButtonPC.addEventListener('click', function (e) { 2763 e.preventDefault(); 2764 2765 if (headerPC.classList.contains('is-open')) { 2766 menuButtonPC.classList.remove('is-open'); 2767 headerPC.classList.remove('is-open'); 2768 header.classList.remove('is-open'); 2769 body.classList.remove('is-hidden'); 2770 document.removeEventListener('click', closeMenuOnOutsideClickPC); 2771 } else { 2772 menuButtonPC.classList.add('is-open'); 2773 headerPC.classList.add('is-open'); 2774 header.classList.add('is-open'); 2775 body.classList.add('is-hidden'); 2776 document.addEventListener('click', closeMenuOnOutsideClickPC); 2777 } 2778 }); 2779 2780 function closeMenuOnOutsideClick(e) { 2781 if (!header.contains(e.target)) { 2782 menuButton.classList.remove('is-open'); 2783 header.classList.remove('is-open'); 2784 body.classList.remove('is-hidden'); 2785 document.removeEventListener('click', closeMenuOnOutsideClick); 2786 } 2787 } 2788 function closeMenuOnOutsideClickPC(e) { 2789 if (!headerPC.contains(e.target) && !header.contains(e.target)) { 2790 menuButtonPC.classList.remove('is-open'); 2791 headerPC.classList.remove('is-open'); 2792 header.classList.remove('is-open'); 2793 body.classList.remove('is-hidden'); 2794 document.removeEventListener('click', closeMenuOnOutsideClickPC); 2795 } 2796 } 2797 2798 2799 //ÐÐÐÐШТУÐÐÐÐЯ Ð ÐÐÐТРÐÐÐЮ 2800 function moveMenuForLargeScreens() { 2801 let siteHeaderMenu = document.querySelector('.site-header__menu'); 2802 let siteHeaderBottom = document.querySelector('.site-header__bottom'); 2803 let siteHeader = document.querySelector('.site-header'); 2804 2805 // ÐеÑевÑÑÑÑмо, Ñи ÑиÑина вÑкна пеÑевиÑÑÑ 1200 пÑкÑелÑв 2806 if (window.matchMedia('(min-width: 1200px)').matches) { 2807 // ЯкÑо Ñак, пеÑемÑÑаÑмо .site-header__menu вÑеÑÐµÐ´Ð¸Ð½Ñ .site-header__bottom 2808 siteHeaderBottom.appendChild(siteHeaderMenu); 2809 } else { 2810 // ЯкÑо ÑиÑина екÑÐ°Ð½Ñ Ð¼ÐµÐ½Ñе нÑж 1200px, пеÑемÑÑаÑмо .site-header__menu назад до .site-header 2811 // ÐеÑеконÑÑмоÑÑ, Ñо .site-header__menu Ñе не в .site-header пеÑед Ñим, Ñк додаÑи його назад 2812 if (siteHeaderMenu.parentNode !== siteHeader) { 2813 siteHeader.appendChild(siteHeaderMenu); 2814 } 2815 } 2816 } 2817 2818 // ÐиконÑÑмо ÑÑнкÑÑÑ Ð¿Ñи пеÑÑÐ¾Ð¼Ñ Ð·Ð°Ð²Ð°Ð½ÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑÑоÑÑнки 2819 moveMenuForLargeScreens(); 2820 2821 // Також виконÑÑмо ÑÑнкÑÑÑ Ð¿Ñи змÑÐ½Ñ ÑозмÑÑÑ Ð²Ñкна бÑаÑзеÑа 2822 window.addEventListener('resize', moveMenuForLargeScreens); 2823 }); 2824 2825 2826 2827 var topWindow = window.scrollY; 2828 var winHeight = window.innerHeight; 2829 2830 window.addEventListener('scroll', function() { 2831 topWindow = window.scrollY; 2832 winHeight = window.innerHeight; 2833 // var devel = document.querySelector('.gl-devel'); 2834 // 2835 // if (!devel.classList.contains('is-animate')) { 2836 // var topDevel = devel.getBoundingClientRect().top + window.pageYOffset; 2837 // if ((topWindow + winHeight) > topDevel) { 2838 // devel.classList.add('is-animate'); 2839 // } 2840 // } 2841 2842 var header = document.querySelector('.site-header'); 2843 if (window.scrollY > 65) { 2844 header.classList.add('is-scrolled'); 2845 } else { 2846 header.classList.remove('is-scrolled'); 2847 } 2848 }); 2849 2850 document.addEventListener('DOMContentLoaded', function() { 2851 // ÐÐ½Ð°Ñ Ð¾Ð´Ð¸Ð¼Ð¾ блоки за ÑÑ ÐºÐ»Ð°Ñами 2852 const sourceBlock = document.querySelector('.block-type-disability-block'); 2853 const targetBlock = document.querySelector('.block-type-site-info-header-info .b-site-info-short-info'); 2854 2855 // ÐеÑевÑÑÑÑмо, Ñи знайдено обидва блока 2856 if (sourceBlock && targetBlock) { 2857 // ÐеÑеноÑимо блок sourceBlock в кÑнеÑÑ Ð±Ð»Ð¾ÐºÑ targetBlock 2858 targetBlock.append(sourceBlock); 2859 } 2860 }); 2861 2862 2863 2864 // 2865 // 2866 // document.addEventListener('DOMContentLoaded', function() { 2867 // 2868 // }) 2869 2870 2871 2872})(Drupal); 2873/* !themes/nursery/js/common.js */; 2874/*! 2875 * jQuery Form Plugin 2876 * version: 4.3.0 2877 * Requires jQuery v1.7.2 or later 2878 * Project repository: https://github.com/jquery-form/form 2879 2880 * Copyright 2017 Kevin Morris 2881 * Copyright 2006 M. Alsup 2882 2883 * Dual licensed under the LGPL-2.1+ or MIT licenses 2884 * https://github.com/jquery-form/form#license 2885 2886 * This library is free software; you can redistribute it and/or 2887 * modify it under the terms of the GNU Lesser General Public
vendor: 16,397 bytes, lines 2888-2895
2888 * License as published by the Free Software Foundation; either 2889 * version 2.1 of the License, or (at your option) any later version. 2890 * This library is distributed in the hope that it will be useful, 2891 * but WITHOUT ANY WARRANTY; without even the implied warranty of 2892 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2893 * Lesser General Public License for more details. 2894 */ 2895!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('<input type="file">').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0<arguments.length?(M={url:M,data:e,dataType:t},"function"==typeof r&&(M.success=r)):void 0===M&&(M={}),O=M.method||M.type||this.attr2("method"),n=(n=(n="string"==typeof(a=M.url||this.attr2("action"))?q.trim(a):"")||window.location.href||"")&&(n.match(/^([^#]+)/)||[])[1],o=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",M=q.extend(!0,{url:n,success:q.ajaxSettings.success,type:O||q.ajaxSettings.type,iframeSrc:o},M);var i={};if(this.trigger("form-pre-serialize",[this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return N("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var s=M.traditional;void 0===s&&(s=q.ajaxSettings.traditional);var u,c,C=[],l=this.formToArray(M.semantic,C,M.filtering);if(M.data&&(c=q.isFunction(M.data)?M.data(l):M.data,M.extraData=c,u=q.param(c,s)),M.beforeSubmit&&!1===M.beforeSubmit(l,this,M))return N("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var f=q.param(l,s);u&&(f=f?f+"&"+u:u),"GET"===M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+f,M.data=null):M.data=f;var d,m,p,h=[];M.resetForm&&h.push(function(){X.resetForm()}),M.clearForm&&h.push(function(){X.clearForm(M.includeHidden)}),!M.dataType&&M.target?(d=M.success||function(){},h.push(function(e,t,r){var a=arguments,n=M.replaceTarget?"replaceWith":"html";q(M.target)[n](e).each(function(){d.apply(this,a)})})):M.success&&(q.isArray(M.success)?q.merge(h,M.success):h.push(M.success)),M.success=function(e,t,r){for(var a=M.context||this,n=0,o=h.length;n<o;n++)h[n].apply(a,[e,t,r||X,X])},M.error&&(m=M.error,M.error=function(e,t,r){var a=M.context||this;m.apply(a,[e,t,r,X])}),M.complete&&(p=M.complete,M.complete=function(e,t){var r=M.context||this;p.apply(r,[e,t,X])});var v=0<q("input[type=file]:enabled",this).filter(function(){return""!==q(this).val()}).length,g="multipart/form-data",x=X.attr("enctype")===g||X.attr("encoding")===g,y=S.fileapi&&S.formdata;N("fileAPI :"+y);var b,T=(v||x)&&!y;!1!==M.iframe&&(M.iframe||T)?M.closeKeepAlive?q.get(M.closeKeepAlive,function(){b=w(l)}):b=w(l):b=(v||x)&&y?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(M.extraData){var a=function(e){var t,r,a=q.param(e,M.traditional).split("&"),n=a.length,o=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),o.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return o}(M.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}M.data=null;var n=q.extend(!0,{},q.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:O||"POST"});M.uploadProgress&&(n.xhr=function(){var e=q.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),M.uploadProgress(e,r,a,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){M.formData?t.data=M.formData:t.data=r,o&&o.call(this,e,t)},q.ajax(n)}(l):q.ajax(M),X.removeData("jqxhr").data("jqxhr",b);for(var j=0;j<C.length;j++)C[j]=null;return this.trigger("form-submit-notify",[this,M]),this;function w(e){var t,r,l,f,o,d,m,p,a,n,h,v,i=X[0],g=q.Deferred();if(g.abort=function(e){p.abort(e)},e)for(r=0;r<C.length;r++)t=q(C[r]),_?t.prop("disabled",!1):t.removeAttr("disabled");(l=q.extend(!0,{},q.ajaxSettings,M)).context=l.context||l,o="jqFormIO"+(new Date).getTime();var s=i.ownerDocument,u=X.closest("body");if(l.iframeTarget?(n=(d=q(l.iframeTarget,s)).attr2("name"))?o=n:d.attr2("name",o):(d=q('<iframe name="'+o+'" src="'+l.iframeSrc+'" />',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('<input type="hidden" name="'+l.extraData[n].name+'">',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('<input type="hidden" name="'+n+'">',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:r},"function"==typeof a&&(e.success=a)),(e=e||{}).delegation=e.delegation&&q.isFunction(q.fn.on),e.delegation||0!==this.length)return e.delegation?(q(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i));var n={s:this.selector,c:this.context};return!q.isReady&&n.s?(N("DOM not ready, queuing ajaxForm"),q(function(){q(n.s,n.c).ajaxForm(e)})):N("terminating; zero elements found by selector"+(q.isReady?"":" (DOM not ready)")),this},q.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},q.fn.formToArray=function(e,t,r){var a=[];if(0===this.length)return a;var n,o,i,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=(v=e||void 0===p.elements?p.getElementsByTagName("*"):p.elements)&&q.makeArray(v);if(h&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(n=q(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(n)),!v||!v.length)return a;for(q.isFunction(r)&&(v=q.map(v,r)),o=0,c=v.length;o<c;o++)if((m=(u=v[o]).name)&&!u.disabled)if(e&&p.clk&&"image"===u.type)p.clk===u&&(a.push({name:m,value:q(u).val(),type:u.type}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y}));else if((s=q.fieldValue(u,!0))&&s.constructor===Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)a.push({name:m,value:s[i]});else if(S.fileapi&&"file"===u.type){t&&t.push(u);var g=u.files;if(g.length)for(i=0;i<g.length;i++)a.push({name:m,value:g[i],type:u.type});else a.push({name:m,value:"",type:u.type})}else null!=s&&(t&&t.push(u),a.push({name:m,value:s,type:u.type,required:u.required}));return e||!p.clk||(m=(d=(f=q(p.clk))[0]).name)&&!d.disabled&&"image"===d.type&&(a.push({name:m,value:f.val()}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y})),a},q.fn.formSerialize=function(e){return q.param(this.formToArray(e))},q.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=q.fieldValue(this,n);if(t&&t.constructor===Array)for(var r=0,a=t.length;r<a;r++)o.push({name:e,value:t[r]});else null!=t&&o.push({name:this.name,value:t})}}),q.param(o)},q.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],o=q.fieldValue(n,e);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?q.merge(t,o):t.push(o))}return t},q.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!e.checked||("submit"===a||"image"===a)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return q(e).val().replace(m,"\r\n");var o=e.selectedIndex;if(o<0)return null;for(var i=[],s=e.options,u="select-one"===a,c=u?o+1:s.length,l=u?o:0;l<c;l++){var f=s[l];if(f.selected&&!f.disabled){var d=(d=f.value)||(f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value);if(u)return d;i.push(d)}}return i},q.fn.clearForm=function(e){return this.each(function(){q("input,select,textarea",this).clearFields(e)})},q.fn.clearFields=q.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?q(this).replaceWith(q(this).clone(!0)):q(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&q(this).is(r))&&(this.value="")})},q.fn.resetForm=function(){return this.each(function(){var t=q(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var r=t.parents("select");return r.length&&r[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():r.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=q(t.attr("for")),n=t.find("input,select,textarea");return a[0]&&n.unshift(a[0]),n.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},q.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},q.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e,t=this.t
2895ype;"checkbox"===t||"radio"===t?this.checked=r:"option"===this.tagName.toLowerCase()&&(e=q(this).parent("select"),r&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=r)})},q.fn.ajaxSubmit.debug=!1}); 2896 2897; 2898/* core/modules/views/js/base.js */ 2899/** 2900* DO NOT EDIT THIS FILE. 2901* See the following change record for more information, 2902* https://www.drupal.org/node/2815083 2903* @preserve 2904**/ 2905(function ($, Drupal, drupalSettings) { 2906 Drupal.Views = {}; 2907 Drupal.Views.parseQueryString = function (query) { 2908 var args = {}; 2909 var pos = query.indexOf('?'); 2910 if (pos !== -1) { 2911 query = query.substring(pos + 1); 2912 } 2913 var pair; 2914 var pairs = query.split('&'); 2915 for (var i = 0; i < pairs.length; i++) { 2916 pair = pairs[i].split('='); 2917 if (pair[0] !== 'q' && pair[1]) { 2918 args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' ')); 2919 } 2920 } 2921 return args; 2922 }; 2923 Drupal.Views.parseViewArgs = function (href, viewPath) { 2924 var returnObj = {}; 2925 var path = Drupal.Views.getPath(href); 2926 var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length); 2927 if (viewHref && path.substring(0, viewHref.length + 1) === "".concat(viewHref, "/")) { 2928 returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length)); 2929 returnObj.view_path = path; 2930 } 2931 return returnObj; 2932 }; 2933 Drupal.Views.pathPortion = function (href) { 2934 var protocol = window.location.protocol; 2935 if (href.substring(0, protocol.length) === protocol) { 2936 href = href.substring(href.indexOf('/', protocol.length + 2)); 2937 } 2938 return href; 2939 }; 2940 Drupal.Views.getPath = function (href) { 2941 href = Drupal.Views.pathPortion(href); 2942 href = href.substring(drupalSettings.path.baseUrl.length, href.length); 2943 if (href.substring(0, 3) === '?q=') { 2944 href = href.substring(3, href.length); 2945 } 2946 var chars = ['#', '?', '&']; 2947 for (var i = 0; i < chars.length; i++) { 2948 if (href.indexOf(chars[i]) > -1) { 2949 href = href.substr(0, href.indexOf(chars[i])); 2950 } 2951 } 2952 return href; 2953 }; 2954})(jQuery, Drupal, drupalSettings); 2955/* !core/modules/views/js/base.js */; 2956/* core/modules/views/js/ajax_view.js */ 2957/** 2958* DO NOT EDIT THIS FILE. 2959* See the following change record for more information, 2960* https://www.drupal.org/node/2815083 2961* @preserve 2962**/ 2963(function ($, Drupal, drupalSettings) { 2964 Drupal.behaviors.ViewsAjaxView = {}; 2965 Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) { 2966 if (settings && settings.views && settings.views.ajaxViews) { 2967 var ajaxViews = settings.views.ajaxViews; 2968 Object.keys(ajaxViews || {}).forEach(function (i) { 2969 Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]); 2970 }); 2971 } 2972 }; 2973 Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) { 2974 if (trigger === 'unload') { 2975 if (settings && settings.views && settings.views.ajaxViews) { 2976 var ajaxViews = settings.views.ajaxViews; 2977 Object.keys(ajaxViews || {}).forEach(function (i) { 2978 var selector = ".js-view-dom-id-".concat(ajaxViews[i].view_dom_id); 2979 if ($(selector, context).length) { 2980 delete Drupal.views.instances[i]; 2981 delete settings.views.ajaxViews[i]; 2982 } 2983 }); 2984 } 2985 } 2986 }; 2987 Drupal.views = {}; 2988 Drupal.views.instances = {}; 2989 Drupal.views.ajaxView = function (settings) { 2990 var selector = ".js-view-dom-id-".concat(settings.view_dom_id); 2991 this.$view = $(selector); 2992 var ajaxPath = drupalSettings.views.ajax_path; 2993 if (ajaxPath.constructor.toString().indexOf('Array') !== -1) { 2994 ajaxPath = ajaxPath[0]; 2995 } 2996 var queryString = window.location.search || ''; 2997 if (queryString !== '') { 2998 queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, ''); 2999 if (queryString !== '') { 3000 queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString; 3001 } 3002 } 3003 this.element_settings = { 3004 url: ajaxPath + queryString, 3005 submit: settings, 3006 setClick: true, 3007 event: 'click', 3008 selector: selector, 3009 progress: { 3010 type: 'fullscreen' 3011 } 3012 }; 3013 this.settings = settings; 3014 this.$exposed_form = $("form#views-exposed-form-".concat(settings.view_name.replace(/_/g, '-'), "-").concat(settings.view_display_id.replace(/_/g, '-'))); 3015 once('exposed-form', this.$exposed_form).forEach($.proxy(this.attachExposedFormAjax, this));
3016 once('ajax-pager', this.$view.filter($.proxy(this.filterNestedViews, this))).forEach($.proxy(this.attachPagerAjax, this)); 3017 var selfSettings = $.extend({}, this.element_settings, { 3018 event: 'RefreshView', 3019 base: this.selector, 3020 element: this.$view.get(0) 3021 }); 3022 this.refreshViewAjax = Drupal.ajax(selfSettings); 3023 }; 3024 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { 3025 var that = this; 3026 this.exposedFormAjax = []; 3027 $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) { 3028 var selfSettings = $.extend({}, that.element_settings, { 3029 base: $(this).attr('id'), 3030 element: this 3031 }); 3032 that.exposedFormAjax[index] = Drupal.ajax(selfSettings); 3033 }); 3034 }; 3035 Drupal.views.ajaxView.prototype.filterNestedViews = function () { 3036 return !this.$view.parents('.view').length; 3037 }; 3038 Drupal.views.ajaxView.prototype.attachPagerAjax = function () { 3039 this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this)); 3040 }; 3041 Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { 3042 var $link = $(link); 3043 var viewData = {}; 3044 var href = $link.attr('href'); 3045 $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path)); 3046 var selfSettings = $.extend({}, this.element_settings, {
3047 submit: viewData, 3048 base: false, 3049 element: link 3050 }); 3051 this.pagerAjax = Drupal.ajax(selfSettings); 3052 }; 3053 Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) { 3054 var offset = $(response.selector).offset(); 3055 var scrollTarget = response.selector; 3056 while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) { 3057 scrollTarget = $(scrollTarget).parent(); 3058 } 3059 if (offset.top - 10 < $(scrollTarget).scrollTop()) { 3060 $(scrollTarget).animate({ 3061 scrollTop: offset.top - 10 3062 }, 500); 3063 } 3064 }; 3065})(jQuery, Drupal, drupalSettings); 3066/* !core/modules/views/js/ajax_view.js */; 3067/* modules/contrib/geolocation/js/geolocation-api.js */ 3068/** 3069 * @file 3070 * Javascript for the geolocation module. 3071 */ 3072 3073/** 3074 * @typedef {Object} GeolocationSettings 3075 * 3076 * @property {GeolocationMapSettings[]} maps 3077 * @property {Object} mapCenter 3078 */ 3079 3080/** 3081 * @type {GeolocationSettings} drupalSettings.geolocation 3082 */ 3083 3084/** 3085 * @typedef {Object} GeolocationMapSettings 3086 * 3087 * @property {String} [type] Map type 3088 * @property {String} id 3089 * @property {Object} settings 3090 * @property {Number} lat 3091 * @property {Number} lng 3092 * @property {Object[]} map_center 3093 * @property {jQuery} wrapper 3094 * @property {GeolocationMapMarker[]} mapMarkers 3095 * @property {GeolocationShape[]} mapShapes 3096 */ 3097 3098/** 3099 * Callback when map is clicked. 3100 * 3101 * @callback GeolocationMapClickCallback 3102 * 3103 * @param {GeolocationCoordinates} location - Click location. 3104 */ 3105 3106/** 3107 * Callback when a marker is added or removed. 3108 * 3109 * @callback GeolocationMarkerCallback 3110 * 3111 * @param {GeolocationMapMarker} marker - Map marker. 3112 */ 3113 3114/** 3115 * Callback when map is right-clicked. 3116 * 3117 * @callback GeolocationMapContextClickCallback 3118 * 3119 * @param {GeolocationCoordinates} location - Click location. 3120 */ 3121 3122/**
3123 * Callback when map provider becomes available. 3124 * 3125 * @callback GeolocationMapInitializedCallback 3126 * 3127 * @param {GeolocationMapInterface} map - Geolocation map. 3128 */ 3129 3130/** 3131 * Callback when map bounds changed. 3132 * 3133 * @callback GeolocationBoundsChangedCallback 3134 * 3135 * @param object bounds - New bounds. 3136 */ 3137 3138/** 3139 * Callback when map fully loaded. 3140 * 3141 * @callback GeolocationMapPopulatedCallback 3142 * 3143 * @param {GeolocationMapInterface} map - Geolocation map. 3144 */ 3145 3146/** 3147 * Callback when and only when map is updated. 3148 * 3149 * @callback GeolocationMapUpdatedCallback 3150 * 3151 * @param {GeolocationMapInterface, GeolocationMapSettings} map - Geolocation map. 3152 */ 3153 3154/** 3155 * @typedef {Object} GeolocationCoordinates 3156 * 3157 * @property {Number} lat 3158 * @property {Number} lng 3159 */ 3160 3161/** 3162 * @typedef {Object} GeolocationCenterOption 3163 * 3164 * @property {Object} map_center_id 3165 * @property {Object} option_id 3166 * @property {Object} settings 3167 */ 3168 3169/** 3170 * @typedef {Object} GeolocationMapMarker 3171 * 3172 * @property {GeolocationCoordinates} position 3173 * @property {string} title 3174 * @property {boolean} [setMarker] 3175 * @property {string} [icon] 3176 * @property {string} [label] 3177 * @property {jQuery} locationWrapper 3178 */ 3179 3180/** 3181 * @typedef {Object} GeolocationShape 3182 * 3183 * @property {GeolocationCoordinates[]} coordinates 3184 * @property {jQuery} shapeWrapper 3185 * @property {string} shape 3186 * @property {string} [title] 3187 * @property {string} [strokeColor] 3188 * @property {int} [strokeWidth] 3189 * @property {number} [strokeOpacity] 3190 * @property {string} [fillColor] 3191 * @property {number} [fillOpacity] 3192 */ 3193 3194/** 3195 * Interface for classes that represent a color. 3196 * 3197 * @interface GeolocationMapInterface 3198 * 3199 * @property {Boolean} initialized - True when map provider available and initializedCallbacks executed. 3200 * @property {Boolean} loaded - True when map fully loaded and all loadCallbacks executed. 3201 * @property {String} id 3202 * @property {GeolocationMapSettings} settings 3203 * @property {Number} lat 3204 * @property {Number} lng 3205 * @property {Object[]} mapCenter 3206 * @property {jQuery} wrapper 3207 * @property {jQuery} container 3208 * @property {Object[]} mapMarkers 3209 * 3210 * @property {function({jQuery}):{jQuery}} addControl - Add control to map, identified by classes. 3211 * @property {function()} removeControls - Remove controls from map. 3212 * 3213 * @property {function()} populatedCallback - Executes {GeolocationMapPopulatedCallback[]} for this map. 3214 * @property {function({GeolocationMapPopulatedCallback})} addPopulatedCallback - Adds a callback that will be called when map is fully loaded. 3215 * @property {function()} initializedCallback - Executes {GeolocationMapInitializedCallbacks[]} for this map. 3216 * @property {function({GeolocationMapInitializedCallback})} addInitializedCallback - Adds a callback that will be called when map provider be
3216comes available. 3217 * @property {function({GeolocationMapSettings})} updatedCallback - Executes {GeolocationMapUpdatedCallbacks[]} for this map. 3218 * @property {function({GeolocationMapUpdatedCallbacks})} addUpdatedCallback - Adds a callback that will be called when and only when an already existing map is updated. 3219 * 3220 * @property {function({GeolocationMapMarker}):{GeolocationMapMarker}} setMapMarker - Set marker on map. 3221 * @property {function({GeolocationMapMarker})} removeMapMarker - Remove single marker. 3222 * @property {function()} removeMapMarkers - Remove all markers from map. 3223 * 3224 * @property {function({GeolocationShape})} addShape - Add shape to map. 3225 * @property {function({GeolocationShape})} removeShape - Remove shape from map. 3226 * @property {function()} removeShapes - Remove all shapes from map. 3227 * 3228 * @property {function():{Promise}} getZoom - Get zoom. 3229 * @property {function({string}?, {Boolean}?)} setZoom - Set zoom. 3230 * @property {function():{GeolocationCoordinates}} getCenter - Get map center coordinates. 3231 * @property {function({string})} setCenter - Center map by plugin. 3232 * @property {function({GeolocationCoordinates}, {Number}?, {string}?)} setCenterByCoordinates - Center map on coordinates. 3233 * @property {function({GeolocationMapMarker}[]?, {String}?)} fitMapToMarkers - Fit map to markers. 3234 * @property {function({GeolocationMapMarker}[]?):{Object}} getMarkerBoundaries - Get marker boundaries. 3235 * @property {function({Object}, {String}?)} fitBoundaries - Fit map to bounds. 3236 * 3237 * @property {function({Event})} clickCallback - Executes {GeolocationMapClickCallbacks} for this map. 3238 * @property {function({GeolocationMapClickCallback})} addClickCallback - Adds a callback that will be called when map is clicked. 3239 * 3240 * @property {function({Event})} doubleClickCallback - Executes {GeolocationMapClickCallbacks} for this map. 3241 * @property {function({GeolocationMapClickCallback})} addDoubleClickCallback - Adds a callback that will be called on double click. 3242 * 3243 * @property {function({Event})} contextClickCallback - Executes {GeolocationMapContextClickCallbacks} for this map. 3244 * @property {function({GeolocationMapContextClickCallback})} addContextClickCallback - Adds a callback that will be called when map is clicked. 3245 * 3246 * @property {function({GeolocationMapMarker})} markerAddedCallback - Executes {GeolocationMarkerCallback} for this map. 3247 * @property {function({GeolocationMarkerCallback})} addMarkerAddedCallback - Adds a callback that will be called on marker(s) being added. 3248 * 3249 * @property {function({GeolocationMapMarker})} markerRemoveCallback - Executes {GeolocationMarkerCallback} for this map. 3250 * @property {function({GeolocationMarkerCallback})} addMarkerRemoveCallback - Adds a callback that will be called before marker is removed. 3251 * 3252 * @property {function()} boundsChangedCallback - Executes {GeolocationBoundsChangedCallback} for this map. 3253 * @property {function({GeolocationBoundsChangedCallback})} addBoundsChangedCallback - Adds a callback that will be called when map bounds changed. 3254 */ 3255 3256/** 3257 * Geolocation map API. 3258 * 3259 * @implements {GeolocationMapInterface} 3260 */ 3261( 3262 function ($, Drupal) { 3263 "use strict"; 3264 3265 /** 3266 * @namespace 3267 * @prop {Object} Drupal.geolocation 3268 */ 3269 Drupal.geolocation = Drupal.geolocation || {}; 3270 3271 /** 3272 * @type {GeolocationMapInterface[]} 3273 * @prop {GeolocationMapSettings} settings The map settings. 3274 */ 3275 Drupal.geolocation.maps = Drupal.geolocation.maps || []; 3276 3277 Drupal.geolocation.mapCenter = Drupal.geolocation.mapCenter || {}; 3278 3279 /** 3280 * Geolocation map. 3281 * 3282 * @constructor 3283 * @abstract 3284 * @implements {GeolocationMapInterface} 3285 * 3286 * @param {GeolocationMapSettings} mapSettings Setting to create map. 3287 */ 3288 function GeolocationMapBase(mapSettings) { 3289 this.settings = mapSettings.settings || {}; 3290 this.wrapper = mapSettings.wrapper; 3291 this.container = mapSettings.wrapper 3292 .find(".geolocation-map-container") 3293 .first(); 3294 3295 if (this.container.length !== 1) { 3296 throw "Geolocation - Map container not found"; 3297 } 3298 3299 this.initialized = false;
3300 this.populated = false; 3301 this.lat = mapSettings.lat; 3302 this.lng = mapSettings.lng; 3303 3304 if (typeof mapSettings.id === "undefined") { 3305 this.id = "map" + Math.floor(Math.random() * 10000); 3306 } else { 3307 this.id = mapSettings.id; 3308 } 3309 3310 this.mapCenter = mapSettings.map_center; 3311 this.mapMarkers = this.mapMarkers || []; 3312 this.mapShapes = this.mapShapes || []; 3313 3314 return this; 3315 } 3316 3317 GeolocationMapBase.prototype = { 3318 addControl: function (element) { 3319 // Stub. 3320 }, 3321 removeControls: function () { 3322 // Stub. 3323 }, 3324 getZoom: function () { 3325 // Stub. 3326 }, 3327 setZoom: function (zoom, defer) { 3328 // Stub. 3329 }, 3330 getCenter: function () { 3331 // Stub. 3332 }, 3333 setCenter: function () { 3334 if (typeof this.wrapper.data("preserve-map-center") !== "undefined") { 3335 return; 3336 } 3337 3338 this.setZoom(); 3339 this.setCenterByCoordinates({ lat: this.lat, lng: this.lng }); 3340 3341 if (typeof this.mapCenter !== "undefined") { 3342 var that = this; 3343 3344 var centerOptions = Object 3345 // .values(this.mapCenter) // Reenable once IE11 is dead. Hopefully soon. 3346 .keys(that.mapCenter) 3347 .map(function (item) { 3348 return that.mapCenter[item]; 3349 }) // IE11 fix from #3046802. 3350 .sort(function (a, b) { 3351 return a.weight - b.weight; 3352 }); 3353 3354 centerOptions.some( 3355 /** 3356 * @param {GeolocationCenterOption} centerOption 3357 */ 3358 function (centerOption) { 3359 if ( 3360 typeof Drupal.geolocation.mapCenter[ 3361 centerOption.map_center_id 3362 ] === "function" 3363 ) { 3364 return Drupal.geolocation.mapCenter[centerOption.map_center_id]( 3365 that, 3366 centerOption 3367 ); 3368 } 3369 } 3370 ); 3371 } 3372 }, 3373 setCenterByCoordinates: function (coordinates, accuracy, identifier) { 3374 this.centerUpdatedCallback(coordinates, accuracy, identifier); 3375 }, 3376 setMapMarker: function (marker) { 3377 this.mapMarkers.push(marker); 3378 this.markerAddedCallback(marker); 3379 }, 3380 removeMapMarker: function (marker) { 3381 var that = this; 3382 $.each( 3383 this.mapMarkers, 3384 3385 /** 3386 * @param {integer} index - Current index. 3387 * @param {GeolocationMapMarker} item - Current marker. 3388 */ 3389 function (index, item) { 3390 if (item === marker) { 3391 that.markerRemoveCallback(marker); 3392 that.mapMarkers.splice(Number(index), 1); 3393 } 3394 } 3395 ); 3396 }, 3397 removeMapMarkers: function () { 3398 var that = this; 3399 var shallowCopy = $.extend({}, this.mapMarkers); 3400 $.each( 3401 shallowCopy, 3402 3403 /** 3404 * @param {integer} index - Current index. 3405 * @param {GeolocationMapMarker} item - Current marker. 3406 */ 3407 function (index, item) { 3408 if (typeof item === "undefined") { 3409 return; 3410 } 3411 that.removeMapMarker(item); 3412 } 3413 ); 3414 }, 3415 addShape: function (shape) { 3416 this.mapShapes.push(shape); 3417 }, 3418 removeShape: function (shape) { 3419 var that = this; 3420 $.each( 3421 this.mapShapes, 3422 3423 /** 3424 * @param {integer} index - Current index. 3425 * @param {GeolocationShape} item - Current shape. 3426 */ 3427 function (index, item) { 3428 if (item === shape) { 3429 that.mapShapes.splice(Number(index), 1); 3430 } 3431 } 3432 ); 3433 }, 3434 removeShapes: function () { 3435 var that = this; 3436 var shallowCopy = $.extend({}, this.mapShapes); 3437 $.each( 3438 shallowCopy, 3439 3440 /** 3441 * @param {integer} index - Current index. 3442 * @param {GeolocationShape} item - Current shape. 3443 */ 3444 function (index, item) { 3445 if (typeof item === "undefined") { 3446 return; 3447 } 3448 that.removeShape(item); 3449 } 3450 ); 3451 }, 3452 fitMapToMarkers: function (markers, identifier) { 3453 var boundaries = this.getMarkerBoundaries(); 3454 if (boundaries === false) { 3455 return false;
3456 } 3457 3458 this.fitBoundaries(boundaries, identifier); 3459 }, 3460 getMarkerBoundaries: function (markers) { 3461 // Stub. 3462 }, 3463 fitBoundaries: function (boundaries, identifier) { 3464 this.centerUpdatedCallback(this.getCenter(), null, identifier); 3465 }, 3466 clickCallback: function (location) { 3467 this.clickCallbacks = this.clickCallbacks || []; 3468 $.each(this.clickCallbacks, function (index, callback) { 3469 callback(location); 3470 }); 3471 }, 3472 addClickCallback: function (callback) { 3473 this.clickCallbacks = this.clickCallbacks || []; 3474 this.clickCallbacks.push(callback); 3475 }, 3476 doubleClickCallback: function (location) { 3477 this.doubleClickCallbacks = this.doubleClickCallbacks || []; 3478 $.each(this.doubleClickCallbacks, function (index, callback) { 3479 callback(location); 3480 }); 3481 }, 3482 addDoubleClickCallback: function (callback) { 3483 this.doubleClickCallbacks = this.doubleClickCallbacks || []; 3484 this.doubleClickCallbacks.push(callback); 3485 }, 3486 contextClickCallback: function (location) { 3487 this.contextClickCallbacks = this.contextClickCallbacks || []; 3488 $.each(this.contextClickCallbacks, function (index, callback) { 3489 callback(location); 3490 }); 3491 }, 3492 addContextClickCallback: function (callback) { 3493 this.contextClickCallbacks = this.contextClickCallbacks || []; 3494 this.contextClickCallbacks.push(callback); 3495 }, 3496 initializedCallback: function () { 3497 this.initializedCallbacks = this.initializedCallbacks || []; 3498 while (this.initializedCallbacks.length > 0) { 3499 this.initializedCallbacks.shift()(this); 3500 } 3501 this.initialized = true; 3502 }, 3503 addInitializedCallback: function (callback) { 3504 if (this.initialized) { 3505 callback(this); 3506 } else { 3507 this.initializedCallbacks = this.initializedCallbacks || []; 3508 this.initializedCallbacks.push(callback); 3509 } 3510 }, 3511 updatedCallback: function (mapSettings) { 3512 var that = this; 3513 this.updatedCallbacks = this.updatedCallbacks || []; 3514 this.updatedCallbacks.forEach(function (callback) { 3515 callback(that, mapSettings); 3516 }); 3517 }, 3518 addUpdatedCallback: function (callback) { 3519 this.updatedCallbacks = this.updatedCallbacks || []; 3520 this.updatedCallbacks.push(callback); 3521 }, 3522 boundsChangedCallback: function (bounds) { 3523 this.boundsChangedCallbacks = this.boundsChangedCallbacks || []; 3524 $.each(this.boundsChangedCallbacks, function (index, callback) { 3525 callback(bounds); 3526 }); 3527 }, 3528 addBoundsChangedCallback: function (callback) { 3529 this.boundsChangedCallbacks = this.boundsChangedCallbacks || []; 3530 this.boundsChangedCallbacks.push(callback); 3531 }, 3532 centerUpdatedCallback: function (coordinates, accuracy, identifier) { 3533 this.centerUpdatedCallbacks = this.centerUpdatedCallbacks || []; 3534 $.each(this.centerUpdatedCallbacks, function (index, callback) { 3535 callback(coordinates, accuracy, identifier); 3536 }); 3537 }, 3538 addCenterUpdatedCallback: function (callback) { 3539 this.centerUpdatedCallbacks = this.centerUpdatedCallbacks || []; 3540 this.centerUpdatedCallbacks.push(callback); 3541 }, 3542 markerAddedCallback: function (marker) { 3543 this.markerAddedCallbacks = this.markerAddedCallbacks || []; 3544 $.each(this.markerAddedCallbacks, function (index, callback) { 3545 callback(marker); 3546 }); 3547 }, 3548 addMarkerAddedCallback: function (callback, existing) { 3549 existing = existing || true; 3550 if (existing) { 3551 $.each(this.mapMarkers, function (index, marker) { 3552 callback(marker); 3553 }); 3554 } 3555 this.markerAddedCallbacks = this.markerAddedCallbacks || []; 3556 this.markerAddedCallbacks.push(callback); 3557 }, 3558 markerRemoveCallback: function (marker) { 3559 this.markerRemoveCallbacks = this.markerRemoveCallbacks || []; 3560 $.each(this.markerRemoveCallbacks, function (index, callback) { 3561 callback(marker); 3562 }); 3563 }, 3564 addMarkerRemoveCallback: function (callback) { 3565 this.markerRemoveCallbacks = this.markerRemoveCallbacks || []; 3566 this.markerRemoveCallbacks.push(callback); 3567 }, 3568 populatedCallback: function () { 3569 this.populatedCallbacks = this.populatedCallbacks || []; 3570 while (this.populatedCallbacks.length > 0) { 3571 this.populatedCallbacks.shift()(this); 3572 } 3573 this.populated = true; 3574 }, 3575 addPopulatedCallback: function (callback) { 3576 if (this.populated) { 3577 callback(this); 3578 } else { 3579 this.populatedCallbacks = this.populatedCallbacks || []; 3580 this.populatedCallbacks.push(callback); 3581 } 3582 }, 3583 loadMarkersFromContainer: function () { 3584 var locations = []; 3585 this.wrapper 3586 .find(".geolocation-location") 3587 .each(function (index, locationWrapperElement) { 3588 var locationWrapper = $(locationWrapperElement); 3589 3590 var position = { 3591 lat: Number(locationWrapper.data("lat")), 3592 lng: Number(locationWrapper.data("lng")), 3593 }; 3594 3595 /** @type {GeolocationMapMarker} */ 3596 var location = { 3597 position: position, 3598 title: locationWrapper.find(".location-title").text().trim(), 3599 setMarker: true, 3600 locationWrapper: locationWrapper, 3601 }; 3602 3603 if (typeof locationWrapper.data("icon") !== "undefined") { 3604 location.icon = locationWrapper.data("icon").toString(); 3605 } 3606 3607 if (typeof locationWrapper.data("label") !== "undefined") { 3608 location.label = locationWrapper.data("label").toString(); 3609 } 3610
3611 if (locationWrapper.data("set-marker") === "false") { 3612 location.setMarker = false; 3613 } 3614 3615 locations.push(location); 3616 }); 3617 3618 return locations; 3619 }, 3620 loadShapesFromContainer: function () { 3621 var shapes = []; 3622 this.wrapper 3623 .find(".geolocation-shape") 3624 .each(function (index, shapeWrapperElement) { 3625 var shapeWrapper = $(shapeWrapperElement); 3626 var meta = shapeWrapper 3627 .find('span[typeof="GeoShape"] meta') 3628 .first(); 3629 if (meta.length === 0) { 3630 return; 3631 } 3632 3633 var type = meta.attr("property").toString(); 3634 3635 var coordinates = []; 3636 $.each( 3637 meta.attr("content").toString().split(" "), 3638 function (index, rawCoordinate) { 3639 var coordinate = rawCoordinate.split(","); 3640 if (coordinate[0].length === 0 || coordinate[1].length === 0) { 3641 return; 3642 } 3643 coordinates.push({ 3644 lat: parseFloat(coordinate[0]), 3645 lng: parseFloat(coordinate[1]), 3646 }); 3647 } 3648 ); 3649 3650 /** @type {GeolocationShape} */ 3651 var shape = { 3652 coordinates: coordinates, 3653 shape: type, 3654 shapeWrapper: shapeWrapper, 3655 }; 3656 3657 switch (type) { 3658 case "line": 3659 shape.title = shapeWrapper 3660 .find(".polyline-title") 3661 .text() 3662 .trim(); 3663 break; 3664 3665 case "polygon": 3666 shape.title = shapeWrapper.find(".polygon-title").text().trim(); 3667 3668 if (typeof shapeWrapper.data("fillColor") !== "undefined") { 3669 shape.fillColor = shapeWrapper.data("fillColor").toString(); 3670 } 3671 if (typeof shapeWrapper.data("fillOpacity") !== "undefined") { 3672 shape.fillOpacity = parseFloat( 3673 shapeWrapper.data("fillOpacity").toString() 3674 ); 3675 } 3676 break; 3677 } 3678 3679 if (typeof shapeWrapper.data("strokeColor") !== "undefined") { 3680 shape.strokeColor = shapeWrapper.data("strokeColor").toString(); 3681 } 3682 if (typeof shapeWrapper.data("strokeWidth") !== "undefined") { 3683 shape.strokeWidth = parseInt( 3684 shapeWrapper.data("strokeWidth").toString() 3685 ); 3686 } 3687 if (typeof shapeWrapper.data("strokeOpacity") !== "undefined") { 3688 shape.strokeOpacity = parseFloat( 3689 shapeWrapper.data("strokeOpacity").toString() 3690 ); 3691 } 3692 3693 shapes.push(shape); 3694 }); 3695 3696 return shapes; 3697 }, 3698 boundariesNormalized: function (boundaries) { 3699 if ( 3700 typeof boundaries.north === "number" && 3701 typeof boundaries.east === "number" && 3702 typeof boundaries.south === "number" && 3703 typeof boundaries.west === "number" 3704 ) { 3705 return true; 3706 } 3707 3708 return false; 3709 }, 3710 normalizeBoundaries: function (boundaries) { 3711 var that = this; 3712 3713 if (that.boundariesNormalized(boundaries)) { 3714 return boundaries; 3715 } 3716 3717 if ( 3718 typeof boundaries.north !== "undefined" && 3719 typeof boundaries.south !== "undefined" && 3720 typeof boundaries.east !== "undefined" && 3721 typeof boundaries.west !== "undefined" 3722 ) { 3723 var castBoundaries = { 3724 north: Number(boundaries.north), 3725 east: Number(boundaries.east), 3726 south: Number(boundaries.south), 3727 west: Number(boundaries.west), 3728 }; 3729 3730 if (that.boundariesNormalized(castBoundaries)) { 3731 return castBoundaries; 3732 } 3733 } 3734 3735 $.each(Drupal.geolocation.MapProviders, function (type, name) { 3736 if ( 3737 typeof Drupal.geolocation[name].prototype.normalizeBoundaries !== 3738 "undefined" 3739 ) { 3740 var normalizedBoundaries = Drupal.geolocation[ 3741 name 3742 ].prototype.normalizeBoundaries.call(null, boundaries); 3743 } 3744 3745 if (that.boundariesNormalized(normalizedBoundaries)) { 3746 boundaries = normalizedBoundaries; 3747 return false;
3748 } 3749 }); 3750 3751 if (that.boundariesNormalized(boundaries)) { 3752 return boundaries; 3753 } 3754 3755 return false; 3756 }, 3757 }; 3758 3759 Drupal.geolocation.GeolocationMapBase = GeolocationMapBase; 3760 3761 /** 3762 * Factory creating map instances. 3763 * 3764 * @constructor 3765 * 3766 * @param {GeolocationMapSettings} mapSettings The map settings. 3767 * @param {Boolean} [reset] Force creation of new map. 3768 * 3769 * @return {GeolocationMapInterface|boolean} Un-initialized map. 3770 */ 3771 function Factory(mapSettings, reset) { 3772 reset = reset || false; 3773 mapSettings.type = mapSettings.type || "google_maps"; 3774 3775 var map = null; 3776 3777 /** 3778 * Previously stored map. 3779 * @type {boolean|GeolocationMapInterface} 3780 */ 3781 var existingMap = Drupal.geolocation.getMapById(mapSettings.id); 3782 3783 if (reset === true || !existingMap) { 3784 if ( 3785 typeof Drupal.geolocation[ 3786 Drupal.geolocation.MapProviders[mapSettings.type] 3787 ] !== "undefined" 3788 ) { 3789 var mapProvider = 3790 Drupal.geolocation[ 3791 Drupal.geolocation.MapProviders[mapSettings.type] 3792 ]; 3793 map = new mapProvider(mapSettings); 3794 Drupal.geolocation.maps.push(map); 3795 } 3796 } else { 3797 map = existingMap; 3798 map.updatedCallback(mapSettings); 3799 } 3800 3801 if (!map) { 3802 console.error("Map could not be initialized."); // eslint-disable-line no-console . 3803 return false; 3804 } 3805 3806 if (typeof map.container === "undefined") { 3807 console.error("Map container not set."); // eslint-disable-line no-console . 3808 return false; 3809 } 3810 3811 if (map.container.length !== 1) { 3812 console.error("Map container not unique."); // eslint-disable-line no-console . 3813 return false; 3814 } 3815 3816 return map; 3817 } 3818 3819 Drupal.geolocation.Factory = Factory; 3820 3821 /** 3822 * @type {Object} 3823 */ 3824 Drupal.geolocation.MapProviders = {}; 3825 3826 Drupal.geolocation.addMapProvider = function (type, name) { 3827 Drupal.geolocation.MapProviders[type] = name; 3828 }; 3829 3830 /** 3831 * Get map by ID. 3832 * 3833 * @param {String} id - Map ID to retrieve. 3834 * 3835 * @return {GeolocationMapInterface|boolean} - Retrieved map or false. 3836 */ 3837 Drupal.geolocation.getMapById = function (id) { 3838 var map = false; 3839 $.each(Drupal.geolocation.maps, function (index, currentMap) { 3840 if (currentMap.id === id) { 3841 map = currentMap; 3842 } 3843 }); 3844 3845 if (!map) { 3846 return false; 3847 } 3848 3849 if (typeof map.container === "undefined") { 3850 console.error("Existing map container not set."); // eslint-disable-line no-console . 3851 return false; 3852 } 3853 3854 if (map.container.length !== 1) { 3855 console.error("Existing map container not unique."); // eslint-disable-line no-console . 3856 return false; 3857 } 3858 3859 return map; 3860 }; 3861 3862 /** 3863 * @typedef {Object} GeolocationMapFeatureSettings 3864 * 3865 * @property {String} id 3866 * @property {boolean} enabled 3867 * @property {boolean} executed 3868 */ 3869 3870 /** 3871 * Callback when map is clicked. 3872 * 3873 * @callback GeolocationMapFeatureCallback 3874 * 3875 * @param {GeolocationMapInterface} map - Map. 3876 * @param {GeolocationMapFeatureSettings} featureSettings - Settings. 3877 * 3878 * @return {boolean} - Executed successfully. 3879 */ 3880 3881 /** 3882 * Get map by ID. 3883 * 3884 * @param {String} featureId - Map ID to retrieve. 3885 * @param {GeolocationMapFeatureCallback} callback - Retrieved map or false. 3886 * @param {Object} drupalSettings - Drupal settings. 3887 */ 3888 Drupal.geolocation.executeFeatureOnAllMaps = function ( 3889 featureId, 3890 callback, 3891 drupalSettings 3892 ) { 3893 if (typeof drupalSettings.geolocation === "undefined") { 3894 return false; 3895 } 3896 3897 $.each( 3898 drupalSettings.geolocation.maps, 3899 3900 /** 3901 * @param {String} mapId - ID of current map 3902 * @param {Object} mapSettings - settings for current map 3903 * @param {GeolocationMapFeatureSettings} mapSettings[featureId] - Feature settings for current map 3904 */ 3905 function (mapId, mapSettings) { 3906 if (typeof mapSettings[featureId] === "undefined") { 3907 return; 3908 } 3909 if (!mapSettings[featureId].enable) { 3910 return; 3911 } 3912 var map = Drupal.geolocation.getMapById(mapId); 3913 if (!map) { 3914 return; 3915 } 3916 3917 map.features = map.features || {}; 3918 map.features[featureId] = map.features[featureId] || {}; 3919 if (typeof map.features[featureId].executed === "undefined") { 3920 map.features[featureId].executed = false;
3921 } 3922 3923 if (map.features[featureId].executed) { 3924 return; 3925 } 3926 3927 map.addPopulatedCallback(function (map) { 3928 if (map.features[featureId].executed) { 3929 return; 3930 } 3931 var result = callback(map, mapSettings[featureId]); 3932 3933 if (result === true) { 3934 map.features[featureId].executed = true; 3935 } 3936 }); 3937 } 3938 ); 3939 }; 3940 } 3941)(jQuery, Drupal); 3942 3943/* !modules/contrib/geolocation/js/geolocation-api.js */; 3944/* modules/contrib/geolocation/js/geolocation-map.js */ 3945/** 3946 * @file 3947 * Javascript for the Geolocation map formatter. 3948 */ 3949 3950(function ($, Drupal) { 3951 "use strict"; 3952 3953 /** 3954 * Find and display all maps. 3955 * 3956 * @type {Drupal~behavior} 3957 * 3958 * @prop {Drupal~behaviorAttach} attach 3959 * Attaches Geolocation Maps formatter functionality to relevant elements. 3960 */ 3961 Drupal.behaviors.geolocationMap = { 3962 /** 3963 * @param context 3964 * @param drupalSettings 3965 * @param {Object} drupalSettings.geolocation 3966 */ 3967 attach: function (context, drupalSettings) { 3968 $(once("geolocation-map-processed", ".geolocation-map-wrapper")) 3969 .each(function (index, item) { 3970 var mapWrapper = $(item); 3971 var mapSettings = {}; 3972 var reset = false; 3973 mapSettings.id = mapWrapper.attr("id"); 3974 mapSettings.wrapper = mapWrapper; 3975 3976 if (mapWrapper.length === 0) { 3977 return; 3978 } 3979 3980 mapSettings.lat = 0; 3981 mapSettings.lng = 0; 3982 3983 if (mapWrapper.data("centre-lat") && mapWrapper.data("centre-lng")) { 3984 mapSettings.lat = Number(mapWrapper.data("centre-lat")); 3985 mapSettings.lng = Number(mapWrapper.data("centre-lng")); 3986 } 3987 3988 if (mapWrapper.data("map-type")) { 3989 mapSettings.type = mapWrapper.data("map-type"); 3990 } 3991 3992 if (typeof drupalSettings.geolocation === "undefined") { 3993 console.error("Bailing out for lack of settings."); // eslint-disable-line no-console . 3994 return; 3995 } 3996 3997 $.each( 3998 drupalSettings.geolocation.maps, 3999 function (mapId, currentSettings) { 4000 if (mapId === mapSettings.id) { 4001 mapSettings = $.extend(currentSettings, mapSettings); 4002 } 4003 } 4004 ); 4005 4006 if (mapWrapper.parent().hasClass("preview-section")) { 4007 if (mapWrapper.parentsUntil("#views-live-preview").length) { 4008 reset = true; 4009 } 4010 } 4011 4012 var map = Drupal.geolocation.Factory(mapSettings, reset); 4013 4014 if (!map) { 4015 once.removeOnce("geolocation-map-processed", mapWrapper); 4016 return; 4017 } 4018 4019 map.addInitializedCallback(function (map) { 4020 map.removeControls(); 4021 $(".geolocation-map-controls > *", map.wrapper).each(function ( 4022 index, 4023 control 4024 ) { 4025 map.addControl(control); 4026 }); 4027 4028 map.removeMapMarkers(); 4029 var locations = map.loadMarkersFromContainer(); 4030 $.each(locations, function (index, location) { 4031 map.setMapMarker(location); 4032 }); 4033 4034 map.removeShapes(); 4035 var shapes = map.loadShapesFromContainer(); 4036 $.each(shapes, function (index, shape) { 4037 map.addShape(shape); 4038 }); 4039 4040 map.setCenter(); 4041 4042 map.wrapper.find(".geolocation-location").hide(); 4043 }); 4044 4045 map.addUpdatedCallback(function (map, mapSettings) { 4046 map.settings = $.extend(map.settings, mapSettings.settings); 4047 map.wrapper = mapSettings.wrapper; 4048 mapSettings.wrapper 4049 .find(".geolocation-map-container") 4050 .replaceWith(map.container); 4051 map.lat = mapSettings.lat; 4052 map.lng = mapSettings.lng; 4053 if (typeof mapSettings.map_center !== "undefined") { 4054 map.mapCenter = mapSettings.map_center; 4055 } 4056 }); 4057 }); 4058 }, 4059 detach: function (context, drupalSettings) {}, 4060 }; 4061})(jQuery, Drupal); 4062 4063/* !modules/contrib/geolocation/js/geolocation-map.js */; 4064/* modules/contrib/geolocation/js/geolocation-common-map.js */ 4065/** 4066 * @file 4067 * Handle the common map. 4068 */ 4069 4070/** 4071 * @name CommonMapUpdateSettings 4072 * @property {String} enable 4073 * @property {String} hide_form 4074 * @property {number} views_refresh_delay 4075 * @property {String} update_view_id 4076 * @property {String} update_view_display_id 4077 * @property {String}
4077 boundary_filter 4078 * @property {String} parameter_identifier 4079 */ 4080 4081/** 4082 * @name CommonMapSettings 4083 * @property {Object} settings 4084 * @property {CommonMapUpdateSettings} dynamic_map 4085 * @property {Boolean} markerScrollToResult 4086 */ 4087 4088/** 4089 * @property {CommonMapSettings[]} drupalSettings.geolocation.commonMap 4090 */ 4091 4092(function ($, window, Drupal) { 4093 "use strict"; 4094 4095 /** 4096 * Attach common map style functionality. 4097 * 4098 * @type {Drupal~behavior} 4099 * 4100 * @prop {Drupal~behaviorAttach} attach 4101 * Attaches common map style functionality to relevant elements. 4102 */ 4103 Drupal.behaviors.geolocationCommonMap = { 4104 /** 4105 * @param {GeolocationSettings} drupalSettings.geolocation 4106 */ 4107 attach: function (context, drupalSettings) { 4108 if (typeof drupalSettings.geolocation === "undefined") { 4109 return; 4110 } 4111 4112 $.each( 4113 drupalSettings.geolocation.commonMap, 4114 4115 /** 4116 * @param {String} mapId - ID of current map 4117 * @param {CommonMapSettings} commonMapSettings - settings for current map 4118 */ 4119 function (mapId, commonMapSettings) { 4120 var map = Drupal.geolocation.getMapById(mapId); 4121 4122 if (!map) { 4123 return; 4124 } 4125 4126 /* 4127 * Hide form if requested. 4128 */ 4129 if ( 4130 typeof commonMapSettings.dynamic_map !== "undefined" && 4131 commonMapSettings.dynamic_map.enable && 4132 commonMapSettings.dynamic_map.hide_form && 4133 typeof commonMapSettings.dynamic_map.parameter_identifier !== 4134 "undefined" 4135 ) { 4136 var exposedForm = $( 4137 "form#views-exposed-form-" + 4138 commonMapSettings.dynamic_map.update_view_id.replace( 4139 /_/g, 4140 "-" 4141 ) + 4142 "-" + 4143 commonMapSettings.dynamic_map.update_view_display_id.replace( 4144 /_/g, 4145 "-" 4146 ) 4147 ); 4148 4149 if (exposedForm.length === 1) { 4150 exposedForm 4151 .find( 4152 'input[name^="' + 4153 commonMapSettings.dynamic_map.parameter_identifier + 4154 '"]' 4155 ) 4156 .each(function (index, item) { 4157 $(item).parent().hide(); 4158 }); 4159 4160 // Hide entire form if it's empty now, except form-submit. 4161 if ( 4162 exposedForm.find( 4163 "input:visible:not(.form-submit), select:visible" 4164 ).length === 0 4165 ) { 4166 exposedForm.hide(); 4167 } 4168 } 4169 } 4170 } 4171 ); 4172 }, 4173 detach: function (context, drupalSettings) {}, 4174 }; 4175 4176 Drupal.geolocation.commonMap = Drupal.geolocation.commonMap || {}; 4177 4178 Drupal.geolocation.commonMap.dynamicMapViewsAjaxSettings = function ( 4179 commonMapSettings 4180 ) { 4181 // Make sure to load current form DOM element, which will change after every AJAX operation. 4182 var view = $( 4183 ".view-id-" + 4184 commonMapSettings.dynamic_map.update_view_id + 4185 ".view-display-id-" + 4186 commonMapSettings.dynamic_map.update_view_display_id 4187 ); 4188 if (view.length === 0) { 4189 console.error("Geolocation - No common map container found."); 4190 return; 4191 } 4192 4193 if (typeof commonMapSettings.dynamic_map.boundary_filter === "undefined") { 4194 return; 4195 } 4196 4197 // Extract the view DOM ID from the view classes. 4198 var matches = /(js-view-dom-id-\w+)/.exec(view.attr("class").toString()); 4199 var currentViewId = matches[1].replace("js-view-dom-id-", "views_dom_id:"); 4200 4201 var viewInstance = Drupal.views.instances[currentViewId]; 4202 var ajaxSettings = $.extend(true, {}, viewInstance.element_settings); 4203 ajaxSettings.progress.type = "none"; 4204 4205 var exposedForm = $( 4206 "form#views-exposed-form-" + 4207 commonMapSettings.dynamic_map.update_view_id.replace(/_/g, "-") + 4208 "-" + 4209 commonMapSettings.dynamic_map.update_view_display_id.replace(/_/g, "-") 4210 ); 4211 if (exposedForm.length) { 4212 // Add form values. 4213 jQuery.each(exposedForm.serializeArray(), function (index, field) { 4214 var add = {}; 4215 add[field.name] = field.value; 4216 ajaxSettings.submit = $.extend(ajaxSettings.submit, add); 4217 }); 4218 } 4219 4220 // Trigger geolocation bounds specific behavior. 4221 ajaxSettings.submit = $.extend(ajaxSettings.submit, { 4222 geolocation_common_map_dynamic_view: true, 4223 }); 4224 4225 return ajaxSettings; 4226 }; 4227})(jQuery, window, Drupal); 4228 4229/* !modules/contrib/geolocation/js/geolocation-common-map.js */; 4230/* modules/contrib/geolocation/js/MapCenter/fitlocations.js */ 4231/** 4232 * @file 4233 * Fit locations. 4234 */ 4235 4236(function (Drupal) { 4237 "use strict"; 4238 4239 Drupal.geolocation = Drupal.geolocation || {}; 4240 Drupal.geolocation.mapCenter = Drupal.geolocation.mapCenter || {}; 4241 4242 /** 4243 * @param {GeolocationMapInterface} map 4244 * @param {GeolocationCenterOption} centerOption 4245 * @param {Boolean} centerOption.settings.reset_zoom 4246 * @param {Boolean} centerOption.settings.min_zoom 4247 */ 4248 Drupal.geolocation.mapCenter.fit_bounds = function (map, centerOption) { 4249 if (typeof map.mapMarkers === "undefined") { 4250 return false;
4251 } 4252 4253 if (map.mapMarkers.length === 0) { 4254 return false; 4255 } 4256 4257 map.fitMapToMarkers(); 4258 4259 if (centerOption.settings.reset_zoom) { 4260 map.setZoom(undefined, true); 4261 } else if (centerOption.settings.min_zoom) { 4262 map.getZoom().then(function (zoom) { 4263 if (centerOption.settings.min_zoom < zoom) { 4264 map.setZoom(centerOption.settings.min_zoom); 4265 } 4266 }); 4267 } 4268 4269 return true; 4270 }; 4271})(Drupal); 4272 4273/* !modules/contrib/geolocation/js/MapCenter/fitlocations.js */; 4274/* modules/contrib/geolocation/js/MapCenter/static-location.js */ 4275/** 4276 * @file 4277 * Static location center. 4278 */ 4279 4280(function (Drupal) { 4281 "use strict"; 4282 4283 Drupal.geolocation = Drupal.geolocation || {}; 4284 Drupal.geolocation.mapCenter = Drupal.geolocation.mapCenter || {}; 4285 4286 /** 4287 * @param {GeolocationMapInterface} map 4288 * @param {GeolocationCenterOption} centerOption 4289 * @param {Boolean} centerOption.success 4290 */ 4291 Drupal.geolocation.mapCenter.location_plugins = function (map, centerOption) { 4292 if (typeof centerOption.success !== "undefined" && centerOption.success) { 4293 return true; 4294 } 4295 return false; 4296 }; 4297})(Drupal); 4298 4299/* !modules/contrib/geolocation/js/MapCenter/static-location.js */; 4300/* modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-leaflet-api.js */ 4301/** 4302 * @file 4303 * Javascript for leaflet integration. 4304 */ 4305 4306(function ($, Drupal) { 4307 'use strict'; 4308 4309 /** 4310 * GeolocationLeafletMap element. 4311 * 4312 * @constructor 4313 * @augments {GeolocationMapBase} 4314 * @implements {GeolocationMapInterface} 4315 * @inheritDoc 4316 * 4317 * @prop {Map} leafletMap 4318 * @prop {L.LayerGroup} markerLayer 4319 * @prop {TileLayer} tileLayer 4320 * @prop {Object} settings.leaflet_settings - Leaflet specific settings. 4321 */ 4322 function GeolocationLeafletMap(mapSettings) { 4323 var leafletPromise = new Promise(function (resolve, reject) { 4324 if (typeof L === 'undefined') { 4325 setTimeout(function () { 4326 if (typeof L === 'undefined') { 4327 reject(); 4328 } 4329 else { 4330 resolve(); 4331 } 4332 }, 1000); 4333 } 4334 else { 4335 resolve(); 4336 } 4337 }); 4338 4339 this.type = 'leaflet'; 4340 4341 Drupal.geolocation.GeolocationMapBase.call(this, mapSettings); 4342 4343 /** 4344 * 4345 * @type {MapOptions} 4346 */ 4347 var defaultLeafletSettings = { 4348 zoom: 10 4349 }; 4350 4351 // Add any missing settings. 4352 this.settings.leaflet_settings = $.extend(defaultLeafletSettings, this.settings.leaflet_settings); 4353 4354 // Set the container size. 4355 this.container.css({ 4356 height: this.settings.leaflet_settings.height, 4357 width: this.settings.leaflet_settings.width 4358 }); 4359 4360 var that = this; 4361 4362 leafletPromise.then(function () { 4363 4364 var leafletMapSettings = that.settings.leaflet_settings; 4365 leafletMapSettings.center = [that.lat, that.lng]; 4366 leafletMapSettings.zoomControl = false; 4367 leafletMapSettings.attributionControl = false; 4368 leafletMapSettings.crs = L.CRS[that.settings.leaflet_settings.crs]; 4369 4370 /** @type {Map} */ 4371 var leafletMap = L.map(that.container.get(0), leafletMapSettings); 4372 4373 var markerLayer = L.layerGroup().addTo(leafletMap); 4374 4375 // Set the tile layer. 4376 var tileLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(leafletMap); 4377 4378 that.leafletMap = leafletMap; 4379 that.markerLayer = markerLayer; 4380 that.tileLayer = tileLayer; 4381 4382 that.addPopulatedCallback(function (map) { 4383 var singleClick; 4384 map.leafletMap.on('click', /** @param {LeafletMouseEvent} e */ function (e) { 4385 singleClick = setTimeout(function () { 4386 map.clickCallback({lat: e.latlng.lat, lng: e.latlng.lng}); 4387 }, 500); 4388 }); 4389 4390 map.leafletMap.on('dblclick', /** @param {LeafletMouseEvent} e */ function (e) { 4391 clearTimeout(singleClick); 4392 map.doubleClickCallback({lat: e.latlng.lat, lng: e.latlng.lng}); 4393 }); 4394 4395 map.leafletMap.on('contextmenu', /** @param {LeafletMouseEvent} e */ function (e) { 4396 map.contextClickCallback({lat: e.latlng.lat, lng: e.latlng.lng}); 4397 }); 4398 4399 map.leafletMap.on('moveend', /** @param {LeafletEvent} e */ function (e) { 4400 map.boundsChangedCallback(map.leafletMap.getBounds()); 4401 }); 4402 }); 4403 4404 that.initializedCallback(); 4405 that.populatedCallback(); 4406 }) 4407 .catch(function (error) { 4408 console.error(error); 4409 }); 4410 } 4411 GeolocationLeafletMap.prototype = Object.create(Drupal.geolocation.GeolocationMapBase.prototype); 4412 GeolocationLeafletMap.prototype.constructor = GeolocationLeafletMap; 4413 GeolocationLeafletMap.prototype.getZoom = function () { 4414 var that = this; 4415 return new Promise(function (resolve, reject) { 4416 resolve(that.leafletMap.getZoom()); 4417 }); 4418 }; 4419 GeolocationLeafletMap.prototype.setZoom = function (zoom, defer) { 4420 if (typeof zoom === 'undefined') { 4421 zoom = this.settings.leaflet_settings.zoom; 4422 } 4423 zoom = parseInt(zoom); 4424 this.leafletMap.setZoom(zoom); 4425 }; 4426 GeolocationLeafletMap.prototype.setCenterByCoordinates = function (coordinates, accuracy, identifier) { 4427 Drupal.geolocation.GeolocationMapBase.prototype.setCenterByCoordinates.call(this, coordinates, accuracy, identifier); 4428 4429 if (typeof accuracy === 'undefined') { 4430 this.leafletMap.panTo(coordinates); 4431 return; 4432 } 4433 4434 var circle = this.addAccuracyIndicatorCircle(coordinates, accuracy); 4435 4436 this.leafletMap.fitBounds(circle.getBounds()); 4437 4438 setInterval(fadeCityCircles, 300); 4439 4440 function fadeCityCircles() { 4441 var fillOpacity = circle.options.fillOpacity; 4442 fillOpacity -= 0.03; 4443 4444 var opacity = circle.options.opacity; 4445 opacity -= 0.06; 4446 4447 if ( 4448 opacity > 0 4449 && fillOpacity > 0 4450 ) { 4451 circle.setStyle({ 4452 fillOpacity: fillOpacity, 4453 stroke: opacity 4454 }); 4455 } 4456 else { 4457 circle.remove() 4458 } 4459 } 4460 }; 4461 GeolocationLeafletMap.prototype.addAccuracyIndicatorCircle = function (location, accuracy) { 4462 return L.circle(location, accuracy, { 4463 interactive: false, 4464 color: '#4285F4', 4465 opacity: 0.3, 4466 fillColor: '#4285F4', 4467 fillOpacity: 0.15 4468 }).addTo(this.leafletMap); 4469 }; 4470 GeolocationLeafletMap.prototype.setMapMarker = function (markerSettings) { 4471 if (typeof markerSettings.setMarker !== 'undefined') { 4472 if (markerSettings.setMarker === false) { 4473 return; 4474 } 4475 } 4476 4477 if (typeof markerSettings.icon === 'string') { 4478 markerSettings.icon = L.icon({ 4479 iconUrl: markerSettings.icon 4480 }); 4481 } 4482 4483 /** @type {Marker} */ 4484 var currentMarker = L.marker([parseFloat(markerSettings.position.lat), parseFloat(markerSettings.position.lng)], markerSettings).addTo(this.markerLayer); 4485 4486 currentMarker.locationWrapper = markerSettings.locationWrapper; 4487 4488 if (typeof markerSettings.label === 'string') { 4489 currentMarker.bindTooltip(markerSettings.label, { 4490 permanent: true, 4491 direction: 'top' 4492 }); 4493 } 4494 4495 Drupal.geolocation.GeolocationMapBase.prototype.setMapMarker.call(this, currentMarker); 4496 4497 return currentMarker; 4498 }; 4499 GeolocationLeafletMap.prototype.removeMapMarker = function (marker) { 4500 Drupal.geolocation.GeolocationMapBase.prototype.removeMapMarker.call(this, marker); 4501 this.markerLayer.removeLayer(marker); 4502 }; 4503 GeolocationLeafletMap.prototype.addShape = function (shapeSettings) { 4504 if (typeof shapeSettings === 'undefined') { 4505 return; 4506 } 4507 4508 var coordinates = []; 4509 4510 $.each(shapeSettings.coordinates, function (index, coordinate) {
4511 coordinates.push([coordinate.lat, coordinate.lng]); 4512 }); 4513 4514 var shape; 4515 4516 switch (shapeSettings.shape) { 4517 case 'line': 4518 shape = L.polyline(coordinates, { 4519 color: shapeSettings.strokeColor, 4520 opacity: shapeSettings.strokeOpacity, 4521 weight: shapeSettings.strokeWidth 4522 }); 4523 if (shapeSettings.title) { 4524 shape.bindTooltip(shapeSettings.title); 4525 } 4526 break; 4527 4528 case 'polygon': 4529 shape = L.polygon(coordinates, { 4530 color: shapeSettings.strokeColor, 4531 opacity: shapeSettings.strokeOpacity, 4532 weight: shapeSettings.strokeWidth, 4533 fillColor: shapeSettings.fillColor, 4534 fillOpacity: shapeSettings.fillOpacity 4535 }); 4536 if (shapeSettings.title) { 4537 shape.bindTooltip(shapeSettings.title); 4538 } 4539 break; 4540 } 4541 4542 shape.addTo(this.leafletMap); 4543 4544 Drupal.geolocation.GeolocationMapBase.prototype.addShape.call(this, shape); 4545 4546 return shape; 4547 4548 }; 4549 GeolocationLeafletMap.prototype.removeShape = function (shape) { 4550 if (typeof shape === 'undefined') { 4551 return; 4552 } 4553 Drupal.geolocation.GeolocationMapBase.prototype.removeShape.call(this, shape); 4554 shape.remove(); 4555 }; 4556 GeolocationLeafletMap.prototype.getMarkerBoundaries = function (locations) { 4557 4558 locations = locations || this.mapMarkers; 4559 if (locations.length === 0) { 4560 return; 4561 } 4562 4563 var group = new L.featureGroup(locations); 4564 4565 return group.getBounds(); 4566 }; 4567 GeolocationLeafletMap.prototype.getCenter = function () { 4568 var center = this.leafletMap.getCenter(); 4569 return {lat: center.lat, lng: center.lng}; 4570 }; 4571 GeolocationLeafletMap.prototype.normalizeBoundaries = function (boundaries) { 4572 if (boundaries instanceof L.LatLngBounds) { 4573 return { 4574 north: boundaries.getNorth(), 4575 east: boundaries.getEast(), 4576 south: boundaries.getSouth(), 4577 west: boundaries.getWest() 4578 }; 4579 } 4580 4581 return false; 4582 }; 4583 GeolocationLeafletMap.prototype.denormalizeBoundaries = function (boundaries) { 4584 if (typeof boundaries === 'undefined') { 4585 return false; 4586 } 4587 4588 if (boundaries instanceof L.LatLngBounds) { 4589 return boundaries; 4590 } 4591 4592 if (Drupal.geolocation.GeolocationMapBase.prototype.boundariesNormalized.call(this, boundaries)) { 4593 return L.latLngBounds([ 4594 [boundaries.south, boundaries.west], 4595 [boundaries.north, boundaries.east] 4596 ]); 4597 } 4598 else { 4599 boundaries = Drupal.geolocation.GeolocationMapBase.prototype.normalizeBoundaries.call(this, boundaries); 4600 if (boundaries) { 4601 return L.latLngBounds([ 4602 [boundaries.south, boundaries.west], 4603 [boundaries.north, boundaries.east] 4604 ]); 4605 } 4606 } 4607 4608 return false; 4609 }; 4610 GeolocationLeafletMap.prototype.fitBoundaries = function (boundaries, identifier) { 4611 boundaries = this.denormalizeBoundaries(boundaries); 4612 if (!boundaries) { 4613 return; 4614 } 4615 4616 if (!this.leafletMap.getBounds().equals(boundaries)) { 4617 this.leafletMap.fitBounds(boundaries); 4618 Drupal.geolocation.GeolocationMapBase.prototype.fitBoundaries.call(this, boundaries, identifier); 4619 } 4620 }; 4621 GeolocationLeafletMap.prototype.addControl = function (element) { 4622 this.leafletMap.controls = this.leafletMap.controls || []; 4623 var controlElement = new(L.Control.extend({ 4624 options: { 4625 position: typeof element.dataset.controlPosition === 'undefined' ? 'topleft' : element.dataset.controlPosition 4626 }, 4627 onAdd: function (map) { 4628 element.style.display = 'block'; 4629 L.DomEvent.disableClickPropagation(element); 4630 return element; 4631 } 4632 })); 4633 controlElement.addTo(this.leafletMap); 4634 this.leafletMap.controls.push(controlElement); 4635 }; 4636 GeolocationLeafletMap.prototype.removeControls = function () { 4637 this.leafletMap.controls = this.leafletMap.controls || []; 4638 var that = this; 4639 $.each(this.leafletMap.controls, function (index, control) { 4640 that.leafletMap.removeControl(control); 4641 }); 4642 }; 4643 4644 Drupal.geolocation.GeolocationLeafletMap = GeolocationLeafletMap; 4645 Drupal.geolocation.addMapProvider('leaflet', 'GeolocationLeafletMap'); 4646 4647})(jQuery, Drupal); 4648 4649/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-leaflet-api.js */; 4650/* modules/ukraine/m_map/misc/m_map.geolocation.js */ 4651(function ($, Drupal) { 4652 Drupal.geolocation.GeolocationLeafletMap.prototype.fitBoundaries = function (boundaries, identifier) { 4653 boundaries = this.denormalizeBoundaries(boundaries); 4654 4655 if (!boundaries) { 4656 return; 4657 } 4658 4659 if (!this.leafletMap.getBounds().equals(boundaries)) { 4660 this.leafletMap.fitBounds(boundaries, {padding: [40, 40]}); 4661 Drupal.geolocation.GeolocationMapBase.prototype.fitBoundaries.call(this, boundaries, identifier); 4662 } 4663 }; 4664})(jQuery, Drupal) 4665 4666/* !modules/ukraine/m_map/misc/m_map.geolocation.js */; 4667/* modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-common-map-leaflet.js */ 4668/** 4669 * @file 4670 * Common Map Leaflet. 4671 */ 4672 4673(function ($, Drupal) { 4674 4675 'use strict'; 4676 4677 /** 4678 * Dynamic map handling aka "AirBnB mode". 4679 * 4680 * @type {Drupal~behavior} 4681 * 4682 * @prop {Drupal~behaviorAttach} attach 4683 * Attaches common map style functionality to relevant elements. 4684 */ 4685 Drupal.behaviors.geolocationCommonMapLeaflet = { 4686 /** 4687 * @param {GeolocationSettings} drupalSettings.geolocation 4688 */ 4689 attach: function (context, drupalSettings) { 4690 $.each( 4691 drupalSettings.geolocation.commonMap, 4692 4693 /** 4694 * @param {String} mapId - ID of current map
4695 * @param {CommonMapSettings} commonMapSettings - settings for current map 4696 */ 4697 function (mapId, commonMapSettings) { 4698 if ( 4699 typeof commonMapSettings.dynamic_map !== 'undefined' 4700 && commonMapSettings.dynamic_map.enable 4701 ) { 4702 var map = Drupal.geolocation.getMapById(mapId); 4703 4704 if (!map) { 4705 return; 4706 } 4707 4708 if (map.container.hasClass('geolocation-common-map-leaflet-processed')) { 4709 return; 4710 } 4711 map.container.addClass('geolocation-common-map-leaflet-processed'); 4712 4713 /** 4714 * Update the view depending on dynamic map settings and capability. 4715 * 4716 * One of several states might occur now. Possible state depends on whether: 4717 * - view using AJAX is enabled 4718 * - map view is the containing (page) view or an attachment 4719 * - the exposed form is present and contains the boundary filter 4720 * - map settings are consistent 4721 * 4722 * Given these factors, map boundary changes can be handled in one of three ways: 4723 * - trigger the views AJAX "RefreshView" command 4724 * - trigger the exposed form causing a regular POST reload 4725 * - fully reload the website 4726 * 4727 * These possibilities are ordered by UX preference. 4728 */ 4729 if ( 4730 map.container.length 4731 && map.type === 'leaflet' 4732 ) { 4733 map.addPopulatedCallback(function (map) { 4734 var geolocationMapIdleTimer; 4735 map.leafletMap.on('moveend zoomend', /** @param {LeafletMouseEvent} e */function (e) { 4736 clearTimeout(geolocationMapIdleTimer); 4737 4738 geolocationMapIdleTimer = setTimeout( 4739 function () { 4740 var ajaxSettings = Drupal.geolocation.commonMap.dynamicMapViewsAjaxSettings(commonMapSettings); 4741 4742 // Add bounds. 4743 var currentBounds = map.leafletMap.getBounds(); 4744 var bound_parameters = {}; 4745 bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier'] + '[lat_north_east]'] = currentBounds.getNorthEast().lat; 4746 bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier'] + '[lng_north_east]'] = currentBounds.getNorthEast().lng; 4747 bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier'] + '[lat_south_west]'] = currentBounds.getSouthWest
4747().lat; 4748 bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier'] + '[lng_south_west]'] = currentBounds.getSouthWest().lng; 4749 4750 ajaxSettings.submit = $.extend( 4751 ajaxSettings.submit, 4752 bound_parameters 4753 ); 4754 4755 Drupal.ajax(ajaxSettings).execute(); 4756 }, 4757 commonMapSettings.dynamic_map.views_refresh_delay 4758 ); 4759 }); 4760 }); 4761 } 4762 } 4763 }); 4764 }, 4765 detach: function (context, drupalSettings) {} 4766 }; 4767 4768})(jQuery, Drupal); 4769 4770/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-common-map-leaflet.js */; 4771/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-zoom.js */ 4772/** 4773 * @file 4774 * Control Zoom. 4775 */ 4776 4777/** 4778 * @typedef {Object} ControlZoomSettings 4779 * 4780 * @extends {GeolocationMapFeatureSettings} 4781 * 4782 * @property {String} position 4783 */ 4784 4785(function (Drupal) { 4786 4787 'use strict'; 4788 4789 /** 4790 * Zoom control. 4791 * 4792 * @type {Drupal~behavior} 4793 * 4794 * @prop {Drupal~behaviorAttach} attach 4795 * Attaches common map zoom functionality to relevant elements. 4796 */ 4797 Drupal.behaviors.leafletControlZoom = { 4798 attach: function (context, drupalSettings) { 4799 Drupal.geolocation.executeFeatureOnAllMaps( 4800 'leaflet_control_zoom', 4801 4802 /** 4803 * @param {GeolocationLeafletMap} map - Current map. 4804 * @param {ControlZoomSettings} featureSettings - Settings for current feature. 4805 */ 4806 function (map, featureSettings) { 4807 L.control.zoom({ 4808 position: featureSettings.position 4809 }).addTo(map.leafletMap); 4810 4811 return true; 4812 }, 4813 drupalSettings 4814 ); 4815 }, 4816 detach: function (context, drupalSettings) {} 4817 }; 4818 4819})(Drupal); 4820 4821/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-zoom.js */; 4822/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-gesture-handling.js */ 4823/** 4824 * @file 4825 * Gesture handling. 4826 */ 4827 4828(function (Drupal) { 4829 4830 'use strict'; 4831 4832 /** 4833 * Gesture handling. 4834 * 4835 * @type {Drupal~behavior} 4836 * 4837 * @prop {Drupal~behaviorAttach} attach 4838 * Attaches common map gesture handling functionality to relevant elements. 4839 */ 4840 Drupal.behaviors.leafletGestureHandling = { 4841 attach: function (context, drupalSettings) { 4842 Drupal.geolocation.executeFeatureOnAllMaps( 4843 'leaflet_gesture_handling', 4844 4845 /** 4846 * @param {GeolocationLeafletMap} map - Current map. 4847 * @param {GeolocationMapFeatureSettings} featureSettings - Settings for current feature. 4848 */ 4849 function (map, featureSettings) { 4850 L.Util.setOptions(map.leafletMap, { 4851 gestureHandlingOptions: { 4852 duration: 1000 4853 } 4854 }); 4855 map.leafletMap['gestureHandling'].enable(); 4856 4857 return true; 4858 }, 4859 drupalSettings 4860 ); 4861 }, 4862 detach: function (context, drupalSettings) {} 4863 }; 4864 4865})(Drupal); 4866 4867/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-gesture-handling.js */; 4868/* modules/contrib/geolocation/js/geolocation-geocoder-api.js */ 4869/** 4870 * @file 4871 * Javascript for the plugin-based geocoder function. 4872 */ 4873 4874/** 4875 * Callback when map is clicked. 4876 * 4877 * @callback GeolocationGeocoderResultCallback 4878 * @callback GeolocationGeocoderClearCallback 4879 * 4880 * @param {Object} address - Address. 4881 */ 4882 4883/** 4884 * Geocoder API. 4885 */ 4886(function ($, Drupal) { 4887 "use strict"; 4888 4889 Drupal.geolocation = Drupal.geolocation || {}; 4890 4891 Drupal.geolocation.geocoder = Drupal.geolocation.geocoder || {}; 4892 4893 /** 4894 * Provides the callback that is called when geocoded results are found loads. 4895 * 4896 * @param {google.maps.GeocoderResult} result - first returned address 4897 * @param {string} elementId - Source ID. 4898 */ 4899 Drupal.geolocation.geocoder.resultCallback = function (result, elementId) { 4900 Drupal.geolocation.geocoder.resultCallbacks = 4901 Drupal.geolocation.geocoder.resultCallbacks || []; 4902 $.each( 4903 Drupal.geolocation.geocoder.resultCallbacks, 4904 function (index, callbackContainer) { 4905 if (callbackContainer.elementId === elementId) { 4906 callbackContainer.callback(result); 4907 } 4908 } 4909 ); 4910 }; 4911 4912 /** 4913 * Adds a callback that will be called when results are found. 4914 * 4915 * @param {GeolocationGeocoderResultCallback} callback - The callback 4916 * @param {string} elementId - Identify source of result by its element ID. 4917 */ 4918 Drupal.geolocation.geocoder.addResultCallback = function ( 4919 callback, 4920 elementId 4921 ) { 4922 if (typeof elementId === "undefined") { 4923 return; 4924 } 4925 Drupal.geolocation.geocoder.resultCallbacks = 4926 Drupal.geolocation.geocoder.resultCallbacks || []; 4927 Drupal.geolocation.geocoder.resultCallbacks.push({ 4928 callback: callback, 4929 elementId: elementId, 4930 }); 4931 }; 4932 4933 /** 4934 * Provides the callback that is called when results become invalid loads. 4935 * 4936 * @param {string} elementId - Source ID. 4937 */ 4938 Drupal.geolocation.geocoder.clearCallback = function (elementId) { 4939 Drupal.geolocation.geocoder.clearCallbacks = 4940 Drupal.geolocation.geocoder.clearCallbacks || []; 4941 $.each( 4942 Drupal.geolocation.geocoder.clearCallbacks, 4943 function (index, callbackContainer) { 4944 if (callbackContainer.elementId === elementId) { 4945 callbackContainer.callback(); 4946 } 4947 } 4948 ); 4949 }; 4950 4951 /** 4952 * Adds a callback that will be called when results should be cleared. 4953 * 4954 * @param {GeolocationGeocoderClearCallback} callback - The callback 4955 * @param {string} elementId - Identify source of result by its element ID. 4956 */ 4957 Drupal.geolocation.geocoder.addClearCallback = function ( 4958 callback, 4959 elementId 4960 ) { 4961 if (typeof elementId === "undefined") { 4962 return; 4963 } 4964 Drupal.geolocation.geocoder.clearCallbacks = 4965 Drupal.geolocation.geocoder.clearCallbacks || []; 4966 Drupal.geolocation.geocoder.clearCallbacks.push({ 4967 callback: callback, 4968 elementId: elementId, 4969 }); 4970 }; 4971})(jQuery, Drupal); 4972 4973/* !modules/contrib/geolocation/js/geolocation-geocoder-api.js */; 4974/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-geocoder.js */ 4975/** 4976 * @file 4977 * Control Geocoder. 4978 */ 4979 4980(function (Drupal) { 4981 4982 'use strict'; 4983 4984 /** 4985 * Geocoder control. 4986 * 4987 * @type {Drupal~behavior} 4988 * 4989 * @prop {Drupal~behaviorAttach} attach 4990 * Attaches common map geocoder functionality to relevant elements. 4991 */ 4992 Drupal.behaviors.leafletControlGeocoder = { 4993 attach: function (context, drupalSettings) { 4994 4995 Drupal.geolocation.executeFeatureOnAllMaps( 4996 'leaflet_control_geocoder', 4997 4998 /** 4999 * @param {GeolocationMapInterface} map 5000 * @param {GeolocationMapFeatureSettings} featureSettings 5001 */ 5002 function (map, featureSettings) { 5003 Drupal.geolocation.geocoder.addResultCallback( 5004 /** 5005 * @param {Object} address.geometry.bounds 5006 */ 5007 function (address) { 5008 if (typeof address.geometry.bounds !== 'undefined') { 5009 map.fitBoundaries(address.geometry.bounds, 'leaflet_control_geocoder'); 5010 } 5011 else { 5012 var accuracy = undefined; 5013 if (typeof address.geometry.accuracy === 'undefined') { 5014 accuracy = 10000; 5015 } 5016 map.setCenterByCoordinates({lat: address.geometry.location.lat(), lng: address.geometry.location.lng()}, accuracy, 'leaflet_control_geocoder'); 5017 } 5018 }, 5019 map.id 5020 ); 5021 5022 return true; 5023 }, 5024 drupalSettings 5025 ); 5026 }, 5027 detach: function (context, drupalSettings) {} 5028 }; 5029 5030})(Drupal); 5031 5032/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-geocoder.js */; 5033/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-attribution.js */ 5034/** 5035 * @file 5036 * Control Zoom. 5037 */ 5038 5039/** 5040 * @typedef {Object} ControlAttributionSettings 5041 * 5042 * @extends {GeolocationMapFeatureSettings} 5043 * 5044 * @property {String} prefix 5045 * @property {String} position 5046 */ 5047 5048(function (Drupal) { 5049 5050 'use strict'; 5051 5052 /** 5053 * Zoom control. 5054 * 5055 * @type {Drupal~behavior} 5056 * 5057 * @prop {Drupal~behaviorAttach} attach 5058 * Attaches common map zoom functionality to relevant elements. 5059 */ 5060 Drupal.behaviors.leafletControlAttribution = { 5061 attach: function (context, drupalSettings) { 5062 Drupal.geolocation.executeFeatureOnAllMaps( 5063 'leaflet_control_attribution', 5064 5065 /** 5066 * @param {GeolocationLeafletMap} map - Current map. 5067 * @param {ControlAttributionSettings} featureSettings - Settings for current feature. 5068 */ 5069 function (map, featureSettings) { 5070 L.control.attribution({ 5071 prefix: featureSettings.prefix + ' | © <a href="https://osm.org/copyright">OpenStreetMap</a> contributors', 5072 position: featureSettings.position 5073 }).addTo(map.leafletMap); 5074 5075 return true; 5076 }, 5077 drupalSettings 5078 ); 5079 }, 5080 detach: function (context, drupalSettings) {} 5081 }; 5082 5083})(Drupal); 5084 5085/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-attribution.js */; 5086/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-popup.js */ 5087/** 5088 * @file 5089 * Marker Popup. 5090 */ 5091 5092/** 5093 * @typedef {Object} LeafletMarkerPopupSettings 5094 * 5095 * @extends {GeolocationMapFeatureSettings} 5096 * 5097 * @property {Boolean} infoAutoDisplay 5098 * @property {Number} maxWidth 5099 * @property {Number} minWidth 5100 * @property {Number} maxHeight 5101 * @property {Boolean} autoPan 5102 * @property {Boolean} keepInView 5103 * @property {Boolean} closeButton 5104 * @property {Boolean} autoClose 5105 * @property {Boolean} closeOnEscapeKey 5106 * @property {String} className 5107 */ 5108 5109(function ($, Drupal) { 5110 5111 'use strict'; 5112 5113 /** 5114 * Marker Popup. 5115 * 5116 * @type {Drupal~behavior} 5117 * 5118 * @prop {Drupal~behaviorAttach} attach 5119 * Attaches common map marker popup functionality to relevant elements. 5120 */ 5121 Drupal.behaviors.leafletMarkerPopup = { 5122 attach: function (context, drupalSettings) { 5123 Drupal.geolocation.executeFeatureOnAllMaps( 5124 'leaflet_marker_popup', 5125 5126 /** 5127 * @param {GeolocationLeafletMap} map - Current map. 5128 * @param {LeafletMarkerPopupSettings} featureSettings - Settings for current feature. 5129 */ 5130 function (map, featureSettings) { 5131 var geolocationLeafletPopupHandler = function (currentMarker) { 5132 if (typeof (currentMarker.locationWrapper) === 'undefined') { 5133 return; 5134 } 5135 5136 var content = currentMarker.locationWrapper.find('.location-content'); 5137 5138 if (content.length < 1) { 5139 return; 5140 } 5141 var popupOptions = {}; 5142 /** 5143 * 'maxWidth' => $feature_settings['max_width'], 5144 'minWidth' =>
5144 $feature_settings['min_width'], 5145 'maxHeight' => $feature_settings['max_height'], 5146 'autoPan' => $feature_settings['auto_pan'], 5147 'keepInView' => $feature_settings['keep_in_view'], 5148 'closeButton' => $feature_settings['close_button'], 5149 'autoClose' => $feature_settings['auto_close'], 5150 'closeOnEscapeKey' => $feature_settings['close_on_escape_key'], 5151 'className' => $feature_settings['class_name'], 5152 */ 5153 if (featureSettings.maxWidth) { 5154 popupOptions.maxWidth = Math.round(featureSettings.maxWidth); 5155 } 5156 if (featureSettings.minWidth) { 5157 popupOptions.minWidth = Math.round(featureSettings.minWidth); 5158 } 5159 if (featureSettings.maxHeight) { 5160 popupOptions.maxHeight = Math.round(featureSettings.maxHeight); 5161 } 5162 if (typeof featureSettings.autoPan !== "undefined") { 5163 popupOptions.autoPan = featureSettings.autoPan; 5164 } 5165 if (typeof featureSettings.keepInView !== "undefined") { 5166 popupOptions.keepInView = featureSettings.keepInView; 5167 } 5168 if (typeof featureSettings.closeButton !== "undefined") { 5169 popupOptions.closeButton = featureSettings.closeButton; 5170 } 5171 if (typeof featureSettings.autoClose !== "undefined") { 5172 popupOptions.autoClose = featureSettings.autoClose; 5173 } 5174 if (typeof featureSettings.closeOnEscapeKey !== "undefined") { 5175 popupOptions.closeOnEscapeKey = featureSettings.closeOnEscapeKey; 5176 } 5177 if (featureSettings.className) { 5178 popupOptions.className = featureSettings.className; 5179 } 5180 5181 currentMarker.bindPopup(content.html(), popupOptions); 5182 5183 if (featureSettings.infoAutoDisplay) { 5184 currentMarker.openPopup(); 5185 } 5186 }; 5187 5188 map.addPopulatedCallback(function (map) { 5189 $.each(map.mapMarkers, function (index, currentMarker) { 5190 geolocationLeafletPopupHandler(currentMarker); 5191 }); 5192 }); 5193 5194 map.addMarkerAddedCallback(function (currentMarker) { 5195 geolocationLeafletPopupHandler(currentMarker); 5196 }); 5197 5198 return true; 5199 }, 5200 drupalSettings 5201 ); 5202 }, 5203 detach: function (context, drupalSettings) {} 5204 }; 5205})(jQuery, Drupal); 5206 5207/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-popup.js */; 5208/* modules/contrib/geolocation/modules/geolocation_leaflet/js/photon-geocoder.js */ 5209/** 5210 * @file 5211 * Javascript for the Photon geocoder. 5212 */ 5213 5214/** 5215 * @typedef {Object} PhotonResult 5216 * @property {Object} properties 5217 * @property {String} properties.street 5218 * @property {String} properties.city 5219 * @property {String} properties.state 5220 * @property {String} properties.postcode 5221 * @property {String} properties.country 5222 * @property {String} properties.housenumber 5223 */ 5224 5225/** 5226 * @property {String[]} drupalSettings.geolocation.geocoder.photon.inputIds 5227 * @property {String} drupalSettings.geolocation.geocoder.photon.locationPriority 5228 * @property {float} drupalSettings.geolocation.geocoder.photon.locationPriority.lat 5229 * @property {float} drupalSettings.geolocation.geocoder.photon.locationPriority.lon 5230 * @property {Boolean} drupalSettings.geolocation.geocoder.photon.removeDuplicates 5231 */ 5232 5233(function ($, Drupal) { 5234 'use strict'; 5235 5236 if (typeof Drupal.geolocation.geocoder === 'undefined') { 5237 return false; 5238 } 5239 5240 drupalSettings.geolocation.geocoder.photon = drupalSettings.geolocation.geocoder.photon || {}; 5241 5242 /** 5243 * Attach geocoder input for Photon. 5244 * 5245 * @type {Drupal~behavior} 5246 * 5247 * @prop {Drupal~behaviorAttach} attach 5248 * Attaches views geocoder input for Photon to relevant elements. 5249 */ 5250 Drupal.behaviors.geolocationGeocoderPhoton = { 5251 attach: function (context) { 5252 $.each(drupalSettings.geolocation.geocoder.photon.inputIds, function (index, inputId) {
5253 var geocoderInput = $('input.geolocation-geocoder-address[data-source-identifier="' + inputId + '"]', context); 5254 5255 if (geocoderInput.length === 0) { 5256 return; 5257 } 5258 5259 if (geocoderInput.hasClass('geocoder-attached')) { 5260 return; 5261 } 5262 else { 5263 geocoderInput.addClass('geocoder-attached'); 5264 } 5265 5266 var minLength = 1; 5267 if ( 5268 typeof drupalSettings.geolocation.geocoder.photon.autocompleteMinLength !== 'undefined' 5269 && parseInt(drupalSettings.geolocation.geocoder.photon.autocompleteMinLength) 5270 ) { 5271 minLength = parseInt(drupalSettings.geolocation.geocoder.photon.autocompleteMinLength); 5272 } 5273 5274 geocoderInput.autocomplete({ 5275 autoFocus: true, 5276 minLength: minLength, 5277 source: function (request, response) { 5278 var autocompleteResults = []; 5279 5280 var options = { 5281 q: request.term, 5282 limit: 3 5283 }; 5284 5285 var lang = $('html').attr('lang'); 5286 if ($.inArray(lang, ['de', 'en', 'fr']) !== -1) { 5287 options.lang = lang; 5288 } 5289 5290 if (typeof drupalSettings.geolocation.geocoder.photon.locationPriority !== 'undefined') { 5291 if ( 5292 drupalSettings.geolocation.geocoder.photon.locationPriority.lat 5293 && drupalSettings.geolocation.geocoder.photon.locationPriority.lon 5294 ) { 5295 $.extend(options, drupalSettings.geolocation.geocoder.photon.locationPriority); 5296 } 5297 } 5298 5299 $.getJSON( 5300 'https://photon.komoot.io/api/', 5301 options, 5302 function (data) { 5303 if (typeof data.features === 'undefined') { 5304 response(); 5305 return; 5306 } 5307 /** 5308 * @param {int} index 5309 * @param {PhotonResult} result 5310 */ 5311 $.each(data.features, function (index, result) { 5312 var formatted_address = []; 5313 if (typeof result.properties.street !== 'undefined') { 5314 var street = result.properties.street; 5315 if (typeof result.properties.housenumber !== 'undefined') { 5316 street = result.properties.housenumber + ' ' + street; 5317 } 5318 formatted_address.push(street); 5319 } 5320 if (typeof result.properties.city !== 'undefined') { 5321 formatted_address.push(result.properties.city); 5322 } 5323 if (typeof result.properties.state !== 'undefined') { 5324 formatted_address.push(result.properties.state); 5325 } 5326 if (typeof result.properties.postcode !== 'undefined') { 5327 formatted_address.push(result.properties.postcode); 5328 } 5329 if (typeof result.properties.country !== 'undefined') { 5330 formatted_address.push(result.properties.country); 5331 } 5332 5333 var formatted_value = ''; 5334 if (typeof result.properties.name !== 'undefined') { 5335 formatted_value = result.properties.name + ' - '; 5336 } 5337 formatted_value += formatted_address.join(', '); 5338 5339 if (drupalSettings.geolocation.geocoder.photon.removeDuplicates) { 5340 var existingResults = $.grep(autocompleteResults, function (resultItem) { 5341 return resultItem.value === formatted_value; 5342 }); 5343 5344 if (existingResults.length === 0) { 5345 autocompleteResults.push({ 5346 value: formatted_value, 5347 result: result 5348 }); 5349 } 5350 } 5351 else { 5352 autocompleteResults.push({ 5353 value: formatted_value, 5354 result: result 5355 }); 5356 } 5357 }); 5358 response(autocompleteResults); 5359 } 5360 ); 5361 }, 5362 5363 /** 5364 * Option form autocomplete selected. 5365 * 5366 * @param {Object} event - See jquery doc 5367 * @param {Object} ui - See jquery doc 5368 * @param {Object} ui.item - See jquery doc 5369 */ 5370 select: function (event, ui) { 5371 if (typeof ui.item.result.geometry.coordinates === 'undefined') { 5372 return; 5373 } 5374 5375 var result = { 5376 geometry: { 5377 location: { 5378 lat: function () { 5379 return ui.item.result.geometry.coordinates[1]; 5380 }, 5381 lng: function () { 5382 return ui.item.result.geometry.coordinates[0]; 5383 } 5384 }, 5385 bounds: ui.item.result.properties.extent 5386 } 5387 }; 5388 5389 /** @var ui.item.result.properties.extent array */ 5390 if (typeof ui.item.result.properties.extent !== 'undefined') { 5391 result.geometry.bounds = { 5392 north: ui.item.result.properties.extent[1], 5393 east: ui.item.result.properties.extent[2], 5394 south: ui.item.result.properties.extent[3], 5395 west: ui.item.result.properties.extent[0] 5396 }; 5397 } 5398 5399 Drupal.geolocation.geocoder.resultCallback(result, $(event.target).data('source-identifier').toString()); 5400 } 5401 }) 5402 .on('input', function () { 5403 Drupal.geolocation.geocoder.clearCallback($(this).data('source-identifier').toString()); 5404 }); 5405 5406 }); 5407 }, 5408 detach: function () {} 5409 }; 5410 5411})(jQuery, Drupal); 5412 5413/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/photon-geocoder.js */; 5414/* modules/ukraine/m_search/misc/search.js */ 5415(function($, Drupal){ 5416 5417 $(document).ready(function(){ 5418 5419 $('.js-search-btn').on('click', function(e){ 5420 e.preventDefault(); 5421 $(this).closest('.b-search-block').toggleClass('is-open'); 5422 }) 5423 5424 }); 5425 5426})(jQuery, Drupal); 5427 5428/* !modules/ukraine/m_search/misc/search.js */; 5429/* modules/ukraine/m_search/misc/search_voice.js */ 5430/*global webkitSpeechRecognition */ 5431(function ($) { 5432 'use strict'; 5433 5434 5435 // check for support (webkit only) 5436 if (!('webkitSpeechRecognition' in window)) return; 5437 5438 // seconds to wait for more input after last 5439 var defaultPatienceThreshold = 3; 5440 5441 function capitalize(str) { 5442 return str.charAt(0).toUpperCase() + str.slice(1); 5443 } 5444 5445 5446 Drupal.behaviors.search_voice = { 5447 attach: function (context) { 5448 5449 var inputEls = once('input', '.speech-input'); 5450 // var talkMsg = Drupal.t('Speak now'); 5451 var talkMsg = $(inputEls).data('speech_text'); 5452 $(inputEls).parents('form:first').find('.form-actions').hide(); 5453 5454 [].forEach.call(inputEls, function (inputEl) { 5455 var patience = parseInt(inputEl.dataset.patience, 10) || defaultPatienceThreshold; 5456 var micBtn, micIcon, holderIcon, newWrapper; 5457 var shouldCapitalize = true; 5458 5459 // gather inputEl data 5460 var nextNode = inputEl.nextSibling; 5461 var parent = inputEl.parentNode; 5462 var inputRightBorder = parseInt(getComputedStyle(inputEl).borderRightWidth, 10); 5463 var buttonSize = 0.8 * (inputEl.dataset.buttonsize || inputEl.offsetHeight); 5464 5465 // default max size for textareas 5466 if (!inputEl.dataset.buttonsize && inputEl.tagName === 'TEXTAREA' && buttonSize > 26) { 5467 buttonSize = 26; 5468 } 5469 5470 // create wrapper if not present 5471 var wrapper = inputEl.parentNode; 5472 5473 if (!wrapper.classList.contains('si-wrapper')) { 5474 wrapper = document.createElement('div'); 5475 wrapper.classList.add('si-wrapper'); 5476 wrapper.appendChild(parent.removeChild(inputEl)); 5477 newWrapper = true; 5478 } 5479 5480 // create mic button if not present 5481 micBtn = wrapper.querySelector('.si-btn'); 5482 if (!micBtn) { 5483 micBtn = document.createElement('button'); 5484 micBtn.type = 'button'; 5485 micBtn.classList.add('si-btn'); 5486 micBtn.textContent = 'speech input'; 5487 micIcon = document.createElement('span'); 5488 holderIcon = document.createElement('span'); 5489 micIcon.classList.add('si-mic'); 5490 holderIcon.classList.add('si-holder'); 5491 micBtn.appendChild(micIcon); 5492 micBtn.appendChild(holderIcon); 5493 wrapper.appendChild(micBtn); 5494 5495 // size and position mic and input 5496 // micBtn.style.cursor = 'pointer'; 5497 // micBtn.style.top = 0.125 * buttonSize + 'px'; 5498 // micBtn.style.height = micBtn.style.width = buttonSize + 'px'; 5499 // inputEl.style.paddingRight = buttonSize - inputRightBorder + 'px'; 5500 } 5501 5502 var clearBtn = $('<span class="clear">X</span>'); 5503 $(inputEl).parents('div:first').append(clearBtn); 5504 5505 if (inputEl.value == '') clearBtn.hide(); 5506 else $(micBtn).hide(); 5507 5508 // append wrapper where input was 5509 if (newWrapper) parent.insertBefore(wrapper, nextNode); 5510
5511 // setup recognition 5512 var prefix = ''; 5513 var isSentence; 5514 var recognizing = false; 5515 var timeout; 5516 var oldPlaceholder = null; 5517 var recognition = new webkitSpeechRecognition(); 5518 recognition.continuous = true; 5519 recognition.interimResults = true; 5520 5521 // if lang attribute is set on field use that 5522 // (defaults to use the lang of the root element) 5523 if (inputEl.lang) { 5524 recognition.lang = inputEl.lang 5525 } else { 5526 recognition.lang = document.getElementsByTagName('html')[0].lang 5527 } 5528 5529 function restartTimer(tims) { 5530 timeout = setTimeout(function () { 5531 recognition.stop(); 5532 }, tims * 1000); 5533 } 5534 5535 recognition.onstart = function () { 5536 5537 // console.log('START'); 5538 5539 oldPlaceholder = inputEl.placeholder; 5540 inputEl.placeholder = inputEl.dataset.ready || talkMsg; 5541 $(inputEl).focus(); 5542 recognizing = true; 5543 micBtn.classList.add('listening'); 5544 restartTimer(patience); 5545 }; 5546 5547 recognition.onend = function () { 5548 5549 5550 recognizing = false; 5551 clearTimeout(timeout); 5552 micBtn.classList.remove('listening'); 5553 if (oldPlaceholder !== null) inputEl.placeholder = oldPlaceholder; 5554 5555 // If the <input> has data-instant-submit and a value, 5556 // if (inputEl.dataset.instantSubmit !== undefined && inputEl.value) { 5557 // // submit the form it's in (if it is in one). 5558 // if (inputEl.form) inputEl.form.submit(); 5559 // } 5560 5561 if (inputEl.value == '') { 5562 $(inputEl).blur(); 5563 } 5564 5565 // console.log('END'); 5566 }; 5567 5568 recognition.onresult = function (event) { 5569 clearTimeout(timeout); 5570 5571 // get SpeechRecognitionResultList object 5572 var resultList = event.results; 5573 5574 // go through each SpeechRecognitionResult object in the list 5575 var finalTranscript = ''; 5576 var interimTranscript = ''; 5577 for (var i = event.resultIndex; i < resultList.length; ++i) { 5578 var result = resultList[i]; 5579 5580 // get this result's first SpeechRecognitionAlternative object 5581 var firstAlternative = result[0]; 5582 5583 if (result.isFinal) { 5584 finalTranscript = firstAlternative.transcript; 5585 } else { 5586 interimTranscript += firstAlternative.transcript; 5587 } 5588 } 5589 5590 // capitalize transcript if start of new sentence 5591 var transcript = finalTranscript || interimTranscript; 5592 transcript = !prefix || isSentence ? capitalize(transcript) : transcript; 5593 5594 // append transcript to cached input value 5595 // inputEl.value = prefix + transcript; 5596 inputEl.value = transcript; 5597 5598 // set cursur and scroll to end 5599 inputEl.focus(); 5600 if (inputEl.tagName === 'INPUT') { 5601 inputEl.scrollLeft = inputEl.scrollWidth; 5602 } else { 5603 inputEl.scrollTop = inputEl.scrollHeight; 5604 } 5605 5606 $(inputEl).keyup(); 5607 5608 restartTimer(1); 5609 }; 5610 5611 $(inputEl).keyup(function () { 5612 if (inputEl.value == '') { 5613 $(micBtn).show(); 5614 clearBtn.hide(); 5615 } else { 5616 $(micBtn).hide(); 5617 clearBtn.show(); 5618 } 5619 }); 5620 5621 micBtn.addEventListener('click', function (event) { 5622 event.preventDefault(); 5623 5624 // stop and exit if already going 5625 if (recognizing) { 5626 recognition.stop(); 5627 return; 5628 } 5629 5630 // Cache current input value which the new transcript will be appended to 5631 var endsWithWhitespace = inputEl.value.slice(-1).match(/\s/); 5632 prefix = !inputEl.value || endsWithWhitespace ? inputEl.value : inputEl.value + ' '; 5633 5634 // check if value ends with a sentence 5635 isSentence = prefix.trim().slice(-1).match(/[\.\?\!]/); 5636 5637 // restart recognition 5638 recognition.start(); 5639 }, false); 5640 5641 clearBtn.click(function () { 5642 clearBtn.hide(); 5643 $(micBtn).show(); 5644 inputEl.value = ''; 5645 }); 5646 }); 5647}} 5648})(jQuery); 5649 5650/* !modules/ukraine/m_search/misc/search_voice.js */; 5651/* modules/ukraine/disability/misc/m_disability.disabilities.js */ 5652(function($, Drupal) { 5653 5654 $(document).ready(function(){ 5655 $('.js-disabled-version-reset').on('click', function(e){ 5656 $('.b-site-style__item').each(function(){ 5657 $(this).find('.b-site-style__link').eq(0).find('.js-site-style-btn').trigger('click'); 5658 }); 5659 }); 5660 5661 $('.js-site-style-btn').on('click', function(e){ 5662 e.preventDefault(); 5663 var $this = $(this); 5664 $this.parent().siblings().removeClass('is-active'); 5665 $this.parent().addClass('is-active'); 5666 var index = $this.parent().index(); 5667 var type = $this.attr('data-type'); 5668 var value = $this.attr('data-value'); 5669 5670 var type = type.split('|'); 5671 var value = value.split('|'); 5672 var group = $this.attr('data-group'); 5673 5674 var active = localStorage.getItem('style_active_group') 5675 if (!active) { 5676 active = {}; 5677 } else { 5678 active = JSON.parse(active); 5679 } 5680 5681 var styles = localStorage.getItem('style_info') 5682 if (!styles) { 5683 styles = {}; 5684 } else { 5685 styles = JSON.parse(styles); 5686 } 5687 5688 if (type.length > 0) { 5689 for (var i = 0; i < type.length; i++) { 5690 styles[type[i]] = value[i]; 5691 if (type[i] === 'bgColor') { 5692 if (value[i] != 'unset') { 5693 $('html').addClass('disabilities-bg'); 5694 } 5695 else { 5696 $('html').removeClass('disabilities-bg'); 5697 } 5698 } 5699 switch (type[i]) { 5700 case 'bgColor': 5701 break; 5702 5703 case 'image': 5704 $('html').removeClass('disabilities-image-gray'); 5705 $('html').removeClass('disabilities-image-hidden'); 5706 switch (value[i]) { 5707 case 'normal': 5708 break; 5709 case 'gray': 5710 $('html').addClass('disabilities-image-gray'); 5711 break; 5712 case 'hidden': 5713 $('html').addClass('disabilities-image-hidden'); 5714 break; 5715 } 5716 break; 5717 5718 case 'font-size': 5719 break; 5720 } 5721 if (type == 'font-size') { 5722 if (value != '16px') { 5723 $('body').addClass('style-big-font'); 5724 } else { 5725 $('body').removeClass('style-big-font'); 5726 } 5727 } 5728 if (value[i] === 'unset') { 5729 document.documentElement.style.removeProperty('--'+ type[i]); 5730 } 5731 else { 5732 document.documentElement.style.setProperty('--' + type[i], value[i]); 5733 } 5734 active[group] = index; 5735 } 5736 } 5737 localStorage.setItem('style_info', JSON.stringify(styles)); 5738 localStorage.setItem('style_active_group', JSON.stringify(active)); 5739 5740 });
vendor: 39,781 bytes, lines 5741-5794
5741 5742 $('.js-disabled-version').on('click', function(e){ 5743 e.preventDefault(); 5744 var $target = $('.b-site-style'); 5745 var groups = localStorage.getItem('style_active_group'); 5746 groups = JSON.parse(groups); 5747 try { 5748 if (groups) { 5749 for (item in groups) { 5750 $target.find('[data-group="' + item + '"]').eq(groups[item]).parent().siblings().removeClass('is-active').end().addClass('is-active'); 5751 } 5752 } 5753 } 5754 catch (e) {} 5755 5756 if ($target.length) { 5757 $.magnificPopup.open({ 5758 items: { 5759 src: $target, 5760 type: 'inline' 5761 }, 5762 removalDelay: 400, 5763 mainClass: 'mfp-zoom-in', 5764 autoFocusLast: false, 5765 fixedContentPos: true, 5766 fixedBgPos: ('ontouchstart' in window) ? false : true, 5767 closeOnBgClick: false, 5768 callbacks: { 5769 beforeOpen: function() { 5770 $target.addClass('mfp-with-anim'); 5771 }, 5772 afterClose: function() { 5773 $target.removeClass('mfp-with-anim'); 5774 }, 5775 } 5776 }); 5777 } 5778 }); 5779 }); 5780 5781})(jQuery, Drupal); 5782 5783/* !modules/ukraine/disability/misc/m_disability.disabilities.js */; 5784/* modules/ukraine/m_libraries/misc/gsap/gsap-latest-beta.min.js */ 5785/*! 5786 * GSAP 3.10.1 5787 * https://greensock.com 5788 * 5789 * @license Copyright 2022, GreenSock. All rights reserved. 5790 * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. 5791 * @author: Jack Doyle, [email protected] 5792 */ 5793 5794!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){return"string"==typeof t}function p(t){return"function"==typeof t}function q(t){return"number"==typeof t}function r(t){return void 0===t}function s(t){return"object"==typeof t}function t(t){return!1!==t}function u(){return"undefined"!=typeof window}function v(t){return p(t)||o(t)}function M(t){return(h=mt(t,ot))&&he}function N(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function O(t,e){return!e&&console.warn(t)}function P(t,e){return t&&(ot[t]=e)&&h&&(h[t]=e)||ot}function Q(){return 0}function $(t){var e,r,i=t[0];if(s(i)||p(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=pt.length;r--&&!pt[r].targetTest(i););e=pt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Lt(t[r],e)))||t.splice(r,1);return t}function _(t){return t._gsap||$(xt(t))[0]._gsap}function aa(t,e,i){return(i=t[e])&&p(i)?t[e]():r(i)&&t.getAttribute&&t.getAttribute(e)||i}function ba(t,e){return(t=t.split(",")).forEach(e)||t}function ca(t){return Math.round(1e5*t)/1e5||0}function da(t){return Math.round(1e7*t)/1e7||0}function ea(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function fa(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function ga(){var t,e,r=ht.length,i=ht.slice(0);for(lt={},t=ht.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function ha(t,e,r,i){ht.length&&ga(),t.render(e,r,i),ht.length&&ga()}function ia(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(at).length<2?e:o(t)?t.trim():t}function ja(t){return t}function ka(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function na(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=s(e[r])?na(t[r]||(t[r]={}),e[r]):e[r]);return t}function oa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function pa(e){var r=e.parent||I,i=e.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(J(e.keyframes)):ka;if(t(e.inherit))for(;r;)i(e,r.vars.defaults),r=r.parent||r._dp;return e}function ra(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function sa(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function ta(t,e){!t.parent||e&&!t.parent.autoRemoveChildren||t.parent.remove(t),t._act=0}function ua(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function xa(t){return t._repeat?gt(t._tTime,t=t.duration()+t._rDelay)*t:0}function za(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Aa(t){return t._end=da(t._start+(t._tDur/Math.abs(t._ts||t._rts||V)||0))}function Ba(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=da(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Aa(t),r._dirty||ua(r,t)),t}function Ca(t,e){var r;if((e._time||e._initted&&!e._dur)&&(r=za(t.rawTime(),e),(!e._dur||bt(0,e.totalDuration(),r)-e._tTime>V)&&e.render(r,!0)),ua(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-V}}function Da(t,e,r,i){return e.parent&&ta(e),e._start=da((q(r)?r:r||t!==I?Tt(t,r,e):t._time)+e._delay),e._end=da(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),ra(t,e,"_first","_last",t._sort?"_start":0),vt(e)||(t._recent=e),i||Ca(t,e),t}function Ea(t,e){return(ot.ScrollTrigger||N("scrollTrigger",e))&&ot.ScrollTrigger.create(e,t)}function Fa(t,e,r,i){return Xt(t,e),t._initted?!r&&t._pt&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==Dt.frame?(ht.push(t),t._lazy=[e,i],1):void 0:1}function Ka(t,e,r,i){var n=t._repeat,a=da(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:da(a*(n+1)+t._rDelay*n):a,0<s&&!i?Ba(t,t._tTime=t._tDur*s):t.parent&&Aa(t),r||ua(t.parent,t),t}function La(t){return t instanceof Ut?ua(t):Ka(t,t._dur)}function Oa(e,r,i){var n,a,s=q(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=t(a.vars.inherit)&&a.parent;u.immediateRender=t(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new $t(r[0],u,r[1+o])}function Pa(t,e){return t||0===t?e(t):e}function Ra(t,e){return o(t)&&(e=st.exec(t))?e[1]:""}function Ua(t,e){return t&&s(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&s(t[0]))&&!t.nodeType&&t!==i}function Ya(t){return t.sort(function(){return.5-Math.random()})}function Za(t){if(p(t))return t;var c=s(t)?t:{each:t},m=Bt(c.ease),g=c.from||0,v=parseFloat(c.base)||0,y={},e=0<g&&g<1,T=isNaN(g)||e,b=c.axis,w=g,x=g;return o(g)?w=x={center:.5,edges:.5,end:1}[g]||0:!e&&T&&(w=g[0],x=g[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,d=(r||c).length,_=y[d];if(!_){if(!(f="auto"===c.grid?0:(c.grid||[1,Y])[1])){for(h=-Y;h<(h=r[f++].getBoundingClientRect().left)&&f<d;);f--}for(_=y[d]=[],i=T?Math.min(f,d)*w-.5:g%f,n=f===Y?0:T?d*x/f-.5:g/f|0,l=Y,u=h=0;u<d;u++)a=u%f-i,s=n-(u/f|0),_[u]=o=b?Math.abs("y"===b?s:a):G(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===g&&Ya(_),_.max=h-l,_.min=l,_.v=d=(parseFloat(c.amount)||parseFloat(c.each)*(d<f?d-1:b?"y"===b?d/f:f:Math.max(f,d/f))||0)*("edges"===g?-1:1),_.b=d<0?v-d:v,_.u=Ra(c.amount||c.each)||0,m=m&&d<0?Ft(m):m}return d=(_[t]-_.min)/_.max||0,da(_.b+(m?m(d):d)*_.v)+_.u}}function $a(r){var i=Math.pow(10,((r+"").split(".")[1]||"").length);return function(t){var e=Math.round(parseFloat(t)/r)*r*i;return(e-e%1)/i+(q(t)?0:Ra(t))}}function _a(u,t){var h,l,e=J(u);return!e&&s(u)&&(h=e=u.radius||Y,u.values?(u=xt(u.values),(l=!q(u[0]))&&(h*=h)):u=$a(u.increment)),Pa(t,e?p(u)?function(t){return l=u(t),Math.abs(l-t)<=h?l:t}:function(t){for(var e,r,i=parseFloat(l?t.x:t),n=parseFloat(l?t.y:0),a=Y,s=0,o=u.length;o--;)(e=l?(e=u[o].x-i)*e+(r=u[o].y-n)*r:Math.abs(u[o]-i))<a&&(a=e,s=o);return s=!h||a<=h?u[s]:t,l||s===t||q(t)?s:s+Ra(t)}:$a(u))}function ab(t,e,r,i){return Pa(J(t)?!e:!0===r?!!(r=0):!i,function(){return J(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function eb(e,r,t){return Pa(t,function(t){return e[~~r(t)]})}function hb(t){for(var e,r,i,n,a=0,s="";~(e=t.indexOf("random(",a));)i=t.indexOf(")",e),n="["===t.charAt(e+7),r=t.substr(e+7,i-e-7).match(n?at:tt),s+=t.substr(a,e-a)+ab(n?r:+r[0],n?0:+r[1],+r[2]||1e-5),a=i+1;return s+t.substr(a,t.length-a)}function kb(t,e,r){var i,n,a,s=t.labels,o=Y;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function mb(t){return ta(t),t.scrollTrigger&&t.scrollTrigger.kill(!1),t.progress()<1&&Ot(t,"onInterrupt"),t}function rb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*Pt+.5|0}function sb(t,e,r){var i,n,a,s,o,u,h,l,f,d,_=t?q(t)?[t>>16,t>>8&Pt,t&Pt]:0:Mt.black;if(!_){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Mt[t])_=Mt[t];else if("#"===t.charAt(0)){if(t.length<6&&(t="#"+(i=t.charAt(1))+i+(n=t.charAt(2))+n+(a=t.charAt(3))+a+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(_=parseInt(t.substr(1,6),16))>>16,_>>8&Pt,_&Pt,parseInt(t.substr(7),16)/255];_=[(t=parseInt(t.substr(1),16))>>16,t>>8&Pt,t&Pt]}else if("hsl"===t.substr(0,3))if(_=d=t.match(tt),e){if(~t.indexOf("="))return _=t.match(et),r&&_.length<4&&(_[3]=1),_}else s=+_[0]%360/360,o=_[1]/100,i=2*(u=_[2]/100)-(n=u<=.5?u*(o+1):u+o-u*o),3<_.length&&(_[3]*=1),_[0]=rb(s+1/3,i,n),_[1]=rb(s,i,n),_[2]=rb(s-1/3,i,n);else _=t.match(tt)||Mt.transparent;_=_.map(Number)}return e&&!d&&(i=_[0]/Pt,n=_[1]/Pt,a=_[2]/Pt,u=((h=Math.max(i,n,a))+(l=Math.min(i,n,a)))/2,h===l?s=o=0:(f=h-l,o=.5<u?f/(2-h-l):f/(h+l),s=h===i?(n-a)/f+(n<a?6:0):h===n?(a-i)/f+2:(i-n)/f+4,s*=60),_[0]=~~(s+.5),_[1]=~~(100*o+.5),_[2]=~~(100*u+.5)),r&&_.length<4&&(_[3]=1),_}function tb(t){var r=[],i=[],n=-1;return t.split(Ct).forEach(function(t){var e=t.match(rt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function ub(t,e,r){var i,n,a,s,o="",u=(t+o).match(Ct),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=sb(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=tb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Ct,"1").split(rt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Ct)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function xb(t){var e,r=t.join(" ");if(Ct.lastIndex=0,Ct.test(r))return e=At.test(r),t[1]=ub(t[1],e),t[0]=ub(t[0],e,tb(t[1])),!0}function Gb(t){var e=(t+"").split("("),r=zt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Et,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ia)):zt._CE&&Rt.test(t)?zt._CE("",t):r}function Ib(t,e){for(var r,i=t._first;i;)i instanceof Ut?Ib(i,e):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===e||(i.timeline?Ib(i.timeline,e):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=e)),i=i._next}function Kb(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ba(t,function(t){for(var e in zt[t]=ot[t]=a,zt[n=t.toLowerCase()]=r,a)zt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=zt[t+"."+e]=a[e]}),a}function Lb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Mb(r,t,e){function em(t){return 1===t?1:i*Math.pow(2,-10*t)*Z((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/X*(Math.asin(1/i)||0),s="out"===r?em:"in"===r?function(t){return 1-em(1-t)}:Lb(em);return n=X/n,s.config=function(t,e){return Mb(r,t,e)},s}function Nb(e,r){function mm(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?mm:"in"===e?function(t){return 1-mm(1-t)}:Lb(mm);return t.config=function(t){return Nb(e,t)},t}var B,I,i,n,a,h,l,f,d,c,m,g,y,T,b,w,x,k,C,A,D,S,z,R,E,F,U={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},L={duration:.5,overwrite:!1,delay:0},Y=1e8,V=1/Y,X=2*Math.PI,j=X/4,K=0,G=Math.sqrt,W=Math.cos,Z=Math.sin,H="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},J=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,rt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,it=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,nt=/[+-]=-?[.\d]+/,at=/[^,'"\[\]\s]+/gi,st=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ot={},ut={},ht=[],lt={},ft={},dt={},_t=30,pt=[],ct="",mt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},gt=function _animationCycle(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},vt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},yt={_start:0,endTime:Q,totalDuration:Q},Tt=function _parsePosition(t,e,r){var i,n,a,s=t.labels,u=t._recent||yt,h=t.duration()>=Y?u.endTime(!1):t._dur;return o(e)&&(isNaN(e)||e in s)?(n=e.charAt(0),a="%"===e.substr(-1),i=e.indexOf("="),"<"===n||">"===n?(0<=i&&(e=e.replace(/=/,"")),("<"===n?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(a?(i<0?u:r).totalDuration()/100:1)):i<0?(e in s||(s[e]=h),s[e]):(n=parseFloat(e.charAt(i-1)+e.substr(i+1)),a&&r&&(n=n/100*(J(r)?r[0]:r).totalDuration()),1<i?_parsePosition(t,e.substr(0,i-1),r)+n:h+n)):null==e?h:+e},bt=function _clamp(t,e,r){return r<t?t:e<r?e:r},wt=[].slice,xt=function toArray(t,e,r){return!o(t)||r||!n&&St()?J(t)?function _flatten(t,e,r){return void 0===r&&(r=[]),t.forEach(function(t){return o(t)&&!e||Ua(t,1)?r.push.apply(r,xt(t)):r.push(t)})||r}(t,r):Ua(t)?wt.call(t,0):t?[t]:[]:wt.call((e||a).querySelectorAll(t),0)},kt=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Pa(n,function(t){return r+((t-e)/a*s||0)})},Ot=function _callback(t,e,r){var i,n,a=t.vars,s=a[e];if(s)return i=a[e+"Params"],n=a.callbackScope||t,r&&ht.length&&ga(),i?s.apply(n,i):s.call(n)},Pt=255,Mt={aqua:[0,Pt,Pt],lime:[0,Pt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Pt],navy:[0,0,128],white:[Pt,Pt,Pt],olive:[128,128,0],yellow:[Pt,Pt,0],orange:[Pt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Pt,0,0],pink:[Pt,192,203],cyan:[0,Pt,Pt],transparent:[Pt,Pt,Pt,0]},Ct=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Mt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),At=/hsl[a]?\(/,Dt=(x=Date.now,k=500,C=33,A=x(),D=A,z=S=1e3/240,T={time:0,frame:0,tick:function tick(){Vk(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){l&&(!n&&u()&&(i=n=window,a=i.document||{},ot.gsap=he,(i.gsapVersions||(i.gsapVersions=[])).push(he.version),M(h||i.GreenSockGlobals||!i.gsap&&i||{}),y=i.requestAnimationFrame),m&&T.sleep(),g=y||function(t){return setTimeout(t,z-1e3*T.time+1|0)},c=1,Vk(2))},sleep:function sleep(){(y?i.cancelAnimationFrame:clearTimeout)(m),c=0,g=Q},lagSmoothing:function lagSmoothing(t,e){k=t||1e8,C=Math.min(e,k,0)},fps:function fps(t){S=1e3/(t||240),z=1e3*T.time+S},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),T.remove(a)}:n;return T.remove(n),R[e?"unshift":"push"](a),St(),a},remove:function remove(t,e){~(e=R.indexOf(t))&&R.splice(e,1)&&e<=w&&w--},_listeners:R=[]}),St=function _wake(){return!c&&Dt.wake()},zt={},Rt=/^[\d.\-M][\d.\-,\s]/,Et=/["']/g,Ft=function _invertEase(e){return function(t){return 1-e(1-t)}},Bt=function _parseEase(t,e){return t&&(p(t)?t:zt[t]||Gb(t))||e};function Vk(t){var e,r,i,n,a=x()-D,s=!0===t;if(k<a&&(A+=a-C),(0<(e=(i=(D+=a)-A)-z)||s)&&(n=++T.frame,b=i-1e3*T.time,T.time=i/=1e3,z+=e+(S<=e?4:S-e),r=1),s||(m=g(Vk)),r)for(w=0;w<R.length;w++)R[w](i,b,n,t)}function Dm(t){return t<F?E*t*t:t<.7272727272727273?E*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?E*(t-=2.25/2.75)*t+.9375:E*Math.pow(t-2.625/2.75,2)+.984375}ba("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Kb(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),zt.Linear.easeNone=zt.none=zt.Linear.easeIn,Kb("Elastic",Mb("in"),Mb("out"),Mb()),E=7.5625,F=1/2.75,Kb("Bounce",function(t){return 1-Dm(1-t)},Dm),Kb("Expo",function(t){return t?Math.pow(2,10*(t-1)):0}),Kb("Circ",function(t){return-(G(1-t*t)-1)}),Kb("Sine",function(t){return 1===t?1:1-W(t*j)}),Kb("Back",Nb("in"),Nb("out"),Nb()),zt.SteppedEase=zt.steps=ot.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*bt(0,.99999999,t)|0)+n)*r}}},L.ease=zt["quad.out"],ba("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return ct+=t+","+t+"Params,"});var It,Lt=function GSCache(t,e){this.id=K++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:aa,this.set=e?e.getSetter:Ht},Nt=((It=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},It.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},It.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ka(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},It.totalTime=function totalTime(t,e){if(St(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Ba(this,t),!r._dp||r.parent||Ca(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Da(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===V||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),ha(this,t,e)),this},It.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+xa(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},It.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},It.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+xa(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},It.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?gt(this._tTime,r)+1:1},It.timeScale=function timeScale(t){if(!arguments.length)return this._rts===-V?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?za(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-V?0:this._rts,this.totalTime(bt(-this._delay,this._tDur,e),!0),Aa(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},It.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(St(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==V&&(this._tTime-=V)))),this):this._ps},It.startTime=function startTime(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Da(e,this,t-this._delay),this}return this._start},It.endTime=function endTime(e){return this._start+(t(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},It.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?za(e.rawTime(t),this):this._tTime:this._tTime},It.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(e._ts||1),e=e._dp;return r},It.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,La(this)):-2===this._repeat?1/0:this._repeat},It.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,La(this),e?this.time(e):this}return this._rDelay},It.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},It.seek=function seek(e,r){return this.totalTime(Tt(this,e),t(r))},It.restart=function restart(e,r){return this.play().totalTime(e?-this._delay:0,t(r))},It.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},It.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},It.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},It.resume=function resume(){return this.paused(!1)},It.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-V:0)),this):this._rts<0},It.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-V,this},It.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-V))},It.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},It.then=function then(t){var i=this;return new Promise(function(e){function Un(){var t=i.then;i.then=null,p(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=p(t)?t:ja;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Un():i._prom=Un})},It.kill=function kill(){mb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ka(this,+t.duration,1,1),this.data=t.data,c||Dt.wake()}ka(Nt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-V,_prom:0,_ps:!1,_rts:1});var Ut=function(n){function Timeline(e,r){var i;return void 0===e&&(e={}),(i=n.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=t(e.sortChildren),I&&Da(e.parent||I,_assertThisInitialized(i),r),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&Ea(_assertThisInitialized(i),e.scrollTrigger),i}_inheritsLoose(Timeline,n);var e=Timeline.prototype;return e.to=function to(t,e,r){return Oa(0,arguments,this),this},e.from=function from(t,e,r){return Oa(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Oa(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,pa(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new $t(t,e,Tt(this,r),1),this},e.call=function call(t,e,r){return Da(this,$t.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new $t(t,r,Tt(this,n)),this},e.staggerFrom=function staggerFrom(e,r,i,n,a,s,o){return i.runBackwards=1,pa(i).immediateRender=t(i.immediateRender),this.staggerTo(e,r,i,n,a,s,o)},e.staggerFromTo=function staggerFromTo(e,r,i,n,a,s,o,u){return n.startAt=i,pa(n).immediateRender=t(n.immediateRender),this.staggerTo(e,r,n,a,s,o,u)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d,_,p,c=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:da(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==I&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(c!==this._time&&g&&(v+=this._time-c,t+=this._time-c),i=v,f=this._start,u=!(l=this._ts),y&&(g||(c=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(_=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=da(v%o),v===m?(s=this._repeat,i=g):((s=~~(v/o))&&s===v/o&&(i=g,s--),g<i&&(i=g)),d=gt(this._tTime,o),!c&&this._tTime&&d!==s&&(d=s),_&&1&s&&(i=g-i,p=1),s!==d&&!this._lock){var T=_&&1&d,b=T===(_&&1&s);if(s<d&&(T=!T),c=T?0:g,this._lock=1,this.render(c||(p?0:da(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&Ot(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),c&&c!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,c=T?g:-1e-4,this.render(c,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Ib(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,da(c),da(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,c=0),!c&&i&&!e&&(Ot(this,"onStart"),this._tTime!==v))return this;if(c<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-V);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-V:V);break}}n=a}}if(h&&!e&&(this.pause(),h.render(c<=i?0:-V)._zTime=c<=i?1:-1,this._ts))return this._start=f,Aa(this),this.render(t,e,r);this._onUpdate&&!e&&Ot(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&c)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||ta(this,1),e||t<0&&!c||!v&&!c&&m||(Ot(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(t,e){var r=this;if(q(e)||(e=Tt(this,e,t)),!(t instanceof Nt)){if(J(t))return t.forEach(function(t){return r.add(t,e)}),this;if(o(t))return this.addLabel(t,e);if(!p(t))return this;t=$t.delayedCall(0,t)}return this!==t?Da(this,t,e):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-Y);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof $t?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return o(t)?this.removeLabel(t):p(t)?this.killTweensOf(t):(sa(this,t),t===this._recent&&(this._recent=this._last),ua(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=da(Dt.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),n.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Tt(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=$t.delayedCall(0,e||Q,r);return i.data="isPause",this._hasPause=1,Da(this,i,Tt(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Tt(this,t);e;)e._start===t&&"isPause"===e.data&&ta(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Yt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(t,e){for(var r,i=[],n=xt(t),a=this._first,s=q(e);a;)a instanceof $t?fa(a._targets,n)&&(s?(!Yt||a._initted&&a._ts)&&a.globalTime(0)<=e&&a.globalTime(a.totalDuration())>e:!e||a.isActive())&&i.push(a):(r=a.getTweensOf(n,e)).length&&i.push.apply(i,r),a=a._next;return i},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Tt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=$t.to(i,ka({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||V,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ka(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ka({startAt:{time:Tt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),kb(this,Tt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),kb(this,Tt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+V)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return ua(this)},e.invalidate=function invalidate(){var t=this._first;for(this._lock=0;t;)t.invalidate(),t=t._next;return n.prototype.invalidate.call(this)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),ua(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=Y;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Da(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ka(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(ha(I,za(t,I)),f=Dt.frame),Dt.frame>=_t){_t+=U.autoSleep||120;var e=I._first;if((!e||!e._ts)&&U.autoSleep&&Dt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Dt.sleep()}}},Timeline}(Nt);ka(Ut.prototype,{_lock:0,_hasPause:0,_forcing:0});function Ub(t,e,r,i,n,a){var u,h,l,f;if(ft[t]&&!1!==(u=new ft[t]).init(n,u.rawVars?e[t]:function _processVars(t,e,r,i,n){if(p(t)&&(t=Qt(t,n,e,r,i)),!s(t)||t.style&&t.nodeType||J(t)||H(t))return o(t)?Qt(t,n,e,r,i):t;var a,u={};for(a in t)u[a]=Qt(t[a],n,e,r,i);return u}(e[t],i,n,a,r),r,i,a)&&(r._pt=h=new oe(r._pt,n,t,0,1,u.render,u,0,u.priority),r!==d))for(l=r._ptLookup[r._targets.indexOf(n)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function $b(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(J(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Yt,qt,Vt=function _addPropTween(t,e,r,i,n,a,s,u,h){p(i)&&(i=i(n||0,t,a));var l,f=t[e],d="get"!==r?r:p(f)?h?t[e.indexOf("set")||!p(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():f,_=p(f)?h?Zt:Wt:Gt;if(o(i)&&(~i.indexOf("random(")&&(i=hb(i)),"="===i.charAt(1)&&(!(l=ea(d,i)+(Ra(d)||0))&&0!==l||(i=l))),d!==i||qt)return isNaN(d*i)||""===i?(f||e in t||N(e,i),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,d,_,p,c=new oe(this._pt,t,e,0,1,ee,null,n),m=0,g=0;for(c.b=r,c.e=i,r+="",(_=~(i+="").indexOf("random("))&&(i=hb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(d=parseFloat(u[g-1])||0,c._pt={_next:c._pt,p:f||1===g?f:",",s:d,c:"="===l.charAt(1)?ea(d,l)-d:parseFloat(l)-d,m:h&&h<4?Math.round:0},m=it.lastIndex);return c.c=m<i.length?i.substring(m,i.length):"",c.fp=s,(nt.test(i)||_)&&(c.e=0),this._pt=c}.call(this,t,e,d,i,_,u||U.stringFilter,h)):(l=new oe(this._pt,t,e,+d||0,i-(d||0),"boolean"==typeof f?te:Jt,0,_),h&&(l.fp=h),s&&l.modifier(s,this,t),this._pt=l)},Xt=function _initTween(e,r){var i,n,a,s,o,u,h,l,f,d,p,c,m,g=e.vars,v=g.ease,y=g.startAt,T=g.immediateRender,b=g.lazy,w=g.onUpdate,x=g.onUpdateParams,k=g.callbackScope,O=g.runBackwards,P=g.yoyoEase,M=g.keyframes,C=g.autoRevert,A=e._dur,D=e._startAt,S=e._targets,z=e.parent,R=z&&"nested"===z.data?z.parent._targets:S,E="auto"===e._overwrite&&!B,F=e.timeline;if(!F||M&&v||(v="none"),e._ease=Bt(v,L.ease),e._yEase=P?Ft(Bt(!0===P?v:P,L.ease)):0,P&&e._yoyo&&!e._repeat&&(P=e._yEase,e._yEase=e._ease,e._ease=P),e._from=!F&&!!g.runBackwards,!F||M&&!g.stagger){if(c=(l=S[0]?_(S[0]).harness:0)&&g[l.prop],i=oa(g,ut),D&&(ta(D.render(-1,!0)),D._lazy=0),y)if(ta(e._startAt=$t.set(S,ka({data:"isStart",overwrite:!1,parent:z,immediateRender:!0,lazy:t(b),startAt:null,delay:0,onUpdate:w,onUpdateParams:x,callbackScope:k,stagger:0},y))),r<0&&!T&&!C&&e._startAt.render(-1,!0),T){if(0<r&&!C&&(e._startAt=0),A&&r<=0)return void(r&&(e._zTime=r))}else!1===C&&(e._startAt=0);else if(O&&A)if(D)C||(e._startAt=0);else if(r&&(T=!1),a=ka({overwrite:!1,data:"isFromStart",lazy:T&&t(b),immediateRender:T,stagger:0,parent:z},i),c&&(a[l.prop]=c),ta(e._startAt=$t.set(S,a)),r<0&&e._startAt.render(-1,!0),e._zTime=r,T){if(!r)return}else _initTween(e._startAt,V);for(e._pt=e._ptCache=0,b=A&&t(b)||b&&!A,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||$(S)[n]._gsap,e._ptLookup[n]=d={},lt[h.id]&&ht.length&&ga(),p=R===S?n:R.indexOf(o),l&&!1!==(f=new l).init(o,c||i,e,p,R)&&(e._pt=s=new oe(e._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){d[t]=s}),f.priority&&(u=1)),!l||c)for(a in i)ft[a]&&(f=Ub(a,i,e,p,o,R))?f.priority&&(u=1):d[a]=s=Vt.call(e,o,a,"get",i[a],p,R,0,g.stringFilter);e._op&&e._op[n]&&e.kill(o,e._op[n]),E&&e._pt&&(Yt=e,I.killTweensOf(o,d,e.globalTime(r)),m=!e.parent,Yt=0),e._pt&&b&&(lt[h.id]=1)}u&&se(e),e._onInit&&e._onInit(e)}e._onUpdate=w,e._initted=(!e._op||e._pt)&&!m,M&&r<=0&&F.render(Y,!0,!0)},Qt=function _parseFuncOrString(t,e,r,i,n){return p(t)?t.call(e,r,i,n):o(t)&&~t.indexOf("random(")?hb(t):t},jt=ct+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Kt={};ba(jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var $t=function(R){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var o,u,h,l,f,d,_,p,c=(a=R.call(this,n?r:pa(r))||this).vars,m=c.duration,g=c.delay,y=c.immediateRender,T=c.stagger,b=c.overwrite,w=c.keyframes,x=c.defaults,k=c.scrollTrigger,P=c.yoyoEase,M=r.parent||I,C=(J(e)||H(e)?q(e[0]):"length"in r)?[e]:xt(e);if(a._targets=C.length?$(C):O("GSAP target "+e+" not found. https://greensock.com",!U.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,w||T||v(m)||v(g)){if(r=a.vars,(o=a.timeline=new Ut({data:"nested",defaults:x||{}})).kill(),o.parent=o._dp=_assertThisInitialized(a),o._start=0,T||v(m)||v(g)){if(l=C.length,_=T&&Za(T),s(T))for(f in T)~jt.indexOf(f)&&((p=p||{})[f]=T[f]);for(u=0;u<l;u++)(h=oa(r,Kt)).stagger=0,P&&(h.yoyoEase=P),p&&mt(h,p),d=C[u],h.duration=+Qt(m,_assertThisInitialized(a),u,d,C),h.delay=(+Qt(g,_assertThisInitialized(a),u,d,C)||0)-a._delay,!T&&1===l&&h.delay&&(a._delay=g=h.delay,a._start+=g,h.delay=0),o.to(d,h,_?_(u,d,C):0),o._ease=zt.none;o.duration()?m=g=0:a.timeline=0}else if(w){pa(ka(o.vars.defaults,{ease:"none"})),o._ease=Bt(w.ease||r.ease||"none");var A,D,S,z=0;if(J(w))w.forEach(function(t){return o.to(C,t,">")});else{for(f in h={},w)"ease"===f||"easeEach"===f||$b(f,w[f],h,w.easeEach);for(f in h)for(A=h[f].sort(function(t,e){return t.t-e.t}),u=z=0;u<A.length;u++)(S={ease:(D=A[u]).e,duration:(D.t-(u?A[u-1].t:0))/100*m})[f]=D.v,o.to(C,S,z),z+=S.duration;o.duration()<m&&o.to({},{duration:m-o.duration()})}}m||a.duration(m=o.duration())}else a.timeline=0;return!0!==b||B||(Yt=_assertThisInitialized(a),I.killTweensOf(C),Yt=0),Da(M,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(y||!m&&!w&&a._start===da(M._time)&&t(y)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==M.data)&&(a._tTime=-V,a.render(Math.max(0,-g))),k&&Ea(_assertThisInitialized(a),k),a}_inheritsLoose(Tween,R);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d=this._time,_=this._tDur,p=this._dur,c=_-V<t&&0<=t?_:t<V?0:t;if(p){if(c!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=t<0){if(i=c,l=this.timeline,this._repeat){if(s=p+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*s+t,e,r);if(i=da(c%s),c===_?(a=this._repeat,i=p):((a=~~(c/s))&&a===c/s&&(i=p,a--),p<i&&(i=p)),(u=this._yoyo&&1&a)&&(f=this._yEase,i=p-i),o=gt(this._tTime,s),i===d&&!r&&this._initted)return this._tTime=c,this;a!==o&&(l&&this._yEase&&Ib(l,u),!this.vars.repeatRefresh||u||this._lock||(this._lock=r=1,this.render(da(s*a),!0).invalidate()._lock=0))}if(!this._initted){if(Fa(this,t<0?t:i,r,e))return this._tTime=0,this;if(d!==this._time)return this;if(p!==this._dur)return this.render(t,e,r)}if(this._tTime=c,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=h=(f||this._ease)(i/p),this._from&&(this.ratio=h=1-h),i&&!d&&!e&&(Ot(this,"onStart"),this._tTime!==c))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:!i&&u?-V:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(t<0&&this._startAt&&this._startAt.render(t,!0,r),Ot(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&Ot(this,"onRepeat"),c!==this._tDur&&c||this._tTime!==c||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,!0,!0),!t&&p||!(c===this._tDur&&0<this._ts||!c&&this._ts<0)||ta(this,1),e||t<0&&!d||!c&&!d||(Ot(this,c===_?"onComplete":"onReverseComplete",!0),!this._prom||c<_&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!vt(t))||(t._ts<0||t._dp._ts<0)&&!vt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=bt(0,t._tDur,e),a=gt(l,h),t._yoyo&&1&a&&(u=1-u),a!==gt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||i||t._zTime===V||!e&&t._zTime){if(!t._initted&&Fa(t,e,i,r))return;for(s=t._zTime,t._zTime=e||(r?V:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;t._startAt&&e<0&&t._startAt.render(e,!0,!0),t._onUpdate&&!r&&Ot(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&Ot(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&ta(t,1),r||(Ot(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets}
vendor: 5,807 bytes, line 5794
5794,e.invalidate=function invalidate(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),R.prototype.invalidate.call(this)},e.resetTo=function resetTo(t,e,r,i){c||Dt.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Xt(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!l)for(l=t._ptCache[e]=[],u=t._ptLookup,h=t._targets.length;h--;){if((o=u[h][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e;)o=o._next;if(!o)return qt=1,t.vars[e]="+=0",Xt(t,s),qt=0,1;l.push(o)}for(h=l.length;h--;)(o=l[h]).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,o.e&&(o.e=ca(r)+Ra(o.e)),o.b&&(o.b=o.s+Ra(o.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(Ba(this,0),this.parent||ra(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?mb(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Yt&&!0!==Yt.vars.overwrite)._first||mb(this),this.parent&&r!==this.timeline.totalDuration()&&Ka(this,this._dur*this.timeline._tDur/r,0,1),this}var i,n,a,s,u,h,l,f=this._targets,d=t?xt(t):f,p=this._ptLookup,c=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,d))return"all"===e&&(this._pt=0),mb(this);for(i=this._op=this._op||[],"all"!==e&&(o(e)&&(u={},ba(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?_(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=mt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~d.indexOf(f[l]))for(u in n=p[l],"all"===e?(i[l]=e,s=n,a={}):(a=i[l]=i[l]||{},s=e),s)(h=n&&n[u])&&("kill"in h.d&&!0!==h.d.kill(u)||sa(this,h,"_pt"),delete n[u]),"all"!==a&&(a[u]=1);return this._initted&&!this._pt&&c&&mb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Oa(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Oa(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Nt);ka($t.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ba("staggerTo,staggerFrom,staggerFromTo",function(r){$t[r]=function(){var t=new Ut,e=wt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function gc(t,e,r){return t.setAttribute(e,r)}function oc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var Gt=function _setterPlain(t,e,r){return t[e]=r},Wt=function _setterFunc(t,e,r){return t[e](r)},Zt=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},Ht=function _getSetter(t,e){return p(t[e])?Wt:r(t[e])&&t.setAttribute?gc:Gt},Jt=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},te=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ee=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},re=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ie=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ne=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?sa(this,i,"_pt"):i.dep||(e=1),i=r;return!e},se=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},oe=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=oc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||Jt,this.d=s||this,this.set=o||Gt,this.pr=u||0,(this._next=t)&&(t._prev=this)}ba(ct+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return ut[t]=1}),ot.TweenMax=ot.TweenLite=$t,ot.TimelineLite=ot.TimelineMax=Ut,I=new Ut({sortChildren:!1,defaults:L,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),U.stringFilter=xb;var ue={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return function _createPlugin(t){var e=(t=!t.name&&t.default||t).name,r=p(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:Q,render:re,add:Vt,kill:ne,modifier:ie,rawVars:0},a={targetTest:0,get:0,getSetter:Ht,aliases:{},register:0};if(St(),t!==i){if(ft[e])return;ka(i,ka(oa(t,n),a)),mt(i.prototype,mt(n,oa(t,a))),ft[i.prop=e]=i,t.targetTest&&(pt.push(i),ut[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}P(e,i),t.register&&t.register(he,i,oe)}(t)})},timeline:function timeline(t){return new Ut(t)},getTweensOf:function getTweensOf(t,e){return I.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,r){o(i)&&(i=xt(i)[0]);var n=_(i||{}).get,a=e?ja:ia;return"native"===e&&(e=""),i?t?a((ft[t]&&ft[t].get||n)(i,t,e,r)):function(t,e,r){return a((ft[t]&&ft[t].get||n)(i,t,e,r))}:i}
vendor: 18,726 bytes, line 5794
5794,quickSetter:function quickSetter(r,e,i){if(1<(r=xt(r)).length){var n=r.map(function(t){return he.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=ft[e],o=_(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;d._pt=0,e.init(r,i?t+i:t,d,0,[r]),e.render(1,e),d._pt&&re(1,d)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function iw(t,e,r){return n.resetTo(i,t,e,r)}var r,n=he.to(t,mt(((r={})[i]="+=0.1",r.paused=!0,r),e||{}));return iw.tween=n,iw},isTweening:function isTweening(t){return 0<I.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=Bt(t.ease,L.ease)),na(L,t||{})},config:function config(t){return na(U,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!ft[t]&&!ot[t]&&O(i+" effect requires "+t+" plugin.")}),dt[i]=function(t,e,r){return n(xt(t),ka(e||{},a),r)},r&&(Ut.prototype[i]=function(t,e,r){return this.add(dt[i](t,s(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){zt[t]=Bt(e)},parseEase:function parseEase(t,e){return arguments.length?Bt(t,e):zt},getById:function getById(t){return I.getById(t)},exportRoot:function exportRoot(e,r){void 0===e&&(e={});var i,n,a=new Ut(e);for(a.smoothChildTiming=t(e.smoothChildTiming),I.remove(a),a._dp=0,a._time=a._tTime=I._time,i=I._first;i;)n=i._next,!r&&!i._dur&&i instanceof $t&&i.vars.onComplete===i._targets[0]||Da(a,i,i._start-i._delay),i=n;return Da(I,a,0),a},utils:{wrap:function wrap(e,t,r){var i=t-e;return J(e)?eb(e,wrap(0,e.length),t):Pa(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return J(e)?eb(e,wrapYoyo(0,e.length-1),t):Pa(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:Za,random:ab,snap:_a,normalize:function normalize(t,e,r){return kt(t,e,0,1,r)},getUnit:Ra,clamp:function clamp(e,r,t){return Pa(t,function(t){return bt(e,r,t)})},splitColor:sb,toArray:xt,selector:function selector(r){return r=xt(r)[0]||O("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return xt(t,e.querySelectorAll?e:e===r?O("Invalid scope")||a.createElement("div"):r)}},mapRange:kt,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||Ra(t))}},interpolate:function interpolate(e,r,t,i){var n=isNaN(e+r)?0:function(t){return(1-t)*e+t*r};if(!n){var a,s,u,h,l,f=o(e),d={};if(!0===t&&(i=1)&&(t=null),f)e={p:e},r={p:r};else if(J(e)&&!J(r)){for(u=[],h=e.length,l=h-2,s=1;s<h;s++)u.push(interpolate(e[s-1],e[s]));h--,n=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=r}else i||(e=mt(J(e)?[]:{},e));if(!u){for(a in r)Vt.call(d,e,a,"get",r[a]);n=function func(t){return re(t,d)||(f?e.p:e)}}}return Pa(t,n)},shuffle:Ya},install:M,effects:dt,ticker:Dt,updateRoot:Ut.updateRoot,plugins:ft,globalTimeline:I,core:{PropTween:oe,globals:P,Tween:$t,Timeline:Ut,Animation:Nt,getCache:_,_removeLinkedListItem:sa,suppressOverwrites:function suppressOverwrites(t){return B=t}}};ba("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return ue[t]=$t[t]}),Dt.add(Ut.updateRoot),d=ue.to({},{duration:0});function sc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function uc(t,n){return{name:t,rawVars:1,init:function init(t,i,e){e._onInit=function(t){var e,r;if(o(i)&&(e={},ba(i,function(t){return e[t]=1}),i=e),n){for(r in e={},i)e[r]=n(i[r]);i=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=sc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,i)}}}}var he=ue.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s;for(a in e)(s=this.add(t,"setAttribute",(t.getAttribute(a)||0)+"",e[a],i,n,0,0,a))&&(s.op=a),this._props.push(a)}},{name:"endArray",init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r])}},uc("roundProps",$a),uc("modifiers"),uc("snap",_a))||ue;$t.version=Ut.version=he.version="3.10.1",l=1,u()&&St();function dd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function ed(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function fd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function gd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function hd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function id(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function jd(t,e,r){return t.style[e]=r}function kd(t,e,r){return t.style.setProperty(e,r)}function ld(t,e,r){return t._gsap[e]=r}function md(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function nd(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function od(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function sd(t,e){var r=fe.createElementNS?fe.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):fe.createElement(t);return r.style?r:fe.createElement(t)}function td(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Ne,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&td(t,je(e)||e,1)||""}function wd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(le=window,fe=le.document,de=fe.documentElement,pe=sd("div")||{style:{}},sd("div"),Ve=je(Ve),Xe=Ve+"Origin",pe.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",me=!!je("perspective"),_e=1)}function xd(t){var e,r=sd("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,a=this.style.cssText;if(de.appendChild(r),r.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=xd}catch(t){}else this._gsapBBox&&(e=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),de.removeChild(r),this.style.cssText=a,e}function yd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function zd(e){var r;try{r=e.getBBox()}catch(t){r=xd.call(e,!0)}return r&&(r.width||r.height)||e.getBBox===xd||(r=xd.call(e,!0)),!r||r.width||r.x||r.y?r:{x:+yd(e,["x","cx","x1"])||0,y:+yd(e,["y","cy","y1"])||0,width:0,height:0}}function Ad(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!zd(t))}function Bd(t,e){if(e){var r=t.style;e in Fe&&e!==Xe&&(e=Ve),r.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty(e.replace(Ne,"-$1").toLowerCase())):r.removeAttribute(e)}}function Cd(t,e,r,i,n,a){var s=new oe(t._pt,e,r,0,1,a?id:hd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function Ed(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=pe.style,f=Ue.test(e),d="svg"===t.tagName.toLowerCase(),p=(d?"client":"offset")+(f?"Width":"Height"),c="px"===i,m="%"===i;return i===h||!u||Ke[i]||Ke[h]?u:("px"===h||c||(u=Ed(t,e,r,"px")),o=t.getCTM&&Ad(t),!m&&"%"!==h||!Fe[e]&&!~e.indexOf("adius")?(l[f?"width":"height"]=100+(c?h:i),a=~e.indexOf("adius")||"em"===i&&t.appendChild&&!d?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==fe&&a.appendChild||(a=fe.body),(s=a._gsap)&&m&&s.width&&f&&s.time===Dt.time?ca(u/s.width*100):(!m&&"%"!==h||(l.position=td(t,"position")),a===t&&(l.position="static"),a.appendChild(pe),n=pe[p],a.removeChild(pe),l.position="absolute",f&&m&&((s=_(a)).time=Dt.time,s.width=a[p]),ca(c?n*u/100:n&&u?100/n*u:0))):(n=o?t.getBBox()[f?"width":"height"]:t[p],ca(m?u/n*100:u/100*n)))}function Fd(t,e,r,i){var n;return _e||wd(),e in qe&&"transform"!==e&&~(e=qe[e]).indexOf(",")&&(e=e.split(",")[0]),Fe[e]&&"transform"!==e?(n=He(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Je(td(t,Xe))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=Ge[e]&&Ge[e](t,e,r)||td(t,e)||aa(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?Ed(t,e,n,r)+r:n}function Gd(t,e,r,i){if(!r||"none"===r){var n=je(e,t,1),a=n&&td(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=td(t,"borderTopColor"))}var s,o,u,h,l,f,d,_,p,c,m,g=new oe(this._pt,t.style,e,0,1,ee),v=0,y=0;if(g.b=r,g.e=i,r+="","auto"===(i+="")&&(t.style[e]=i,i=td(t,e)||i,t.style[e]=r),xb(s=[r,i]),i=s[1],u=(r=s[0]).match(rt)||[],(i.match(rt)||[]).length){for(;o=rt.exec(i);)d=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),d!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===d.charAt(1)&&(d=ea(h,d)+m),_=parseFloat(d),c=d.substr((_+"").length),v=rt.lastIndex-c.length,c||(c=c||U.units[e]||m,v===i.length&&(i+=c,g.e+=c)),m!==c&&(h=Ed(t,e,f,c)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:_-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?id:hd;return nt.test(i)&&(g.e=0),this._pt=g}function Id(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=$e[r]||r,e[1]=$e[i]||i,e.join(" ")}function Jd(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],Fe[r]&&(i=1,r="transformOrigin"===r?Xe:Ve),Bd(a,r);i&&(Bd(a,Ve),u&&(u.svg&&a.removeAttribute("transform"),He(a,1),u.uncache=1))}}function Nd(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function Od(t){var e=td(t,Ve);return Nd(e)?We:e.substr(7).match(et).map(ca)}function Pd(t,e){var r,i,n,a,s=t._gsap||_(t),o=t.style,u=Od(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?We:u:(u!==We||t.offsetParent||t===de||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&t.offsetParent||(a=1,i=t.nextSibling,de.appendChild(t)),u=Od(t),n?o.display=n:Bd(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):de.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function Qd(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||Pd(t,!0),f=h.xOrigin||0,d=h.yOrigin||0,_=h.xOffset||0,p=h.yOffset||0,c=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==We&&(o=c*v-m*g)&&(u=w*(-m/o)+x*(c/o)-(c*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=zd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-d,h.xOffset=_+(y*c+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[Xe]="0px 0px",a&&(Cd(a,h,"xOrigin",f,w),Cd(a,h,"yOrigin",d,x),Cd(a,h,"xOffset",_,h.xOffset),Cd(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function Td(t,e,r){var i=Ra(e);return ca(parseFloat(e)+parseFloat(Ed(t,"x",r+"px",i)))+i}function $d(t,e,r,i,n){var a,s,u=360,h=o(n),l=parseFloat(n)*(h&&~n.indexOf("rad")?Be:1)-i,f=i+l+"deg";return h&&("short"===(a=n.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===a&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===a&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=s=new oe(t._pt,e,r,i,l,ed),s.e=f,s.u="deg",t._props.push(r),s}function _d(t,e){for(var r in e)t[r]=e[r];return t}function ae(t,e,r){var i,n,a,s,o,u,h,l=_d({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[Ve]=e,i=He(r,1),Bd(r,Ve),r.setAttribute("transform",a)):(a=getComputedStyle(r)[Ve],f[Ve]=e,i=He(r,1),f[Ve]=a),Fe)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=Ra(a)!==(h=Ra(s))?Ed(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new oe(t._pt,i,n,o,u-o,dd),t._pt.u=h||0,t._props.push(n));_d(i,l)}var le,fe,de,_e,pe,ce,me,ge=zt.Power0,ve=zt.Power1,ye=zt.Power2,Te=zt.Power3,be=zt.Power4,we=zt.Linear,xe=zt.Quad,ke=zt.Cubic,Oe=zt.Quart,Pe=zt.Quint,Me=zt.Strong,Ce=zt.Elastic,Ae=zt.Back,De=zt.SteppedEase,Se=zt.Bounce,ze=zt.Sine,Re=zt.Expo,Ee=zt.Circ,Fe={},Be=180/Math.PI,Ie=Math.PI/180,Le=Math.atan2,Ne=/([A-Z])/g,Ue=/(left|right|width|margin|padding|x)/i,Ye=/[\s,\(]\S/,qe={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Ve="transform",Xe=Ve+"Origin",Qe="O,Moz,ms,Ms,Webkit".split(","),je=function _checkPropPrefix(t,e,r){var i=(e||pe).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(Qe[n]+t in i););return n<0?null:(3===n?"ms":0<=n?Qe[n]:"")+t},Ke={deg:1,rad:1,turn:1},$e={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Ge={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new oe(t._pt,e,r,0,0,Jd);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},We=[1,0,0,1,0,0],Ze={},He=function _parseTransform(t,e){var r=t._gsap||new Lt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,d,_,p,c,m,g,v,y,T,b,w,x,k,O,P,M,C,A,D,S,z,R,E,F=t.style,B=r.scaleX<0,I="deg",L=td(t,Xe)||"0";return i=n=a=u=h=l=f=d=_=0,s=o=1,r.svg=!(!t.getCTM||!Ad(t)),m=Pd(t,r.svg),r.svg&&(P=(!r.uncache||"0px 0px"===L)&&!e&&t.getAttribute("data-svg-origin"),Qd(t,P||L,!!P||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,c=r.yOrigin||0,m!==We&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?Le(b,T)*Be:0,(f=w||x?Le(w,x)*Be+u:0)&&(o*=Math.abs(Math.cos(f*Ie))),r.svg&&(i-=p-(p*T+c*w),n-=c-(p*b+c*x))):(E=m[6],z=m[7],A=m[8],D=m[9],S=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=Le(E,S))*Be,g&&(P=k*(v=Math.cos(-g))+A*(y=Math.sin(-g)),M=O*v+D*y,C=E*v+S*y,A=k*-y+A*v,D=O*-y+D*v,S=E*-y+S*v,R=z*-y+R*v,k=P,O=M,E=C),l=(g=Le(-w,S))*Be,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=P=T*v-A*y,b=M=b*v-D*y,w=C=w*v-S*y),u=(g=Le(b,T))*Be,g&&(P=T*(v=Math.cos(g))+b*(y=Math.sin(g)),M=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=P,k=M),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ca(Math.sqrt(T*T+b*b+w*w)),o=ca(Math.sqrt(O*O+E*E)),g=Le(k,O),f=2e-4<Math.abs(g)?g*Be:0,_=R?1/(R<0?-R:R):0),r.svg&&(P=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!Nd(td(t,Ve)),P&&t.setAttribute("transform",P))),90<Math.abs(f)&&Math.abs(f)<270&&(B?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ca(s),r.scaleY=ca(o),r.rotation=ca(u)+I,r.rotationX=ca(h)+I,r.rotationY=ca(l)+I,r.skewX=f+I,r.skewY=d+I,r.transformPerspective=_+"px",(r.zOrigin=parseFloat(L.split(" ")[2])||0)&&(F[Xe]=Je(L)),r.xOffset=r.yOffset=0,r.force3D=U.force3D,r.renderTransform=r.svg?ar:me?nr:tr,r.uncache=0,r},Je=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},tr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,nr(t,e)},er="0deg",rr="0px",ir=") ",nr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,d=r.skewY,_=r.scaleX,p=r.scaleY,c=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==er||h!==er)){var b,w=parseFloat(h)*Ie,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*Ie,b=Math.cos(w),a=Td(g,a,x*b*-v),s=Td(g,s,-Math.sin(w)*-v),o=Td(g,o,k*b*-v+v)}c!==rr&&(y+="perspective("+c+ir),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===rr&&s===rr&&o===rr||(y+=o!==rr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+ir),u!==er&&(y+="rotate("+u+ir),h!==er&&(y+="rotateY("+h+ir),l!==er&&(y+="rotateX("+l+ir),f===er&&d===er||(y+="skew("+f+", "+d+ir),1===_&&1===p||(y+="scale("+_+", "+p+ir),g.style[Ve]=y||"translate(0, 0)"},ar=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,d=o.rotation,_=o.skewX,p=o.skewY,c=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);d=parseFloat(d),_=parseFloat(_),(p=parseFloat(p))&&(_+=p=parseFloat(p),d+=p),d||_?(d*=Ie,_*=Ie,r=Math.cos(d)*c,i=Math.sin(d)*c,n=Math.sin(d-_)*-m,a=Math.cos(d-_)*m,_&&(p*=Ie,s=Math.tan(_-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ca(r),i=ca(i),n=ca(n),a=ca(a)):(r=c,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=Ed(g,"x",l,"px"),k=Ed(g,"y",f,"px")),(v||y||T||b)&&(x=ca(x+v-(v*r+y*n)+T),k=ca(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ca(x+u/100*s.width),k=ca(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[Ve]=s)};ba("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});Ge[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return Fd(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var sr,or,ur,hr={name:"css",register:wd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,r,i,n){var a,s,u,h,l,f,d,_,p,c,m,g,v,y,T,b=this._props,w=t.style,x=r.vars.startAt;for(d in _e||wd(),e)if("autoRound"!==d&&(s=e[d],!ft[d]||!Ub(d,e,r,i,t,n)))if(l=typeof s,f=Ge[d],"function"===l&&(l=typeof(s=s.call(r,i,t,n))),"string"===l&&~s.indexOf("random(")&&(s=hb(s)),f)f(this,t,d,s,r)&&(T=1);else if("--"===d.substr(0,2))a=(getComputedStyle(t).getPropertyValue(d)+"").trim(),s+="",Ct.lastIndex=0,Ct.test(a)||(_=Ra(a),p=Ra(s)),p?_!==p&&(a=Ed(t,d,a,p)+p):_&&(s+=_),this.add(w,"setProperty",a,s,i,n,0,0,d),b.push(d);else if("undefined"!==l){if(x&&d in x?(a="function"==typeof x[d]?x[d].call(r,i,t,n):x[d],o(a)&&~a.indexOf("random(")&&(a=hb(a)),Ra(a+"")||(a+=U.units[d]||Ra(Fd(t,d))||""),"="===(a+"").charAt(1)&&(a=Fd(t,d))):a=Fd(t,d),h=parseFloat(a),(c="string"===l&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),u=parseFloat(s),d in qe&&("autoAlpha"===d&&(1===h&&"hidden"===Fd(t,"visibility")&&u&&(h=0),Cd(this,w,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==d&&"transform"!==d&&~(d=qe[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in Fe)if(g||((v=t._gsap).renderTransform&&!e.parseTransform||He(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new oe(this._pt,w,Ve,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new oe(this._pt,v,"scaleY",v.scaleY,(c?ea(v.scaleY,c+u):u)-v.scaleY||0),b.pu
5794sh("scaleY",d),d+="X";else{if("transformOrigin"===d){s=Id(s),v.svg?Qd(t,s,0,y,0,this):((p=parseFloat(s.split(" ")[2])||0)!==v.zOrigin&&Cd(this,v,"zOrigin",v.zOrigin,p),Cd(this,w,d,Je(a),Je(s)));continue}if("svgOrigin"===d){Qd(t,s,1,y,0,this);continue}if(d in Ze){$d(this,v,d,h,c?ea(h,c+s):s);continue}if("smoothOrigin"===d){Cd(this,v,"smooth",v.smooth,s);continue}if("force3D"===d){v[d]=s;continue}if("transform"===d){ae(this,s,t);continue}}else d in w||(d=je(d)||d);if(m||(u||0===u)&&(h||0===h)&&!Ye.test(s)&&d in w)u=u||0,(_=(a+"").substr((h+"").length))!==(p=Ra(s)||(d in U.units?U.units[d]:_))&&(h=Ed(t,d,a,p)),this._pt=new oe(this._pt,m?v:w,d,h,(c?ea(h,c+u):u)-h,m||"px"!==p&&"zIndex"!==d||!1===e.autoRound?dd:gd),this._pt.u=p||0,_!==p&&"%"!==p&&(this._pt.b=a,this._pt.r=fd);else if(d in w)Gd.call(this,t,d,a,c?c+s:s);else{if(!(d in t)){N(d,s);continue}this.add(t,d,a||t[d],c?c+s:s,i,n)}b.push(d)}T&&se(this)},get:Fd,aliases:qe,getSetter:function getSetter(t,e,i){var n=qe[e];return n&&n.indexOf(",")<0&&(e=n),e in Fe&&e!==Xe&&(t._gsap.x||Fd(t,"x"))?i&&ce===i?"scale"===e?md:ld:(ce=i||{})&&("scale"===e?nd:od):t.style&&!r(t.style[e])?jd:~e.indexOf("-")?kd:Ht(t,e)},core:{_removeProperty:Bd,_getMatrix:Pd}};he.utils.checkPrefix=je,ur=ba((sr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(or="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){Fe[t]=1}),ba(or,function(t){U.units[t]="deg",Ze[t]=1}),qe[ur[13]]=sr+","+or,ba("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");qe[e[1]]=ur[e[0]]}),ba("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){U.units[t]="px"}),he.registerPlugin(hr);var lr=he.registerPlugin(hr)||he,fr=lr.core.Tween;e.Back=Ae,e.Bounce=Se,e.CSSPlugin=hr,e.Circ=Ee,e.Cubic=ke,e.Elastic=Ce,e.Expo=Re,e.Linear=we,e.Power0=ge,e.Power1=ve,e.Power2=ye,e.Power3=Te,e.Power4=be,e.Quad=xe,e.Quart=Oe,e.Quint=Pe,e.Sine=ze,e.SteppedEase=De,e.Strong=Me,e.TimelineLite=Ut,e.TimelineMax=Ut,e.TweenLite=$t,e.TweenMax=fr,e.default=lr,e.gsap=lr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); 5795 5796 5797/* !modules/ukraine/m_libraries/misc/gsap/gsap-latest-beta.min.js */; 5798/* modules/ukraine/m_libraries/misc/gsap/ScrollTrigger.min.js */ 5799/*! 5800 * ScrollTrigger 3.10.4 5801 * https://greensock.com 5802 * 5803 * @license Copyright 2022, GreenSock. All rights reserved. 5804 * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. 5805 * @author: Jack Doyle, [email protected] 5806 */ 5807 5808!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function q(){return we||"undefined"!=typeof window&&(we=window.gsap)&&we.registerPlugin&&we}function y(e,t){return~Le.indexOf(e)&&Le[Le.indexOf(e)+1][t]}function z(e){return!!~t.indexOf(e)}function A(e,t,r,n,i){return e.addEventListener(t,r,{passive:!n,capture:!!i})}function B(e,t,r,n){return e.removeEventListener(t,r,!!n)}function E(){return De&&De.isPressed||T.cache++}function F(r,n){function Uc(e){if(e||0===e){i&&(Me.history.scrollRestoration="manual");var t=De&&De.isPressed;e=Uc.v=Math.round(e)||(De&&De.iOS?1:0),r(e),Uc.cacheID=T.cache,t&&o("ss",e)}else(n||T.cache!==Uc.cacheID||o("ref"))&&(Uc.cacheID=T.cache,Uc.v=r());return Uc.v+Uc.offset}return Uc.offset=0,r&&Uc}function I(e){return we.utils.toArray(e)[0]||("string"==typeof e&&!1!==we.config().nullTargetWarn?console.warn("Element not found:",e):null)}function J(t,e){var r=e.s,n=e.sc,i=T.indexOf(t),o=n===Ne.sc?1:2;return~i||(i=T.push(t)-1),T[i+o]||(T[i+o]=F(y(t,r),!0)||(z(t)?n:F(function(e){return arguments.length?t[r]=e:t[r]})))}function K(e,t,i){function od(e,t){var r=He();t||n<r-s?(a=o,o=e,l=s,s=r):i?o+=e:o=a+(e-a)/(r-l)*(s-l)}var o=e,a=e,s=He(),l=s,n=t||50,c=Math.max(500,3*n);return{update:od,reset:function reset(){a=o=i?0:o,l=s=0},getVelocity:function getVelocity(e){var t=l,r=a,n=He();return!e&&0!==e||e===o||od(e),s===l||c<n-l?0:(o+(i?r:-r))/((i?n:s)-t)*1e3}}}function L(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e}function M(e){var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(r)?t:r}function N(){(Be=we.core.globals().ScrollTrigger)&&Be.core&&function _integrate(){var e=Be.core,r=e.bridge||{},t=e._scrollers,n=e._proxies;t.push.apply(t,T),n.push.apply(n,Le),T=t,Le=n,o=function _bridge(e,t){return r[e](t)}}()}function O(e){return(we=e||q())&&"undefined"!=typeof document&&document.body&&(Me=window,Ce=(Ae=document).documentElement,Oe=Ae.body,t=[Me,Ae,Ce,Oe],we.utils.clamp,Ie="onpointerenter"in Oe?"pointer":"mouse",Ee=k.isTouch=Me.matchMedia&&Me.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Me||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints?2:0,ze=k.eventTypes=("ontouchstart"in Ce?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Ce?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return i=0},500),N(),ke=1),ke}var we,ke,Me,Ae,Ce,Oe,Ee,Ie,Be,t,De,ze,i=1,Fe=[],T=[],Le=[],He=Date.now,o=function _bridge(e,t){return t},r="scrollLeft",n="scrollTop",Re={s:r,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:F(function(e){return arguments.length?Me.scrollTo(e,Ne.sc()):Me.pageXOffset||Ae[r]||Ce[r]||Oe[r]||0})},Ne={s:n,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Re,sc:F(function(e){return arguments.length?Me.scrollTo(Re.sc(),e):Me.pageYOffset||Ae[n]||Ce[n]||Oe[n]||0})};Re.op=Ne,T.cache=0;var k=(Observer.prototype.init=function init(e){ke||O(we)||console.warn("Please gsap.registerPlugin(Observer)"),Be||N();var i=e.tolerance,a=e.dragMinimum,t=e.type,n=e.target,r=e.lineHeight,o=e.debounce,s=e.preventDefault,l=e.onStop,c=e.onStopDelay,u=e.ignore,f=e.wheelSpeed,d=e.event,p=e.onDragStart,g=e.onDragEnd,h=e.onDrag,v=e.onPress,b=e.onRelease,m=e.onRight,y=e.onLeft,x=e.onUp,w=e.onDown,S=e.onCh
vendor: 5,401 bytes, line 5808
5808angeX,_=e.onChangeY,T=e.onChange,k=e.onToggleX,C=e.onToggleY,P=e.onHover,D=e.onHoverEnd,Y=e.onMove,X=e.ignoreCheck,F=e.isNormalizer,H=e.onGestureStart,R=e.onGestureEnd,U=e.onWheel,V=e.onEnable,W=e.onDisable,j=e.onClick,Q=e.scrollSpeed,q=e.capture,G=e.allowClicks,Z=e.lockAxis,$=e.onLockAxis;function Pe(){return ye=He()}function Qe(e,t){return(se.event=e)&&u&&~u.indexOf(e.target)||t&&ge&&"touch"!==e.pointerType||X&&X(e,t)}function Se(){var e=se.deltaX=M(be),t=se.deltaY=M(me),r=Math.abs(e)>=i,n=Math.abs(t)>=i;T&&(r||n)&&T(se,e,t,be,me),r&&(m&&0<se.deltaX&&m(se),y&&se.deltaX<0&&y(se),S&&S(se),k&&se.deltaX<0!=le<0&&k(se),le=se.deltaX,be[0]=be[1]=be[2]=0),n&&(w&&0<se.deltaY&&w(se),x&&se.deltaY<0&&x(se),_&&_(se),C&&se.deltaY<0!=ce<0&&C(se),ce=se.deltaY,me[0]=me[1]=me[2]=0),(ne||re)&&(Y&&Y(se),$&&oe&&$(se),re&&(h(se),re=!1),ne=oe=!1),ie&&(U(se),ie=!1),ee=0}function Te(e,t,r){be[r]+=e,me[r]+=t,se._vx.update(e),se._vy.update(t),o?ee=ee||requestAnimationFrame(Se):Se()}function Ue(e,t){"y"!==ae&&(be[2]+=e,se._vx.update(e,!0)),"x"!==ae&&(me[2]+=t,se._vy.update(t,!0)),Z&&!ae&&(se.axis=ae=Math.abs(e)>Math.abs(t)?"x":"y",oe=!0),o?ee=ee||requestAnimationFrame(Se):Se()}function Ve(e){if(!Qe(e,1)){var t=(e=L(e,s)).clientX,r=e.clientY,n=t-se.x,i=r-se.y,o=se.isDragging;se.x=t,se.y=r,(o||Math.abs(se.startX-t)>=a||Math.abs(se.startY-r)>=a)&&(h&&(re=!0),o||(se.isDragging=!0),Ue(n,i),o||p&&p(se))}}function Xe(t){if(!Qe(t,1)){B(F?n:ve,ze[1],Ve,!0);var e=se.isDragging&&(3<Math.abs(se.x-se.startX)||3<Math.abs(se.y-se.startY)),r=L(t);e||(se._vx.reset(),se._vy.reset(),s&&G&&we.delayedCall(.08,function(){if(300<He()-ye&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(ve.createEvent){var e=ve.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,Me,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}})),se.isDragging=se.isGesturing=se.isPressed=!1,l&&!F&&te.restart(!0),g&&e&&g(se),b&&b(se,e)}}function Ye(e){return e.touches&&1<e.touches.length&&(se.isGesturing=!0)&&H(e,se.isDragging)}function Ze(){return(se.isGesturing=!1)||R(se)}function $e(e){if(!Qe(e)){var t=ue(),r=fe();Te((t-de)*Q,(r-pe)*Q,1),de=t,pe=r,l&&te.restart(!0)}}function _e(e){if(!Qe(e)){e=L(e,s),U&&(ie=!0);var t=(1===e.deltaMode?r:2===e.deltaMode?Me.innerHeight:1)*f;Te(e.deltaX*t,e.deltaY*t,0),l&&!F&&te.restart(!0)}}function af(e){if(!Qe(e)){var t=e.clientX,r=e.clientY,n=t-se.x,i=r-se.y;se.x=t,se.y=r,ne=!0,(n||i)&&Ue(n,i)}}function bf(e){se.event=e,P(se)}function cf(e){se.event=e,D(se)}function df(e){return Qe(e)||L(e,s)&&j(se)}this.target=n=I(n)||Ce,this.vars=e,u=u&&we.utils.toArray(u),i=i||0,a=a||0,f=f||1,Q=Q||1,t=t||"wheel,touch,pointer",o=!1!==o,r=r||parseFloat(Me.getComputedStyle(Oe).lineHeight)||22;var ee,te,re,ne,ie,oe,ae,se=this,le=0,ce=0,ue=J(n,Re),fe=J(n,Ne),de=ue(),pe=fe(),ge=~t.indexOf("touch")&&!~t.indexOf("pointer")&&"pointerdown"===ze[0],he=z(n),ve=n.ownerDocument||Ae,be=[0,0,0],me=[0,0,0],ye=0,xe=se.onPress=function(e){Qe(e,1)||(se.axis=ae=null,te.pause(),se.isPressed=!0,e=L(e),le=ce=0,se.startX=se.x=e.clientX,se.startY=se.y=e.clientY,se._vx.reset(),se._vy.reset(),A(F?n:ve,ze[1],Ve,s,!0),se.deltaX=se.deltaY=0,v&&v(se))};te=se._dc=we.delayedCall(c||.25,function onStopFunc(){se._vx.reset(),se._vy.reset(),te.pause(),l&&l(se)}).pause(),se.deltaX=se.deltaY=0,se._vx=K(0,50,!0),se._vy=K(0,50,!0),se.scrollX=ue,se.scrollY=fe,se.isDragging=se.isGesturing=se.isPressed=!1,se.enable=function(e){return se.isEnabled||(A(he?ve:n,"scroll",E),0<=t.indexOf("scroll")&&A(he?ve:n,"scroll",$e,s,q),0<=t.indexOf("wheel")&&A(n,"wheel",_e,s,q),(0<=t.indexOf("touch")&&Ee||0<=t.indexOf("pointer"))&&(A(n,ze[0],xe,s,q),A(ve,ze[2],Xe),A(ve,ze[3],Xe),G&&A(n,"click",Pe,!1,!0),j&&A(n,"click",df),H&&A(ve,"gesturestart",Ye),R&&A(ve,"gestureend",Ze),P&&A(n,Ie+"enter",bf),D&&A(n,Ie+"leave",cf),Y&&A(n,Ie+"move",af)),se.isEnabled=!0,e&&e.type&&xe(e),V&&V(se)),se},se.disable=function(){se.isEnabled&&(Fe.filter(function(e){return e!==se&&z(e.target)}).length||B(he?ve:n,"scroll",E),se.isPressed&&(se._vx.reset(),se._vy.reset(),B(F?n:ve,ze[1],Ve,!0)),B(he?ve:n,"scroll",$e,q),B(n,"wheel",_e,q),B(n,ze[0],xe,q),B(ve,ze[2],Xe),B(ve,ze[3],Xe),B(n,"click",Pe,!0),B(n,"click",df),B(ve,"gesturestart",Ye),B(ve,"gestureend",Ze),B(n,Ie+"enter",bf),B(n,Ie+"leave",cf),B(n,Ie+"move",af),se.isEnabled=se.isPressed=se.isDragging=!1,W&&W(se))},se.kill=function(){se.disable();var e=Fe.indexOf(se);0<=e&&Fe.splice(e,1),De===se&&(De=0)},Fe.push(se),F&&z(n)&&(De=se),se.enable(d)},function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(Observer,[{key:"velocityX",get:function get(){return this._vx.getVelocity()}},{key:"velocityY",get:function get(){return this._vy.getVelocity()}}]),Observer);function Observer(e){this.init(e)}k.version="3.10.4",k.create=function(e){return new k(e)},k.register=O,k.getAll=function(){return Fe.slice()},k.getById=function(t){return Fe.filter(function(e){return e.vars.id===t})[0]},q()&&we.registerPlugin(k);function va(){return nt=1}function wa(){return nt=0}function xa(e){return e}function ya(e){return Math.round(1e5*e)/1e5||0}function za(){return"undefined"!=typeof window}function Aa(){return We||za()&&(We=window.gsap)&&We.registerPlugin&&We}function Ba(e){return!!~s.indexOf(e)}function Ca(e){return y(e,"getBoundingClientRect")||(Ba(e)?function(){return Bt.width=je.innerWidth,Bt.height=je.innerHe
5808ight,Bt}:function(){return Mt(e)})}function Fa(e,t){var r=t.s,n=t.d2,i=t.d,o=t.a;return(r="scroll"+n)&&(o=y(e,r))?o()-Ca(e)()[i]:Ba(e)?(qe[r]||Ge[r])-(je["inner"+n]||qe["client"+n]||Ge["client"+n]):e[r]-e["offset"+n]}function Ga(e,t){for(var r=0;r<p.length;r+=3)t&&!~t.indexOf(p[r+1])||e(p[r],p[r+1],p[r+2])}function Ha(e){return"string"==typeof e}function Ia(e){return"function"==typeof e}function Ja(e){return"number"==typeof e}function Ka(e){return"object"==typeof e}function La(e){return Ia(e)&&e()}function Ma(r,n){return function(){var e=La(r),t=La(n);return function(){La(e),La(t)}}}function Na(e,t,r){return e&&e.progress(t?0:1)&&r&&e.pause()}function Oa(e,t){if(e.enabled){var r=t(e);r&&r.totalTime&&(e.callbackAnimation=r)}}function db(e){return je.getComputedStyle(e)}function fb(e,t){for(var r in t)r in e||(e[r]=t[r]);return e}function hb(e,t){var r=t.d2;return e["offset"+r]||e["client"+r]||0}function ib(e){var t,r=[],n=e.labels,i=e.duration();for(t in n)r.push(n[t]/i);return r}function kb(i){var o=We.utils.snap(i),a=Array.isArray(i)&&i.slice(0).sort(function(e,t){return e-t});return a?function(e,t,r){var n;if(void 0===r&&(r=.001),!t)return o(e);if(0<t){for(e-=r,n=0;n<a.length;n++)if(a[n]>=e)return a[n];return a[n-1]}for(n=a.length,e+=r;n--;)if(a[n]<=e)return a[n];return a[0]}:function(e,t,r){void 0===r&&(r=.001);var n=o(e);return!t||Math.abs(n-e)<r||n-e<0==t<0?n:o(t<0?e-i:e+i)}}function mb(t,r,e,n){return e.split(",").forEach(function(e){return t(r,e,n)})}function nb(e,t,r,n,i){return e.addEventListener(t,r,{passive:!n,capture:!!i})}function ob(e,t,r,n){return e.removeEventListener(t,r,!!n)}function pb(e,t,r){return r&&r.wheelHandler&&e(t,"wheel",r)}function tb(e,t){if(Ha(e)){var r=e.indexOf("="),n=~r?(e.charAt(r-1)+1)*parseFloat(e.substr(r+1)):0;~r&&(e.indexOf("%")>r&&(n*=t/100),e=e.substr(0,r-1)),e=n+(e in Y?Y[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e}function ub(e,t,r,n,i,o,a,s){var l=i.startColor,c=i.endColor,u=i.fontSize,f=i.indent,d=i.fontWeight,p=Je.createElement("div"),g=Ba(r)||"fixed"===y(r,"pinType"),h=-1!==e.indexOf("scroller"),v=g?Ge:r,b=-1!==e.indexOf("start"),m=b?l:c,x="border-color:"+m+";font-size:"+u+";color:"+m+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return x+="position:"+((h||s)&&g?"fixed;":"absolute;"),!h&&!s&&g||(x+=(n===Ne?_:P)+":"+(o+parseFloat(f))+"px;"),a&&(x+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),p._isStart=b,p.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),p.style.cssText=x,p.innerText=t||0===t?e+"-"+t:e,v.children[0]?v.insertBefore(p,v.children[0]):v.appendChild(p),p._offset=p["offset"+n.op.d2],X(p,0,n,b),p}function zb(){return 34<dt()-pt&&ee()}function Ab(){h&&h.isPressed&&!(h.startX>Ge.clientWidth)||(T.cache++,x=x||requestAnimationFrame(ee),pt||V("scrollStart"),pt=dt())}function Bb(){m=je.innerWidth,b=je.innerHeight}function Cb(){T.cache++,rt||g||Je.fullscreenElement||Je.webkitFullscreenElement||v&&m===je.innerWidth&&!(Math.abs(je.innerHeight-b)>.25*je.innerHeight)||l.restart(!0)}function Ib(e){var t,r=We.ticker.frame,n=[],i=0;if(w!==r||ft){for(Q();i<U.length;i+=4)(t=je.matchMedia(U[i]).matches)!==U[i+3]&&((U[i+3]=t)?n.push(i):Q(1,U[i])||Ia(U[i+2])&&U[i+2]());for(j(),i=0;i<n.length;i++)t=n[i],lt=U[t],U[t+2]=U[t+1](e);lt=0,a&&Z(0,1),w=r,V("matchMedia")}}function Jb(){return ob(oe,"scrollEnd",Jb)||Z(!0)}function Ob(){return T.cache++&&T.forEach(function(e){return"function"==typeof e&&(e.rec=0)})}function Zb(e,t,r,n){if(e.parentNode!==t){for(var i,o=te.length,a=t.style,s=e.style;o--;)a[i=te[o]]=r[i];a.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(a.display="inline-block"),s[P]=s[_]=a.flexBasis="auto",a.overflow="visible",a.boxSizing="border-box",a[vt]=hb(e,Re)+kt,a[bt]=hb(e,Ne)+kt,a[St]=s[_t]=s.top=s.left="0",It(n),s[vt]=s.maxWidth=r[vt],s[bt]=s.maxHeight=r[bt],s[St]=r[St],e.parentNode.insertBefore(t,e),t.appendChild(e)}}function ac(e){for(var t=re.length,r=e.style,n=[],i=0;i<t;i++)n.push(re[i],r[re[i]]);return n.t=e,n}function dc(e,t,r,n,i,o,a,s,l,c,u,f,d){Ia(e)&&(e=e(s)),Ha(e)&&"max"===e.substr(0,3)&&(e=f+("="===e.charAt(4)?tb("0"+e.substr(3),r):0));var p,g,h,v=d?d.time():0;if(d&&d.seek(0),Ja(e))a&&X(a,r,n,!0);else{Ia(t)&&(t=t(s));var b,m,y,x,w=e.split(" ");h=I(t)||Ge,(b=Mt(h)||{})&&(b.left||b.top)||"none"!==db(h).display||(x=h.style.display,h.style.display="block",b=Mt(h),x?h.style.display=x:h.style.removeProperty("display")),m=tb(w[0],b[n.d]),y=tb(w[1]||"0",r),e=b[n.p]-l[n.p]-c+m+i-y,a&&X(a,y,n,r-y<20||a._isStart&&20<y),r-=r-y}if(o){var S=e+r,_=o._isStart;p="scroll"+n.d2,X(o,S,n,_&&20<S||!_&&(u?Math.max(Ge[p],qe[p]):o.parentNode[p])<=S+1),u&&(l=Mt(a),u&&(o.style[n.op.p]=l[n.op.p]-n.op.m-o._offset+kt))}return d&&h&&(p=Mt(h),d.seek(f),g=Mt(h),d._caScrollDist=p[n.p]-g[n.p],e=e/d._caScrollDist*f),d&&d.seek(v),d?e:Math.round(e)}function fc(e,t,r,n){if(e.parentNode!==t){var i,o,a=e.style;if(t===Ge){for(i in e._stOrig=a.cssText,o=db(e))+i||ie.test(i)||!o[i]||"string"!=typeof a[i]||"0"===i||(a[i]=o[i]);a.top=r,a.left=n}else a.cssText=e._stOrig;We.core.getCache(e).uncache=1,t.appendChild(e)}}function gc(l,e){function Qj(e,t,r,n,i){var o=Qj.tween,a=t.onComplete,s={};return r=r||f(),i=n&&i||0,n=n||e-r,o&&o.kill(),c=Math.round(r),t[d]=e,(t.modifiers=s)[d]=function(e){return(e=ya(f()))!==c&&e!==u&&2<Math.abs(e-c)&&2<Math.abs(e-u)?(o.kill(),Qj.tween=0):e=r+n*o.ratio+i*o.ratio*o.ratio,u=c,c=ya(e)},t.onComplete=function(){Qj.tween=0,a&&a.call(o)},o=Qj.tween=We.to(l,t)}var c,u,f=J(l,e),d="_scroll"+e.p2;return(l[d]=f).wheelHandler=function(){return Qj.tween&&Qj.tween.kill()&&(Qj.tween=0)},nb(l,"wheel",f.wheelHandler),Qj}var We,a,je,Je,qe,Ge,s,l,Ke,et,tt,c,rt,nt,u,it,f,d,p,ot,at,g,h,v,b,m,C,st,x,lt,w,ct,ut,ft=1,dt=Date.now,S=dt(),pt=0,gt=0,ht=Math.abs,_="right",P="bottom",vt="width",bt="height",mt="Right",yt="Left",xt="Top",wt="Bottom",St="padding",_t="margin",Tt="Width",D="Height",kt="px",Mt=function _getBounds(e,t){var r=t&&"matrix(1, 0, 0, 1, 0, 0)"!==db(e)[u]&&We.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=e.getBoundingClientRect();return r&&r.progress(0).kill(),n},At={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ct={toggleActions:"play",anticipatePin:0},Y={top:0,left:0,center:.5,bottom:1,right:1},X=function _positionMarker(e,t,r,n){var i={display:"block"},o=r[n?"os2":"p2"],a=r[n?"p2":"os2"];e._isFlipped=n,i[r.a+"Percent"]=n?-100:0,i[r.a]=n?"1px":0,i["border"+o+Tt]=1,i["border"+a+Tt]=0,i[r.p]=t+"px",We.set(e,i)},Ot=[],Pt={},H={},R=[],U=[],V=function _dispatch(e){return H[e]&&H[e].map(function(e){return e()})||R},W=[],j=function _revertRecorded(e){for(var t=0;t<W.length;t+=5)e&&W[t+4]!==e||(W[t].style.cssText=W[t+1],W[t].getBBox&&W[t].setAttribute("transform",W[t+2]||""),W[t+3].uncache=1)},Q=function _revertAll(e,t){var r;for(it=0;it<Ot.length;it++)r=Ot[it],t&&r.media!==t||(e?r.kill(1):r.revert());t&&j(t),t||V("revert")},G=0,Z=function _refreshAll(e,t){if(!pt||e){ct=!0;var r=V("refreshInit");
vendor: 4,364 bytes, line 5808
5808ot&&oe.sort(),t||Q(),Ot.slice(0).forEach(function(e){return e.refresh()}),Ot.forEach(function(e){return"max"===e.vars.end&&e.setPositions(e.start,Fa(e.scroller,e._dir))}),r.forEach(function(e){return e&&e.render&&e.render(-1)}),Ob(),l.pause(),G++,ct=!1,V("refresh")}else nb(oe,"scrollEnd",Jb)},$=0,Et=1,ee=function _updateAll(){if(!ct){oe.isUpdating=!0,ut&&ut.update(0);var e=Ot.length,t=dt(),r=50<=t-S,n=e&&Ot[0].scroll();if(Et=n<$?-1:1,$=n,r&&(pt&&!nt&&200<t-pt&&(pt=0,V("scrollEnd")),tt=S,S=t),Et<0){for(it=e;0<it--;)Ot[it]&&Ot[it].update(0,r);Et=1}else for(it=0;it<e;it++)Ot[it]&&Ot[it].update(0,r);oe.isUpdating=!1}x=0},te=["left","top",P,_,_t+wt,_t+mt,_t+xt,_t+yt,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],re=te.concat([vt,bt,"boxSizing","max"+Tt,"max"+D,"position",_t,St,St+xt,St+mt,St+wt,St+yt]),ne=/([A-Z])/g,It=function _setState(e){if(e){var t,r,n=e.t.style,i=e.length,o=0;for((e.t._gsap||We.core.getCache(e.t)).uncache=1;o<i;o+=2)r=e[o+1],t=e[o],r?n[t]=r:n[t]&&n.removeProperty(t.replace(ne,"-$1").toLowerCase())}},Bt={left:0,top:0},ie=/(webkit|moz|length|cssText|inset)/i,oe=(ScrollTrigger.prototype.init=function init(_,T){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),gt){var k,n,p,M,A,C,O,P,E,B,D,e,z,Y,X,F,L,t,H,b,R,N,m,U,x,w,r,S,V,W,i,g,j,Q,q,G,K,o,Z=(_=fb(Ha(_)||Ja(_)||_.nodeType?{trigger:_}:_,Ct)).onUpdate,$=_.toggleClass,a=_.id,ee=_.onToggle,te=_.onRefresh,re=_.scrub,ne=_.trigger,ie=_.pin,oe=_.pinSpacing,ae=_.invalidateOnRefresh,se=_.anticipatePin,s=_.onScrubComplete,h=_.onSnapComplete,le=_.once,ce=_.snap,ue=_.pinReparent,l=_.pinSpacer,fe=_.containerAnimation,de=_.fastScrollEnd,pe=_.preventOverlaps,ge=_.horizontal||_.containerAnimation&&!1!==_.horizontal?Re:Ne,he=!re&&0!==re,ve=I(_.scroller||je),c=We.core.getCache(ve),be=Ba(ve),me="fixed"===("pinType"in _?_.pinType:y(ve,"pinType")||be&&"fixed"),ye=[_.onEnter,_.onLeave,_.onEnterBack,_.onLeaveBack],xe=he&&_.toggleActions.split(" "),u="markers"in _?_.markers:Ct.markers,we=be?0:parseFloat(db(ve)["border"+ge.p2+Tt])||0,Se=this,_e=_.onRefreshInit&&function(){return _.onRefreshInit(Se)},Te=function _getSizeFunc(e,t,r){var n=r.d,i=r.d2,o=r.a;return(o=y(e,"getBoundingClientRect"))?function(){return o()[n]}:function(){return(t?je["inner"+i]:e["client"+i])||0}}(ve,be,ge),ke=function _getOffsetsFunc(e,t){return!t||~Le.indexOf(e)?Ca(e):function(){return Bt}}(ve,be),Me=0,Ae=0,Ce=J(ve,ge);if(Se.media=lt,Se._dir=ge,se*=45,Se.scroller=ve,Se.scroll=fe?fe.time.bind(fe):Ce,M=Ce(),Se.vars=_,T=T||_.animation,"refreshPriority"in _&&(ot=1,-9999===_.refreshPriority&&(ut=Se)),c.tweenScroll=c.tweenScroll||{top:gc(ve,Ne),left:gc(ve,Re)},Se.tweenTo=k=c.tweenScroll[ge.p],Se.scrubDuration=function(e){(i=Ja(e)&&e)?W?W.duration(e):W=We.to(T,{ease:"expo",totalProgress:"+=0.001",duration:i,paused:!0,onComplete:function onComplete(){return s&&s(Se)}}):(W&&W.progress(1).kill(),W=0)},T&&(T.vars.lazy=!1,T._initted||!1!==T.vars.immediateRender&&!1!==_.immediateRender&&T.render(0,!0,!0),Se.animation=T.pause(),(T.scrollTrigger=Se).scrubDuration(re),S=0,a=a||T.vars.id),Ot.push(Se),ce&&(Ka(ce)&&!ce.push||(ce={snapTo:ce}),"scrollBehavior"in Ge.style&&We.set(be?[Ge,qe]:ve,{scrollBehavior:"auto"}),p=Ia(ce.snapTo)?ce.snapTo:"labels"===ce.snapTo?function _getClosestLabel(t){return function(e){return We.utils.snap(ib(t),e)}}(T):"labelsDirectional"===ce.snapTo?function _getLabelAtDirection(r){return function(e,t){return kb(ib(r))(e,t.direction)}}(T):!1!==ce.directional?function(e,t){return kb(ce.snapTo)(e,dt()-Ae<500?0:t.direction)}:We.utils.snap(ce.snapTo),g=ce.duration||{min:.1,max:2},g=Ka(g)?et(g.min,g.max):et(g,g),j=We.delayedCall(ce.delay||i/2||.1,function(){var e=Ce(),t=dt()-Ae<500,r=k.tween;if(!(t||Math.abs(Se.getVelocity())<10)||r||nt||Me===e)Se.isActive&&Me!==e&&j.restart(!0);else{var n=(e-C)/z,i=T&&!he?T.totalProgress():n,o=t?0:(i-V)/(dt()-tt)*1e3||0,a=We.utils.clamp(-n,1-n,ht(o/2)*o/.185),s=n+(!1===ce.inertia?0:a),l=et(0,1,p(s,Se)),c=Math.round(C+l*z),u=ce.onStart,f=ce.onInterrupt,d=ce.onComplete;if(e<=O&&C<=e&&c!==e){if(r&&!r._initted&&r.data<=ht(c-e))return;!1===ce.inertia&&(a=l-n),k(c,{duration:g(ht(.185*Math.max(ht(s-i),ht(l-i))/o/.05||0)),ease:ce.ease||"power3",data:ht(c-e),onInterrupt:function onInterrupt(){return j.restart(!0)&&f&&f(Se)}
5808,onComplete:function onComplete(){Se.update(),Me=Ce(),S=V=T&&!he?T.totalProgress():Se.progress,h&&h(Se),d&&d(Se)}},e,a*z,c-e-a*z),u&&u(Se,k.tween)}}}).pause()),a&&(Pt[a]=Se),o=(o=(ne=Se.trigger=I(ne||ie))&&ne._gsap&&ne._gsap.stRevert)&&o(Se),ie=!0===ie?ne:I(ie),Ha($)&&($={targets:ne,className:$}),ie&&(!1===oe||oe===_t||(oe=!(!oe&&"flex"===db(ie.parentNode).display)&&St),Se.pin=ie,!1!==_.force3D&&We.set(ie,{force3D:!0}),(n=We.core.getCache(ie)).spacer?Y=n.pinState:(l&&((l=I(l))&&!l.nodeType&&(l=l.current||l.nativeElement),n.spacerIsNative=!!l,l&&(n.spacerState=ac(l))),n.spacer=L=l||Je.createElement("div"),L.classList.add("pin-spacer"),a&&L.classList.add("pin-spacer-"+a),n.pinState=Y=ac(ie)),Se.spacer=L=n.spacer,r=db(ie),m=r[oe+ge.os2],H=We.getProperty(ie),b=We.quickSetter(ie,ge.a,kt),Zb(ie,L,r),F=ac(ie)),u){e=Ka(u)?fb(u,At):At,B=ub("scroller-start",a,ve,ge,e,0),D=ub("scroller-end",a,ve,ge,e,0,B),t=B["offset"+ge.op.d2];var f=I(y(ve,"content")||ve);P=this.markerStart=ub("start",a,f,ge,e,t,0,fe),E=this.markerEnd=ub("end",a,f,ge,e,t,0,fe),fe&&(K=We.quickSetter([P,E],ge.a,kt)),me||Le.length&&!0===y(ve,"fixedMarkers")||(function _makePositionable(e){var t=db(e).position;e.style.position="absolute"===t||"fixed"===t?t:"relative"}(be?Ge:ve),We.set([B,D],{force3D:!0}),x=We.quickSetter(B,ge.a,kt),w=We.quickSetter(D,ge.a,kt))}if(fe){var d=fe.vars.onUpdate,v=fe.vars.onUpdateParams;fe.eventCallback("onUpdate",function(){Se.update(0,0,1),d&&d.apply(v||[])})}Se.previous=function(){return Ot[Ot.indexOf(Se)-1]},Se.next=function(){return Ot[Ot.indexOf(Se)+1]},Se.revert=function(e){var t=!1!==e||!Se.enabled,r=rt;t!==Se.isReverted&&(t&&(!Se.scroll.rec&&rt&&ct&&(Se.scroll.rec=Ce()),q=Math.max(Ce(),Se.scroll.rec||0),Q=Se.progress,G=T&&T.progress()),P&&[P,E,B,D].forEach(function(e){return e.style.display=t?"none":"block"}),t&&(rt=1),Se.update(t),rt=r,ie&&(t?function _swapPinOut(e,t,r){It(r);var n=e._gsap;if(n.spacerIsNative)It(n.spacerState);else if(e.parentNode===t){var i=t.parentNode;i&&(i.insertBefore(e,t),i.removeChild(t))}}(ie,L,Y):ue&&Se.isActive||Zb(ie,L,db(ie),U)),Se.isReverted=t)},Se.refresh=function(e,t){if(!rt&&Se.enabled||t)if(ie&&e&&pt)nb(ScrollTrigger,"scrollEnd",Jb);else{!ct&&_e&&_e(Se),rt=1,Ae=dt(),k.tween&&(k.tween.kill(),k.tween=0),W&&W.pause(),ae&&T&&T.time(-.01,!0).invalidate(),Se.isReverted||Se.revert();for(var r,n,i,o,a,s,l,c,u,f,d=Te(),p=ke(),g=fe?fe.duration():Fa(ve,ge),h=0,v=0,b=_.end,m=_.endTrigger||ne,y=_.start||(0!==_.start&&ne?ie?"0 0":"0 100%":0),x=Se.pinnedContainer=_.pinnedContainer&&I(_.pinnedContainer),w=ne&&Math.max(0,Ot.indexOf(Se))||0,S=w;S--;)(s=Ot[S]).end||s.refresh(0,1)||(rt=1),!(l=s.pin)||l!==ne&&l!==ie||s.isReverted||((f=f||[]).unshift(s),s.revert()),s!==Ot[S]&&(w--,S--);for(Ia(y)&&(y=y(Se)),C=dc(y,ne,d,ge,Ce(),P,B,Se,p,we,me,g,fe)||(ie?-.001:0),Ia(b)&&(b=b(Se)),Ha(b)&&!b.indexOf("+=")&&(~b.indexOf(" ")?b=(Ha(y)?y.split(" ")[0]:"")+b:(h=tb(b.substr(2),d),b=Ha(y)?y:C+h,m=ne)),O=Math.max(C,dc(b||(m?"100% 0":g),m,d,ge,Ce()+h,E,D,Se,p,we,me,g,fe))||-.001,z=O-C||(C-=.01)&&.001,h=0,S=w;S--;)(l=(s=Ot[S]).pin)&&s.start-s._pinPush<C&&!fe&&0<s.end&&(r=s.end-s.start,l!==ne&&l!==x||Ja(y)||(h+=r*(1-s.progress)),l===ie&&(v+=r));if(C+=h,O+=h,Se._pinPush=v,P&&h&&((r={})[ge.a]="+="+h,x&&(r[ge.p]="-="+Ce()),We.set([P,E],r)),ie)r=db(ie),o=ge===Ne,i=Ce(),R=parseFloat(H(ge.a))+v,!g&&1<O&&((be?Ge:ve).style["overflow-"+ge.a]="scroll"),Zb(ie,L,r),F=ac(ie),n=Mt(ie,!0),c=me&&J(ve,o?Re:Ne)(),oe&&((U=[oe+ge.os2,z+v+kt]).t=L,(S=oe===St?hb(ie,ge)+z+v:0)&&U.push(ge.d,S+kt),It(U),me&&Ce(q)),me&&((a={top:n.top+(o?i-C:c)+kt,left:n.left+(o?c:i-C)+kt,boxSizing:"border-box",position:"fixed"})[vt]=a.maxWidth=Math.ceil(n.width)+kt,a[bt]=a.maxHeight=Math.ceil(n.height)+kt,a[_t]=a[_t+xt]=a[_t+mt]=a[_t+wt]=a[_t+yt]="0",a[St]=r[St],a[St+xt]=r[St+xt],a[St+mt]=r[St+mt],a[St+wt]=r[St+wt],a[St+yt]=r[St+yt],X=function _copyState(e,t,r){for(var n,i=[],o=e.length,a=r?8:0;a<o;a+=2)n=e[a],i.push(n,n in t?t[n]:e[a+1]);return i.t=e.t,i}(Y,a,ue)),T?(u=T._initted,at(1),T.render(T.duration(),!0,!0),N=H(ge.a)-R+z+v,z!==N&&me&&X.splice(X.length-2,2),T.render(0,!0,!0),u||T.invali
5808date(),at(0)):N=z;else if(ne&&Ce()&&!fe)for(n=ne.parentNode;n&&n!==Ge;)n._pinOffset&&(C-=n._pinOffset,O-=n._pinOffset),n=n.parentNode;f&&f.forEach(function(e){return e.revert(!1)}),Se.start=C,Se.end=O,M=A=Ce(),fe||(M<q&&Ce(q),Se.scroll.rec=0),Se.revert(!1),j&&(Me=-1,Se.isActive&&Ce(C+z*Q),j.restart(!0)),rt=0,T&&he&&(T._initted||G)&&T.progress()!==G&&T.progress(G,!0).render(T.time(),!0,!0),Q===Se.progress&&!fe||(T&&!he&&T.totalProgress(Q,!0),Se.progress=Q,Se.update(0,0,1)),ie&&oe&&(L._pinOffset=Math.round(Se.progress*N)),te&&te(Se)}},Se.getVelocity=function(){return(Ce()-A)/(dt()-tt)*1e3||0},Se.endAnimation=function(){Na(Se.callbackAnimation),T&&(W?W.progress(1):T.paused()?he||Na(T,Se.direction<0,1):Na(T,T.reversed()))},Se.labelToScroll=function(e){return T&&T.labels&&(C||Se.refresh()||C)+T.labels[e]/T.duration()*z||0},Se.getTrailing=function(t){var e=Ot.indexOf(Se),r=0<Se.direction?Ot.slice(0,e).reverse():Ot.slice(e+1);return(Ha(t)?r.filter(function(e){return e.vars.preventOverlaps===t}):r).filter(function(e){return 0<Se.direction?e.end<=C:e.start>=O})},Se.update=function(e,t,r){if(!fe||r||e){var n,i,o,a,s,l,c,u=Se.scroll(),f=e?0:(u-C)/z,d=f<0?0:1<f?1:f||0,p=Se.progress;if(t&&(A=M,M=fe?Ce():u,ce&&(V=S,S=T&&!he?T.totalProgress():d)),se&&!d&&ie&&!rt&&!ft&&pt&&C<u+(u-A)/(dt()-tt)*se&&(d=1e-4),d!==p&&Se.enabled){if(a=(s=(n=Se.isActive=!!d&&d<1)!=(!!p&&p<1))||!!d!=!!p,Se.direction=p<d?1:-1,Se.progress=d,a&&!rt&&(i=d&&!p?0:1===d?1:1===p?2:3,he&&(o=!s&&"none"!==xe[i+1]&&xe[i+1]||xe[i],c=T&&("complete"===o||"reset"===o||o in T))),pe&&(s||c)&&(c||re||!T)&&(Ia(pe)?pe(Se):Se.getTrailing(pe).forEach(function(e){return e.endAnimation()})),he||(!W||rt||ft?T&&T.totalProgress(d,!!rt):((fe||ut&&ut!==Se)&&W.render(W._dp._time-W._start),W.resetTo?W.resetTo("totalProgress",d,T._tTime/T._tDur):(W.vars.totalProgress=d,W.invalidate().restart()))),ie)if(e&&oe&&(L.style[oe+ge.os2]=m),me){if(a){if(l=!e&&p<d&&u<O+1&&u+1>=Fa(ve,ge),ue)if(e||!n&&!l)fc(ie,L);else{var g=Mt(ie,!0),h=u-C;fc(ie,Ge,g.top+(ge===Ne?h:0)+kt,g.left+(ge===Ne?0:h)+kt)}It(n||l?X:F),N!==z&&d<1&&n||b(R+(1!==d||l?0:N))}}else b(ya(R+N*d));!ce||k.tween||rt||ft||j.restart(!0),$&&(s||le&&d&&(d<1||!st))&&Ke($.targets).forEach(function(e){return e.classList[n||le?"add":"remove"]($.className)}),!Z||he||e||Z(Se),a&&!rt?(he&&(c&&("complete"===o?T.pause().totalProgress(1):"reset"===o?T.restart(!0).pause():"restart"===o?T.restart(!0):T[o]()),Z&&Z(Se)),!s&&st||(ee&&s&&Oa(Se,ee),ye[i]&&Oa(Se,ye[i]),le&&(1===d?Se.kill(!1,1):ye[i]=0),s||ye[i=1===d?1:3]&&Oa(Se,ye[i])),de&&!n&&Math.abs(Se.getVelocity())>(Ja(de)?de:2500)&&(Na(Se.callbackAnimation),W?W.progress(1):Na(T,!d,1))):he&&Z&&!rt&&Z(Se)}if(w){var v=fe?u/fe.duration()*(fe._caScrollDist||0):u;x(v+(B._isFlipped?1:0)),w(v)}K&&K(-u/fe.duration()*(fe._caScrollDist||0))}},Se.enable=function(e,t){Se.enabled||(Se.enabled=!0,nb(ve,"resize",Cb),nb(be?Je:ve,"scroll",Ab),_e&&nb(ScrollTrigger,"refreshInit",_e),!1!==e&&(Se.progress=Q=0,M=A=Me=Ce()),!1!==t&&Se.refresh())},Se.getTween=function(e){return e&&k?k.tween:W},Se.setPositions=function(e,t){ie&&(R+=e-C,N+=t-e-z),Se.start=C=e,Se.end=O=t,z=t-e,Se.update()},Se.disable=function(e,t){if(Se.enabled&&(!1!==e&&Se.revert(),Se.enabled=Se.isActive=!1,t||W&&W.pause(),q=0,n&&(n.uncache=1),_e&&ob(ScrollTrigger,"refreshInit",_e),j&&(j.pause(),k.tween&&k.tween.kill()&&(k.tween=0)),!be)){for(var r=Ot.length;r--;)if(Ot[r].scroller===ve&&Ot[r]!==Se)return;ob(ve,"resize",Cb),ob(ve,"scroll",Ab)}},Se.kill=function(e,t){Se.disable(e,t),W&&!t&&W.kill(),a&&delete Pt[a];var r=Ot.indexOf(Se);0<=r&&Ot.splice(r,1),r===it&&0<Et&&it--,r=0,Ot.forEach(function(e){return e.scroller===Se.scroller&&(r=1)}),r||(Se.scroll.rec=0),T&&(T.scrollTrigger=null,e&&T.render(-1),t||T.kill()),P&&[P,E,B,D].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),ut===Se&&(ut=0),ie&&(n&&(n.uncache=1),r=0,Ot.forEach(function(e){return e.pin===ie&&r++}),r||(n.spacer=0)),_.onKill&&_.onKill(Se)},Se.enable(!1,!1),o&&o(Se),T&&T.add&&!z?We.delayedCall(.01,function(){return C||O||Se.refresh()})&&(z=.01)&&(C=O=0):Se.refresh()}else this.update=this.refresh=this.kill=xa},ScrollTrigger.register=function register(e){return a||(We=e||Aa(),za()&&window.document&&ScrollTrigger.enable(),a=gt),a},ScrollTrigger.defaults=function defaults(e){if(e)for(var t in e)Ct[t]=e[t];return Ct},ScrollTrigger.disable=function disable(t,r){gt=0,Ot.forEach(function(e){return e[r?"kill":"disable"](t)}),ob(je,"wheel",Ab),ob(Je,"scroll",Ab),clearInterval(c),ob(Je,"touchcancel",xa),ob(Ge,"touchstart",xa),mb(ob,Je,"pointerdown,touchstart,mousedown",va),mb(ob,Je,"pointerup,touchend,mouseup",wa),l.kill(),Ga(ob);for(var e=0;e<T.length;e+=3)pb(ob,T[e],T[e+1]),pb(ob,T[e],T[e+2])},ScrollTrigger.enable=function enable(){if(je=window,Je=document,qe=Je.documentElement,Ge=Je.body,We&&(Ke=We.utils.toArray,et=We.utils.clamp,at=We.core.suppressOverwrites||xa,We.core.globals("ScrollTrigger",ScrollTrigger),Ge)){gt=1,k.register(We),ScrollTrigger.isTouch=k.isTouch,C=k.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),nb(je,"wheel",Ab),s=[je,Je,qe,Ge],ScrollTrigger.matchMedia({"(orientation: portrait)":function orientationPortrait(){return Bb(),Bb}}),nb(Je,"scroll",Ab);var e,t,r=Ge.style,n=r.borderTopStyle;for(r.borderTopStyle="solid",e=Mt(Ge),Ne.m=Math.round(e.top+Ne.sc())||0,Re.m=Math.round(e.left+Re.sc())||0,n?r.borderTopStyle=n:r.removeProperty("border-top-style"),c=setInterval(zb,250),We.delayedCall(.5,function(){return ft=0}),nb(Je,"touchcancel",xa),nb(Ge,"touchstart",xa),mb(nb,Je,"pointerdown,touchstart,mousedown",va),mb(nb,Je,"pointerup,touchend,mouseup",wa),u=We.utils.checkPrefix("transform"),re.push(u),a=dt(),l=We.delayedCall(.2,Z).pause(),p=[Je,"visibilitychange",function(){var e=je.innerWidth,t=je.innerHe
vendor: 4,632 bytes, line 5808
5808ight;Je.hidden?(f=e,d=t):f===e&&d===t||Cb()},Je,"DOMContentLoaded",Z,je,"load",Z,je,"resize",Cb],Ga(nb),Ot.forEach(function(e){return e.enable(0,1)}),t=0;t<T.length;t+=3)pb(ob,T[t],T[t+1]),pb(ob,T[t],T[t+2])}},ScrollTrigger.config=function config(e){"limitCallbacks"in e&&(st=!!e.limitCallbacks);var t=e.syncInterval;t&&clearInterval(c)||(c=t)&&setInterval(zb,t),"ignoreMobileResize"in e&&(v=1===ScrollTrigger.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Ga(ob)||Ga(nb,e.autoRefreshEvents||"none"),g=-1===(e.autoRefreshEvents+"").indexOf("resize"))},ScrollTrigger.scrollerProxy=function scrollerProxy(e,t){var r=I(e),n=T.indexOf(r),i=Ba(r);~n&&T.splice(n,i?6:2),t&&(i?Le.unshift(je,t,Ge,t,qe,t):Le.unshift(r,t))},ScrollTrigger.matchMedia=function matchMedia(e){var t,r,n,i,o;for(r in e)n=U.indexOf(r),i=e[r],"all"===(lt=r)?i():(t=je.matchMedia(r))&&(t.matches&&(o=i()),~n?(U[n+1]=Ma(U[n+1],i),U[n+2]=Ma(U[n+2],o)):(n=U.length,U.push(r,i,o),t.addListener?t.addListener(Ib):t.addEventListener("change",Ib)),U[n+3]=t.matches),lt=0;return U},ScrollTrigger.clearMatchMedia=function clearMatchMedia(e){e||(U.length=0),0<=(e=U.indexOf(e))&&U.splice(e,4)},ScrollTrigger.isInViewport=function isInViewport(e,t,r){var n=(Ha(e)?I(e):e).getBoundingClientRect(),i=n[r?vt:bt]*t||0;return r?0<n.right-i&&n.left+i<je.innerWidth:0<n.bottom-i&&n.top+i<je.innerHeight},ScrollTrigger.positionInViewport=function positionInViewport(e,t,r){Ha(e)&&(e=I(e));var n=e.getBoundingClientRect(),i=n[r?vt:bt],o=null==t?i/2:t in Y?Y[t]*i:~t.indexOf("%")?parseFloat(t)*i/100:parseFloat(t)||0;return r?(n.left+o)/je.innerWidth:(n.top+o)/je.innerHeight},ScrollTrigger);function ScrollTrigger(e,t){a||ScrollTrigger.register(We)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,t)}oe.version="3.10.4",oe.saveStyles=function(e){return e?Ke(e).forEach(function(e){if(e&&e.style){var t=W.indexOf(e);0<=t&&W.splice(t,5),W.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),We.core.getCache(e),lt)}}):W},oe.revert=function(e,t){return Q(!e,t)},oe.create=function(e,t){return new oe(e,t)},oe.refresh=function(e){return e?Cb():(a||oe.register())&&Z(!0)},oe.update=ee,oe.clearScrollMemory=Ob,oe.maxScroll=function(e,t){return Fa(e,t?Re:Ne)},oe.getScrollFunc=function(e,t){return J(I(e),t?Re:Ne)},oe.getById=function(e){return Pt[e]},oe.getAll=function(){return Ot.filter(function(e){return"ScrollSmoother"!==e.vars.id})},oe.isScrolling=function(){return!!pt},oe.snapDirectional=kb,oe.addEventListener=function(e,t){var r=H[e]||(H[e]=[]);~r.indexOf(t)||r.push(t)},oe.removeEventListener=function(e,t){var r=H[e],n=r&&r.indexOf(t);0<=n&&r.splice(n,1)},oe.batch=function(e,t){function to(e,t){var r=[],n=[],i=We.delayedCall(o,function(){t(r,n),r=[],n=[]}).pause();return function(e){r.length||i.restart(!0),r.push(e.trigger),n.push(e),a<=r.length&&i.progress(1)}}var r,n=[],i={},o=t.interval||.016,a=t.batchMax||1e9;for(r in t)i[r]="on"===r.substr(0,2)&&Ia(t[r])&&"onRefreshInit"!==r?to(0,t[r]):t[r];return Ia(a)&&(a=a(),nb(oe,"refresh",function(){return a=t.batchMax()})),Ke(e).forEach(function(e){var t={};for(r in i)t[r]=i[r];t.trigger=e,n.push(oe.create(t))}),n};function ic(e,t,r,n){return n<t?e(n):t<0&&e(0),n<r?(n-t)/(r-t):r<0?t/(t-r):1}function jc(e,t){!0===t?e.style.removeProperty("touch-action"):e.style.touchAction=!0===t?"auto":t?"pan-"+t+(k.isTouch?" pinch-zoom":""):"none",e===qe&&jc(Ge,t)}function lc(e){var t,r=e.event,n=e.target,i=e.axis,o=(r.changedTouches?r.changedTouches[0]:r).target,a=o._gsap||We.core.getCache(o),s=dt();if(!a._isScrollT||2e3<s-a._isScrollT){for(;o&&o.scrollHeight<=o.clientHeight;)o=o.parentNode;a._isScroll=o&&!Ba(o)&&o!==n&&(se[(t=db(o)).overflowY]||se[t.overflowX]),a._isScrollT=s}!a._isScroll&&"x"!==i||(r._gsapAllow=!0)}function mc(e,t,r,n){return k.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:n=n&&lc,onPress:n,onDrag:n,onScroll:n,onEnable:function onEnable(){return r&&nb(Je,k.eventTypes[0],ce,!1,!0)},onDisable:function onDisable(){return ob(Je,k.eventTypes[0],ce,!0)}})}function qc(e){function op(){return n=!1}function rp(){o=Fa(d,Ne),_=et(C?1:0,o),f&&(S=et(0,Fa(d,Re))),a=G}function xp(){rp(),s.isActive()&&s.vars.scrollY>o&&(h()>o?s.progress(1)&&h(o):s.resetTo("scrollY",o))}Ka(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var r,o,n,a,s,l,c,u,f=e.normalizeScrollX,t=e.momentum,i=e.allowNestedScroll,d=I(e.target)||qe,p=We.core.globals().ScrollSmoother,g=C&&(e.content&&I(e.content)||p&&p.get()&&p.get().content()),h=J(d,Ne),v=J(d,Re),b=1,m=(k.isTouch&&je.visualVie
5808wport?je.visualViewport.scale*je.visualViewport.width:je.outerWidth)/je.innerWidth,y=0,x=Ia(t)?function(){return t(r)}:function(){return t||2.8},w=mc(d,e.type,!0,i),S=xa,_=xa;return e.ignoreCheck=function(e){return C&&"touchmove"===e.type&&function ignoreDrag(){if(n){requestAnimationFrame(op);var e=ya(r.deltaY/2),t=_(h.v-e);return g&&t!==h.v+h.offset&&(h.offset=t-h.v,g.style.transform="translateY("+-h.offset+"px)",g._gsap&&(g._gsap.y=-h.offset+"px"),h.cacheID=T.cache,ee()),!0}g&&(g.style.transform="translateY(0px)",h.offset=h.cacheID=0,g._gsap&&(g._gsap.y="0px")),n=!0}()||1.05<b&&"touchstart"!==e.type||r.isGesturing||e.touches&&1<e.touches.length},e.onPress=function(){var e=b;b=ya((je.visualViewport&&je.visualViewport.scale||1)/m),s.pause(),e!==b&&jc(d,1.01<b||!f&&"x"),n=!1,l=v(),c=h(),rp(),a=G},e.onRelease=e.onGestureStart=function(e,t){if(g&&(g.style.transform="translateY(0px)",h.offset=h.cacheID=0,g._gsap&&(g._gsap.y="0px")),t){T.cache++;var r,n,i=x();f&&(n=(r=v())+.05*i*-e.velocityX/.227,i*=ic(v,r,n,Fa(d,Re)),s.vars.scrollX=S(n)),n=(r=h())+.05*i*-e.velocityY/.227,i*=ic(h,r,n,Fa(d,Ne)),s.vars.scrollY=_(n),s.invalidate().duration(i).play(.01),(C&&s.vars.scrollY>=o||o-1<=r)&&We.to({},{onUpdate:xp,duration:i})}else u.restart(!0)},e.onWheel=function(){s._ts&&s.pause(),1e3<dt()-y&&(a=0,y=dt())},e.onChange=function(e,t,r,n,i){G!==a&&rp(),t&&f&&v(S(n[2]===t?l+(e.startX-e.x):v()+t-n[1])),r&&h(_(i[2]===r?c+(e.startY-e.y):h()+r-i[1])),ee()},e.onEnable=function(){jc(d,!f&&"x"),nb(je,"resize",xp),w.enable()},e.onDisable=function(){jc(d,!0),ob(je,"resize",xp),w.kill()},((r=new k(e)).iOS=C)&&!h()&&h(1),u=r._dc,s=We.to(r,{ease:"power4",paused:!0,scrollX:f?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:u.vars.onComplete}),r}var ae,se={auto:1,scroll:1},le=/(input|label|select|textarea)/i,ce=function _captureInputs(e){var t=le.test(e.target.tagName);(t||ae)&&(e._gsapAllow=!0,ae=t)};oe.sort=function(e){return Ot.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},oe.observe=function(e){return new k(e)},oe.normalizeScroll=function(e){if(void 0===e)return h;if(!0===e&&h)return h.enable();if(!1===e)return h&&h.kill();var t=e instanceof k?e:qc(e);return h&&h.target===t.target&&h.kill(),Ba(t.target)&&(h=t),t},oe.core={_getVelocityProp:K,_inputObserver:mc,_scrollers:T,_proxies:Le,bridge:{ss:function ss(){pt||V("scrollStart"),pt=dt()},ref:function ref(){return rt}}},Aa()&&We.registerPlugin(oe),e.ScrollTrigger=oe,e.default=oe;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); 5809 5810 5811/* !modules/ukraine/m_libraries/misc/gsap/ScrollTrigger.min.js */; 5812/* themes/nursery/components/animation_front/animation_front.js */ 5813(function ($, Drupal) { 5814 function animateFrom(elem, direction) { 5815 direction = direction || 1; 5816 var x = 0, 5817 y = direction * 100; 5818 if(elem.classList.contains("field-block-image") || elem.classList.contains("node-teaser__image") || elem.classList.contains("media-big-teaser") ) { 5819 x = -100; 5820 y = 0; 5821 } else if (elem.classList.contains("body") || elem.classList.contains("text-formatted") || elem.classList.contains("node-teaser__link-wrapper") || elem.classList.contains("more-link") ) { 5822 x = 100; 5823 y = 0; 5824 } 5825 elem.style.transform = "translate(" + x + "px, " + y + "px)"; 5826 elem.style.opacity = "0"; 5827 gsap.fromTo(elem, {x: x, y: y, autoAlpha: 0}, { 5828 duration: 1.25, 5829 x: 0, 5830 y: 0, 5831 autoAlpha: 1, 5832 ease: "expo", 5833 overwrite: "auto" 5834 }); 5835 } 5836 5837 function hide(elem) { 5838 gsap.set(elem, {autoAlpha: 0}); 5839 } 5840 5841 document.addEventListener("DOMContentLoaded", function() { 5842 setTimeout(function () { 5843 gsap.registerPlugin(ScrollTrigger); 5844 5845 gsap.utils.toArray(".view-filters, .block__title:not(.views-block-persons-block-2__title), .more-link, .node-teaser:not(.news-big-teaser, .node--type-person), .field-paragraph-icon-title, .block-type-benefits .field-block-paragraph__item, .paragraph--type--icons-desc,.block-type-img-text .text-formatted,.block-type-img-text .field-block-image, .block-type-list-icons .field-block-image").forEach(function(elem) { 5846 hide(elem); // assure that the element is hidden when scrolled into view 5847 ScrollTrigger.create({ 5848 trigger: elem, 5849 onEnter: function() { animateFrom(elem) }, 5850 onEnterBack: function() { animateFrom(elem, -1) }, 5851 onLeave: function() { hide(elem) } // assure that the element is hidden when scrolled into view 5852 }); 5853 }); 5854 }, 300); 5855 5856 }); 5857 5858 5859 $(document).ready(function () { 5860 5861 }); 5862 5863 Drupal.behaviors.personal_anim_front = { 5864 attach: function (context, settings) { 5865 } 5866 } 5867 5868})(jQuery, Drupal); 5869
5870/* !themes/nursery/components/animation_front/animation_front.js */; 5871/* modules/glyanec/ajax_forms/libs/magnificPopup/jquery.magnific-popup.min.js */ 5872/*! Magnific Popup - v1.1.0 - 2016-02-20 5873* http://dimsemenov.com/plugins/magnific-popup/ 5874* Copyright (c) 2016 Dmitry Semenov; */ 5875!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(e){var t,n,i,o,a,r,s=function(){},l=!!window.jQuery,c=e(window),p=function(e,n){t.ev.on("mfp"+e+".mfp",n)},d=function(t,n,i,o){var a=document.createElement("div");return a.className="mfp-"+t,i&&(a.innerHTML=i),o?n&&n.appendChild(a):(a=e(a),n&&a.appendTo(n)),a},u=function(n,i){t.ev.triggerHandler("mfp"+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},f=function(n){return n===r&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),r=n),t.currTemplate.closeBtn},m=function(){e.magnificPopup.instance||((t=new s).init(),e.magnificPopup.instance=t)},g=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};s.prototype={constructor:s,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=g(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;if(!1===n.isObj){t.items=n.items.toArray(),t.index=0;var r,s=n.items;for(o=0;o<s.length;o++)if((r=s[o]).parsed&&(r=r.el[0]),r===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;{if(!t.isOpen){t.types=[],a="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=d("bg").on("click.mfp",function(){t.close()}),t.wrap=d("wrap").attr("tabindex",-1).on("click.mfp",function(e){t._checkIfClose(e.target)&&t.close()}),t.container=d("container",t.wrap)),t.contentContainer=d("content"),t.st.preloader&&(t.preloader=d("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var m=l[o];m=m.charAt(0).toUpperCase()+m.slice(1),t["init"+m].call(t)}u("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(p("MarkupParse",function(e,t,n,i){n.close_replaceWith=f(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(f())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:c.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup.mfp",function(e){27===e.keyCode&&t.close()}),c.on("resize.mfp",function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var g=t.wH=c.height(),v={};if(t.fixedContentPos&&t._hasScrollBar(g)){var h=t._getScrollbarSize();h&&(v.marginRight=h)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):v.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),u("BuildControls"),e("html").css(v),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP("mfp-ready"),t._setFocus()):t.bgOverlay.addClass("mfp-ready"),i.on("focusin.mfp",t._onFocusIn)},16),t.isOpen=!0,t.updateSize(g),u("Open"),n}t.updateItemHTML()}},close:function(){t.isOpen&&(u("BeforeClose"),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP("mfp-removing"),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){u("Close");var n="mfp-removing mfp-ready ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}i.off("keyup.mfp focusin.mfp"),t.ev.off(".mfp"),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,u("AfterClose")},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||c.height();t.fixedContentPos||t.wrap.css("height",t.wH),u("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(u("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var a=!!t.st[i]&&t.st[i].markup;u("FirstMarkupParse",a),t.currTemplate[i]=!a||e(a)}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var r=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(r,i),n.preloaded=!0,u("Change",n),o=n.type,t.container.prepend(t.contentContainer),u("AfterChange")},appendContent:function(e,n){if(t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[n]?t.content.find(".mfp-close").length||t.content.append(f()):t.content=e:t.content="",u("BeforeAppend"),t.st.mainClass&&"inline"===t.st.type&&t.content.addClass("mfp-with-anim"),t.st.mainClass&&"iframe"===t.st.type){var i=t.content.find("iframe"),o=i.attr("src");i.attr("src",""),setTimeout(function(){i.attr("src",o)},200)}t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}
5875),o.el){for(var a=t.types,r=0;r<a.length;r++)if(o.el.hasClass("mfp-"+a[r])){i=a[r];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,u("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){if((void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick)||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(c.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};u("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass("mfp-prevent-close")){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?i.height():document.body.scrollHeight)>(e||c.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){if(n.target!==t.wrap[0]&&!e.contains(t.wrap[0],n.target))return t._setFocus(),!1},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),u("MarkupParse",[t,n,i]),e.each(n,function(n,i){if(void 0===i||!1===i)return!0;if((o=n.split("_")).length>1){var a=t.find(".mfp-"+o[0]);if(a.length>0){var r=o[1];"replaceWith"===r?a[0]!==i[0]&&a.replaceWith(i):"img"===r?a.is("img")?a.attr("src",i):a.replaceWith(e("<img>").attr("src",i).attr("class",a.attr("class"))):a.attr(o[1],i)}}else t.find(".mfp-"+n).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:s.prototype,modules:[],open:function(t,n){return m(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"",tLoading:"",autoFocusLast:!0}},e.fn.magnificPopup=function(n){m();var i=e(this);if("string"==typeof n)if("open"===n){var o,a=l?i.data("magnificPopup"):i[0].magnificPopup,r=parseInt(arguments[1],10)||0;a.items?o=a.items[r]:(o=i,a.delegate&&(o=o.find(a.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},i,a)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),l?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var v,h,C,y=function(){C&&(h.after(C.addClass(v)).detach(),C=null)};e.magnificPopup.registerModule("inline",{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"}
5875,proto:{initInline:function(){t.types.push("inline"),p("Close.inline",function(){y()})},getInline:function(n,i){if(y(),n.src){var o=t.st.inline,a=e(n.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(h||(v=o.hiddenClass,h=d(v),v="mfp-"+v),C=a.after(h).detach().removeClass(v)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),a=e("<div>");return n.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var w,b=function(){w&&e(document.body).removeClass(w)},I=function(){b(),t.req&&t.req.abort()};e.magnificPopup.registerModule("ajax",{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push("ajax"),w=t.st.ajax.cursor,p("Close.ajax",I),p("BeforeChange.ajax",I)},getAjax:function(n){w&&e(document.body).addClass(w),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,a){var r={data:i,xhr:a};u("ParseAjax",r),t.appendContent(e(r.data),"ajax"),n.finished=!0,b(),t._setFocus(),setTimeout(function(){t.wrap.addClass("mfp-ready")},16),t.updateStatus("ready"),u("AjaxContentAdded")},error:function(){b(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var x,k=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;
5875var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),p("Open"+i,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),p("Close"+i,function(){n.cursor&&e(document.body).removeClass(n.cursor),c.off("resize.mfp")}),p("Resize"+i,t.resizeImage),t.isLowIE&&p("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,x&&clearInterval(x),e.isCheckingImgSize=!1,u("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(a){x&&clearInterval(x),x=setInterval(function(){i.naturalWidth>0?t._onImageHasSize(e):(n>200&&clearInterval(x),3===++n?o(10):40===n?o(50):100===n&&o(500))},a)};o(1)},getImage:function(n,i){var o=0,a=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,u("ImageLoadComplete")):++o<200?setTimeout(a,100):r())},r=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),(c=n.img[0]).naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:k(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(x&&clearInterval(x),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var T,_=function(){return void 0===T&&(T=void 0!==document.createElement("p").style.MozTransform),T};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,a,r=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=i,t.css(o),t},l=function(){t.content.css("visibility","visible")};p("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void l();(a=s(e)).css(t._getOffset()),t.wrap.append(a),o=setTimeout(function(){a.css(t._getOffset(!0)),o=setTimeout(function(){l(),setTimeout(function(){a.remove(),e=a=null,u("ZoomAnimationEnded")},16)},r)},16)}}),p("BeforeClose"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=r,!e){if(!(e=t._getItemToZoom()))return;a=s(e)}a.css(t._getOffset(!0)),t.wrap.append(a),t.content.css("visibility","hidden"),setTimeout(function(){a.css(t._getOffset())},16)}}),p("Close"+i,function(){t._allowZoom()&&(l(),a&&a.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(n){var i,o=(i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),a=parseInt(i.css("padding-top"),10),r=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:i.width(),height:(l?i.innerHeight():i[0].offsetHeight)-r-a};return _()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var P=function(e){if(t.currTemplate.iframe){var n=t.currTemplate.iframe.find("iframe");n.length&&(e||(n[0].src="//about:blank"),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule("iframe",{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push("iframe"),p("BeforeChange",function(e,t,n){t!==n&&("iframe"===t?P():"iframe"===n&&P(!0))}),p("Close.iframe",function(){P()})},getIframe:function(n,i){var o=n.src,a=t.st.iframe;e.each(a.patterns,function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id
5875)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1});var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(i,r,n),t.updateStatus("ready"),i}}});var S=function(e){var n=t.items.length;return e>n-1?e-n:e<0?n+e:e},E=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!n||!n.enabled)return!1;a+=" mfp-gallery",p("Open"+o,function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){if(t.items.length>1)return t.next(),!1}),i.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),p("UpdateStatus"+o,function(e,n){n.text&&(n.text=E(n.text,t.currItem.index,t.items.length))}),p("MarkupParse"+o,function(e,i,o,a){var r=t.items.length;o.counter=r>1?E(n.tCounter,a.index,r):""}),p("BuildControls"+o,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass("mfp-prevent-close"),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass("mfp-prevent-close");o.click(function(){t.prev()}),a.click(function(){t.next()}),t.container.append(o.add(a))}}),p("Change"+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),p("Close"+o,function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null})},next:function(){t.direction=!0,t.index=S(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=S(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=S(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),u("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,u("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});e.magnificPopup.registerModule("retina",{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;(n=isNaN(n)?n():n)>1&&(p("ImageHasSize.retina",function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),p("ElementParse.retina",function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),m()}); 5876/* !modules/glyanec/ajax_forms/libs/magnificPopup/jquery.magnific-popup.min.js */; 5877/* modules/glyanec/ajax_forms/js/ajax_forms.js */ 5878 5879(function($, Drupal, drupalSettings) { 5880 5881 'use strict'; 5882 5883 Drupal.AjaxCommands.prototype.magnificPopup = function(ajax, response, status) { 5884 var options = { 5885 items: { 5886 src: response.html, 5887 type: 'inline' 5888 }, 5889 mainClass: 'mfp-zoom-in', 5890 removalDelay: 400, 5891 fixedContentPos: true, 5892 fixedBgPos: ('ontouchstart' in window) ? false : true, 5893 autoFocusLast: false, 5894 } 5895 5896 // Add custom options added on server side. 5897 for (var option in response.options) { 5898 options[option] = response.options[option] 5899 } 5900 5901 $.magnificPopup.open(options); 5902 Drupal.attachBehaviors(); 5903 }; 5904 5905 function ajaxForms(element, form_id) { 5906 var langPath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix; 5907 5908 // get entity id if we need node comment form 5909 var currentPath = drupalSettings.path.currentPath.split('/'); 5910 var entity_id_attribute = element.getAttribute('entity_id'); 5911 var entity_id = ''; 5912 5913 if (entity_id_attribute) { 5914 entity_id = '/' + entity_id_attribute; 5915 } else if (currentPath[0] === 'node') { 5916 entity_id = '/' + currentPath[1]; 5917 } 5918 5919 Drupal.ajax({ 5920 url: langPath + 'api/ajax_forms/link/' + form_id + entity_id, 5921 element: element, 5922 progress: { type: 'fullscreen' } 5923 }).execute(); 5924 } 5925 5926 $(document).ready(function(){ 5927 if (typeof drupalSettings.ajax_forms !== 'undefined') { 5928 for (var selector in drupalSettings.ajax_forms.links) { 5929 (function(form_id, selector){ 5930 $('body').off('click.ajax_forms', selector).on('click.ajax_forms', selector, function(e){ 5931 e.preventDefault(); 5932 ajaxForms(this, form_id); 5933 }); 5934 })(drupalSettings.ajax_forms.links[selector], selector); 5935 } 5936 } 5937 }); 5938 5939})(jQuery, Drupal, drupalSettings); 5940 5941/* !modules/glyanec/ajax_forms/js/ajax_forms.js */;
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.