1 2; /* Start:"a:4:{s:4:"full";s:71:"/bitrix/templates/evolution_v2/js/collapse-box.babel.js?170555006325636";s:6:"source";s:55:"/bitrix/templates/evolution_v2/js/collapse-box.babel.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3/* 4* Author: Vladimir Pozdnyakov 5* Date: 16.11.2023 6* Version: 1.0.3 7*/ 8(function () { 9 function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); } 10 function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); } 11 function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } 12 function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 13 function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } 14 function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } 15 function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; } 16 function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); } 17 function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; } 18 function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; } 19 function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); } 20 function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } } 21 var _shadowRoot = /*#__PURE__*/new WeakMap(); 22 var _name = /*#__PURE__*/new WeakMap(); 23 var _fullHeight = /*#__PURE__*/new WeakMap(); 24 var _styleProps = /*#__PURE__*/new WeakMap(); 25 var _onlyone = /*#__PURE__*/new WeakMap(); 26 var _isAnimate = /*#__PURE__*/new WeakMap(); 27 var _isOpen = /*#__PURE__*/new WeakMap(); 28 var _isOverflow = /*#__PURE__*/new WeakMap(); 29 var _hasHead = /*#__PURE__*/new WeakMap(); 30 var _hasContent = /*#__PURE__*/new WeakMap(); 31 var _head = /*#__PURE__*/new WeakMap(); 32 var _body = /*#__PURE__*/new WeakMap(); 33 var _inner = /*#__PURE__*/new WeakMap(); 34 var _button = /*#__PURE__*/new WeakMap(); 35 var _toggleButtons = /*#__PURE__*/new WeakMap(); 36 var _toggleHandler = /*#__PURE__*/new WeakMap(); 37 var _init = /*#__PURE__*/new WeakSet(); 38 var _events = /*#__PURE__*/new WeakSet(); 39 var _toggle = /*#__PURE__*/new WeakSet(); 40 var _hasOpen = /*#__PURE__*/new WeakSet(); 41 var _buttonStatus = /*#__PURE__*/new WeakSet(); 42 var _getHeight = /*#__PURE__*/new WeakSet(); 43 var _getSiblings = /*#__PURE__*/new WeakSet(); 44 var _setButtonHandler = /*#__PURE__*/new WeakSet(); 45 var _getButtons = /*#__PURE__*/new WeakSet(); 46 var _onResize = /*#__PURE__*/new WeakSet(); 47 class collapseBox extends HTMLElement { 48 constructor() { 49 super(); 50 _classPrivateMethodInitSpec(this, _onResize); 51 _classPrivateMethodInitSpec(this, _getButtons); 52 _classPrivateMethodInitSpec(this, _setButtonHandler); 53 _classPrivateMethodInitSpec(this, _getSiblings); 54 _classPrivateMethodInitSpec(this, _getHeight); 55 _classPrivateMethodInitSpec(this, _buttonStatus); 56 _classPrivateMethodInitSpec(this, _hasOpen); 57 _classPrivateMethodInitSpec(this, _toggle); 58 _classPrivateMethodInitSpec(this, _events); 59 _classPrivateMethodInitSpec(this, _init); 60 _defineProperty(this, "template", ` 61<style> 62 :host { 63 display: block; 64 box-sizing: border-box; 65 66 --_wc-collapse-open-hide: var(--wc-collapse-open-hide, none); 67 --_wc-collapse-close-hide: var(--wc-collapse-close-hide, none); 68 --_wc-collapse-close-max-height: var(--wc-collapse-close-max-height, 0); 69 --_wc-collapse-duration: var(--wc-collapse-duration, 0.25s); 70 --_wc-collapse-transition: var(--wc-collapse-transition, max-height var(--_wc-collapse-duration) ease-in-out 0s); 71 72 --_wc-collapse-background: var(--wc-collapse-background, inherit); 73 74 --_wc-collapse-shadow-color: var(--wc-collapse-shadow-color, transparent); 75 --_wc-collapse-shadow-size: var(--wc-collapse-shadow-size, 0); 76 77 --_wc-collapse-head-padding: var(--wc-collapse-head-padding, 0px); 78 --_wc-collapse-head-margin: var(--wc-collapse-head-margin, 0px); 79 --_wc-collapse-head-border: var(--wc-collapse-head-border, none); 80 --_wc-collapse-head-radius: var(--wc-collapse-head-radius, 0px); 81 --_wc-collapse-head-background: var(--wc-collapse-head-background, transparent); 82 --_wc-collapse-head-gap: var(--wc-collapse-head-gap, 0px); 83 --_wc-collapse-head-color: var(--wc-collapse-head-color, inherit); 84 --_wc-collapse-overflow: var(--wc-collapse-overflow, inherit); 85 86 --_wc-collapse-body-padding: var(--wc-collapse-body-padding, 0px); 87 } 88 *, *:after, *:before { 89 box-sizing: inherit; 90 } 91 :host([open]) { 92 --_wc-collapse-open-hide: none; 93 --_wc-collapse-close-hide: block; 94 } 95 :host(:not([open])) { 96 --_wc-collapse-open-hide: block; 97 --_wc-collapse-close-hide: none; 98 } 99 :host(.is-overflow) { 100 overflow: hidden; 101 } 102 .wc-collapse__head { 103 position: relative; 104 padding: var(--_wc-collapse-head-padding); 105 margin: var(--_wc-collapse-head-margin); 106 border: var(--_wc-collapse-head-border); 107 border-radius: var(--_wc-collapse-head-radius); 108 background: var(--_wc-collapse-head-background); 109 display: flex; 110 grid-gap: var(--_wc-collapse-head-gap); 111 gap: var(--_wc-collapse-head-gap); 112 color: var(--_wc-collapse-head-color); 113 } 114 .wc-collapse__head[hidden] { 115 display: none; 116 } 117 .wc-collapse__head::slotted(*) { 118 119 } 120 .wc-collapse__button { 121 position: relative; 122 width: 24px; 123 height: 24px; 124 padding: 0; 125 margin: 0; 126 border: none; 127 background: none; 128 display: grid; 129 align-items: center; 130 justify-content: center; 131 cursor: pointer; 132 order: -1; 133 } 134 :host(:not(.is-overflow)) .wc-collapse__button { 135 display: none; 136 } 137 .wc-collapse__button:before { 138 content: "â®"; 139 transition: transform var(--_wc-collapse-duration) ease-in-out 0s; 140 } 141 :host([open]) .wc-collapse__button:before { 142 transform: rotate(-180deg); 143 } 144 .wc-collapse__body { 145 max-height: none; 146 display: flex; 147 flex-direction: column; 148 } 149 :host(.is-animate) .wc-collapse__body { 150 max-height: var(--_wc-collapse-height, none); 151 } 152 :host(.is-overflow) .wc-collapse__body { 153 position: relative; 154 display: flex; 155 transition: var(--_wc-collapse-transition); 156 overflow: var(--_wc-collapse-overflow, inherit); 157 } 158 .wc-collapse__body:after { 159 position: absolute; 160 left: 0; 161 right: 0; 162 bottom: 0; 163 height: var(--_wc-collapse-shadow-size); 164 padding-bottom: inherit; 165 background: var(--_wc-collapse-shadow-color); 166 background-clip: content-box; 167 transform: scaleY(0); 168 transform-origin: 50% 100%; 169 transition: transform var(--_wc-collapse-duration) ease-in-out 0s; 170 box-sizing: content-box; 171 will-change: transform; 172 pointer-events: none; 173 } 174 :host(.is-overflow) .wc-collapse__body:after { 175 content: ''; 176 } 177 :host(:not(.is-open)) .wc-collapse__body { 178 max-height: var(--_wc-collapse-close-max-height, 0); 179 } 180 :host(:not(.is-open)) .wc-collapse__body:after { 181 transform: scaleY(1); 182 } 183 .wc-collapse__body-inner { 184 display: block; 185 } 186 :host(.is-overflow) .wc-collapse__body-inner { 187 padding: var(--_wc-collapse-body-padding); 188 } 189 .wc-collapse__body-inner::after { 190 position: absolute; 191 left: 0; 192 right: 0; 193 bottom: 0; 194 background: var(--_wc-collapse-background); 195 padding-bottom: inherit; 196 } 197 :host(.is-overflow) .wc-collapse__body-inner::after { 198 content: ''; 199 } 200 .wc-collapse__body-inner:not([name]) {} 201 .wc-collapse__body-inner:not([name])::slotted(*) {} 202 .wc-collapse__body-inner:not([name])::slotted(:first-child) { 203 margin-top: 0;
204 } 205 .wc-collapse__body-inner:not([name])::slotted(:last-child) { 206 margin-bottom: 0; 207 } 208 .wc-collapse__foot { 209 flex: 0 0 auto; 210 } 211 :host(.is-overflow) .wc-collapse__foot { 212 display: block; 213 } 214 .wc-collapse__foot::slotted(*) {} 215 [data-is-close="hide"] { 216 display: var(--_wc-collapse-close-hide); 217 } 218 [data-is-close="show"] { 219 display: var(--_wc-collapse-open-hide); 220 } 221</style> 222<slot class="wc-collapse__head" name="collapse-head"></slot> 223<div class="wc-collapse__body"> 224 <slot class="wc-collapse__body-inner"></slot> 225</div> 226<slot class="wc-collapse__foot" name="collapse-foot"></slot>`); 227 _classPrivateFieldInitSpec(this, _shadowRoot, { 228 writable: true, 229 value: '' 230 }); 231 _classPrivateFieldInitSpec(this, _name, { 232 writable: true, 233 value: null 234 }); 235 _classPrivateFieldInitSpec(this, _fullHeight, { 236 writable: true, 237 value: 0 238 }); 239 _classPrivateFieldInitSpec(this, _styleProps, { 240 writable: true, 241 value: null 242 }); 243 _classPrivateFieldInitSpec(this, _onlyone, { 244 writable: true, 245 value: false 246 }); 247 _classPrivateFieldInitSpec(this, _isAnimate, { 248 writable: true, 249 value: false 250 }); 251 _classPrivateFieldInitSpec(this, _isOpen, { 252 writable: true, 253 value: false 254 }); 255 _classPrivateFieldInitSpec(this, _isOverflow, { 256 writable: true, 257 value: false 258 }); 259 _classPrivateFieldInitSpec(this, _hasHead, { 260 writable: true, 261 value: false 262 }); 263 _classPrivateFieldInitSpec(this, _hasContent, { 264 writable: true, 265 value: false 266 }); 267 _classPrivateFieldInitSpec(this, _head, { 268 writable: true, 269 value: null 270 }); 271 _classPrivateFieldInitSpec(this, _body, { 272 writable: true, 273 value: null 274 }); 275 _classPrivateFieldInitSpec(this, _inner, { 276 writable: true, 277 value: null 278 }); 279 _classPrivateFieldInitSpec(this, _button, { 280 writable: true, 281 value: null 282 }); 283 _classPrivateFieldInitSpec(this, _toggleButtons, { 284 writable: true, 285 value: [] 286 }); 287 _classPrivateFieldInitSpec(this, _toggleHandler, { 288 writable: true, 289 value: e => { 290 this.toggle(); 291 } 292 }); 293 _classPrivateFieldSet(this, _shadowRoot, this.attachShadow({ 294 mode: "open" 295 })); 296 _classPrivateFieldGet(this, _shadowRoot).innerHTML = this.template; 297 } 298 connectedCallback() { 299 if (this.rendered) { 300 return; 301 } 302 if (this.children.length) { 303 _classPrivateMethodGet(this, _init, _init2).call(this); 304 this.rendered = true; 305 } else { 306 const observer = new MutationObserver((mutationsList, observer) => { 307 observer.disconnect(); 308 _classPrivateMethodGet(this, _init, _init2).call(this); 309 this.rendered = true; 310 }); 311 observer.observe(this, { 312 childList: true, 313 subtree: true 314 }); 315 } 316 } 317 disconnectedCallback() {} 318 adoptedCallback() {} 319 static get observedAttributes() { 320 return ['name', 'onlyone', 'open']; 321 } 322 attributeChangedCallback(name, oldValue, newValue) { 323 switch (name) { 324 case 'name': 325 { 326 _classPrivateFieldSet(this, _name, newValue); 327 } 328 break; 329 case 'onlyone': 330 { 331 _classPrivateFieldSet(this, _onlyone, newValue == null ? false : true); 332 } 333 break; 334 case 'open': 335 { 336 _classPrivateFieldSet(this, _isOpen, newValue == null ? false : true); 337 } 338 break; 339 default: 340 {} 341 } 342 } 343 open() { 344 this.toggle(true); 345 } 346 close() { 347 this.toggle(false); 348 } 349 toggle(isOpen) { 350 if (!_classPrivateFieldGet(this, _isOverflow) || !_classPrivateFieldGet(this, _hasContent)) { 351 return; 352 } 353 isOpen = isOpen != undefined ? isOpen : !_classPrivateMethodGet(this, _hasOpen, _hasOpen2).call(this); 354 if (isOpen) { 355 this.setAttribute('open', ''); 356 } else { 357 this.removeAttribute('open'); 358 } 359 _classPrivateMethodGet(this, _toggle, _toggle2).call(this, _classPrivateFieldGet(this, _isOpen)); 360 } 361 } 362 function _init2() { 363 _classPrivateFieldSet(this, _head, _classPrivateFieldGet(this, _shadowRoot).querySelector('.wc-collapse__head')); 364 _classPrivateFieldSet(this, _body, _classPrivateFieldGet(this, _shadowRoot).querySelector('.wc-collapse__body')); 365 _classPrivateFieldSet(this, _inner, _classPrivateFieldGet(this, _shadowRoot).querySelector('.wc-collapse__body-inner')); 366 367 if (!_classPrivateFieldGet(this, _body)) { 368 return; 369 } 370 _classPrivateFieldSet(this, _styleProps, getComputedStyle(_classPrivateFieldGet(this, _body))); 371 _classPrivateFieldSet(this, _fullHeight, _classPrivateMethodGet(this, _getHeight, _getHeight2).call(this, _classPrivateFieldGet(this, _body))); 372 this.style.setProperty('--_wc-collapse-height', _classPrivateFieldGet(this, _fullHeight) + 'px'); 373 if (_classPrivateFieldGet(this, _name)) { 374 _classPrivateFieldSet(this, _toggleButtons, document.querySelectorAll('[data-collapse-target="' + _classPrivateFieldGet(this, _name) + '"]')); 375 } 376 _classPrivateMethodGet(this, _events, _events2).call(this); 377 _classPrivateMethodGet(this, _buttonStatus, _buttonStatus2).call(this, _classPrivateFieldGet(this, _isOpen) || _classPrivateMethodGet(this, _hasOpen, _hasOpen2).call(this), 'is-open'); 378 this.classList[_classPrivateFieldGet(this, _isOpen) ? 'remove' : 'add']('is-close'); 379 this.classList.toggle('is-open', _classPrivateFieldGet(this, _isOpen) || _classPrivateMethodGet(this, _hasOpen, _hasOpen2).call(this)); 380 _classPrivateFieldGet(this, _head).hidden = !_classPrivateFieldGet(this, _hasHead); 381 } 382 function _events2() { 383 let self = this; 384 if (!_classPrivateFieldGet(this, _body) || !_classPrivateFieldGet(this, _inner)) { 385 return; 386 } 387 this.addEventListener('open', function (event) { 388 self.toggle(true); 389 }, false); 390 this.addEventListener('close', function (event) { 391 self.toggle(false); 392 }, false); 393 this.addEventListener('toggle', function (event) {
394 self.toggle(); 395 }, false); 396 397 _classPrivateMethodGet(this, _setButtonHandler, _setButtonHandler2).call(this); 398 _classPrivateFieldGet(this, _head).addEventListener('slotchange', function (event) { 399 _classPrivateFieldSet(self, _hasHead, !!this.assignedNodes().length); 400 _classPrivateFieldGet(self, _head).hidden = !_classPrivateFieldGet(self, _hasHead); 401 }); 402 403 _classPrivateFieldGet(this, _inner).addEventListener('slotchange', function (event) { 404 _classPrivateFieldSet(self, _hasContent, this.assignedNodes().some(function (node) { 405 if (node.tagName || node.textContent.trim().length) { 406 return true; 407 } 408 return false; 409 })); 410 }); 411 _classPrivateFieldGet(this, _body).addEventListener('transitionstart', function (event) { 412 if (this != event.target || event.propertyName != 'max-height' || !!event.pseudoElement) { 413 return; 414 } 415 _classPrivateFieldSet(self, _isAnimate, true); 416 self.dispatchEvent(new CustomEvent("onCollapse.start", { 417 cancelable: true, 418 detail: { 419 isOpen: _classPrivateMethodGet(self, _hasOpen, _hasOpen2).call(self) 420 } 421 })); 422 }, false); 423 _classPrivateFieldGet(this, _body).addEventListener('transitionend', function (event) { 424 if (this != event.target || event.propertyName != 'max-height' || !!event.pseudoElement) { 425 return; 426 } 427 _classPrivateFieldSet(self, _isAnimate, false); 428 self.classList.remove('is-animate'); 429 self.dispatchEvent(new CustomEvent("onCollapse.end", { 430 cancelable: true, 431 detail: { 432 isOpen: _classPrivateMethodGet(self, _hasOpen, _hasOpen2).call(self) 433 } 434 })); 435 }, false); 436 const resizeObserver = new ResizeObserver(function (event) { 437 _classPrivateMethodGet(self, _onResize, _onResize2).call(self); 438 }); 439 resizeObserver.observe(_classPrivateFieldGet(this, _inner)); 440 const intersectionObserver = new IntersectionObserver(function (entries, observer) { 441 _classPrivateMethodGet(self, _onResize, _onResize2).call(self); 442 }, { 443 root: _classPrivateFieldGet(this, _body), 444 rootMargin: '0px', 445 threshold: 1.0 446 }); 447 intersectionObserver.observe(_classPrivateFieldGet(this, _inner)); 448 } 449 function _toggle2(isOpen) { 450 let self = this, 451 isSelfOpen = _classPrivateMethodGet(self, _hasOpen, _hasOpen2).call(self); 452 if (!_classPrivateFieldGet(self, _body) || !_classPrivateFieldGet(self, _inner) /* || isSelfOpen == isOpen*/) { 453 return; 454 } 455 let otherBlock = _classPrivateMethodGet(self, _getSiblings, _getSiblings2).call(self, self); 456 self.toggleTimeout && clearTimeout(self.toggleTimeout); 457 if (isOpen) { 458 self.classList.add('is-animate'); 459 self.classList.add('is-open'); 460 self.classList.remove('is-close'); 461 } else { 462 self.classList.add('is-animate'); 463 self.toggleTimeout = setTimeout(function () { 464 self.classList.add('is-close'); 465 self.classList.remove('is-open'); 466 self.classList.remove('is-animate'); 467 }, 1); 468 } 469 if (isOpen && _classPrivateFieldGet(self, _onlyone)) { 470 Array.prototype.forEach.call(otherBlock, function (item) { 471 if (item != self.block && item.close != undefined) { 472 item.close(); 473 } 474 }); 475 } 476 _classPrivateMethodGet(this, _buttonStatus, _buttonStatus2).call(this, isOpen, 'is-open'); 477 self.dispatchEvent(new CustomEvent("onCollapse." + (isOpen ? 'open' : 'close'), { 478 cancelable: true 479 }));
480 self.dispatchEvent(new CustomEvent("onCollapse.toggle", { 481 cancelable: true, 482 detail: { 483 isOpen: isOpen 484 } 485 })); 486 } 487 function _hasOpen2() { 488 return this.getAttribute('open') != undefined; 489 } 490 function _buttonStatus2(flag, val) { 491 _classPrivateFieldGet(this, _toggleButtons) && Array.prototype.forEach.call(_classPrivateFieldGet(this, _toggleButtons), function (btn) { 492 btn.classList[flag ? 'add' : 'remove'](val); 493 }); 494 _classPrivateFieldGet(this, _button) && Array.prototype.forEach.call(_classPrivateFieldGet(this, _button), function (btn) { 495 btn.classList[flag ? 'add' : 'remove'](val); 496 }); 497 } 498 function _getHeight2(element) { 499 return element.scrollHeight + (element.offsetHeight - element.clientHeight); 500 } 501 function _getSiblings2(element) { 502 let siblings = []; 503 if (!element.parentNode) { 504 return siblings; 505 } 506 let sibling = element.parentNode.firstChild; 507 while (sibling) { 508 if (sibling.nodeType === 1 && sibling !== element && sibling.tagName.toLowerCase() == "collapse-box") { 509 siblings.push(sibling); 510 } 511 sibling = sibling.nextSibling; 512 } 513 return siblings; 514 } 515 function _setButtonHandler2() { 516 _classPrivateFieldGet(this, _button) && _classPrivateFieldGet(this, _button).forEach(btn => { 517 btn.removeEventListener('click', _classPrivateFieldGet(this, _toggleHandler)); 518 }); 519 _classPrivateFieldSet(this, _button, _classPrivateMethodGet(this, _getButtons, _getButtons2).call(this)); 520 if (!_classPrivateFieldGet(this, _button) || !_classPrivateFieldGet(this, _button).length) { 521 return; 522 } 523 _classPrivateFieldGet(this, _button).forEach(item => { 524 item.addEventListener('click', _classPrivateFieldGet(this, _toggleHandler)); 525 }); 526 } 527 function _getButtons2() { 528 let buttons = this.querySelectorAll(':scope [data-wc-collapse-button]:not
528(:scope collapse-box [data-wc-collapse-button])'); 529 if (buttons.length) { 530 return Array.prototype.slice.call(buttons); 531 } else { 532 return [_classPrivateFieldGet(this, _head)]; 533 } 534 return []; 535 } 536 function _onResize2() { 537 let newHeight = _classPrivateMethodGet(this, _getHeight, _getHeight2).call(this, _classPrivateFieldGet(this, _body)), 538 closeHeight = parseInt(_classPrivateFieldGet(this, _styleProps).getPropertyValue('--_wc-collapse-close-max-height'), 10); 539 closeHeight = isNaN(closeHeight) ? false : closeHeight; 540 if (_classPrivateFieldGet(this, _fullHeight) != newHeight) { 541 _classPrivateFieldSet(this, _fullHeight, newHeight); 542 this.style.setProperty('--_wc-collapse-height', newHeight + 'px'); 543 } 544 if (closeHeight !== false) { 545 _classPrivateFieldSet(this, _isOverflow, _classPrivateFieldGet(this, _hasContent) && _classPrivateFieldGet(this, _fullHeight) > closeHeight); 546 this.classList.toggle('is-overflow', _classPrivateFieldGet(this, _isOverflow)); 547 _classPrivateMethodGet(this, _buttonStatus, _buttonStatus2).call(this, _classPrivateFieldGet(this, _isOverflow), 'is-overflow'); 548 } else { 549 _classPrivateFieldSet(this, _isOverflow, false); 550 this.classList.remove('is-overflow'); 551 _classPrivateMethodGet(this, _buttonStatus, _buttonStatus2).call(this, false, 'is-overflow'); 552 } 553 } 554 document.addEventListener('click', function (event) { 555 let button = event.target.closest('[data-collapse-target]'), 556 target; 557 if (!button) { 558 return; 559 } 560 target = button.dataset['collapseTarget']; 561 if (!(target = document.querySelectorAll('collapse-box[name="' + target + '"]'))) { 562 return; 563 } 564 target.forEach(function (item) { 565 if (!item.toggle) { 566 return; 567 } 568 item.toggle(); 569 }); 570 }, false); 571 if ('customElements' in window) { 572 customElements.define("collapse-box", collapseBox); 573 } 574})(); 575/* End */ 576; 577; /* Start:"a:4:{s:4:"full";s:56:"/bitrix/templates/evolution_v2/js/fonts.js?1766049213531";s:6:"source";s:42:"/bitrix/templates/evolution_v2/js/fonts.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 578// WebFontConfig = { 579// google: { families: ['Open+Sans:400,400i,600,600i,700,700i,800,800i:latin,cyrillic'] }, 580// active: function(){ 581// $(document).trigger('wf-active'); 582// } 583// }; 584// (function() { 585// var wf = document.createElement('script'); 586// wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; 587// wf.type = 'text/javascript'; 588// wf.async = 'true'; 589// var s = document.getElementsByTagName('script')[0]; 590// s.parentNode.insertBefore(wf, s); 591// })(); 592/* End */ 593; 594; /* Start:"a:4:{s:4:"full";s:42:"/js/modernizr-3.5.0.min.js?168190048820089";s:6:"source";s:26:"/js/modernizr-3.5.0.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 595/*! modernizr 3.5.0 (Custom Build) | MIT * 596 * https://modernizr.com/download/?-applicationcache-audio-backgroundblendmode-backgroundcliptext-backgroundsize-bgpositionshorthand-bgsizecover-borderimage-borderradius-boxshadow-boxsizing-canvas-canvastext-contextmenu-cssall-cssanimations-csscalc-csscolumns-cssfilters-cssgradients-cssmask-csspointerevents-csspositionsticky-cssreflections-csstransforms-csstransforms3d-csstransitions-cssvhunit-cssvminunit-cssvwunit-filereader-flash-flexbox-flexwrap-fontface-forcetouch-generatedcontent-geolocation-hashchange-history-hsla-ie8compat-indexeddb-inlinesvg-input-inputtypes-localstorage-multiplebgs-objectfit-opacity-postmessage-preserve3d-rgba-scrollsnappoints-sessionstorage-shapes-smil-supports-svg-svgclippaths-textshadow-touchevents-video-webgl-websockets-websqldatabase-webworkers-addtest-atrule-domprefixes-hasevent-mq-prefixed-prefixedcss-prefixedcssvalue-prefixes-setclasses-testallprops-testprop-teststyles !*/ 597!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,a,i,s;for(var d in S)if(S.hasOwnProperty(d)){if(e=[],t=S[d],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,a=0;a<e.length;a++)i=e[a],s=i.split("."),1===s.length?Modernizr[s[0]]=o:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=o),w.push((o?"":"no-")+s.join("-"))}}function a(e){var t=O.className,n=Modernizr._config.classPrefix||"";if(M&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),M?O.className.baseVal=t:O.className=t)}function i(e,t){if("object"==typeof e)for(var n in e)N(e,n)&&i(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;t="function"==typeof t?t():t,1==r.length?Modernizr[r[0]]=t:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=t),a([(t&&0!=t?"":"no-")+r.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):M?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function d(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function c(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function l(){var e=t.body;return e||(e=s(M?"svg":"body"),e.fake=!0),e}function u(e,n,r,o){var a,i,d,c,u="modernizr",f=s("div"),p=l();if(parseInt(r,10))for(;r--;)d=s("div"),d.id=o?o[r]:u+(r+1),f.appendChild(d);return a=s("style"),a.type="text/css",a.id="s"+u,(p.fake?p:f).appendChild(a),p.appendChild(f),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(t.createTextNode(e)),f.id=u,p.fake&&(p.style.background="",p.style.overflow="hidden",c=O.style.overflow,O.style.overflow="hidden",O.appendChild(p)),i=n(f,e),p.fake?(p.parentNode.removeChild(p),O.style.overflow=c,O.offsetHeight):f.parentNode.removeChild(f),!!i}function f(e,t){return!!~(""+e).indexOf(t)}function p(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var a=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(a){var i=a.error?"error":"log";a[i].call(a,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}function h(e,t){return e-1===t||e===t||e+1===t}function v(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;
597)if(e.CSS.supports(c(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var a=[];o--;)a.push("("+c(t[o])+":"+r+")");return a=a.join(" or "),u("@supports ("+a+") { #modernizr { position: absolute; } }",function(e){return"absolute"==p(e,null,"position")})}return n}function m(e,t){return function(){return e.apply(t,arguments)}}function g(e,t,n){var o;for(var a in e)if(e[a]in t)return n===!1?e[a]:(o=t[e[a]],r(o,"function")?m(o,n||t):o);return!1}function y(e,t,o,a){function i(){l&&(delete K.style,delete K.modElem)}if(a=r(a,"undefined")?!1:a,!r(o,"undefined")){var c=v(e,o);if(!r(c,"undefined"))return c}for(var l,u,p,h,m,g=["modernizr","tspan","samp"];!K.style&&g.length;)l=!0,K.modElem=s(g.shift()),K.style=K.modElem.style;for(p=e.length,u=0;p>u;u++)if(h=e[u],m=K.style[h],f(h,"-")&&(h=d(h)),K.style[h]!==n){if(a||r(o,"undefined"))return i(),"pfx"==t?h:!0;try{K.style[h]=o}catch(y){}if(K.style[h]!=m)return i(),"pfx"==t?h:!0}return i(),!1}function b(e,t,n,o,a){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+I.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?y(s,t,o,a):(s=(e+" "+A.join(i+" ")+i).split(" "),g(s,t,n))}function T(e,t){var n=e.deleteDatabase(t);n.onsuccess=function(){i("indexeddb.deletedatabase",!0)},n.onerror=function(){i("indexeddb.deletedatabase",!1)}}function x(e,t,r){return b(e,n,n,t,r)}var w=[],S=[],C={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){S.push({name:e,fn:t,options:n})},addAsyncTest:function(e){S.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=C,Modernizr=new Modernizr,Modernizr.addTest("applicationcache","applicationCache"in e),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")||"file:"===location.protocol?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("ie8compat",!e.addEventListener&&!!t.documentMode&&7===t.documentMode),Modernizr.addTest("postmessage","postMessage"in e),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var k=!1;try{k="WebSocket"in e&&2===e.WebSocket.CLOSING}catch(_){}Modernizr.addTest("websockets",k);var E="CSS"in e&&"supports"in e.CSS,P="supportsCSS"in e;Modernizr.addTest("supports",E||P),Modernizr.addTest("filereader",!!(e.File&&e.FileList&&e.FileReader)),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e),Modernizr.addTest("webworkers","Worker"in e);var z=C._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];C._prefixes=z;var O=t.documentElement;Modernizr.addTest("contextmenu","contextMenu"in O&&"HTMLMenuItemElement"in e),Modernizr.addTest("cssall","all"in O.style);var M="svg"===O.nodeName.toLowerCase(),R="Moz O ms Webkit",A=C._config.usePrefixes?R.toLowerCase().split(" "):[];C._domPrefixes=A;var N;!function(){var e={}.hasOwnProperty;N=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),C._l={},C.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},C._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e<n.length;e++)(r=n[e])(t)},0),delete this._l[e]}},Modernizr._q.push(function(){C.addTest=i});var I=C._config.usePrefixes?R.split(" "):[];C._cssomPrefixes=I;var j=function(t){var r,o=z.length,a=e.CSSRule;if("undefined"==typeof a)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in a)return"@"+t;for(var i=0;o>i;i++){var s=z[i],d=s.toUpperCase()+"_"+r;if(d in a)return"@-"+s.toLowerCase()+"-"+t}return!1};C.atRule=j;var W=function(){function e(e,t){var o;return e?(t&&"string"!=typeof t||(t=s(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=s("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o):!1}var r=!("onblur"in t.documentElement);return e}();C.hasEvent=W,Modernizr.addTest("hashchange",function(){return W("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7});var B=function(e,t){var n=!1,r=s("div"),o=r.style;if(e in o){var a=A.length;for(o[e]=t,n=o[e];a--&&!n;)o[e]="-"+A[a]+"-"+t,n=o[e]}return""===n&&(n=!1),n};C.prefixedCSSValue=B,Modernizr.addTest("audio",function(){var e=s("audio"),t=!1;try{t=!!e.canPlayType,t&&(t=new Boolean(t),t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,""),t.opus=e.canPlayType('audio/ogg; codecs="opus"')||e.canPlayType('audio/webm; codecs="opus"').replace(/^no$/,""),t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("canvas",function(){var e=s("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof s("canvas").getContext("2d").fillText}),Modernizr.addTest("video",function(){var e=s("video"),t=!1;try{t=!!e.canPlayType,t&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("webgl",function(){var t=s("canvas"),n="probablySupportsContext"in t?"probablySupportsContext":"supportsContext";return n in t?t[n]("webgl")||t[n]("experimental-webgl"):"WebGLRenderingContext"in e}),Modernizr.addTest("bgpositionshorthand",function(){var e=s("a"),t=e.style,n="right 10px bottom 10px";return t.cssText="background-position: "+n+";",t.backgroundPosition===n}),Modernizr.addTest("csscalc",function(){var e="width:",t="calc(10px);",n=s("a");return n.style.cssText=e+z.join(t+e),!!n.style.length}),Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",o=0,a=z.length-1;a>o;o++)e=0===o?"to ":"",r+=t+z[o]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(r+=t+"-webkit-"+n);var i=s("a"),d=i.style;return d.cssText=r,(""+d.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("multiplebgs",function(){var e=s("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("opacity",function(){var e=s("a").style;return e.cssText=z.join("opacity:.55;"),/^0.55$/.test(e.opacity)}),Modernizr.addTest("csspointerevents",function(){var e=s("a").style;return e.cssText="pointer-events:auto","auto"===e.pointerEvents}),Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=s("a"),r=n.style;return r.cssText=e+z.join(t+";"+e).slice(0,-e.length),-1!==r.position.indexOf(t)}),Modernizr.addTest("rgba",function(){var e=s("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("preserve3d",function(){var t,n,r=e.CSS,o=!1;return r&&r.supports&&r.supports("(transform-style: preserve-3d)")?!0:(t=s("a"),n=s("a"),t.style.cssText="display: block; transform-style: preserve-3d; transform-origin: right; transform: rotateY(40deg);",n.style.cssText="display: block; width: 9px; height: 1px; background: #000; transform-origin: right; transform: rotateY(40deg);",t.appendChild(n),O.appendChild(t),o=n.getBoundingClientRect(),O.removeChild(t),o=o.width&&o.width<4)}),Modernizr.addTest("inlinesvg",function(){var e=s("div");return e.innerHTML="<svg/>
597","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)}),Modernizr.addAsyncTest(function(){var n,r,o=function(e){O.contains(e)||O.appendChild(e)},a=function(e){e.fake&&e.parentNode&&e.parentNode.removeChild(e)},d=function(e,t){var n=!!e;if(n&&(n=new Boolean(n),n.blocked="blocked"===e),i("flash",function(){return n}),t&&h.contains(t)){for(;t.parentNode!==h;)t=t.parentNode;h.removeChild(t)}};try{r="ActiveXObject"in e&&"Pan"in new e.ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(c){}if(n=!("plugins"in navigator&&"Shockwave Flash"in navigator.plugins||r),n||M)d(!1);else{var u,f,p=s("embed"),h=l();if(p.type="application/x-shockwave-flash",h.appendChild(p),!("Pan"in p||r))return o(h),d("blocked",p),void a(h);u=function(){return o(h),O.contains(h)?(O.contains(p)?(f=p.style.cssText,""!==f?d("blocked",p):d(!0,p)):d("blocked"),void a(h)):(h=t.body||h,p=s("embed"),p.type="application/x-shockwave-flash",h.appendChild(p),setTimeout(u,1e3))},setTimeout(u,10)}});var L=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return u("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();C.mq=L;var $=C.testStyles=u;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",z.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");$(r,function(e){n=9===e.offsetTop})}return n});var F=function(){var e=navigator.userAgent,t=e.match(/w(eb)?osbrowser/gi),n=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9;return t||n}();F?Modernizr.addTest("fontface",!1):$('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),o=r.sheet||r.styleSheet,a=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"",i=/src/i.test(a)&&0===a.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",i)}),$('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(e){Modernizr.addTest("generatedcontent",e.offsetHeight>=6)});var V=s("input"),q="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),H={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)H[t[n]]=!!(t[n]in V);return H.list&&(H.list=!(!s("datalist")||!e.HTMLDataListElement)),H}(q);var U="search tel url email datetime date month week time datetime-local number range color".split(" "),D={};Modernizr.inputtypes=function(e){for(var r,o,a,i=e.length,s="1)",d=0;i>d;d++)V.setAttribute("type",r=e[d]),a="text"!==V.type&&"style"in V,a&&(V.value=s,V.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&V.style.WebkitAppearance!==n?(O.appendChild(V),o=t.defaultView,a=o.getComputedStyle&&"textfield"!==o.getComputedStyle(V,null).WebkitAppearance&&0!==V.offsetHeight,O.removeChild(V)):/^(search|tel)$/.test(r)||(a=/^(url|email)$/.test(r)?V.checkValidity&&V.checkValidity()===!1:V.value!=s)),D[e[d]]=!!a;return D}(U),Modernizr.addTest("hsla",function(){var e=s("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",f(e.backgroundColor,"rgba")||f(e.backgroundColor,"hsla")}),$("#modernizr { height: 50vh; }",function(t){var n=parseInt(e.innerHeight/2,10),r=parseInt(p(t,null,"height"),10);Modernizr.addTest("cssvhunit",r==n)}),$("#modernizr { width: 50vw; }",function(t){var n=parseInt(e.innerWidth/2,10),r=parseInt(p(t,null,"width"),10);Modernizr.addTest("cssvwunit",r==n)}),$("#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}#modernizr3{position:fixed;top:0;left:0;bottom:0;right:0}",function(e){var t=e.childNodes[2],n=e.childNodes[1],r=e.childNodes[0],o=parseInt((n.offsetWidth-n.clientWidth)/2,10),a=r.clientWidth/100,i=r.clientHeight/100,s=parseInt(50*Math.min(a,i),10),d=parseInt(p(t,null,"width"),10);Modernizr.addTest("cssvminunit",h(s,d)||h(s,d-o))},3);var G={}.toString;Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(G.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(G.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))});var J={elem:s("modernizr")};Modernizr._q.push(function(){delete J.elem});var K={style:J.elem.style};Modernizr._q.unshift(function(){delete K.style});var X=C.testProp=function(e,t,r){return y([e],n,t,r)};Modernizr.addTest("textshadow",X("textShadow","1px 1px")),C.testAllProps=b;var Y=C.prefixed=function(e,t,n){return 0===e.indexOf("@")?j(e):(-1!=e.indexOf("-")&&(e=d(e)),t?b(e,t,n):b(e,"pfx"))};C.prefixedCSS=function(e){var t=Y(e);return t&&c(t)};Modernizr.addTest("forcetouch",function(){return W(Y("mouseforcewillbegin",e,!1),e)?MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN&&MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN:!1}),Modernizr.addAsyncTest(function(){var t;try{t=Y("indexedDB",e)}catch(n){}if(t){var r="modernizr-"+Math.random(),o=t.open(r);
597o.onerror=function(){o.error&&"InvalidStateError"===o.error.name?i("indexeddb",!1):(i("indexeddb",!0),T(t,r))},o.onsuccess=function(){i("indexeddb",!0),T(t,r)}}else i("indexeddb",!1)}),Modernizr.addTest("backgroundblendmode",Y("backgroundBlendMode","text")),Modernizr.addTest("objectfit",!!Y("objectFit"),{aliases:["object-fit"]}),C.testAllProps=x,Modernizr.addTest("cssanimations",x("animationName","a",!0)),Modernizr.addTest("backgroundcliptext",function(){return x("backgroundClip","text")}),Modernizr.addTest("backgroundsize",x("backgroundSize","100%",!0)),Modernizr.addTest("bgsizecover",x("backgroundSize","cover")),Modernizr.addTest("borderimage",x("borderImage","url() 1",!0)),Modernizr.addTest("borderradius",x("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",x("boxShadow","1px 1px",!0)),Modernizr.addTest("boxsizing",x("boxSizing","border-box",!0)&&(t.documentMode===n||t.documentMode>7)),function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=x("columnCount");try{e=!!t,e&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r<n.length;r++)e=n[r].toLowerCase(),t=x("column"+n[r]),("breakbefore"===e||"breakafter"===e||"breakinside"==e)&&(t=t||x(n[r])),Modernizr.addTest("csscolumns."+e,t)}(),Modernizr.addTest("cssfilters",function(){if(Modernizr.supports)return x("filter","blur(2px)");var e=s("a");return e.style.cssText=z.join("filter:blur(2px); "),!!e.style.length&&(t.documentMode===n||t.documentMode>9)}),Modernizr.addTest("flexbox",x("flexBasis","1px",!0)),Modernizr.addTest("flexwrap",x("flexWrap","wrap",!0)),Modernizr.addTest("cssmask",x("maskRepeat","repeat-x",!0)),Modernizr.addTest("cssreflections",x("boxReflect","above",!0)),Modernizr.addTest("scrollsnappoints",x("scrollSnapType")),Modernizr.addTest("shapes",x("shapeOutside","content-box",!0)),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&x("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!x("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in O.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",$(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),Modernizr.addTest("csstransitions",x("transition","all",!0)),o(),a(w),delete C.addTest,delete C.addAsyncTest;for(var Z=0;Z<Modernizr._q.length;Z++)Modernizr._q[Z]();e.Modernizr=Modernizr}(window,document); 598/* End */ 599; 600; /* Start:"a:4:{s:4:"full";s:73:"/bitrix/templates/evolution_v2/js/vendor/bootstrap.min.js?168190042936874";s:6:"source";s:57:"/bitrix/templates/evolution_v2/js/vendor/bootstrap.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 601/*! 602 * Bootstrap v3.3.6 (http://getbootstrap.com) 603 * Copyright 2011-2015 Twitter, Inc. 604 * Licensed under the MIT license 605 */ 606if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;
606e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")}
vendor: 5,584 bytes, line 606
606,c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","fal
606se"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("key
606down.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focu
606s":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.t
vendor: 6,972 bytes, lines 606-607
606ype+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active"); 607d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
607e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); 608/* End */ 609; 610; /* Start:"a:4:{s:4:"full";s:84:"/bitrix/templates/evolution_v2/js/vendor/jquery.inputmask.bundle.js?1681900429222044";s:6:"source";s:67:"/bitrix/templates/evolution_v2/js/vendor/jquery.inputmask.bundle.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 611/*! 612* jquery.inputmask.bundle.js 613* https://github.com/RobinHerbots/Inputmask 614* Copyright (c) 2010 - 2018 Robin Herbots 615* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 616* Version: 4.0.2 617*/ 618 619(function(modules) { 620 var installedModules = {}; 621 function __webpack_require__(moduleId) { 622 if (installedModules[moduleId]) { 623 return installedModules[moduleId].exports; 624 } 625 var module = installedModules[moduleId] = { 626 i: moduleId, 627 l: false, 628 exports: {} 629 }; 630 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 631 module.l = true; 632 return module.exports; 633 } 634 __webpack_require__.m = modules; 635 __webpack_require__.c = installedModules; 636 __webpack_require__.d = function(exports, name, getter) { 637 if (!__webpack_require__.o(exports, name)) { 638 Object.defineProperty(exports, name, { 639 enumerable: true, 640 get: getter 641 }); 642 } 643 }; 644 __webpack_require__.r = function(exports) { 645 if (typeof Symbol !== "undefined" && Symbol.toStringTag) { 646 Object.defineProperty(exports, Symbol.toStringTag, { 647 value: "Module" 648 }); 649 } 650 Object.defineProperty(exports, "__esModule", { 651 value: true 652 }); 653 }; 654 __webpack_require__.t = function(value, mode) { 655 if (mode & 1) value = __webpack_require__(value); 656 if (mode & 8) return value; 657 if (mode & 4 && typeof value === "object" && value && value.__esMo
657dule) return value; 658 var ns = Object.create(null); 659 __webpack_require__.r(ns); 660 Object.defineProperty(ns, "default", { 661 enumerable: true, 662 value: value 663 }); 664 if (mode & 2 && typeof value != "string") for (var key in value) __webpack_require__.d(ns, key, function(key) { 665 return value[key]; 666 }.bind(null, key)); 667 return ns; 668 }; 669 __webpack_require__.n = function(module) { 670 var getter = module && module.__esModule ? function getDefault() { 671 return module["default"]; 672 } : function getModuleExports() { 673 return module; 674 }; 675 __webpack_require__.d(getter, "a", getter); 676 return getter; 677 }; 678 __webpack_require__.o = function(object, property) { 679 return Object.prototype.hasOwnProperty.call(object, property); 680 }; 681 __webpack_require__.p = ""; 682 return __webpack_require__(__webpack_require__.s = 0); 683})([ function(module, exports, __webpack_require__) { 684 "use strict"; 685 __webpack_require__(1); 686 __webpack_require__(7); 687 __webpack_require__(8); 688 var _inputmask = __webpack_require__(2); 689 var _inputmask2 = _interopRequireDefault(_inputmask); 690 var _inputmask3 = __webpack_require__(3); 691 var _inputmask4 = _interopRequireDefault(_inputmask3); 692 var _jquery = __webpack_require__(4); 693 var _jquery2 = _interopRequireDefault(_jquery); 694 function _interopRequireDefault(obj) { 695 return obj && obj.__esModule ? obj : { 696 default: obj 697 }; 698 } 699 if (_inputmask4.default === _jquery2.default) { 700 __webpack_require__(9); 701 } 702 window.Inputmask = _inputmask2.default; 703}, function(module, exports, __webpack_require__) { 704 "use strict"; 705 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 706 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 707 return typeof obj; 708 } : function(obj) { 709 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 710 }; 711 (function(factory) { 712 if (true) { 713 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 714 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 715 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 716 } else {} 717 })(function(Inputmask) { 718 Inputmask.extendDefinitions({ 719 A: { 720 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 721 casing: "upper" 722 }, 723 "&": { 724 validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 725 casing: "upper" 726 }, 727 "#": { 728 validator: "[0-9A-Fa-f]", 729 casing: "upper" 730 } 731 }); 732 Inputmask.extendAliases({ 733 cssunit: { 734 regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" 735 }, 736 url: { 737 regex: "(https?|ftp)//.*", 738 autoUnmask: false 739 }, 740 ip: { 741 mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]", 742 definitions: { 743 i: { 744 validator: function validator(chrs, maskset, pos, strict, opts) { 745 if (pos - 1 > -1 && maskset.buffer[pos - 1] !== ".") { 746 chrs = maskset.buffer[pos - 1] + chrs; 747 if (pos - 2 > -1 && maskset.buffer[pos - 2] !== ".") { 748 chrs = maskset.buffer[pos - 2] + chrs; 749 } else chrs = "0" + chrs; 750 } else chrs = "00" + chrs; 751 return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs); 752 } 753 } 754 }, 755 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 756 return maskedValue; 757 }, 758 inputmode: "numeric" 759 }, 760 email: { 761 mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
762 greedy: false, 763 casing: "lower", 764 onBeforePaste: function onBeforePaste(pastedValue, opts) { 765 pastedValue = pastedValue.toLowerCase(); 766 return pastedValue.replace("mailto:", ""); 767 }, 768 definitions: { 769 "*": { 770 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]" 771 }, 772 "-": { 773 validator: "[0-9A-Za-z-]" 774 } 775 }, 776 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 777 return maskedValue; 778 }, 779 inputmode: "email" 780 }, 781 mac: { 782 mask: "##:##:##:##:##:##" 783 }, 784 vin: { 785 mask: "V{13}9{4}", 786 definitions: { 787 V: { 788 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 789 casing: "upper" 790 } 791 }, 792 clearIncomplete: true, 793 autoUnmask: true 794 } 795 }); 796 return Inputmask; 797 }); 798}, function(module, exports, __webpack_require__) { 799 "use strict"; 800 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 801 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 802 return typeof obj; 803 } : function(obj) { 804 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 805 }; 806 (function(factory) { 807 if (true) { 808 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3), __webpack_require__(5), __webpack_require__(6) ], 809 __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 810 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 811 } else {} 812 })(function($, window, document, undefined) { 813 var ua = navigator.userAgent, mobile = isInputEventSupported("touchstart"), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile; 814 function Inputmask(alias, options, internal) { 815 if (!(this instanceof Inputmask)) { 816 return new Inputmask(alias, options, internal); 817 } 818 this.el = undefined; 819 this.events = {}; 820 this.maskset = undefined; 821 this.refreshValue = false; 822 if (internal !== true) { 823 if ($.isPlainObject(alias)) { 824 options = alias; 825 } else { 826 options = options || {}; 827 if (alias) options.alias = alias; 828 } 829 this.opts = $.extend(true, {}, this.defaults, options); 830 this.noMasksCache = options && options.definitions !== undefined; 831 this.userOptions = options || {}; 832 this.isRTL = this.opts.numericInput; 833 resolveAlias(this.opts.alias, options, this.opts); 834 } 835 } 836 Inputmask.prototype = { 837 dataAttribute: "data-inputmask", 838 defaults: { 839 placeholder: "_", 840 optionalmarker: [ "[", "]" ], 841 quantifiermarker: [ "{", "}" ], 842 groupmarker: [ "(", ")" ], 843 alternatormarker: "|", 844 escapeChar: "\\", 845 mask: null, 846 regex: null, 847 oncomplete: $.noop, 848 onincomplete: $.noop, 849 oncleared: $.noop, 850 repeat: 0, 851 greedy: false, 852 autoUnmask: false, 853 removeMaskOnSubmit: false, 854 clearMaskOnLostFocus: true, 855 insertMode: true, 856 clearIncomplete: false, 857 alias: null, 858 onKeyDown: $.noop, 859 onBeforeMask: null, 860 onBeforePaste: function onBeforePaste(pastedValue, opts) { 861 return $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(this, pastedValue, opts) : pastedValue; 862 }, 863 onBeforeWrite: null, 864 onUnMask: null, 865 showMaskOnFocus: true, 866 showMaskOnHover: true, 867 onKeyValidation: $.noop, 868 skipOptionalPartCharacter: " ", 869 numericInput: false, 870 rightAlign: false, 871 undoOnEscape: true, 872 radixPoint: "", 873 _radixDance: false, 874 groupSeparator: "", 875 keepStatic: null, 876 positionCaretOnTab: true, 877 tabThrough: false, 878 supportsInputType: [ "text", "tel", "password", "search" ], 879 ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 880 isComplete: null, 881 preValidation: null, 882 postValidation: null, 883 staticDefinitionSymbol: undefined, 884 jitMasking: false, 885 nullable: true, 886 inputEventOnly: false, 887 noValuePatching: false, 888 positionCaretOnClick: "lvp", 889 casing: null, 890 inputmode: "verbatim", 891 colorMask: false, 892 disablePredictiveText: false, 893 importDataAttributes: true 894 }, 895 definitions: { 896 9: { 897 validator: "[0-9\uff11-\uff19]", 898 definitionSymbol: "*" 899 }, 900 a: { 901 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 902 definitionSymbol: "*" 903 }, 904 "*": { 905 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]" 906 } 907 }, 908 aliases: {}, 909 masksCache: {}, 910 mask: function mask(elems) { 911 var that = this; 912 function importAttributeOptions(npt, opts, userOptions, dataAttribute) { 913 if (opts.importDataAttributes === true) { 914 var importOption = function importOption(option, optionData) { 915 optionData = optionData !== undefined ? optionData : npt.getAttribute(dataAttribute + "-" + option); 916 if (optionData !== null) { 917 if (typeof optionData === "string") { 918 if (option.indexOf("on") === 0) optionData = window[optionData];
918 else if (optionData === "false") optionData = false; else if (optionData === "true") optionData = true; 919 } 920 userOptions[option] = optionData; 921 } 922 }; 923 var attrOptions = npt.getAttribute(dataAttribute), option, dataoptions, optionData, p; 924 if (attrOptions && attrOptions !== "") { 925 attrOptions = attrOptions.replace(/'/g, '"'); 926 dataoptions = JSON.parse("{" + attrOptions + "}"); 927 } 928 if (dataoptions) { 929 optionData = undefined; 930 for (p in dataoptions) { 931 if (p.toLowerCase() === "alias") { 932 optionData = dataoptions[p]; 933 break; 934 } 935 } 936 } 937 importOption("alias", optionData); 938 if (userOptions.alias) { 939 resolveAlias(userOptions.alias, userOptions, opts); 940 } 941 for (option in opts) { 942 if (dataoptions) { 943 optionData = undefined; 944 for (p in dataoptions) { 945 if (p.toLowerCase() === option.toLowerCase()) { 946 optionData = dataoptions[p]; 947 break; 948 } 949 } 950 } 951 importOption(option, optionData); 952 } 953 } 954 $.extend(true, opts, userOptions); 955 if (npt.dir === "rtl" || opts.rightAlign) { 956 npt.style.textAlign = "right"; 957 } 958 if (npt.dir === "rtl" || opts.numericInput) { 959 npt.dir = "ltr"; 960 npt.removeAttribute("dir"); 961 opts.isRTL = true; 962 } 963 return Object.keys(userOptions).length; 964 } 965 if (typeof elems === "string") { 966 elems = document.getElementById(elems) || document.querySelectorAll(elems); 967 } 968 elems = elems.nodeName ? [ elems ] : elems; 969 $.each(elems, function(ndx, el) { 970 var scopedOpts = $.extend(true, {}, that.opts); 971 if (importAttributeOptions(el, scopedOpts, $.extend(true, {}, that.userOptions), that.dataAttribute)) { 972 var maskset = generateMaskSet(scopedOpts, that.noMasksCache); 973 if (maskset !== undefined) { 974 if (el.inputmask !== undefined) { 975 el.inputmask.opts.autoUnmask = true; 976 el.inputmask.remove(); 977 } 978 el.inputmask = new Inputmask(undefined, undefined, true); 979 el.inputmask.opts = scopedOpts; 980 el.inputmask.noMasksCache = that.noMasksCache; 981 el.inputmask.userOptions = $.extend(true, {}, that.userOptions); 982 el.inputmask.isRTL = scopedOpts.isRTL || scopedOpts.numericInput; 983 el.inputmask.el = el; 984 el.inputmask.maskset = maskset; 985 $.data(el, "_inputmask_opts", scopedOpts); 986 maskScope.call(el.inputmask, { 987 action: "mask" 988 }); 989 } 990 } 991 }); 992 return elems && elems[0] ? elems[0].inputmask || this : this; 993 }, 994 option: function option(options, noremask) { 995 if (typeof options === "string") { 996 return this.opts[options]; 997 } else if ((typeof options === "undefined" ? "undefined" : _typeof(options)) === "object") { 998 $.extend(this.userOptions, options); 999 if (this.el && noremask !== true) { 1000 this.mask(this.el); 1001 } 1002 return this; 1003 } 1004 }, 1005 unmaskedvalue: function unmaskedvalue(value) { 1006 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1007 return maskScope.call(this, { 1008 action: "unmaskedvalue", 1009 value: value 1010 }); 1011 }, 1012 remove: function remove() { 1013 return maskScope.call(this, { 1014 action: "remove" 1015 }); 1016 }, 1017 getemptymask: function getemptymask() { 1018 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1019 return maskScope.call(this, { 1020 action: "getemptymask" 1021 }); 1022 }, 1023 hasMaskedValue: function hasMaskedValue() { 1024 return !this.opts.autoUnmask; 1025 }, 1026 isComplete: function isComplete() { 1027 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1028 return maskScope.call(this, { 1029 action: "isComplete" 1030 }); 1031 }, 1032 getmetadata: function getmetadata() { 1033 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1034 return maskScope.call(this, { 1035 action: "getmetadata" 1036 }); 1037 }, 1038 isValid: function isValid(value) { 1039 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1040 return maskScope.call(this, { 1041 action: "isValid", 1042 value: value 1043 }); 1044 }, 1045 format: function format(value, metadata) { 1046 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 1047 return maskScope.call(this, { 1048 action: "format", 1049 value: value, 1050 metadata: metadata 1051 }); 1052 }, 1053 setValue: function setValue(value) { 1054 if (this.el) { 1055 $(this.el).trigger("setvalue", [ value ]); 1056 } 1057 }, 1058 analyseMask: function analyseMask(mask, regexMask, opts) { 1059 var tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g, regexTokenizer = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, escaped = false, currentToken = new MaskToken(), match, m, openenings = [], maskTokens = [], openingToken, currentOpeningToken, alternator, lastMatch, groupToken; 1060 function MaskToken(isGroup, isOptional, isQuantifier, isAlternator) { 1061 this.matches = []; 1062 this.openGroup = isGroup || false; 1063 this.alternatorGroup = false;
1064 this.isGroup = isGroup || false; 1065 this.isOptional = isOptional || false; 1066 this.isQuantifier = isQuantifier || false; 1067 this.isAlternator = isAlternator || false; 1068 this.quantifier = { 1069 min: 1, 1070 max: 1 1071 }; 1072 } 1073 function insertTestDefinition(mtoken, element, position) { 1074 position = position !== undefined ? position : mtoken.matches.length; 1075 var prevMatch = mtoken.matches[position - 1]; 1076 if (regexMask) { 1077 if (element.indexOf("[") === 0 || escaped && /\\d|\\s|\\w]/i.test(element) || element === ".") { 1078 mtoken.matches.splice(position++, 0, { 1079 fn: new RegExp(element, opts.casing ? "i" : ""), 1080 optionality: false, 1081 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element, 1082 casing: null, 1083 def: element, 1084 placeholder: undefined, 1085 nativeDef: element 1086 }); 1087 } else { 1088 if (escaped) element = element[element.length - 1]; 1089 $.each(element.split(""), function(ndx, lmnt) { 1090 prevMatch = mtoken.matches[position - 1]; 1091 mtoken.matches.splice(position++, 0, { 1092 fn: null, 1093 optionality: false, 1094 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== lmnt && prevMatch.fn !== null, 1095 casing: null, 1096 def: opts.staticDefinitionSymbol || lmnt, 1097 placeholder: opts.staticDefinitionSymbol !== undefined ? lmnt : undefined, 1098 nativeDef: (escaped ? "'" : "") + lmnt 1099 }); 1100 }); 1101 } 1102 escaped = false; 1103 } else { 1104 var maskdef = (opts.definitions ? opts.definitions[element] : undefined) || Inputmask.prototype.definitions[element]; 1105 if (maskdef && !escaped) { 1106 mtoken.matches.splice(position++, 0, { 1107 fn: maskdef.validator ? typeof maskdef.validator == "string" ? new RegExp(maskdef.validator, opts.casing ? "i" : "") : new function() { 1108 this.test = maskdef.validator; 1109 }() : new RegExp("."), 1110 optionality: false, 1111 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== (maskdef.definitionSymbol || element), 1112 casing: maskdef.casing, 1113 def: maskdef.definitionSymbol || element, 1114 placeholder: maskdef.placeholder, 1115 nativeDef: element 1116 }); 1117 } else { 1118 mtoken.matches.splice(position++, 0, { 1119 fn: null, 1120 optionality: false, 1121 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element && prevMatch.fn !== null, 1122 casing: null, 1123 def: opts.staticDefinitionSymbol || element, 1124 placeholder: opts.staticDefinitionSymbol !== undefined ? element : undefined, 1125 nativeDef: (escaped ? "'" : "") + element 1126 }); 1127 escaped = false;
1128 } 1129 } 1130 } 1131 function verifyGroupMarker(maskToken) { 1132 if (maskToken && maskToken.matches) { 1133 $.each(maskToken.matches, function(ndx, token) { 1134 var nextToken = maskToken.matches[ndx + 1]; 1135 if ((nextToken === undefined || nextToken.matches === undefined || nextToken.isQuantifier === false) && token && token.isGroup) { 1136 token.isGroup = false; 1137 if (!regexMask) { 1138 insertTestDefinition(token, opts.groupmarker[0], 0); 1139 if (token.openGroup !== true) { 1140 insertTestDefinition(token, opts.groupmarker[1]); 1141 } 1142 } 1143 } 1144 verifyGroupMarker(token); 1145 }); 1146 } 1147 } 1148 function defaultCase() { 1149 if (openenings.length > 0) { 1150 currentOpeningToken = openenings[openenings.length - 1]; 1151 insertTestDefinition(currentOpeningToken, m); 1152 if (currentOpeningToken.isAlternator) { 1153 alternator = openenings.pop(); 1154 for (var mndx = 0; mndx < alternator.matches.length; mndx++) { 1155 if (alternator.matches[mndx].isGroup) alternator.matches[mndx].isGroup = false; 1156 } 1157 if (openenings.length > 0) { 1158 currentOpeningToken = openenings[openenings.length - 1]; 1159 currentOpeningToken.matches.push(alternator); 1160 } else { 1161 currentToken.matches.push(alternator); 1162 } 1163 } 1164 } else { 1165 insertTestDefinition(currentToken, m); 1166 } 1167 } 1168 function reverseTokens(maskToken) { 1169 function reverseStatic(st) { 1170 if (st === opts.optionalmarker[0]) st = opts.optionalmarker[1]; else if (st === opts.optionalmarker[1]) st = opts.optionalmarker[0]; else if (st === opts.groupmarker[0]) st = opts.groupmarker[1]; else if (st === opts.groupmarker[1]) st = opts.groupmarker[0]; 1171 return st; 1172 } 1173 maskToken.matches = maskToken.matches.reverse(); 1174 for (var match in maskToken.matches) { 1175 if (maskToken.matches.hasOwnProperty(match)) { 1176 var intMatch = parseInt(match); 1177 if (maskToken.matches[match].isQuantifier && maskToken.matches[intMatch + 1] && maskToken.matches[intMatch + 1].isGroup) { 1178 var qt = maskToken.matches[match]; 1179 maskToken.matches.splice(match, 1); 1180 maskToken.matches.splice(intMatch + 1, 0, qt); 1181 } 1182 if (maskToken.matches[match].matches !== undefined) { 1183 maskToken.matches[match] = reverseTokens(maskToken.matches[match]); 1184 } else { 1185 maskToken.matches[match] = reverseStatic(maskToken.matches[match]); 1186 } 1187 } 1188 } 1189 return maskToken; 1190 } 1191 function groupify(matches) { 1192 var groupToken = new MaskToken(true); 1193 groupToken.openGroup = false; 1194 groupToken.matches = matches; 1195 return groupToken; 1196 } 1197 if (regexMask) { 1198 opts.optionalmarker[0] = undefined; 1199 opts.optionalmarker[1] = undefined; 1200 } 1201 while (match = regexMask ? regexTokenizer.exec(mask) : tokenizer.exec(mask)) { 1202 m = match[0]; 1203 if (regexMask) { 1204 switch (m.charAt(0)) { 1205 case "?": 1206 m = "{0,1}"; 1207 break; 1208 1209 case "+": 1210 case "*": 1211 m = "{" + m + "}"; 1212 break; 1213 } 1214 } 1215 if (escaped) { 1216 defaultCase(); 1217 continue; 1218 } 1219 switch (m.charAt(0)) { 1220 case "(?=": 1221 break; 1222 1223 case "(?!": 1224 break; 1225 1226 case "(?<=": 1227 break; 1228 1229 case "(?<!": 1230 break; 1231 1232 case opts.escapeChar: 1233 escaped = true; 1234 if (regexMask) { 1235 defaultCase(); 1236 } 1237 break; 1238 1239 case opts.optionalmarker[1]: 1240 case opts.groupmarker[1]: 1241 openingToken = openenings.pop(); 1242 openingToken.openGroup = false;
1243 if (openingToken !== undefined) { 1244 if (openenings.length > 0) { 1245 currentOpeningToken = openenings[openenings.length - 1]; 1246 currentOpeningToken.matches.push(openingToken); 1247 if (currentOpeningToken.isAlternator) { 1248 alternator = openenings.pop(); 1249 for (var mndx = 0; mndx < alternator.matches.length; mndx++) { 1250 alternator.matches[mndx].isGroup = false; 1251 alternator.matches[mndx].alternatorGroup = false; 1252 } 1253 if (openenings.length > 0) { 1254 currentOpeningToken = openenings[openenings.length - 1]; 1255 currentOpeningToken.matches.push(alternator); 1256 } else { 1257 currentToken.matches.push(alternator); 1258 } 1259 } 1260 } else { 1261 currentToken.matches.push(openingToken); 1262 } 1263 } else defaultCase(); 1264 break; 1265 1266 case opts.optionalmarker[0]: 1267 openenings.push(new MaskToken(false, true)); 1268 break; 1269 1270 case opts.groupmarker[0]: 1271 openenings.push(new MaskToken(true)); 1272 break; 1273 1274 case opts.quantifiermarker[0]: 1275 var quantifier = new MaskToken(false, false, true); 1276 m = m.replace(/[{}]/g, ""); 1277 var mqj = m.split("|"), mq = mqj[0].split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = mq.length === 1 ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]); 1278 if (mq0 === "*" || mq0 === "+") { 1279 mq0 = mq1 === "*" ? 0 : 1; 1280 } 1281 quantifier.quantifier = { 1282 min: mq0, 1283 max: mq1, 1284 jit: mqj[1] 1285 }; 1286 var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches; 1287 match = matches.pop(); 1288 if (match.isAlternator) { 1289 matches.push(match); 1290 matches = match.matches; 1291 var groupToken = new MaskToken(true); 1292 var tmpMatch = matches.pop(); 1293 matches.push(groupToken); 1294 matches = groupToken.matches; 1295 match = tmpMatch; 1296 } 1297 if (!match.isGroup) { 1298 match = groupify([ match ]); 1299 } 1300 matches.push(match); 1301 matches.push(quantifier); 1302 break; 1303 1304 case opts.alternatormarker: 1305 var groupQuantifier = function groupQuantifier(matches) { 1306 var lastMatch = matches.pop(); 1307 if (lastMatch.isQuantifier) { 1308 lastMatch = groupify([ matches.pop(), lastMatch ]); 1309 } 1310 return lastMatch; 1311 }; 1312 if (openenings.length > 0) { 1313 currentOpeningToken = openenings[openenings.length - 1]; 1314 var subToken = currentOpeningToken.matches[currentOpeningToken.matches.length - 1]; 1315 if (currentOpeningToken.openGroup && (subToken.matches === undefined || subToken.isGroup === false && subToken.isAlternator === false)) { 1316 lastMatch = openenings.pop(); 1317 } else { 1318 lastMatch = groupQuantifier(currentOpeningToken.matches); 1319 } 1320 } else { 1321 lastMatch = groupQuantifier(currentToken.matches); 1322 } 1323 if (lastMatch.isAlternator) { 1324 openenings.push(lastMatch); 1325 } else { 1326 if (lastMatch.alternatorGroup) { 1327 alternator = openenings.pop(); 1328 lastMatch.alternatorGroup = false;
1329 } else { 1330 alternator = new MaskToken(false, false, false, true); 1331 } 1332 alternator.matches.push(lastMatch); 1333 openenings.push(alternator); 1334 if (lastMatch.openGroup) { 1335 lastMatch.openGroup = false; 1336 var alternatorGroup = new MaskToken(true); 1337 alternatorGroup.alternatorGroup = true; 1338 openenings.push(alternatorGroup); 1339 } 1340 } 1341 break; 1342 1343 default: 1344 defaultCase(); 1345 } 1346 } 1347 while (openenings.length > 0) { 1348 openingToken = openenings.pop(); 1349 currentToken.matches.push(openingToken); 1350 } 1351 if (currentToken.matches.length > 0) { 1352 verifyGroupMarker(currentToken); 1353 maskTokens.push(currentToken); 1354 } 1355 if (opts.numericInput || opts.isRTL) { 1356 reverseTokens(maskTokens[0]); 1357 } 1358 return maskTokens; 1359 } 1360 }; 1361 Inputmask.extendDefaults = function(options) { 1362 $.extend(true, Inputmask.prototype.defaults, options); 1363 }; 1364 Inputmask.extendDefinitions = function(definition) { 1365 $.extend(true, Inputmask.prototype.definitions, definition); 1366 }; 1367 Inputmask.extendAliases = function(alias) { 1368 $.extend(true, Inputmask.prototype.aliases, alias); 1369 }; 1370 Inputmask.format = function(value, options, metadata) { 1371 return Inputmask(options).format(value, metadata); 1372 }; 1373 Inputmask.unmask = function(value, options) { 1374 return Inputmask(options).unmaskedvalue(value); 1375 }; 1376 Inputmask.isValid = function(value, options) { 1377 return Inputmask(options).isValid(value); 1378 }; 1379 Inputmask.remove = function(elems) { 1380 if (typeof elems === "string") { 1381 elems = document.getElementById(elems) || document.querySelectorAll(elems); 1382 } 1383 elems = elems.nodeName ? [ elems ] : elems; 1384 $.each(elems, function(ndx, el) { 1385 if (el.inputmask) el.inputmask.remove(); 1386 }); 1387 }; 1388 Inputmask.setValue = function(elems, value) { 1389 if (typeof elems === "string") { 1390 elems = document.getElementById(elems) || document.querySelectorAll(elems); 1391 } 1392 elems = elems.nodeName ? [ elems ] : elems; 1393 $.each(elems, function(ndx, el) { 1394 if (el.inputmask) el.inputmask.setValue(value); else $(el).trigger("setvalue", [ value ]); 1395 }); 1396 }; 1397 Inputmask.escapeRegex = function(str) { 1398 var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ]; 1399 return str.replace(new RegExp("(\\" + specials.join("|\\") + ")", "gim"), "\\$1"); 1400 }; 1401 Inputmask.keyCode = { 1402 BACKSPACE: 8, 1403 BACKSPACE_SAFARI: 127, 1404 DELETE: 46, 1405 DOWN: 40, 1406 END: 35, 1407 ENTER: 13, 1408 ESCAPE: 27, 1409 HOME: 36, 1410 INSERT: 45, 1411 LEFT: 37, 1412 PAGE_DOWN: 34, 1413 PAGE_UP: 33, 1414 RIGHT: 39, 1415 SPACE: 32, 1416 TAB: 9, 1417 UP: 38, 1418 X: 88, 1419 CONTROL: 17 1420 }; 1421 Inputmask.dependencyLib = $; 1422 function resolveAlias(aliasStr, options, opts) { 1423 var aliasDefinition = Inputmask.prototype.aliases[aliasStr]; 1424 if (aliasDefinition) { 1425 if (aliasDefinition.alias) resolveAlias(aliasDefinition.alias, undefined, opts); 1426 $.extend(true, opts, aliasDefinition); 1427 $.extend(true, opts, options); 1428 return true; 1429 } else if (opts.mask === null) { 1430 opts.mask = aliasStr; 1431 } 1432 return false;
1433 } 1434 function generateMaskSet(opts, nocache) { 1435 function generateMask(mask, metadata, opts) { 1436 var regexMask = false; 1437 if (mask === null || mask === "") { 1438 regexMask = opts.regex !== null; 1439 if (regexMask) { 1440 mask = opts.regex; 1441 mask = mask.replace(/^(\^)(.*)(\$)$/, "$2"); 1442 } else { 1443 regexMask = true; 1444 mask = ".*"; 1445 } 1446 } 1447 if (mask.length === 1 && opts.greedy === false && opts.repeat !== 0) { 1448 opts.placeholder = ""; 1449 } 1450 if (opts.repeat > 0 || opts.repeat === "*" || opts.repeat === "+") { 1451 var repeatStart = opts.repeat === "*" ? 0 : opts.repeat === "+" ? 1 : opts.repeat; 1452 mask = opts.groupmarker[0] + mask + opts.groupmarker[1] + opts.quantifiermarker[0] + repeatStart + "," + opts.repeat + opts.quantifiermarker[1]; 1453 } 1454 var masksetDefinition, maskdefKey = regexMask ? "regex_" + opts.regex : opts.numericInput ? mask.split("").reverse().join("") : mask; 1455 if (Inputmask.prototype.masksCache[maskdefKey] === undefined || nocache === true) { 1456 masksetDefinition = { 1457 mask: mask, 1458 maskToken: Inputmask.prototype.analyseMask(mask, regexMask, opts), 1459 validPositions: {}, 1460 _buffer: undefined, 1461 buffer: undefined, 1462 tests: {}, 1463 excludes: {}, 1464 metadata: metadata, 1465 maskLength: undefined 1466 }; 1467 if (nocache !== true) { 1468 Inputmask.prototype.masksCache[maskdefKey] = masksetDefinition; 1469 masksetDefinition = $.extend(true, {}, Inputmask.prototype.masksCache[maskdefKey]); 1470 } 1471 } else masksetDefinition = $.extend(true, {}, Inputmask.prototype.masksCache[maskdefKey]); 1472 return masksetDefinition; 1473 } 1474 var ms; 1475 if ($.isFunction(opts.mask)) { 1476 opts.mask = opts.mask(opts); 1477 } 1478 if ($.isArray(opts.mask)) { 1479 if (opts.mask.length > 1) { 1480 if (opts.keepStatic === null) { 1481 opts.keepStatic = "auto"; 1482 for (var i = 0; i < opts.mask.length; i++) { 1483 if (opts.mask[i].charAt(0) !== opts.mask[0].charAt(0)) { 1484 opts.keepStatic = true; 1485 break; 1486 } 1487 } 1488 } 1489 var altMask = opts.groupmarker[0]; 1490 $.each(opts.isRTL ? opts.mask.reverse() : opts.mask, function(ndx, msk) { 1491 if (altMask.length > 1) { 1492 altMask += opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0]; 1493 } 1494 if (msk.mask !== undefined && !$.isFunction(msk.mask)) { 1495 altMask += msk.mask; 1496 } else { 1497 altMask += msk; 1498 } 1499 }); 1500 altMask += opts.groupmarker[1]; 1501 return generateMask(altMask, opts.mask, opts); 1502 } else opts.mask = opts.mask.pop(); 1503 } 1504 if (opts.mask && opts.mask.mask !== undefined && !$.isFunction(opts.mask.mask)) { 1505 ms = generateMask(opts.mask.mask, opts.mask, opts); 1506 } else { 1507 ms = generateMask(opts.mask, opts.mask, opts); 1508 } 1509 return ms; 1510 } 1511 function isInputEventSupported(eventName) { 1512 var el = document.createElement("input"), evName = "on" + eventName, isSupported = evName in el; 1513 if (!isSupported) { 1514 el.setAttribute(evName, "return;"); 1515 isSupported = typeof el[evName] === "function"; 1516 } 1517 el = null; 1518 return isSupported; 1519 } 1520 function maskScope(actionObj, maskset, opts) { 1521 maskset = maskset || this.maskset; 1522 opts = opts || this.opts; 1523 var inputmask = this, el = this.el, isRTL = this.isRTL, undoValue, $el, skipKeyPressEvent = false, skipInputEvent = false, ignorable = false, maxLength, mouseEnter = false, colorMask, originalPlaceholder; 1524 function getMaskTemplate(baseOnInput, minimalPos, includeMode, noJit, clearOptionalTail) { 1525 var greedy = opts.greedy; 1526 if (clearOptionalTail) opts.greedy = false;
1527 minimalPos = minimalPos || 0; 1528 var maskTemplate = [], ndxIntlzr, pos = 0, test, testPos, lvp = getLastValidPosition(); 1529 do { 1530 if (baseOnInput === true && getMaskSet().validPositions[pos]) { 1531 testPos = clearOptionalTail && getMaskSet().validPositions[pos].match.optionality === true && getMaskSet().validPositions[pos + 1] === undefined && (getMaskSet().validPositions[pos].generatedInput === true || getMaskSet().validPositions[pos].input == opts.skipOptionalPartCharacter && pos > 0) ? determineTestTemplate(pos, getTests(pos, ndxIntlzr, pos - 1)) : getMaskSet().validPositions[pos]; 1532 test = testPos.match; 1533 ndxIntlzr = testPos.locator.slice(); 1534 maskTemplate.push(includeMode === true ? testPos.input : includeMode === false ? test.nativeDef : getPlaceholder(pos, test)); 1535 } else { 1536 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 1537 test = testPos.match; 1538 ndxIntlzr = testPos.locator.slice(); 1539 var jitMasking = noJit === true ? false : opts.jitMasking !== false ? opts.jitMasking : test.jit; 1540 if (jitMasking === false || jitMasking === undefined || typeof jitMasking === "number" && isFinite(jitMasking) && jitMasking > pos) { 1541 maskTemplate.push(includeMode === false ? test.nativeDef : getPlaceholder(pos, test)); 1542 } 1543 } 1544 if (opts.keepStatic === "auto") { 1545 if (test.newBlockMarker && test.fn !== null) { 1546 opts.keepStatic = pos - 1; 1547 } 1548 } 1549 pos++; 1550 } while ((maxLength === undefined || pos < maxLength) && (test.fn !== null || test.def !== "") || minimalPos > pos); 1551 if (maskTemplate[maskTemplate.length - 1] === "") { 1552 maskTemplate.pop(); 1553 } 1554 if (includeMode !== false || getMaskSet().maskLength === undefined) getMaskSet().maskLength = pos - 1; 1555 opts.greedy = greedy; 1556 return maskTemplate; 1557 } 1558 function getMaskSet() { 1559 return maskset; 1560 } 1561 function resetMaskSet(soft) { 1562 var maskset = getMaskSet(); 1563 maskset.buffer = undefined; 1564 if (soft !== true) { 1565 maskset.validPositions = {}; 1566 maskset.p = 0; 1567 } 1568 } 1569 function getLastValidPosition(closestTo, strict, validPositions) { 1570 var before = -1, after = -1, valids = validPositions || getMaskSet().validPositions; 1571 if (closestTo === undefined) closestTo = -1; 1572 for (var posNdx in valids) { 1573 var psNdx = parseInt(posNdx); 1574 if (valids[psNdx] && (strict || valids[psNdx].generatedInput !== true)) { 1575 if (psNdx <= closestTo) before = psNdx; 1576 if (psNdx >= closestTo) after = psNdx; 1577 } 1578 } 1579 return before === -1 || before == closestTo ? after : after == -1 ? before : closestTo - before < after - closestTo ? before : after; 1580 } 1581 function getDecisionTaker(tst) { 1582 var decisionTaker = tst.locator[tst.alternation]; 1583 if (typeof decisionTaker == "string" && decisionTaker.length > 0) { 1584 decisionTaker = decisionTaker.split(",")[0]; 1585 } 1586 return decisionTaker !== undefined ? decisionTaker.toString() : ""; 1587 } 1588 function getLocator(tst, align) { 1589 var locator = (tst.alternation != undefined ? tst.mloc[getDecisionTaker(tst)] : tst.locator).join(""); 1590 if (locator !== "") while (locator.length < align) { 1591 locator += "0"; 1592 } 1593 return locator; 1594 } 1595 function determineTestTemplate(pos, tests) { 1596 pos = pos > 0 ? pos - 1 : 0;
1597 var altTest = getTest(pos), targetLocator = getLocator(altTest), tstLocator, closest, bestMatch; 1598 for (var ndx = 0; ndx < tests.length; ndx++) { 1599 var tst = tests[ndx]; 1600 tstLocator = getLocator(tst, targetLocator.length); 1601 var distance = Math.abs(tstLocator - targetLocator); 1602 if (closest === undefined || tstLocator !== "" && distance < closest || bestMatch && bestMatch.match.optionality && bestMatch.match.newBlockMarker === "master" && (!tst.match.optionality || !tst.match.newBlockMarker) || bestMatch && bestMatch.match.optionalQuantifier && !tst.match.optionalQuantifier) { 1603 closest = distance; 1604 bestMatch = tst; 1605 } 1606 } 1607 return bestMatch; 1608 } 1609 function getTestTemplate(pos, ndxIntlzr, tstPs) { 1610 return getMaskSet().validPositions[pos] || determineTestTemplate(pos, getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs)); 1611 } 1612 function getTest(pos, tests) { 1613 if (getMaskSet().validPositions[pos]) { 1614 return getMaskSet().validPositions[pos]; 1615 } 1616 return (tests || getTests(pos))[0]; 1617 } 1618 function positionCanMatchDefinition(pos, def) { 1619 var valid = false, tests = getTests(pos); 1620 for (var tndx = 0; tndx < tests.length; tndx++) { 1621 if (tests[tndx].match && tests[tndx].match.def === def) { 1622 valid = true; 1623 break; 1624 } 1625 } 1626 return valid; 1627 } 1628 function getTests(pos, ndxIntlzr, tstPs) { 1629 var maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr ? ndxIntlzr.slice() : [ 0 ], matches = [], insertStop = false, latestMatch, cacheDependency = ndxIntlzr ? ndxIntlzr.join("") : "", offset = 0; 1630 function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) { 1631 function handleMatch(match, loopNdx, quantifierRecurse) { 1632 function isFirstMatch(latestMatch, tokenGroup) { 1633 var firstMatch = $.inArray(latestMatch, tokenGroup.matches) === 0; 1634 if (!firstMatch) { 1635 $.each(tokenGroup.matches, function(ndx, match) { 1636 if (match.isQuantifier === true) firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]); else if (match.hasOwnProperty("matches")) firstMatch = isFirstMatch(latestMatch, match); 1637 if (firstMatch) return false; 1638 }); 1639 } 1640 return firstMatch; 1641 } 1642 function resolveNdxInitializer(pos, alternateNdx, targetAlternation) { 1643 var bestMatch, indexPos; 1644 if (getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) { 1645 $.each(getMaskSet().tests[pos] || [ getMaskSet().validPositions[pos] ], function(ndx, lmnt) { 1646 if (lmnt.mloc[alternateNdx]) { 1647 bestMatch = lmnt; 1648 return false; 1649 } 1650 var alternation = targetAlternation !== undefined ? targetAlternation : lmnt.alternation, ndxPos = lmnt.locator[alternation] !== undefined ? lmnt.locator[alternation].toString().indexOf(alternateNdx) : -1; 1651 if ((indexPos === undefined || ndxPos < indexPos) && ndxPos !== -1) { 1652 bestMatch = lmnt; 1653 indexPos = ndxPos; 1654 } 1655 }); 1656 } 1657 if (bestMatch) { 1658 var bestMatchAltIndex = bestMatch.locator[bestMatch.alternation]; 1659 var locator = bestMatch.mloc[alternateNdx] || bestMatch.mloc[bestMatchAltIndex] || bestMatch.locator; 1660 return locator.slice((targetAlternation !== undefined ? targetAlternation : bestMatch.alternation) + 1); 1661 } else { 1662 return targetAlternation !== undefined ? resolveNdxInitializer(pos, alternateNdx) : undefined; 1663 } 1664 } 1665 function isSubsetOf(source, target) { 1666 function expand(pattern) { 1667 var expanded = [], start, end; 1668 for (var i = 0, l = pattern.length; i < l; i++) { 1669 if (pattern.charAt(i) === "-") {
1670 end = pattern.charCodeAt(i + 1); 1671 while (++start < end) { 1672 expanded.push(String.fromCharCode(start)); 1673 } 1674 } else { 1675 start = pattern.charCodeAt(i); 1676 expanded.push(pattern.charAt(i)); 1677 } 1678 } 1679 return expanded.join(""); 1680 } 1681 if (opts.regex && source.match.fn !== null && target.match.fn !== null) { 1682 return expand(target.match.def.replace(/[\[\]]/g, "")).indexOf(expand(source.match.def.replace(/[\[\]]/g, ""))) !== -1; 1683 } 1684 return source.match.def === target.match.nativeDef; 1685 } 1686 function staticCanMatchDefinition(source, target) { 1687 var sloc = source.locator.slice(source.alternation).join(""), tloc = target.locator.slice(target.alternation).join(""), canMatch = sloc == tloc, canMatch = canMatch && source.match.fn === null && target.match.fn !== null ? target.match.fn.test(source.match.def, getMaskSet(), pos, false, opts, false) : false; 1688 return canMatch; 1689 } 1690 function setMergeLocators(targetMatch, altMatch) { 1691 if (altMatch === undefined || targetMatch.alternation === altMatch.alternation && targetMatch.locator[targetMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1) { 1692 targetMatch.mloc = targetMatch.mloc || {}; 1693 var locNdx = targetMatch.locator[targetMatch.alternation]; 1694 if (locNdx === undefined) targetMatch.alternation = undefined; else { 1695 if (typeof locNdx === "string") locNdx = locNdx.split(",")[0]; 1696 if (targetMatch.mloc[locNdx] === undefined) targetMatch.mloc[locNdx] = targetMatch.locator.slice(); 1697 if (altMatch !== undefined) { 1698 for (var ndx in altMatch.mloc) { 1699 if (typeof ndx === "string") ndx = ndx.split(",")[0]; 1700 if (targetMatch.mloc[ndx] === undefined) targetMatch.mloc[ndx] = altMatch.mloc[ndx]; 1701 } 1702 targetMatch.locator[targetMatch.alternation] = Object.keys(targetMatch.mloc).join(","); 1703 } 1704 return true; 1705 } 1706 } 1707 return false; 1708 } 1709 if (testPos > 500 && quantifierRecurse !== undefined) { 1710 throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask; 1711 } 1712 if (testPos === pos && match.matches === undefined) { 1713 matches.push({ 1714 match: match, 1715 locator: loopNdx.reverse(), 1716 cd: cacheDependency, 1717 mloc: {} 1718 }); 1719 return true; 1720 } else if (match.matches !== undefined) { 1721 if (match.isGroup && quantifierRecurse !== match) { 1722 match = handleMatch(maskToken.matches[$.inArray(match, maskToken.matches) + 1], loopNdx, quantifierRecurse); 1723 if (match) return true; 1724 } else if (match.isOptional) { 1725 var optionalToken = match; 1726 match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse); 1727 if (match) { 1728 $.each(matches, function(ndx, mtch) { 1729 mtch.match.optionality = true; 1730 }); 1731 latestMatch = matches[matches.length - 1].match; 1732 if (quantifierRecurse === undefined && isFirstMatch(latestMatch, optionalToken)) { 1733 insertStop = true; 1734 testPos = pos; 1735 } else return true; 1736 } 1737 } else if (match.isAlternator) { 1738 var alternateToken = match, malternateMatches = [], maltMatches, currentMatches = matches.slice(), loopNdxCnt = loopNdx.length; 1739 var altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1; 1740 if (altIndex === -1 || typeof altIndex === "string") { 1741 var currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = [], amndx; 1742 if (typeof altIndex == "string") { 1743 altIndexArr = altIndex.split(","); 1744 } else { 1745 for (amndx = 0;
1745 amndx < alternateToken.matches.length; amndx++) { 1746 altIndexArr.push(amndx.toString()); 1747 } 1748 } 1749 if (getMaskSet().excludes[pos]) { 1750 var altIndexArrClone = altIndexArr.slice(); 1751 for (var i = 0, el = getMaskSet().excludes[pos].length; i < el; i++) { 1752 altIndexArr.splice(altIndexArr.indexOf(getMaskSet().excludes[pos][i].toString()), 1); 1753 } 1754 if (altIndexArr.length === 0) { 1755 getMaskSet().excludes[pos] = undefined; 1756 altIndexArr = altIndexArrClone; 1757 } 1758 } 1759 if (opts.keepStatic === true || isFinite(parseInt(opts.keepStatic)) && currentPos >= opts.keepStatic) altIndexArr = altIndexArr.slice(0, 1); 1760 var unMatchedAlternation = false; 1761 for (var ndx = 0; ndx < altIndexArr.length; ndx++) { 1762 amndx = parseInt(altIndexArr[ndx]); 1763 matches = []; 1764 ndxInitializer = typeof altIndex === "string" ? resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice() : ndxInitializerClone.slice(); 1765 if (alternateToken.matches[amndx] && handleMatch(alternateToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse)) match = true; else if (ndx === 0) { 1766 unMatchedAlternation = true; 1767 } 1768 maltMatches = matches.slice(); 1769 testPos = currentPos; 1770 matches = []; 1771 for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) { 1772 var altMatch = maltMatches[ndx1], dropMatch = false; 1773 altMatch.match.jit = altMatch.match.jit || unMatchedAlternation; 1774 altMatch.alternation = altMatch.alternation || loopNdxCnt; 1775 setMergeLocators(altMatch); 1776 for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) { 1777 var altMatch2 = malternateMatches[ndx2]; 1778 if (typeof altIndex !== "string" || altMatch.alternation !== undefined && $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) { 1779 if (altMatch.match.nativeDef === altMatch2.match.nativeDef) { 1780 dropMatch = true; 1781 setMergeLocators(altMatch2, altMatch); 1782 break; 1783 } else if (isSubsetOf(altMatch, altMatch2)) { 1784 if (setMergeLocators(altMatch, altMatch2)) { 1785 dropMatch = true; 1786 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch); 1787 } 1788 break; 1789 } else if (isSubsetOf(altMatch2, altMatch)) { 1790 setMergeLocators(altMatch2, altMatch); 1791 break; 1792 } else if (staticCanMatchDefinition(altMatch, altMatch2)) { 1793 if (setMergeLocators(altMatch, altMatch2)) { 1794 dropMatch = true; 1795 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch); 1796 } 1797 break; 1798 } 1799 } 1800 } 1801 if (!dropMatch) { 1802 malternateMatches.push(altMatch); 1803 } 1804 } 1805 } 1806 matches = currentMatches.concat(malternateMatches); 1807 testPos = pos; 1808 insertStop = matches.length > 0; 1809 match = malternateMatches.length > 0; 1810 ndxInitializer = ndxInitializerClone.slice(); 1811 } else match = handleMatch(alternateToken.matches[altIndex] || maskToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse); 1812 if (match) return true; 1813 } else if (match.isQuantifier && quantifierRecurse !== maskToken.matches[$.inArray(match, maskToken.matches) - 1]) { 1814 var qt = match; 1815 for (var qndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && testPos <= pos; qndx++) { 1816 var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1]; 1817 match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), tokenGroup); 1818 if (match) { 1819 latestMatch = matches[matches.length - 1].match; 1820 latestMatch.optionalQuantifier = qndx > qt.quantifier.min - 1; 1821 latestMatch.jit = (qndx || 1) * tokenGroup.matches.indexOf(latestMatch) >= qt.quantifier.jit; 1822 if (latestMatch.optionalQuantifier && isFirstMatch(latestMatch, tokenGroup)) { 1823 insertStop = true; 1824 testPos = pos; 1825 break; 1826 } 1827 if (latestMatch.jit && !latestMatch.optionalQuantifier) { 1828 offset = tokenGroup.matches.indexOf(latestMatch); 1829 testPos = pos; 1830 insertStop = true; 1831 break; 1832 } 1833 return true; 1834 } 1835 } 1836 } else { 1837 match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse); 1838 if (match) return true; 1839 } 1840 } else { 1841 testPos++; 1842 } 1843 } 1844 for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx = tndx + 1 + offset) { 1845 offset = 0; 1846 if (maskToken.matches[tndx].isQuantifier !== true) { 1847 var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse); 1848 if (match && testPos === pos) { 1849 return match; 1850 } else if (testPos > pos) { 1851 break; 1852 } 1853 } 1854 } 1855 } 1856 function mergeLocators(pos, tests) { 1857 var locator = []; 1858 if (!$.isArray(tests)) tests = [ tests ]; 1859 if (tests.length > 0) { 1860 if (tests[0].alternation === undefined) { 1861 locator = determineTestTemplate(pos, tests.slice()).locator.slice(); 1862 if (locator.length === 0) locator = tests[0].locator.slice(); 1863 } else { 1864 $.each(tests, function(ndx, tst) { 1865 if (tst.def !== "") { 1866 if (locator.length === 0) locator = t
1866st.locator.slice(); else { 1867 for (var i = 0; i < locator.length; i++) { 1868 if (tst.locator[i] && locator[i].toString().indexOf(tst.locator[i]) === -1) { 1869 locator[i] += "," + tst.locator[i]; 1870 } 1871 } 1872 } 1873 } 1874 }); 1875 } 1876 } 1877 return locator; 1878 } 1879 if (pos > -1) { 1880 if (ndxIntlzr === undefined) { 1881 var previousPos = pos - 1, test; 1882 while ((test = getMaskSet().validPositions[previousPos] || getMaskSet().tests[previousPos]) === undefined && previousPos > -1) { 1883 previousPos--; 1884 } 1885 if (test !== undefined && previousPos > -1) { 1886 ndxInitializer = mergeLocators(previousPos, test); 1887 cacheDependency = ndxInitializer.join(""); 1888 testPos = previousPos; 1889 } 1890 } 1891 if (getMaskSet().tests[pos] && getMaskSet().tests[pos][0].cd === cacheDependency) { 1892 return getMaskSet().tests[pos]; 1893 } 1894 for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) { 1895 var match = resolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]); 1896 if (match && testPos === pos || testPos > pos) { 1897 break; 1898 } 1899 } 1900 } 1901 if (matches.length === 0 || insertStop) { 1902 matches.push({ 1903 match: { 1904 fn: null, 1905 optionality: false, 1906 casing: null, 1907 def: "", 1908 placeholder: "" 1909 }, 1910 locator: [], 1911 mloc: {}, 1912 cd: cacheDependency 1913 }); 1914 } 1915 if (ndxIntlzr !== undefined && getMaskSet().tests[pos]) { 1916 return $.extend(true, [], matches); 1917 } 1918 getMaskSet().tests[pos] = $.extend(true, [], matches); 1919 return getMaskSet().tests[pos]; 1920 } 1921 function getBufferTemplate() { 1922 if (getMaskSet()._buffer === undefined) { 1923 getMaskSet()._buffer = getMaskTemplate(false, 1); 1924 if (getMaskSet().buffer === undefined) getMaskSet().buffer = getMaskSet()._buffer.slice(); 1925 } 1926 return getMaskSet()._buffer; 1927 } 1928 function getBuffer(noCache) { 1929 if (getMaskSet().buffer === undefined || noCache === true) { 1930 getMaskSet().buffer = getMaskTemplate(true, getLastValidPosition(), true); 1931 } 1932 return getMaskSet().buffer; 1933 } 1934 function refreshFromBuffer(start, end, buffer) { 1935 var i, p; 1936 if (start === true) { 1937 resetMaskSet(); 1938 start = 0; 1939 end = buffer.length; 1940 } else { 1941 for (i = start; i < end; i++) { 1942 delete getMaskSet().validPositions[i]; 1943 } 1944 } 1945 p = start; 1946 for (i = start; i < end; i++) { 1947 resetMaskSet(true); 1948 if (buffer[i] !== opts.skipOptionalPartCharacter) { 1949 var valResult = isValid(p, buffer[i], true, true); 1950 if (valResult !== false) { 1951 resetMaskSet(true); 1952 p = valResult.caret !== undefined ? valResult.caret : valResult.pos + 1; 1953 } 1954 } 1955 } 1956 } 1957 function casing(elem, test, pos) { 1958 switch (opts.casing || test.casing) { 1959 case "upper": 1960 elem = elem.toUpperCase(); 1961 break; 1962 1963 case "lower": 1964 elem = elem.toLowerCase(); 1965 break; 1966 1967 case "title": 1968 var posBefore = getMaskSet().validPositions[pos - 1]; 1969 if (pos === 0 || posBefore && posBefore.input === String.fromCharCode(Inputmask.keyCode.SPACE)) { 1970 elem = elem.toUpperCase(); 1971 } else { 1972 elem = elem.toLowerCase(); 1973 } 1974 break; 1975 1976 default: 1977 if ($.isFunction(opts.casing)) { 1978 var args = Array.prototype.slice.call(arguments); 1979 args.push(getMaskSet().validPositions); 1980 elem = opts.casing.apply(this, args); 1981 } 1982 } 1983 return elem; 1984 } 1985 function checkAlternationMatch(altArr1, altArr2, na) { 1986 var altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = false, naArr = na !== undefined ? na.split(",") : [], naNdx; 1987 for (var i = 0; i < naArr.length; i++) { 1988 if ((naNdx = altArr1.indexOf(naArr[i])) !== -1) { 1989 altArr1.splice(naNdx, 1); 1990 } 1991 } 1992 for (var alndx = 0; alndx < altArr1.length; alndx++) { 1993 if ($.inArray(altArr1[alndx], altArrC) !== -1) { 1994 isMatch = true; 1995 break; 1996 } 1997 } 1998 return isMatch; 1999 } 2000 function alternate(pos, c, strict, fromSetValid, rAltPos) {
2001 var validPsClone = $.extend(true, {}, getMaskSet().validPositions), lastAlt, alternation, isValidRslt = false, altPos, prevAltPos, i, validPos, decisionPos, lAltPos = rAltPos !== undefined ? rAltPos : getLastValidPosition(); 2002 if (lAltPos === -1 && rAltPos === undefined) { 2003 lastAlt = 0; 2004 prevAltPos = getTest(lastAlt); 2005 alternation = prevAltPos.alternation; 2006 } else { 2007 for (;lAltPos >= 0; lAltPos--) { 2008 altPos = getMaskSet().validPositions[lAltPos]; 2009 if (altPos && altPos.alternation !== undefined) { 2010 if (prevAltPos && prevAltPos.locator[altPos.alternation] !== altPos.locator[altPos.alternation]) { 2011 break; 2012 } 2013 lastAlt = lAltPos; 2014 alternation = getMaskSet().validPositions[lastAlt].alternation; 2015 prevAltPos = altPos; 2016 } 2017 } 2018 } 2019 if (alternation !== undefined) { 2020 decisionPos = parseInt(lastAlt); 2021 getMaskSet().excludes[decisionPos] = getMaskSet().excludes[decisionPos] || []; 2022 if (pos !== true) { 2023 getMaskSet().excludes[decisionPos].push(getDecisionTaker(prevAltPos)); 2024 } 2025 var validInputsClone = [], staticInputsBeforePos = 0; 2026 for (i = decisionPos; i < getLastValidPosition(undefined, true) + 1; i++) { 2027 validPos = getMaskSet().validPositions[i]; 2028 if (validPos && validPos.generatedInput !== true) { 2029 validInputsClone.push(validPos.input); 2030 } else if (i < pos) staticInputsBeforePos++; 2031 delete getMaskSet().validPositions[i]; 2032 } 2033 while (getMaskSet().excludes[decisionPos] && getMaskSet().excludes[decisionPos].length < 10) { 2034 var posOffset = staticInputsBeforePos * -1, validInputs = validInputsClone.slice(); 2035 getMaskSet().tests[decisionPos] = undefined; 2036 resetMaskSet(true); 2037 isValidRslt = true; 2038 while (validInputs.length > 0) { 2039 var input = validInputs.shift(); 2040 if (!(isValidRslt = isValid(getLastValidPosition(undefined, true) + 1, input, false, fromSetValid, true))) { 2041 break; 2042 } 2043 } 2044 if (isValidRslt && c !== undefined) { 2045 var targetLvp = getLastValidPosition(pos) + 1; 2046 for (i = decisionPos; i < getLastValidPosition() + 1; i++) { 2047 validPos = getMaskSet().validPositions[i]; 2048 if ((validPos === undefined || validPos.match.fn == null) && i < pos + posOffset) { 2049 posOffset++; 2050 } 2051 } 2052 pos = pos + posOffset; 2053 isValidRslt = isValid(pos > targetLvp ? targetLvp : pos, c, strict, fromSetValid, true); 2054 } 2055 if (!isValidRslt) { 2056 resetMaskSet(); 2057 prevAltPos = getTest(decisionPos); 2058 getMaskSet().validPositions = $.extend(true, {}, validPsClone); 2059 if (getMaskSet().excludes[decisionPos]) { 2060 var decisionTaker = getDecisionTaker(prevAltPos); 2061 if (getMaskSet().excludes[decisionPos].indexOf(decisionTaker) !== -1) { 2062 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 2063 break; 2064 } 2065 getMaskSet().excludes[decisionPos].push(decisionTaker); 2066 for (i = decisionPos; i < getLastValidPosition(undefined, true) + 1; i++) { 2067 delete getMaskSet().validPositions[i]; 2068 } 2069 } else { 2070 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 2071 break; 2072 } 2073 } else break; 2074 } 2075 } 2076 getMaskSet().excludes[decisionPos] = undefined; 2077 return isValidRslt; 2078 } 2079 function isValid(pos, c, strict, fromSetValid, fromAlternate, validateOnly) { 2080 function isSelection(posObj) { 2081 return isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end === 1 : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin === 1; 2082 }
2083 strict = strict === true; 2084 var maskPos = pos; 2085 if (pos.begin !== undefined) { 2086 maskPos = isRTL ? pos.end : pos.begin; 2087 } 2088 function _isValid(position, c, strict) { 2089 var rslt = false; 2090 $.each(getTests(position), function(ndx, tst) { 2091 var test = tst.match; 2092 getBuffer(true); 2093 rslt = test.fn != null ? test.fn.test(c, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && test.def !== "" ? { 2094 c: getPlaceholder(position, test, true) || test.def, 2095 pos: position 2096 } : false; 2097 if (rslt !== false) { 2098 var elem = rslt.c !== undefined ? rslt.c : c, validatedPos = position; 2099 elem = elem === opts.skipOptionalPartCharacter && test.fn === null ? getPlaceholder(position, test, true) || test.def : elem; 2100 if (rslt.remove !== undefined) { 2101 if (!$.isArray(rslt.remove)) rslt.remove = [ rslt.remove ]; 2102 $.each(rslt.remove.sort(function(a, b) { 2103 return b - a; 2104 }), function(ndx, lmnt) { 2105 revalidateMask({ 2106 begin: lmnt, 2107 end: lmnt + 1 2108 }); 2109 }); 2110 } 2111 if (rslt.insert !== undefined) { 2112 if (!$.isArray(rslt.insert)) rslt.insert = [ rslt.insert ]; 2113 $.each(rslt.insert.sort(function(a, b) { 2114 return a - b; 2115 }), function(ndx, lmnt) { 2116 isValid(lmnt.pos, lmnt.c, true, fromSetValid); 2117 }); 2118 } 2119 if (rslt !== true && rslt.pos !== undefined && rslt.pos !== position) { 2120 validatedPos = rslt.pos; 2121 } 2122 if (rslt !== true && rslt.pos === undefined && rslt.c === undefined) { 2123 return false; 2124 } 2125 if (!revalidateMask(pos, $.extend({}, tst, { 2126 input: casing(elem, test, validatedPos) 2127 }), fromSetValid, validatedPos)) { 2128 rslt = false; 2129 } 2130 return false; 2131 } 2132 }); 2133 return rslt; 2134 } 2135 var result = true, positionsClone = $.extend(true, {}, getMaskSet().validPositions); 2136 if ($.isFunction(opts.preValidation) && !strict && fromSetValid !== true && validateOnly !== true) { 2137 result = opts.preValidation(getBuffer(), maskPos, c, isSelection(pos), opts, getMaskSet()); 2138 } 2139 if (result === true) { 2140 trackbackPositions(undefined, maskPos, true); 2141 if (maxLength === undefined || maskPos < maxLength) { 2142 result = _isValid(maskPos, c, strict); 2143 if ((!strict || fromSetValid === true) && result === false && validateOnly !== true) { 2144 var currentPosValid = getMaskSet().validPositions[maskPos]; 2145 if (currentPosValid && currentPosValid.match.fn === null && (currentPosValid.match.def === c || c === opts.skipOptionalPartCharacter)) { 2146 result = { 2147 caret: seekNext(maskPos) 2148 }; 2149 } else if ((opts.insertMode || getMaskSet().validPositions[seekNext(maskPos)] === undefined) && !isMask(maskPos, true)) { 2150 for (var nPos = maskPos + 1, snPos = seekNext(maskPos); nPos <= snPos; nPos++) { 2151 result = _isValid(nPos, c, strict); 2152 if (result !== false) { 2153 result = trackbackPositions(maskPos, result.pos !== undefined ? result.pos : nPos) || result; 2154 maskPos = nPos; 2155 break; 2156 } 2157 } 2158 } 2159 } 2160 } 2161 if (result === false && opts.keepStatic !== false && (opts.regex == null || isComplete(getBuffer())) && !strict && fromAlternate !== true) { 2162 result = alternate(maskPos, c, strict, fromSetValid); 2163 } 2164 if (result === true) { 2165 result = { 2166 pos: maskPos 2167 }; 2168 } 2169 } 2170 if ($.isFunction(opts.postValidation) && result !== false && !strict && fromSetValid !== true && validateOnly !== true) { 2171 var postResult = opts.postValidation(getBuffer(true), pos.begin !== undefined ? isRTL ? pos.end : pos.begin : pos, result, opts); 2172 if (postResult !== undefined) { 2173 if (postResult.refreshFromBuffer && postResult.buffer) { 2174 var refresh = postResult.refreshFromBuffer; 2175 refreshFromBuffer(refresh === true ? refresh : refresh.start, refresh.end, postResult.buffer); 2176 } 2177 result = postResult === true ? result : postResult; 2178 } 2179 } 2180 if (result && result.pos === undefined) { 2181 result.pos = maskPos; 2182 } 2183 if (result === false || validateOnly === true) { 2184 resetMaskSet(true); 2185 getMaskSet().validPositions = $.extend(true, {}, positionsClone); 2186 } 2187 return result; 2188 } 2189 function trackbackPositions(originalPos, newPos, fillOnly) { 2190 var result; 2191 if (originalPos === undefined) { 2192 for (originalPos = newPos - 1; originalPos > 0; originalPos--) { 2193 if (getMaskSet().validPositions[originalPos]) break; 2194 } 2195 } 2196 for (var ps = originalPos; ps < newPos; ps++) { 2197 if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, true)) { 2198 var vp = ps == 0 ? getTest(ps) : getMaskSet().validPositions[ps - 1]; 2199 if (vp) { 2200 var tests = getTests(ps).slice(); 2201 if (tests[tests.length - 1].match.def === "") tests.pop(); 2202 var bestMatch = determineTestTemplate(ps, tests); 2203 bestMatch = $.extend({}, bestMatch, { 2204 input: getPlaceholder(ps, bestMatch.match, true) || bestMatch.match.def 2205 }); 2206 bestMatch.generatedInput = true; 2207 revalidateMask(ps, bestMatch, true); 2208 if (fillOnly !== true) { 2209 var cvpInput = getMaskSet().validPositions[newPos].input; 2210 getMaskSet().validPositions[newPos] = undefined; 2211 result = isValid(newPos, cvpInput, true, true); 2212 } 2213 } 2214 } 2215 } 2216 return result; 2217 } 2218 function revalidateMask(pos, validTest, fromSetValid, validatedPos) { 2219 function IsEnclosedStatic(pos, valids, selection) { 2220 var posMatch = valids[pos]; 2221 if (posMatch !== undefined && (posMatch.match.fn === null && posMatch.match.optionality !== true || posMatch.input === opts.radixPoint)) { 2222 var prevMatch = selection.begin <= pos - 1 ? valids[pos - 1] && valids[pos - 1].match.fn === null && valids[pos - 1] : valids[pos - 1], nextMatch = selection.end > pos + 1 ? valids[pos + 1] && valids[pos + 1].match.fn === null && valids[pos + 1] : valids[pos + 1]; 2223 return prevMatch && nextMatch; 2224 } 2225 return false;
2226 } 2227 var begin = pos.begin !== undefined ? pos.begin : pos, end = pos.end !== undefined ? pos.end : pos; 2228 if (pos.begin > pos.end) { 2229 begin = pos.end; 2230 end = pos.begin; 2231 } 2232 validatedPos = validatedPos !== undefined ? validatedPos : begin; 2233 if (begin !== end || opts.insertMode && getMaskSet().validPositions[validatedPos] !== undefined && fromSetValid === undefined) { 2234 var positionsClone = $.extend(true, {}, getMaskSet().validPositions), lvp = getLastValidPosition(undefined, true), i; 2235 getMaskSet().p = begin; 2236 for (i = lvp; i >= begin; i--) { 2237 if (getMaskSet().validPositions[i] && getMaskSet().validPositions[i].match.nativeDef === "+") { 2238 opts.isNegative = false; 2239 } 2240 delete getMaskSet().validPositions[i]; 2241 } 2242 var valid = true, j = validatedPos, vps = getMaskSet().validPositions, needsValidation = false, posMatch = j, i = j; 2243 if (validTest) { 2244 getMaskSet().validPositions[validatedPos] = $.extend(true, {}, validTest); 2245 posMatch++; 2246 j++; 2247 if (begin < end) i++; 2248 } 2249 for (;i <= lvp; i++) { 2250 var t = positionsClone[i]; 2251 if (t !== undefined && (i >= end || i >= begin && t.generatedInput !== true && IsEnclosedStatic(i, positionsClone, { 2252 begin: begin, 2253 end: end 2254 }))) { 2255 while (getTest(posMatch).match.def !== "") { 2256 if (needsValidation === false && positionsClone[posMatch] && positionsClone[posMatch].match.nativeDef === t.match.nativeDef) { 2257 getMaskSet().validPositions[posMatch] = $.extend(true, {}, positionsClone[posMatch]); 2258 getMaskSet().validPositions[posMatch].input = t.input; 2259 trackbackPositions(undefined, posMatch, true); 2260 j = posMatch + 1; 2261 valid = true; 2262 } else if (positionCanMatchDefinition(posMatch, t.match.def)) { 2263 var result = isValid(posMatch, t.input, true, true); 2264 valid = result !== false; 2265 j = result.caret || result.insert ? getLastValidPosition() : posMatch + 1; 2266 needsValidation = true; 2267 } else { 2268 valid = t.generatedInput === true || t.input === opts.radixPoint && opts.numericInput === true; 2269 } 2270 if (valid) break; 2271 if (!valid && posMatch > end && isMask(posMatch, true) && (t.match.fn !== null || posMatch > getMaskSet().maskLength)) { 2272 break; 2273 } 2274 posMatch++; 2275 } 2276 if (getTest(posMatch).match.def == "") valid = false; 2277 posMatch = j; 2278 } 2279 if (!valid) break; 2280 } 2281 if (!valid) { 2282 getMaskSet().validPositions = $.extend(true, {}, positionsClone); 2283 resetMaskSet(true); 2284 return false; 2285 } 2286 } else if (validTest) { 2287 getMaskSet().validPositions[validatedPos] = $.extend(true, {}, validTest); 2288 } 2289 resetMaskSet(true); 2290 return true; 2291 } 2292 function isMask(pos, strict) { 2293 var test = getTestTemplate(pos).match; 2294 if (test.def === "") test = getTest(pos).match; 2295 if (test.fn != null) { 2296 return test.fn; 2297 } 2298 if (strict !== true && pos > -1) { 2299 var tests = getTests(pos); 2300 return tests.length > 1 + (tests[tests.length - 1].match.def === "" ? 1 : 0); 2301 } 2302 return false;
2303 } 2304 function seekNext(pos, newBlock) { 2305 var position = pos + 1; 2306 while (getTest(position).match.def !== "" && (newBlock === true && (getTest(position).match.newBlockMarker !== true || !isMask(position)) || newBlock !== true && !isMask(position))) { 2307 position++; 2308 } 2309 return position; 2310 } 2311 function seekPrevious(pos, newBlock) { 2312 var position = pos, tests; 2313 if (position <= 0) return 0; 2314 while (--position > 0 && (newBlock === true && getTest(position).match.newBlockMarker !== true || newBlock !== true && !isMask(position) && (tests = getTests(position), 2315 tests.length < 2 || tests.length === 2 && tests[1].match.def === ""))) {} 2316 return position; 2317 } 2318 function getBufferElement(position) { 2319 return getMaskSet().validPositions[position] === undefined ? getPlaceholder(position) : getMaskSet().val
2319idPositions[position].input; 2320 } 2321 function writeBuffer(input, buffer, caretPos, event, triggerEvents) { 2322 if (event && $.isFunction(opts.onBeforeWrite)) { 2323 var result = opts.onBeforeWrite.call(inputmask, event, buffer, caretPos, opts); 2324 if (result) { 2325 if (result.refreshFromBuffer) { 2326 var refresh = result.refreshFromBuffer; 2327 refreshFromBuffer(refresh === true ? refresh : refresh.start, refresh.end, result.buffer || buffer); 2328 buffer = getBuffer(true); 2329 } 2330 if (caretPos !== undefined) caretPos = result.caret !== undefined ? result.caret : caretPos; 2331 } 2332 } 2333 if (input !== undefined) { 2334 input.inputmask._valueSet(buffer.join("")); 2335 if (caretPos !== undefined && (event === undefined || event.type !== "blur")) { 2336 caret(input, caretPos); 2337 } else renderColorMask(input, caretPos, buffer.length === 0); 2338 if (triggerEvents === true) { 2339 var $input = $(input), nptVal = input.inputmask._valueGet(); 2340 skipInputEvent = true; 2341 $input.trigger("input"); 2342 setTimeout(function() { 2343 if (nptVal === getBufferTemplate().join("")) { 2344 $input.trigger("cleared"); 2345 } else if (isComplete(buffer) === true) { 2346 $input.trigger("complete"); 2347 } 2348 }, 0); 2349 } 2350 } 2351 } 2352 function getPlaceholder(pos, test, returnPL) { 2353 test = test || getTest(pos).match; 2354 if (test.placeholder !== undefined || returnPL === true) { 2355 return $.isFunction(test.placeholder) ? test.placeholder(opts) : test.placeholder; 2356 } else if (test.fn === null) { 2357 if (pos > -1 && getMaskSet().validPositions[pos] === undefined) { 2358 var tests = getTests(pos), staticAlternations = [], prevTest; 2359 if (tests.length > 1 + (tests[tests.length - 1].match.def === "" ? 1 : 0)) { 2360 for (var i = 0; i < tests.length; i++) { 2361 if (tests[i].match.optionality !== true && tests[i].match.optionalQuantifier !== true && (tests[i].match.fn === null || prevTest === undefined || tests[i].match.fn.test(prevTest.match.def, getMaskSet(), pos, true, opts) !== false)) { 2362 staticAlternations.push(tests[i]); 2363 if (tests[i].match.fn === null) prevTest = tests[i]; 2364 if (staticAlternations.length > 1) { 2365 if (/[0-9a-bA-Z]/.test(staticAlternations[0].match.def)) { 2366 return opts.placeholder.charAt(pos % opts.placeholder.length); 2367 } 2368 } 2369 } 2370 } 2371 } 2372 } 2373 return test.def; 2374 } 2375 return opts.placeholder.charAt(pos % opts.placeholder.length); 2376 } 2377 var EventRuler = { 2378 on: function on(input, eventName, eventHandler) { 2379 var ev = function ev(e) { 2380 var that = this; 2381 if (that.inputmask === undefined && this.nodeName !== "FORM") { 2382 var imOpts = $.data(that, "_inputmask_opts"); 2383 if (imOpts) new Inputmask(imOpts).mask(that); else EventRuler.off(that); 2384 } else if (e.type !== "setvalue" && this.nodeName !== "FORM" && (that.disabled || that.readOnly && !(e.type === "keydown" && e.ctrlKey && e.keyCode === 67 || opts.tabThrough === false && e.keyCode === Inputmask.keyCode.TAB))) { 2385 e.preventDefault(); 2386 } else { 2387 switch (e.type) { 2388 case "input": 2389 if (skipInputEvent === true) { 2390 skipInputEvent = false;
2391 return e.preventDefault(); 2392 } 2393 if (mobile) { 2394 var args = arguments; 2395 setTimeout(function() { 2396 eventHandler.apply(that, args); 2397 caret(that, that.inputmask.caretPos, undefined, true); 2398 }, 0); 2399 return false; 2400 } 2401 break; 2402 2403 case "keydown": 2404 skipKeyPressEvent = false; 2405 skipInputEvent = false; 2406 break; 2407 2408 case "keypress": 2409 if (skipKeyPressEvent === true) { 2410 return e.preventDefault(); 2411 } 2412 skipKeyPressEvent = true; 2413 break; 2414 2415 case "click": 2416 if (iemobile || iphone) { 2417 var args = arguments; 2418 setTimeout(function() { 2419 eventHandler.apply(that, args); 2420 }, 0); 2421 return false; 2422 } 2423 break; 2424 } 2425 var returnVal = eventHandler.apply(that, arguments); 2426 if (returnVal === false) { 2427 e.preventDefault(); 2428 e.stopPropagation(); 2429 } 2430 return returnVal; 2431 } 2432 }; 2433 input.inputmask.events[eventName] = input.inputmask.events[eventName] || []; 2434 input.inputmask.events[eventName].push(ev); 2435 if ($.inArray(eventName, [ "submit", "reset" ]) !== -1) { 2436 if (input.form !== null) $(input.form).on(eventName, ev); 2437 } else { 2438 $(input).on(eventName, ev); 2439 } 2440 }, 2441 off: function off(input, event) { 2442 if (input.inputmask && input.inputmask.events) { 2443 var events; 2444 if (event) { 2445 events = []; 2446 events[event] = input.inputmask.events[event]; 2447 } else { 2448 events = input.inputmask.events; 2449 } 2450 $.each(events, function(eventName, evArr) { 2451 while (evArr.length > 0) { 2452 var ev = evArr.pop(); 2453 if ($.inArray(eventName, [ "submit", "reset" ]) !== -1) { 2454 if (input.form !== null) $(input.form).off(eventName, ev); 2455 } else { 2456 $(input).off(eventName, ev); 2457 } 2458 } 2459 delete input.inputmask.events[eventName]; 2460 }); 2461 } 2462 } 2463 }; 2464 var EventHandlers = { 2465 keydownEvent: function keydownEvent(e) { 2466 var input = this, $input = $(input), k = e.keyCode, pos = caret(input); 2467 if (k === Inputmask.keyCode.BACKSPACE || k === Inputmask.keyCode.DELETE || iphone && k === Inputmask.keyCode.BACKSPACE_SAFARI || e.ctrlKey && k === Inputmask.keyCode.X && !isInputEventSupported("cut")) { 2468 e.preventDefault(); 2469 handleRemove(input, k, pos); 2470 writeBuffer(input, getBuffer(true), getMaskSet().p, e, input.inputmask._valueGet() !== getBuffer().join("")); 2471 } else if (k === Inputmask.keyCode.END || k === Inputmask.keyCode.PAGE_DOWN) { 2472 e.preventDefault(); 2473 var caretPos = seekNext(getLastValidPosition()); 2474 caret(input, e.shiftKey ? pos.begin : caretPos, caretPos, true); 2475 } else if (k === Inputmask.keyCode.HOME && !e.shiftKey || k === Inputmask.keyCode.PAGE_UP) { 2476 e.preventDefault(); 2477 caret(input, 0, e.shiftKey ? pos.begin : 0, true); 2478 } else if ((opts.undoOnEscape && k === Inputmask.keyCode.ESCAPE || k === 90 && e.ctrlKey) && e.altKey !== true) { 2479 checkVal(input, true, false, undoValue.split("")); 2480 $input.trigger("click"); 2481 } else if (k === Inputmask.keyCode.INSERT && !(e.shiftKey || e.ctrlKey)) { 2482 opts.insertMode = !opts.insertMode; 2483 input.setAttribute("im-insert", opts.insertMode); 2484 } else if (opts.tabThrough === true && k === Inputmask.keyCode.TAB) { 2485 if (e.shiftKey === true) { 2486 if (getTest(pos.begin).match.fn === null) { 2487 pos.begin = seekNext(pos.begin); 2488 } 2489 pos.end = seekPrevious(pos.begin, true); 2490 pos.begin = seekPrevious(pos.end, true); 2491 } else { 2492 pos.begin = seekNext(pos.begin, true); 2493 pos.end = seekNext(pos.begin, true); 2494 if (pos.end < getMaskSet().maskLength) pos.end--; 2495 } 2496 if (pos.begin < getMaskSet().maskLength) { 2497 e.preventDefault(); 2498 caret(input, pos.begin, pos.end); 2499 } 2500 } 2501 opts.onKeyDown.call(this, e, getBuffer(), caret(input).begin, opts); 2502 ignorable = $.inArray(k, opts.ignorables) !== -1; 2503 }, 2504 keypressEvent: function keypressEvent(e, checkval, writeOut, strict, ndx) { 2505 var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode; 2506 if (checkval !== true && !(e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) { 2507 if (k === Inputmask.keyCode.ENTER && undoValue !== getBuffer().join("")) { 2508 undoValue = getBuffer().join(""); 2509 setTimeout(function() { 2510 $input.trigger("change"); 2511 }, 0); 2512 } 2513 return true; 2514 } else { 2515 if (k) { 2516 if (k === 46 && e.shiftKey === false && opts.radixPoint !== "") k = opts.radixPoint.charCodeAt(0); 2517 var pos = checkval ? { 2518 begin: ndx, 2519 end: ndx 2520 } : caret(input), forwardPosition, c = String.fromCharCode(k), offset = 0; 2521 if (opts._radixDance && opts.numericInput) { 2522 var caretPos = getBuffer().indexOf(opts.radixPoint.charAt(0)) + 1; 2523 if (pos.begin <= caretPos) { 2524 if (k === opts.radixPoint.charCodeAt(0)) offset = 1; 2525 pos.begin -= 1; 2526 pos.end -= 1; 2527 } 2528 } 2529 getMaskSet().writeOutBuffer = true; 2530 var valResult = isValid(pos, c, strict); 2531 if (valResult !== false) { 2532 resetMaskSet(true); 2533 forwardPosition = valResult.caret !== undefined ? valResult.caret : seekNext(valResult.pos.begin ? valResult.pos.begin : valResult.pos); 2534 getMaskSet().p = forwardPosition; 2535 } 2536 forwardPosition = (opts.numericInput && valResult.caret === undefined ? seekPrevious(forwardPosition) : forwardPosition) + offset; 2537 if (writeOut !== false) { 2538 setTimeout(function() { 2539 opts.onKeyValidation.call(input, k, valResult, opts); 2540 }, 0); 2541 if (getMaskSet().writeOutBuffer && valResult !== false) { 2542 var buffer = getBuffer(); 2543 writeBuffer(input, buffer, forwardPosition, e, checkval !== true); 2544 } 2545 } 2546 e.preventDefault(); 2547 if (checkval) { 2548 if (valResult !== false) valResult.forwardPosition = forwardPosition; 2549 return valResult; 2550 } 2551 } 2552 } 2553 }, 2554 pasteEvent: function pasteEvent(e) { 2555 var input = this, ev = e.originalEvent || e, $input = $(input), inputValue = input.inputmask._valueGet(true), caretPos = caret(input), tempValue; 2556 if (isRTL) { 2557 tempValue = caretPos.end; 2558 caretPos.end = caretPos.begin; 2559 caretPos.begin = tempValue; 2560 } 2561 var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length); 2562 if (valueBeforeCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(0, caretPos.begin).join("")) valueBeforeCaret = ""; 2563 if (valueAfterCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(caretPos.end).join("")) valueAfterCaret = ""; 2564 if (window.clipboardData && window.clipboardData.getData) { 2565 inputValue = valueBeforeCaret + window.clipboardData.getData("Text") + valueAfterCaret; 2566 } else if (ev.clipboardData && ev.clipboardData.getData) { 2567 inputValue = valueBeforeCaret + ev.clipboardData.getData("text/plain") + valueAfterCaret; 2568 } else return true; 2569 var pasteValue = inputValue; 2570 if ($.isFunction(opts.onBeforePaste)) { 2571 pasteValue = opts.onBeforePaste.call(inputmask, inputValue, opts); 2572 if (pasteValue === false) { 2573 return e.preventDefault(); 2574 } 2575 if (!pasteValue) { 2576 pasteValue = inputValue; 2577 } 2578 } 2579 checkVal(input, false, false, pasteValue.toString().split("")); 2580 writeBuffer(input, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join("")); 2581 return e.preventDefault(); 2582 }, 2583 inputFallBackEvent: function inputFallBackEvent(e) { 2584 function radixPointHandler(input, inputValue, caretPos) { 2585 if (inputValue.charAt(caretPos.begin - 1) === "." && opts.radixPoint !== "") { 2586 inputValue = inputValue.split(""); 2587 inputValue[caretPos.begin - 1] = opts.radixPoint.charAt(0); 2588 inputValue = inputValue.join(""); 2589 } 2590 return inputValue; 2591 } 2592 function ieMobileHandler(input, inputValue, caretPos) { 2593 if (iemobile) { 2594 var inputChar = inputValue.replace(getBuffer().join(""), ""); 2595 if (inputChar.length === 1) { 2596 var iv = inputValue.split(""); 2597 iv.splice(caretPos.begin, 0, inputChar); 2598 inputValue = iv.join(""); 2599 } 2600 } 2601 return inputValue; 2602 } 2603 var input = this, inputValue = input.inputmask._valueGet(); 2604 if (getBuffer().join("") !== inputValue) { 2605 var caretPos = caret(input); 2606 inputValue = radixPointHandler(input, inputValue, caretPos); 2607 inputValue = ieMobileHandler(input, inputValue, caretPos); 2608 if (getBuffer().join("") !== inputValue) { 2609 var buffer = getBuffer().join(""), offset = !opts.numericInput && inputValue.length > buffer.length ? -1 : 0, frontPart = inputValue.substr(0, caretPos.begin), backPart = inputValue.substr(caretPos.begin), frontBufferPart = buffer.substr(0, caretPos.begin + offset), backBufferPart = buffer.substr(caretPos.begin + offset); 2610 var selection = caretPos, entries = "", isEntry = false;
2611 if (frontPart !== frontBufferPart) { 2612 var fpl = (isEntry = frontPart.length >= frontBufferPart.length) ? frontPart.length : frontBufferPart.length, i; 2613 for (i = 0; frontPart.charAt(i) === frontBufferPart.charAt(i) && i < fpl; i++) {} 2614 if (isEntry) { 2615 selection.begin = i - offset; 2616 entries += frontPart.slice(i, selection.end); 2617 } 2618 } 2619 if (backPart !== backBufferPart) { 2620 if (backPart.length > backBufferPart.length) { 2621 entries += backPart.slice(0, 1); 2622 } else { 2623 if (backPart.length < backBufferPart.length) { 2624 selection.end += backBufferPart.length - backPart.length; 2625 if (!isEntry && opts.radixPoint !== "" && backPart === "" && frontPart.charAt(selection.begin + offset - 1) === opts.radixPoint) { 2626 selection.begin--; 2627 entries = opts.radixPoint; 2628 } 2629 } 2630 } 2631 } 2632 writeBuffer(input, getBuffer(), { 2633 begin: selection.begin + offset, 2634 end: selection.end + offset 2635 }); 2636 if (entries.length > 0) { 2637 $.each(entries.split(""), function(ndx, entry) { 2638 var keypress = new $.Event("keypress"); 2639 keypress.which = entry.charCodeAt(0); 2640 ignorable = false; 2641 EventHandlers.keypressEvent.call(input, keypress); 2642 }); 2643 } else { 2644 if (selection.begin === selection.end - 1) { 2645 selection.begin = seekPrevious(selection.begin + 1); 2646 if (selection.begin === selection.end - 1) { 2647 caret(input, selection.begin); 2648 } else { 2649 caret(input, selection.begin, selection.end); 2650 } 2651 } 2652 var keydown = new $.Event("keydown"); 2653 keydown.keyCode = opts.numericInput ? Inputmask.keyCode.BACKSPACE : Inputmask.keyCode.DELETE; 2654 EventHandlers.keydownEvent.call(input, keydown); 2655 } 2656 e.preventDefault(); 2657 } 2658 } 2659 }, 2660 beforeInputEvent: function beforeInputEvent(e) { 2661 if (e.cancelable) { 2662 var input = this; 2663 switch (e.inputType) { 2664 case "insertText": 2665 $.each(e.data.split(""), function(ndx, entry) { 2666 var keypress = new $.Event("keypress"); 2667 keypress.which = entry.charCodeAt(0); 2668 ignorable = false; 2669 EventHandlers.keypressEvent.call(input, keypress); 2670 }); 2671 return e.preventDefault(); 2672 2673 case "deleteContentBackward": 2674 var keydown = new $.Event("keydown"); 2675 keydown.keyCode = Inputmask.keyCode.BACKSPACE; 2676 EventHandlers.keydownEvent.call(input, keydown); 2677 return e.preventDefault(); 2678 2679 case "deleteContentForward":
2680 var keydown = new $.Event("keydown"); 2681 keydown.keyCode = Inputmask.keyCode.DELETE; 2682 EventHandlers.keydownEvent.call(input, keydown); 2683 return e.preventDefault(); 2684 } 2685 } 2686 }, 2687 setValueEvent: function setValueEvent(e) { 2688 this.inputmask.refreshValue = false; 2689 var input = this, value = e && e.detail ? e.detail[0] : arguments[1], value = value || input.inputmask._valueGet(true); 2690 if ($.isFunction(opts.onBeforeMask)) value = opts.onBeforeMask.call(inputmask, value, opts) || value; 2691 value = value.split(""); 2692 checkVal(input, true, false, value); 2693 undoValue = getBuffer().join(""); 2694 if ((opts.clearMaskOnLostFocus || opts.clearIncomplete) && input.inputmask._valueGet() === getBufferTemplate().join("")) { 2695 input.inputmask._valueSet(""); 2696 } 2697 }, 2698 focusEvent: function focusEvent(e) { 2699 var input = this, nptValue = input.inputmask._valueGet(); 2700 if (opts.showMaskOnFocus && (!opts.showMaskOnHover || opts.showMaskOnHover && nptValue === "")) { 2701 if (input.inputmask._valueGet() !== getBuffer().join("")) { 2702 writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())); 2703 } else if (mouseEnter === false) { 2704 caret(input, seekNext(getLastValidPosition())); 2705 } 2706 } 2707 if (opts.positionCaretOnTab === true && mouseEnter === false) { 2708 EventHandlers.clickEvent.apply(input, [ e, true ]); 2709 } 2710 undoValue = getBuffer().join(""); 2711 }, 2712 mouseleaveEvent: function mouseleaveEvent(e) { 2713 var input = this; 2714 mouseEnter = false; 2715 if (opts.clearMaskOnLostFocus && document.activeElement !== input) { 2716 input.placeholder = originalPlaceholder; 2717 if (input.placeholder === "") input.removeAttribute("placeholder"); 2718 } 2719 }, 2720 clickEvent: function clickEvent(e, tabbed) { 2721 function doRadixFocus(clickPos) { 2722 if (opts.radixPoint !== "") { 2723 var vps = getMaskSet().validPositions; 2724 if (vps[clickPos] === undefined || vps[clickPos].input === getPlaceholder(clickPos)) { 2725 if (clickPos < seekNext(-1)) return true; 2726 var radixPos = $.inArray(opts.radixPoint, getBuffer()); 2727 if (radixPos !== -1) { 2728 for (var vp in vps) { 2729 if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) { 2730 return false; 2731 } 2732 } 2733 return true; 2734 } 2735 } 2736 } 2737 return false; 2738 } 2739 var input = this; 2740 setTimeout(function() { 2741 if (document.activeElement === input) { 2742 var selectedCaret = caret(input); 2743 if (tabbed) { 2744 if (isRTL) { 2745 selectedCaret.end = selectedCaret.begin; 2746 } else { 2747 selectedCaret.begin = selectedCaret.end; 2748 } 2749 } 2750 if (selectedCaret.begin === selectedCaret.end) { 2751 switch (opts.positionCaretOnClick) { 2752 case "none": 2753 break; 2754 2755 case "select": 2756 caret(input, 0, getBuffer().length); 2757 break; 2758 2759 case "ignore": 2760 caret(input, seekNext(getLastValidPosition())); 2761 break; 2762 2763 case "radixFocus": 2764 if (doRadixFocus(selectedCaret.begin)) { 2765 var radixPos = getBuffer().join("").indexOf(opts.radixPoint); 2766 caret(input, opts.numericInput ? seekNext(radixPos) : radixPos); 2767 break; 2768 } 2769 2770 default: 2771 var clickPosition = selectedCaret.begin, lvclickPosition = getLastValidPosition(clickPosition, true), lastPosition = seekNext(lvclickPosition); 2772 if (clickPosition < lastPosition) { 2773 caret(input, !isMask(clickPosition, true) && !isMask(clickPosition - 1, true) ? seekNext(clickPosition) : clickPosition); 2774 } else { 2775 var lvp = getMaskSet().validPositions[lvclickPosition], tt = getTestTemplate(lastPosition, lvp ? lvp.match.locator : undefined, lvp), placeholder = getPlaceholder(lastPosition, tt.match); 2776 if (placeholder !== "" && getBuffer()[lastPosition] !== placeholder && tt.match.optionalQuantifier !== true && tt.match.newBlockMarker !== true || !isMask(lastPosition, opts.keepStatic) && tt.match.def === placeholder) { 2777 var newPos = seekNext(lastPosition); 2778 if (clickPosition >= newPos || clickPosition === lastPosition) { 2779 lastPosition = newPos; 2780 } 2781 } 2782 caret(input, lastPosition); 2783 } 2784 break; 2785 } 2786 } 2787 } 2788 }, 0); 2789 }, 2790 cutEvent: function cutEvent(e) { 2791 var input = this, $input = $(input), pos = caret(input), ev = e.originalEvent || e; 2792 var clipboardData = window.clipboardData || ev.clipboardData, clipData = isRTL ? getBuffer().slice(pos.end, pos.begin) : getBuffer().slice(pos.begin, pos.end); 2793 clipboardData.setData("text", isRTL ? clipData.reverse().join("") : clip
2793Data.join("")); 2794 if (document.execCommand) document.execCommand("copy"); 2795 handleRemove(input, Inputmask.keyCode.DELETE, pos); 2796 writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue !== getBuffer().join("")); 2797 }, 2798 blurEvent: function blurEvent(e) { 2799 var $input = $(this), input = this; 2800 if (input.inputmask) { 2801 input.placeholder = originalPlaceholder; 2802 if (input.placeholder === "") input.removeAttribute("placeholder"); 2803 var nptValue = input.inputmask._valueGet(), buffer = getBuffer().slice(); 2804 if (nptValue !== "" || colorMask !== undefined) { 2805 if (opts.clearMaskOnLostFocus) { 2806 if (getLastValidPosition() === -1 && nptValue === getBufferTemplate().join("")) { 2807 buffer = []; 2808 } else { 2809 clearOptionalTail(buffer); 2810 } 2811 } 2812 if (isComplete(buffer) === false) { 2813 setTimeout(function() { 2814 $input.trigger("incomplete"); 2815 }, 0); 2816 if (opts.clearIncomplete) { 2817 resetMaskSet(); 2818 if (opts.clearMaskOnLostFocus) { 2819 buffer = []; 2820 } else { 2821 buffer = getBufferTemplate().slice(); 2822 } 2823 } 2824 } 2825 writeBuffer(input, buffer, undefined, e); 2826 } 2827 if (undoValue !== getBuffer().join("")) { 2828 undoValue = buffer.join(""); 2829 $input.trigger("change"); 2830 } 2831 } 2832 }, 2833 mouseenterEvent: function mouseenterEvent(e) { 2834 var input = this; 2835 mouseEnter = true; 2836 if (document.activeElement !== input && opts.showMaskOnHover) { 2837 input.placeholder = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(""); 2838 } 2839 }, 2840 submitEvent: function submitEvent(e) { 2841 if (undoValue !== getBuffer().join("")) { 2842 $el.trigger("change"); 2843 } 2844 if (opts.clearMaskOnLostFocus && getLastValidPosition() === -1 && el.inputmask._valueGet && el.inputmask._valueGet() === getBufferTemplate().join("")) { 2845 el.inputmask._valueSet(""); 2846 } 2847 if (opts.clearIncomplete && isComplete(getBuffer()) === false) { 2848 el.inputmask._valueSet(""); 2849 } 2850 if (opts.removeMaskOnSubmit) { 2851 el.inputmask._valueSet(el.inputmask.unmaskedvalue(), true); 2852 setTimeout(function() { 2853 writeBuffer(el, getBuffer()); 2854 }, 0); 2855 } 2856 }, 2857 resetEvent: function resetEvent(e) { 2858 el.inputmask.refreshValue = true; 2859 setTimeout(function() { 2860 $el.trigger("setvalue"); 2861 }, 0); 2862 } 2863 }; 2864 function checkVal(input, writeOut, strict, nptvl, initiatingEvent) { 2865 var inputmask = this || input.inputmask, inputValue = nptvl.slice(), charCodes = "", initialNdx = -1, result = undefined; 2866 function isTemplateMatch(ndx, charCodes) { 2867 var charCodeNdx = getMaskTemplate(true, 0, false).slice(ndx, seekNext(ndx)).join("").replace(/'/g, "").indexOf(charCodes); 2868 return charCodeNdx !== -1 && !isMask(ndx) && (getTest(ndx).match.nativeDef === charCodes.charAt(0) || getTest(ndx).match.fn === null && getTest(ndx).match.nativeDef === "'" + charCodes.charAt(0) || getTest(ndx).match.nativeDef === " " && (getTest(ndx + 1).match.nativeDef === charCodes.charAt(0) || getTest(ndx + 1).match.fn === null && getTest(ndx + 1).match.nativeDef === "'" + charCodes.charAt(0))); 2869 } 2870 resetMaskSet(); 2871 if (!strict && opts.autoUnmask !== true) { 2872 var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(""), matches = inputValue.join("").match(new RegExp("^" + Inputmask.escapeRegex(staticInput), "g")); 2873 if (matches && matches.length > 0) { 2874 inputValue.splice(0, matches.length * staticInput.length); 2875 initialNdx = seekNext(initialNdx); 2876 } 2877 } else { 2878 initialNdx = seekNext(initialNdx); 2879 } 2880 if (initialNdx === -1) { 2881 getMaskSet().p = seekNext(initialNdx); 2882 initialNdx = 0; 2883 } else getMaskSet().p = initialNdx; 2884 inputmask.caretPos = { 2885 begin: initialNdx 2886 };
2887 $.each(inputValue, function(ndx, charCode) { 2888 if (charCode !== undefined) { 2889 if (getMaskSet().validPositions[ndx] === undefined && inputValue[ndx] === getPlaceholder(ndx) && isMask(ndx, true) && isValid(ndx, inputValue[ndx], true, undefined, undefined, true) === false) { 2890 getMaskSet().p++; 2891 } else { 2892 var keypress = new $.Event("_checkval"); 2893 keypress.which = charCode.charCodeAt(0); 2894 charCodes += charCode; 2895 var lvp = getLastValidPosition(undefined, true); 2896 if (!isTemplateMatch(initialNdx, charCodes)) { 2897 result = EventHandlers.keypressEvent.call(input, keypress, true, false, strict, inputmask.caretPos.begin); 2898 if (result) { 2899 initialNdx = inputmask.caretPos.begin + 1; 2900 charCodes = ""; 2901 } 2902 } else { 2903 result = EventHandlers.keypressEvent.call(input, keypress, true, false, strict, lvp + 1); 2904 } 2905 if (result) { 2906 writeBuffer(undefined, getBuffer(), result.forwardPosition, keypress, false); 2907 inputmask.caretPos = { 2908 begin: result.forwardPosition, 2909 end: result.forwardPosition 2910 }; 2911 } 2912 } 2913 } 2914 }); 2915 if (writeOut) writeBuffer(input, getBuffer(), result ? result.forwardPosition : undefined, initiatingEvent || new $.Event("checkval"), initiatingEvent && initiatingEvent.type === "input"); 2916 } 2917 function unmaskedvalue(input) { 2918 if (input) { 2919 if (input.inputmask === undefined) { 2920 return input.value; 2921 } 2922 if (input.inputmask && input.inputmask.refreshValue) { 2923 EventHandlers.setValueEvent.call(input); 2924 } 2925 } 2926 var umValue = [], vps = getMaskSet().validPositions; 2927 for (var pndx in vps) { 2928 if (vps[pndx].match && vps[pndx].match.fn != null) { 2929 umValue.push(vps[pndx].input); 2930 } 2931 } 2932 var unmaskedValue = umValue.length === 0 ? "" : (isRTL ? umValue.reverse() : umValue).join(""); 2933 if ($.isFunction(opts.onUnMask)) { 2934 var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(""); 2935 unmaskedValue = opts.onUnMask.call(inputmask, bufferValue, unmaskedValue, opts); 2936 } 2937 return unmaskedValue; 2938 } 2939 function caret(input, begin, end, notranslate) { 2940 function translatePosition(pos) { 2941 if (isRTL && typeof pos === "number" && (!opts.greedy || opts.placeholder !== "") && el) { 2942 pos = el.inputmask._valueGet().length - pos; 2943 } 2944 return pos; 2945 } 2946 var range; 2947 if (begin !== undefined) { 2948 if ($.isArray(begin)) { 2949 end = isRTL ? begin[0] : begin[1]; 2950 begin = isRTL ? begin[1] : begin[0]; 2951 } 2952 if (begin.begin !== undefined) { 2953 end = isRTL ? begin.begin : begin.end; 2954 begin = isRTL ? begin.end : begin.begin; 2955 } 2956 if (typeof begin === "number") { 2957 begin = notranslate ? begin : translatePosition(begin); 2958 end = notranslate ? end : translatePosition(end); 2959 end = typeof end == "number" ? end : begin; 2960 var scrollCalc = parseInt(((input.ownerDocument.defaultView || window).getComputedStyle ? (input.ownerDocument.defaultView || window).getComputedStyle(input, null) : input.currentStyle).fontSize) * end; 2961 input.scrollLeft = scrollCalc > input.scrollWidth ? scrollCalc : 0; 2962 input.inputmask.caretPos = { 2963 begin: begin, 2964 end: end 2965 }; 2966 if (input === document.activeElement) { 2967 if ("selectionStart" in input) { 2968 input.selectionStart = begin; 2969 input.selectionEnd = end; 2970 } else if (window.getSelection) { 2971 range = document.createRange(); 2972 if (input.firstChild === undefined || input.firstChild === null) { 2973 var textNode = document.createTextNode(""); 2974 input.appendChild(textNode); 2975 } 2976 range.setStart(input.firstChild, begin < input.inputmask._valueGet().length ? begin : input.inputmask._valueGet().length); 2977 range.setEnd(input.firstChild, end < input.inputmask._valueGet().length ? end : input.inputmask._valueGet().length); 2978 range.collapse(true); 2979 var sel = window.getSelection(); 2980 sel.removeAllRanges(); 2981 sel.addRange(range); 2982 } else if (input.createTextRange) { 2983 range = input.createTextRange(); 2984 range.collapse(true); 2985 range.moveEnd("character", end); 2986 range.moveStart("character", begin); 2987 range.select(); 2988 } 2989 renderColorMask(input, { 2990 begin: begin, 2991 end: end 2992 }); 2993 } 2994 } 2995 } else { 2996 if ("selectionStart" in input) { 2997 begin = input.selectionStart; 2998 end = input.selectionEnd; 2999 } else if (window.getSelection) { 3000 range = window.getSelection().getRangeAt(0); 3001 if (range.commonAncestorContainer.parentNode === input || range.commonAncestorContainer === input) { 3002 begin = range.startOffset; 3003 end = range.endOffset; 3004 } 3005 } else if (document.selection && document.selection.createRange) { 3006 range = document.selection.createRange(); 3007 begin = 0 - range.duplicate().moveStart("character", -input.inputmask._valueGet().length); 3008 end = begin + range.text.length; 3009 } 3010 return { 3011 begin: notranslate ? begin : translatePosition(begin), 3012 end: notranslate ? end : translatePosition(en
3012d) 3013 }; 3014 } 3015 } 3016 function determineLastRequiredPosition(returnDefinition) { 3017 var buffer = getMaskTemplate(true, getLastValidPosition(), true, true), bl = buffer.length, pos, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = lvTest !== undefined ? lvTest.locator.slice() : undefined, testPos; 3018 for (pos = lvp + 1; pos < buffer.length; pos++) { 3019 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 3020 ndxIntlzr = testPos.locator.slice(); 3021 positions[pos] = $.extend(true, {}, testPos); 3022 } 3023 var lvTestAlt = lvTest && lvTest.alternation !== undefined ? lvTest.locator[lvTest.alternation] : undefined; 3024 for (pos = bl - 1; pos > lvp; pos--) { 3025 testPos = positions[pos]; 3026 if ((testPos.match.optionality || testPos.match.optionalQuantifier && testPos.match.newBlockMarker || lvTestAlt && (lvTestAlt !== positions[pos].locator[lvTest.alternation] && testPos.match.fn != null || testPos.match.fn === null && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAlt.toString().split(",")) && getTests(pos)[0].def !== "")) && buffer[pos] === getPlaceholder(pos, testPos.match)) { 3027 bl--; 3028 } else break; 3029 } 3030 return returnDefinition ? { 3031 l: bl, 3032 def: positions[bl] ? positions[bl].match : undefined 3033 } : bl; 3034 } 3035 function clearOptionalTail(buffer) { 3036 buffer.length = 0; 3037 var template = getMaskTemplate(true, 0, true, undefined, true), lmnt, validPos; 3038 while (lmnt = template.shift(), lmnt !== undefined) { 3039 buffer.push(lmnt); 3040 } 3041 return buffer; 3042 } 3043 function isComplete(buffer) { 3044 if ($.isFunction(opts.isComplete)) return opts.isComplete(buffer, opts); 3045 if (opts.repeat === "*") return undefined; 3046 var complete = false, lrp = determineLastRequiredPosition(true), aml = seekPrevious(lrp.l); 3047 if (lrp.def === undefined || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) { 3048 complete = true; 3049 for (var i = 0; i <= aml; i++) { 3050 var test = getTestTemplate(i).match; 3051 if (test.fn !== null && getMaskSet().validPositions[i] === undefined && test.optionality !== true && test.optionalQuantifier !== true || test.fn === null && buffer[i] !== getPlaceholder(i, test)) { 3052 complete = false; 3053 break; 3054 } 3055 } 3056 } 3057 return complete; 3058 } 3059 function handleRemove(input, k, pos, strict, fromIsValid) { 3060 if (opts.numericInput || isRTL) { 3061 if (k === Inputmask.keyCode.BACKSPACE) { 3062 k = Inputmask.keyCode.DELETE; 3063 } else if (k === Inputmask.keyCode.DELETE) { 3064 k = Inputmask.keyCode.BACKSPACE; 3065 } 3066 if (isRTL) { 3067 var pend = pos.end; 3068 pos.end = pos.begin; 3069 pos.begin = pend; 3070 } 3071 } 3072 if (k === Inputmask.keyCode.BACKSPACE && pos.end - pos.begin < 1) { 3073 pos.begin = seekPrevious(pos.begin); 3074 if (getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator) { 3075 pos.begin--; 3076 } 3077 } else if (k === Inputmask.keyCode.DELETE && pos.begin === pos.end) { 3078 pos.end = isMask(pos.end, true) && getMaskSet().validPositions[pos.end] && getMaskSet().validPositions[pos.end].input !== opts.radixPoint ? pos.end + 1 : seekNext(pos.end) + 1; 3079 if (getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator) { 3080 pos.end++; 3081 } 3082 } 3083 revalidateMask(pos); 3084 if (strict !== true && opts.keepStatic !== false || opts.regex !== null) { 3085 var result = alternate(true); 3086 if (result) { 3087 var newPos = result.caret !== undefined ? result.caret : result.pos ? seekNext(result.pos.begin ? result.pos.begin : result.pos) : getLastValidPosition(-1, true); 3088 if (k !== Inputmask.keyCode.DELETE || pos.begin > newPos) { 3089 pos.begin == newPos; 3090 } 3091 } 3092 } 3093 var lvp = getLastValidPosition(pos.begin, true); 3094 if (lvp < pos.begin || pos.begin === -1) { 3095 getMaskSet().p = seekNext(lvp); 3096 } else if (strict !== true) { 3097 getMaskSet().p = pos.begin; 3098 if (fromIsValid !== true) { 3099 while (getMaskSet().p < lvp && getMaskSet().validPositions[getMaskSet().p] === undefined) { 3100 getMaskSet().p++; 3101 } 3102 } 3103 } 3104 } 3105 function initializeColorMask(input) { 3106 var computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null); 3107 function findCaretPos(clientx) { 3108 var e = document.createElement("span"), caretPos; 3109 for (var style in computedStyle) { 3110 if (isNaN(style) && style.indexOf("font") !== -1) { 3111 e.style[style] = computedStyle[style]; 3112 } 3113 } 3114 e.style.textTransform = computedStyle.textTransform; 3115 e.style.letterSpacing = computedStyle.letterSpacing; 3116 e.style.position = "absolute"; 3117 e.style.height = "auto"; 3118 e.style.width = "auto"; 3119 e.style.visibility = "hidden"; 3120 e.style.whiteSpace = "nowrap"; 3121 document.body.appendChild(e); 3122 var inputText = input.inputmask._valueGet(), previousWidth = 0, itl; 3123 for (caretPos = 0, itl = inputText.length; caretPos <= itl;
3123 caretPos++) { 3124 e.innerHTML += inputText.charAt(caretPos) || "_"; 3125 if (e.offsetWidth >= clientx) { 3126 var offset1 = clientx - previousWidth; 3127 var offset2 = e.offsetWidth - clientx; 3128 e.innerHTML = inputText.charAt(caretPos); 3129 offset1 -= e.offsetWidth / 3; 3130 caretPos = offset1 < offset2 ? caretPos - 1 : caretPos; 3131 break; 3132 } 3133 previousWidth = e.offsetWidth; 3134 } 3135 document.body.removeChild(e); 3136 return caretPos; 3137 } 3138 var template = document.createElement("div"); 3139 template.style.width = computedStyle.width; 3140 template.style.textAlign = computedStyle.textAlign; 3141 colorMask = document.createElement("div"); 3142 input.inputmask.colorMask = colorMask; 3143 colorMask.className = "im-colormask"; 3144 input.parentNode.insertBefore(colorMask, input); 3145 input.parentNode.removeChild(input); 3146 colorMask.appendChild(input); 3147 colorMask.appendChild(template); 3148 input.style.left = template.offsetLeft + "px"; 3149 $(colorMask).on("mouseleave", function(e) { 3150 return EventHandlers.mouseleaveEvent.call(input, [ e ]); 3151 }); 3152 $(colorMask).on("mouseenter", function(e) { 3153 return EventHandlers.mouseenterEvent.call(input, [ e ]); 3154 }); 3155 $(colorMask).on("click", function(e) { 3156 caret(input, findCaretPos(e.clientX)); 3157 return EventHandlers.clickEvent.call(input, [ e ]); 3158 }); 3159 } 3160 Inputmask.prototype.positionColorMask = function(input, template) { 3161 input.style.left = template.offsetLeft + "px"; 3162 }; 3163 function renderColorMask(input, caretPos, clear) { 3164 var maskTemplate = [], isStatic = false, test, testPos, ndxIntlzr, pos = 0; 3165 function setEntry(entry) { 3166 if (entry === undefined) entry = ""; 3167 if (!isStatic && (test.fn === null || testPos.input === undefined)) { 3168 isStatic = true; 3169 maskTemplate.push("<span class='im-static'>" + entry); 3170 } else if (isStatic && (test.fn !== null && testPos.input !== undefined || test.def === "")) { 3171 isStatic = false; 3172 var mtl = maskTemplate.length; 3173 maskTemplate[mtl - 1] = maskTemplate[mtl - 1] + "</span>"; 3174 maskTemplate.push(entry); 3175 } else maskTemplate.push(entry); 3176 } 3177 function setCaret() { 3178 if (document.activeElement === input) { 3179 maskTemplate.splice(caretPos.begin, 0, caretPos.begin === caretPos.end || caretPos.end > getMaskSet().maskLength ? '<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">' : '<mark class="im-caret-select">'); 3180 maskTemplate.splice(caretPos.end + 1, 0, "</mark>"); 3181 } 3182 } 3183 if (colorMask !== undefined) { 3184 var buffer = getBuffer(); 3185 if (caretPos === undefined) { 3186 caretPos = caret(input); 3187 } else if (caretPos.begin === undefined) { 3188 caretPos = { 3189 begin: caretPos, 3190 end: caretPos 3191 }; 3192 } 3193 if (clear !== true) { 3194 var lvp = getLastValidPosition(); 3195 do { 3196 if (getMaskSet().validPositions[pos]) { 3197 testPos = getMaskSet().validPositions[pos]; 3198 test = testPos.match; 3199 ndxIntlzr = testPos.locator.slice(); 3200 setEntry(buffer[pos]); 3201 } else { 3202 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 3203 test = testPos.match; 3204 ndxIntlzr = testPos.locator.slice(); 3205 if (opts.jitMasking === false || pos < lvp || typeof opts.jitMasking === "number" && isFinite(opts.jitMasking) && opts.jitMasking > pos) { 3206 setEntry(getPlaceholder(pos, test)); 3207 } else isStatic = false;
3208 } 3209 pos++; 3210 } while ((maxLength === undefined || pos < maxLength) && (test.fn !== null || test.def !== "") || lvp > pos || isStatic); 3211 if (isStatic) setEntry(); 3212 setCaret(); 3213 } 3214 var template = colorMask.getElementsByTagName("div")[0]; 3215 template.innerHTML = maskTemplate.join(""); 3216 input.inputmask.positionColorMask(input, template); 3217 } 3218 } 3219 function mask(elem) { 3220 function isElementTypeSupported(input, opts) { 3221 function patchValueProperty(npt) { 3222 var valueGet; 3223 var valueSet; 3224 function patchValhook(type) { 3225 if ($.valHooks && ($.valHooks[type] === undefined || $.valHooks[type].inputmaskpatch !== true)) { 3226 var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) { 3227 return elem.value; 3228 }; 3229 var valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) { 3230 elem.value = value; 3231 return elem; 3232 }; 3233 $.valHooks[type] = { 3234 get: function get(elem) { 3235 if (elem.inputmask) { 3236 if (elem.inputmask.opts.autoUnmask) { 3237 return elem.inputmask.unmaskedvalue(); 3238 } else { 3239 var result = valhookGet(elem); 3240 return getLastValidPosition(undefined, undefined, elem.inputmask.maskset.validPositions) !== -1 || opts.nullable !== true ? result : ""; 3241 } 3242 } else return valhookGet(elem); 3243 }, 3244 set: function set(elem, value) { 3245 var $elem = $(elem), result; 3246 result = valhookSet(elem, value); 3247 if (elem.inputmask) { 3248 $elem.trigger("setvalue", [ value ]); 3249 } 3250 return result; 3251 }, 3252 inputmaskpatch: true 3253 }; 3254 } 3255 } 3256 function getter() { 3257 if (this.inputmask) { 3258 return this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : getLastValidPosition() !== -1 || opts.nullable !== true ? document.activeElement === this && opts.clearMaskOnLostFocus ? (isRTL ? clearOptionalTail(getBuffer().slice()).reverse() : clearOptionalTail(getBuffer().slice())).join("") : valueGet.call(this) : ""; 3259 } else return valueGet.call(this); 3260 } 3261 function setter(value) { 3262 valueSet.call(this, value); 3263 if (this.inputmask) { 3264 $(this).trigger("setvalue", [ value ]); 3265 } 3266 } 3267 function installNativeValueSetFallback(npt) { 3268 EventRuler.on(npt, "mouseenter", function(event) { 3269 var $input = $(this), input = this, value = input.inputmask._valueGet(); 3270 if (value !== getBuffer().join("")) { 3271 $input.trigger("setvalue"); 3272 } 3273 }); 3274 } 3275 if (!npt.inputmask.__valueGet) { 3276 if (opts.noValuePatching !== true) { 3277 if (Object.getOwnPropertyDescriptor) { 3278 if (typeof Object.getPrototypeOf
3278!== "function") { 3279 Object.getPrototypeOf = _typeof("test".__proto__) === "object" ? function(object) { 3280 return object.__proto__; 3281 } : function(object) { 3282 return object.constructor.prototype; 3283 }; 3284 } 3285 var valueProperty = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(npt), "value") : undefined; 3286 if (valueProperty && valueProperty.get && valueProperty.set) { 3287 valueGet = valueProperty.get; 3288 valueSet = valueProperty.set; 3289 Object.defineProperty(npt, "value", { 3290 get: getter, 3291 set: setter, 3292 configurable: true 3293 }); 3294 } else if (npt.tagName !== "INPUT") { 3295 valueGet = function valueGet() { 3296 return this.textContent; 3297 }; 3298 valueSet = function valueSet(value) { 3299 this.textContent = value; 3300 }; 3301 Object.defineProperty(npt, "value", { 3302 get: getter, 3303 set: setter, 3304 configurable: true 3305 }); 3306 } 3307 } else if (document.__lookupGetter__ && npt.__lookupGetter__("value")) { 3308 valueGet = npt.__lookupGetter__("value"); 3309 valueSet = npt.__lookupSetter__("value"); 3310 npt.__defineGetter__("value", getter); 3311 npt.__defineSetter__("value", setter); 3312 } 3313 npt.inputmask.__valueGet = valueGet; 3314 npt.inputmask.__valueSet = valueSet; 3315 } 3316 npt.inputmask._valueGet = function(overruleRTL) { 3317 return isRTL && overruleRTL !== true ? valueGet.call(this.el).split("").reverse().join("") : valueGet.call(this.el); 3318 }; 3319 npt.inputmask._valueSet = function(value, overruleRTL) { 3320 valueSet.call(this.el, value === null || value === undefined ? "" : overruleRTL !== true && isRTL ? value.split("").reverse().join("") : value); 3321 }; 3322 if (valueGet === undefined) { 3323 valueGet = function valueGet() { 3324 return this.value; 3325 }; 3326 valueSet = function valueSet(value) { 3327 this.value = value; 3328 }; 3329 patchValhook(npt.type); 3330 installNativeValueSetFallback(npt); 3331 } 3332 } 3333 } 3334 var elementType = input.getAttribute("type"); 3335 var isSupported = input.tagName === "INPUT" && $.inArray(elementType, opts.supportsInputType) !== -1 || input.isContentEditable || input.tagName === "TEXTAREA"; 3336 if (!isSupported) { 3337 if (input.tagName === "INPUT") { 3338 var el = document.createElement("input"); 3339 el.setAttribute("type", elementType); 3340 isSupported = el.type === "text"; 3341 el = null; 3342 } else isSupported = "partial"; 3343 } 3344 if (isSupported !== false) { 3345 patchValueProperty(input); 3346 } else input.inputmask = undefined; 3347 return isSupported; 3348 } 3349 EventRuler.off(elem); 3350 var isSupported = isElementTypeSupported(elem, opts); 3351 if (isSupported !== false) { 3352 el = elem; 3353 $el = $(el); 3354 originalPlaceholder = el.placeholder; 3355 maxLength = el !== undefined ? el.maxLength : undefined; 3356 if (maxLength === -1) maxLength = undefined; 3357 if (opts.colorMask === true) { 3358 initializeColorMask(el); 3359 } 3360 if (mobile) { 3361 if ("inputmode" in el) { 3362 el.inputmode = opts.inputmode; 3363 el.setAttribute("inputmode", opts.inputmode); 3364 } 3365 if (opts.disablePredictiveText === true) { 3366 if ("autocorrect" in el) { 3367 el.autocorrect = false;
3368 } else { 3369 if (opts.colorMask !== true) { 3370 initializeColorMask(el); 3371 } 3372 el.type = "password"; 3373 } 3374 } 3375 } 3376 if (isSupported === true) { 3377 el.setAttribute("im-insert", opts.insertMode); 3378 EventRuler.on(el, "submit", EventHandlers.submitEvent); 3379 EventRuler.on(el, "reset", EventHandlers.resetEvent); 3380 EventRuler.on(el, "blur", EventHandlers.blurEvent); 3381 EventRuler.on(el, "focus", EventHandlers.focusEvent); 3382 if (opts.colorMask !== true) { 3383 EventRuler.on(el, "click", EventHandlers.clickEvent); 3384 EventRuler.on(el, "mouseleave", EventHandlers.mouseleaveEvent); 3385 EventRuler.on(el, "mouseenter", EventHandlers.mouseenterEvent); 3386 } 3387 EventRuler.on(el, "paste", EventHandlers.pasteEvent); 3388 EventRuler.on(el, "cut", EventHandlers.cutEvent); 3389 EventRuler.on(el, "complete", opts.oncomplete); 3390 EventRuler.on(el, "incomplete", opts.onincomplete); 3391 EventRuler.on(el, "cleared", opts.oncleared); 3392 if (!mobile && opts.inputEventOnly !== true) { 3393 EventRuler.on(el, "keydown", EventHandlers.keydownEvent); 3394 EventRuler.on(el, "keypress", EventHandlers.keypressEvent); 3395 } else { 3396 el.removeAttribute("maxLength"); 3397 } 3398 EventRuler.on(el, "input", EventHandlers.inputFallBackEvent); 3399 EventRuler.on(el, "beforeinput", EventHandlers.beforeInputEvent); 3400 } 3401 EventRuler.on(el, "setvalue", EventHandlers.setValueEvent); 3402 undoValue = getBufferTemplate().join(""); 3403 if (el.inputmask._valueGet(true) !== "" || opts.clearMaskOnLostFocus === false || document.activeElement === el) { 3404 var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, el.inputmask._valueGet(true), opts) || el.inputmask._valueGet(true) : el.inputmask._valueGet(true); 3405 if (initialValue !== "") checkVal(el, true, false, initialValue.split("")); 3406 var buffer = getBuffer().slice(); 3407 undoValue = buffer.join(""); 3408 if (isComplete(buffer) === false) { 3409 if (opts.clearIncomplete) { 3410 resetMaskSet(); 3411 } 3412 } 3413 if (opts.clearMaskOnLostFocus && document.activeElement !== el) { 3414 if (getLastValidPosition() === -1) { 3415 buffer = []; 3416 } else { 3417 clearOptionalTail(buffer); 3418 } 3419 } 3420 if (opts.clearMaskOnLostFocus === false || opts.showMaskOnFocus && document.activeElement === el || el.inputmask._valueGet(true) !== "") writeBuffer(el, buffer); 3421 if (document.activeElement === el) { 3422 caret(el, seekNext(getLastValidPosition())); 3423 } 3424 } 3425 } 3426 } 3427 var valueBuffer; 3428 if (actionObj !== undefined) { 3429 switch (actionObj.action) { 3430 case "isComplete": 3431 el = actionObj.el; 3432 return isComplete(getBuffer()); 3433 3434 case "unmaskedvalue": 3435 if (el === undefined || actionObj.value !== undefined) { 3436 valueBuffer = actionObj.value; 3437 valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, valueBuffer, opts) || valueBuffer : valueBuffer).split(""); 3438 checkVal.call(this, undefined, false, false, valueBuffer); 3439 if ($.isFunction(opts.onBeforeWrite)) opts.onBeforeWrite.call(inputmask, undefined, getBuffer(), 0, opts); 3440 } 3441 return unmaskedvalue(el); 3442 3443 case "mask": 3444 mask(el); 3445 break; 3446 3447 case "format": 3448 valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, actionObj.value, opts) || actionObj.value : actionObj.value).split(""); 3449 checkVal.call(this, undefined, true, false, valueBuffer); 3450 if (actionObj.metadata) { 3451 return { 3452 value: isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""), 3453 metadata: maskScope.call(this, { 3454 action: "getmetadata" 3455 }, maskset, opts) 3456 }; 3457 } 3458 return isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""); 3459 3460 case "isValid": 3461 if (actionObj.value) { 3462 valueBuffer = actionObj.value.split(""); 3463 checkVal.call(this, undefined, true, true, valueBuffer); 3464 } else { 3465 actionObj.value = getBuffer().join(""); 3466 } 3467 var buffer = getBuffer(); 3468 var rl = determineLastRequiredPosition(), lmib = buffer.length - 1; 3469 for (;lmib > rl; lmib--) { 3470 if (isMask(lmib)) break; 3471 } 3472 buffer.splice(rl, lmib + 1 - rl); 3473 return isComplete(buffer) && actionObj.value === getBuffer().join(""); 3474 3475 case "getemptymask": 3476 return getBufferTemplate().join(""); 3477 3478 case "remove": 3479 if (el && el.inputmask) { 3480 $.data(el, "_inputmask_opts", null); 3481 $el = $(el); 3482 el.inputmask._valueSet(opts.autoUnmask ? unmaskedvalue(el) : el.inputmask._valueGet(true)); 3483 EventRuler.off(el); 3484 if (el.inputmask.colorMask) { 3485 colorMask = el.inputmask.colorMask; 3486 colorMask.removeChild(el); 3487 colorMask.parentNode.insertBefore(el, colorMask); 3488 colorMask.parentNode.removeChild(colorMask); 3489 } 3490 var valueProperty; 3491 if (Object.getOwnPropertyDescriptor && Ob
3491ject.getPrototypeOf) { 3492 valueProperty = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(el), "value"); 3493 if (valueProperty) { 3494 if (el.inputmask.__valueGet) { 3495 Object.defineProperty(el, "value", { 3496 get: el.inputmask.__valueGet, 3497 set: el.inputmask.__valueSet, 3498 configurable: true 3499 }); 3500 } 3501 } 3502 } else if (document.__lookupGetter__ && el.__lookupGetter__("value")) { 3503 if (el.inputmask.__valueGet) { 3504 el.__defineGetter__("value", el.inputmask.__valueGet); 3505 el.__defineSetter__("value", el.inputmask.__valueSet); 3506 } 3507 } 3508 el.inputmask = undefined; 3509 } 3510 return el; 3511 break; 3512 3513 case "getmetadata": 3514 if ($.isArray(maskset.metadata)) { 3515 var maskTarget = getMaskTemplate(true, 0, false).join(""); 3516 $.each(maskset.metadata, function(ndx, mtdt) { 3517 if (mtdt.mask === maskTarget) { 3518 maskTarget = mtdt; 3519 return false; 3520 } 3521 }); 3522 return maskTarget; 3523 } 3524 return maskset.metadata; 3525 } 3526 } 3527 } 3528 return Inputmask; 3529 }); 3530}, function(module, exports, __webpack_require__) { 3531 "use strict"; 3532 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 3533 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 3534 return typeof obj; 3535 } : function(obj) { 3536 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3537 }; 3538 (function(factory) { 3539 if (true) { 3540 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(4) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 3541 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 3542 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 3543 } else {} 3544 })(function($) { 3545 return $; 3546 }); 3547}, function(module, exports) { 3548 module.exports = jQuery; 3549}, function(module, exports, __webpack_require__) { 3550 "use strict"; 3551 var __WEBPACK_AMD_DEFINE_RESULT__; 3552 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 3553 return typeof obj; 3554 } : function(obj) { 3555 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3556 }; 3557 if (true) !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { 3558 return window; 3559 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); else {} 3560}, function(module, exports, __webpack_require__) { 3561 "use strict"; 3562 var __WEBPACK_AMD_DEFINE_RESULT__; 3563 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 3564 return typeof obj; 3565 } : function(obj) { 3566 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3567 }; 3568 if (true) !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { 3569 return document; 3570 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); else {} 3571}, function(module, exports, __webpack_require__) { 3572 "use strict"; 3573 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 3574 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 3575 return typeof obj; 3576 } : function(obj) { 3577 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3578 }; 3579 (function(factory) { 3580 if (true) { 3581 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 3582 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 3583 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 3584 } else {} 3585 })(function(Inputmask) { 3586 var $ = Inputmask.dependencyLib; 3587 var formatCode = { 3588 d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ], 3589 dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() { 3590 return pad(Date.prototype.getDate.call(this), 2); 3591 } ], 3592 ddd: [ "" ], 3593 dddd: [ "" ], 3594 m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 3595 return Date.prototype.getMonth.call(this) + 1; 3596 } ], 3597 mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 3598 return pad(Date.prototype.getMonth.call(this) + 1, 2); 3599 } ], 3600 mmm: [ "" ], 3601 mmmm: [ "" ], 3602 yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() { 3603 return pad(Date.prototype.getFullYear.call(this), 2); 3604 } ], 3605 yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() { 3606 return pad(Date.prototype.getFullYear.call(this), 4); 3607 } ], 3608 h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3609 hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() { 3610 return pad(Date.prototype.getHours.call(this), 2); 3611 } ], 3612 hhh: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3613 H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3614 HH: [ "[01][0-9]|2[0-3]", Date.prototype.setHours, "hours", function() { 3615 return pad(Date.prototype.getHours.call(this), 2); 3616 } ], 3617 HHH: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3618 M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ], 3619 MM: [ "[0-5][0-9]", Date.prototype.setMinutes, "minutes", function() { 3620 return pad(Date.prototype.getMinutes.call(this), 2); 3621 } ], 3622 s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ], 3623 ss: [ "[0-5][0-9]", Date.prototype.setSeconds, "seconds", function() { 3624 return pad(Date.prototype.getSeconds.call(this), 2); 3625 } ], 3626 l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() { 3627 return pad(Date.prototype.getMilliseconds.call(this), 3); 3628 } ], 3629 L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() { 3630 return pad(Date.prototype.getMilliseconds.call(this), 2); 3631 } ], 3632 t: [ "[ap]" ], 3633 tt: [ "[ap]m" ], 3634 T: [ "[AP]" ], 3635 TT: [ "[AP]M" ], 3636 Z: [ "" ], 3637 o: [ "" ], 3638 S: [ "" ] 3639 }, formatAlias = { 3640 isoDate: "yyyy-mm-dd", 3641 isoTime: "HH:MM:ss", 3642 isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 3643 isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 3644 }; 3645 function getTokenizer(opts) { 3646 if (!opts.tokenizer) { 3647 var tokens = []; 3648 for (var ndx in formatCode) { 3649 if (tokens.indexOf(ndx[0]) === -1) tokens.push(ndx[0]); 3650 } 3651 opts.tokenizer = "(" + tokens.join("+|") + ")+?|."; 3652 opts.tokenizer = new RegExp(opts.tokenizer, "g"); 3653 } 3654 return opts.tokenizer; 3655 } 3656 function isValidDate(dateParts, currentResult) { 3657 return !isFinite(dateParts.rawday) || dateParts.day == "29" && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day ? currentResult : false;
3658 } 3659 function isDateInRange(dateParts, opts) { 3660 var result = true; 3661 if (opts.min) { 3662 if (dateParts["rawyear"]) { 3663 var rawYear = dateParts["rawyear"].replace(/[^0-9]/g, ""), minYear = opts.min.year.substr(0, rawYear.length); 3664 result = minYear <= rawYear; 3665 } 3666 if (dateParts["year"] === dateParts["rawyear"]) { 3667 if (opts.min.date.getTime() === opts.min.date.getTime()) { 3668 result = opts.min.date.getTime() <= dateParts.date.getTime(); 3669 } 3670 } 3671 } 3672 if (result && opts.max && opts.max.date.getTime() === opts.max.date.getTime()) { 3673 result = opts.max.date.getTime() >= dateParts.date.getTime(); 3674 } 3675 return result; 3676 } 3677 function parse(format, dateObjValue, opts, raw) { 3678 var mask = "", match; 3679 while (match = getTokenizer(opts).exec(format)) { 3680 if (dateObjValue === undefined) { 3681 if (formatCode[match[0]]) { 3682 mask += "(" + formatCode[match[0]][0] + ")"; 3683 } else { 3684 switch (match[0]) { 3685 case "[": 3686 mask += "("; 3687 break; 3688 3689 case "]": 3690 mask += ")?"; 3691 break; 3692 3693 default: 3694 mask += Inputmask.escapeRegex(match[0]); 3695 } 3696 } 3697 } else { 3698 if (formatCode[match[0]]) { 3699 if (raw !== true && formatCode[match[0]][3]) { 3700 var getFn = formatCode[match[0]][3]; 3701 mask += getFn.call(dateObjValue.date); 3702 } else if (formatCode[match[0]][2]) mask += dateObjValue["raw" + formatCode[match[0]][2]]; else mask += match[0]; 3703 } else mask += match[0]; 3704 } 3705 } 3706 return mask; 3707 } 3708 function pad(val, len) { 3709 val = String(val); 3710 len = len || 2; 3711 while (val.length < len) { 3712 val = "0" + val; 3713 } 3714 return val; 3715 } 3716 function analyseMask(maskString, format, opts) { 3717 var dateObj = { 3718 date: new Date(1, 0, 1) 3719 }, targetProp, mask = maskString, match, dateOperation, targetValidator; 3720 function extendProperty(value) { 3721 var correctedValue; 3722 if (opts.min && opts.min[targetProp] || opts.max && opts.max[targetProp]) { 3723 var min = opts.min && opts.min[targetProp] || opts.max[targetProp], max = opts.max && opts.max[targetProp] || opts.min[targetProp]; 3724 correctedValue = value.replace(/[^0-9]/g, ""); 3725 correctedValue += (min.indexOf(correctedValue) < max.indexOf(correctedValue) ? max : min).toString().substr(correctedValue.length); 3726 while (!new RegExp(targetValidator).test(correctedValue)) { 3727 correctedValue--; 3728 } 3729 } else correctedValue = value.replace(/[^0-9]/g, "0"); 3730 return correctedValue; 3731 } 3732 function setValue(dateObj, value, opts) { 3733 dateObj[targetProp] = extendProperty(value); 3734 dateObj["raw" + targetProp] = value; 3735 if (dateOperation !== undefined) dateOperation.call(dateObj.date, targetProp == "month" ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]); 3736 } 3737 if (typeof mask === "string") { 3738 while (match = getTokenizer(opts).exec(format)) { 3739 var value = mask.slice(0, match[0].length); 3740 if (formatCode.hasOwnProperty(match[0])) { 3741 targetValidator = formatCode[match[0]][0]; 3742 targetProp = formatCode[match[0]][2]; 3743 dateOperation = formatCode[match[0]][1]; 3744 setValue(dateObj, value, opts); 3745 } 3746 mask = mask.slice(value.length); 3747 } 3748 return dateObj; 3749 } else if (mask && (typeof mask === "undefined" ? "undefined" : _typeof(mask)) === "object" && mask.hasOwnProperty("date")) { 3750 return mask; 3751 } 3752 return undefined; 3753 } 3754 Inputmask.extendAliases({ 3755 datetime: { 3756 mask: function mask(opts) { 3757 formatCode.S = opts.i18n.ordinalSuffix.join("|"); 3758 opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat; 3759 opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat; 3760 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat; 3761 opts.placeholder = opts.placeholder !== "" ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, ""); 3762 opts.regex = parse(opts.inputFormat, undefined, opts); 3763 return null; 3764 }, 3765 placeholder: "", 3766 inputFormat: "isoDateTime", 3767 displayFormat: undefined, 3768 outputFormat: undefined, 3769 min: null, 3770 max: null, 3771 i18n: { 3772 dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], 3773 monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
3773November", "December" ], 3774 ordinalSuffix: [ "st", "nd", "rd", "th" ] 3775 }, 3776 postValidation: function postValidation(buffer, pos, currentResult, opts) { 3777 opts.min = analyseMask(opts.min, opts.inputFormat, opts); 3778 opts.max = analyseMask(opts.max, opts.inputFormat, opts); 3779 var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts); 3780 if (result && dateParts.date.getTime() === dateParts.date.getTime()) { 3781 result = isValidDate(dateParts, result); 3782 result = result && isDateInRange(dateParts, opts); 3783 } 3784 if (pos && result && currentResult.pos !== pos) { 3785 return { 3786 buffer: parse(opts.inputFormat, dateParts, opts), 3787 refreshFromBuffer: { 3788 start: pos, 3789 end: currentResult.pos 3790 } 3791 }; 3792 } 3793 return result; 3794 }, 3795 onKeyDown: function onKeyDown(e, buffer, caretPos, opts) { 3796 var input = this; 3797 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 3798 var today = new Date(), match, date = ""; 3799 while (match = getTokenizer(opts).exec(opts.inputFormat)) { 3800 if (match[0].charAt(0) === "d") { 3801 date += pad(today.getDate(), match[0].length); 3802 } else if (match[0].charAt(0) === "m") { 3803 date += pad(today.getMonth() + 1, match[0].length); 3804 } else if (match[0] === "yyyy") { 3805 date += today.getFullYear().toString(); 3806 } else if (match[0].charAt(0) === "y") { 3807 date += pad(today.getYear(), match[0].length); 3808 } 3809 } 3810 input.inputmask._valueSet(date); 3811 $(input).trigger("setvalue"); 3812 } 3813 }, 3814 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 3815 return parse(opts.outputFormat, analyseMask(maskedValue, opts.inputFormat, opts), opts, true); 3816 }, 3817 casing: function casing(elem, test, pos, validPositions) { 3818 if (test.nativeDef.indexOf("[ap]") == 0) return elem.toLowerCase(); 3819 if (test.nativeDef.indexOf("[AP]") == 0) return elem.toUpperCase(); 3820 return elem; 3821 }, 3822 insertMode: false 3823 } 3824 }); 3825 return Inputmask; 3826 }); 3827}, function(module, exports, __webpack_require__) { 3828 "use strict"; 3829 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 3830 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 3831 return typeof obj; 3832 } : function(obj) { 3833 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3834 }; 3835 (function(factory) { 3836 if (true) { 3837 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 3838 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 3839 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 3840 } else {} 3841 })(function(Inputmask) { 3842 var $ = Inputmask.dependencyLib; 3843 function autoEscape(txt, opts) { 3844 var escapedTxt = ""; 3845 for (var i = 0; i < txt.length; i++) { 3846 if (Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i)) { 3847 escapedTxt += "\\" + txt.charAt(i); 3848 } else escapedTxt += txt.charAt(i); 3849 } 3850 return escapedTxt; 3851 } 3852 function alignDigits(buffer, opts) { 3853 if (opts.numericInput) { 3854 var radixPosition = $.inArray(opts.radixPoint, buffer); 3855 if (radixPosition === -1) { 3856 buffer.push(opts.radixPoint); 3857 radixPosition = buffer.length - 1; 3858 } 3859 for (var i = 1; i <= opts.digits; i++) { 3860 buffer[radixPosition + i] = buffer[radixPosition + i] || "0"; 3861 } 3862 } 3863 return buffer; 3864 } 3865 Inputmask.extendAliases({ 3866 numeric: { 3867 mask: function mask(opts) { 3868 if (opts.repeat !== 0 && isNaN(opts.integerDigits)) { 3869 opts.integerDigits = opts.repeat; 3870 } 3871 opts.repeat = 0; 3872 if (opts.groupSeparator === opts.radixPoint && opts.digits && opts.digits !== "0") { 3873 if (opts.radixPoint === ".") { 3874 opts.groupSeparator = ","; 3875 } else if (opts.radixPoint === ",") { 3876 opts.groupSeparator = "."; 3877 } else opts.groupSeparator = ""; 3878 } 3879 if (opts.groupSeparator === " ") { 3880 opts.skipOptionalPartCharacter = undefined; 3881 } 3882 opts.autoGroup = opts.autoGroup && opts.groupSeparator !== ""; 3883 if (opts.autoGroup) { 3884 if (typeof opts.groupSize == "string" && isFinite(opts.groupSize)) opts.groupSize = parseInt(opts.groupSize); 3885 if (isFinite(opts.integerDigits)) { 3886 var seps = Math.floor(opts.integerDigits / opts.groupSize); 3887 var mod = opts.integerDigits % opts.groupSize; 3888 opts.integerDigits = parseInt(opts.integerDigits) + (mod === 0 ? seps - 1 : seps); 3889 if (opts.integerDigits < 1) { 3890 opts.integerDigits = "*"; 3891 } 3892 } 3893 } 3894 if (opts.placeholder.length > 1) { 3895 opts.placeholder = opts.placeholder.charAt(0); 3896 } 3897 if (opts.positionCaretOnClick === "radixFocus" && opts.placeholder === "" && opts.integerOptional === false) { 3898 opts.positionCaretOnClick = "lvp"; 3899 } 3900 opts.definitions[";"] = opts.definitions["~"]; 3901 opts.definitions[";"].definitionSymbol = "~"; 3902 if (opts.numericInput === true) { 3903 opts.positionCaretOnClick = opts.positionCaretOnClick === "radixFocus" ? "lvp" : opts.positionCaretOnClick; 3904 opts.digitsOptional = false;
3905 if (isNaN(opts.digits)) opts.digits = 2; 3906 opts.decimalProtect = false; 3907 } 3908 var mask = "[+]"; 3909 mask += autoEscape(opts.prefix, opts); 3910 if (opts.integerOptional === true) { 3911 mask += "~{1," + opts.integerDigits + "}"; 3912 } else mask += "~{" + opts.integerDigits + "}"; 3913 if (opts.digits !== undefined) { 3914 var radixDef = opts.decimalProtect ? ":" : opts.radixPoint; 3915 var dq = opts.digits.toString().split(","); 3916 if (isFinite(dq[0]) && dq[1] && isFinite(dq[1])) { 3917 mask += radixDef + ";{" + opts.digits + "}"; 3918 } else if (isNaN(opts.digits) || parseInt(opts.digits) > 0) { 3919 if (opts.digitsOptional) { 3920 mask += "[" + radixDef + ";{1," + opts.digits + "}]"; 3921 } else mask += radixDef + ";{" + opts.digits + "}"; 3922 } 3923 } 3924 mask += autoEscape(opts.suffix, opts); 3925 mask += "[-]"; 3926 opts.greedy = false; 3927 return mask; 3928 }, 3929 placeholder: "", 3930 greedy: false, 3931 digits: "*", 3932 digitsOptional: true, 3933 enforceDigitsOnBlur: false, 3934 radixPoint: ".", 3935 positionCaretOnClick: "radixFocus", 3936 groupSize: 3, 3937 groupSeparator: "", 3938 autoGroup: false, 3939 allowMinus: true, 3940 negationSymbol: { 3941 front: "-", 3942 back: "" 3943 }, 3944 integerDigits: "+", 3945 integerOptional: true, 3946 prefix: "", 3947 suffix: "", 3948 rightAlign: true, 3949 decimalProtect: true, 3950 min: null, 3951 max: null, 3952 step: 1, 3953 insertMode: true, 3954 autoUnmask: false, 3955 unmaskAsNumber: false, 3956 inputmode: "numeric", 3957 preValidation: function preValidation(buffer, pos, c, isSelection, opts, maskset) { 3958 if (c === "-" || c === opts.negationSymbol.front) { 3959 if (opts.allowMinus !== true) return false; 3960 opts.isNegative = opts.isNegative === undefined ? true : !opts.isNegative; 3961 if (buffer.join("") === "") return true; 3962 return { 3963 caret: maskset.validPositions[pos] ? pos : undefined, 3964 dopost: true 3965 }; 3966 } 3967 if (isSelection === false && c === opts.radixPoint && opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) { 3968 var radixPos = $.inArray(opts.radixPoint, buffer); 3969 if (radixPos !== -1 && maskset.validPositions[radixPos] !== undefined) { 3970 if (opts.numericInput === true) { 3971 return pos === radixPos; 3972 } 3973 return { 3974 caret: radixPos + 1 3975 }; 3976 } 3977 } 3978 return true; 3979 }, 3980 postValidation: function postValidation(buffer, pos, currentResult, opts) { 3981 function buildPostMask(buffer, opts) { 3982 var postMask = ""; 3983 postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}"; 3984 if (opts.radixPoint !== "") { 3985 var radixSplit = buffer.join("").split(opts.radixPoint); 3986 if (radixSplit[1]) { 3987 postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}"; 3988 } 3989 } 3990 return postMask; 3991 } 3992 var suffix = opts.suffix.split(""), prefix = opts.prefix.split(""); 3993 if (currentResult.pos === undefined && currentResult.caret !== undefined && currentResult.dopost !== true) return currentResult; 3994 var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos; 3995 var maskedValue = buffer.slice(); 3996 if (opts.numericInput) { 3997 caretPos = maskedValue.length - caretPos - 1; 3998 maskedValue = maskedValue.reverse(); 3999 } 4000 var charAtPos = maskedValue[caretPos]; 4001 if (charAtPos === opts.groupSeparator) { 4002 caretPos += 1; 4003 charAtPos = maskedValue[caretPos]; 4004 } 4005 if (caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult; 4006 if (charAtPos !== undefined) { 4007 if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) { 4008 maskedValue[caretPos] = "?"; 4009 if (opts.prefix.length > 0 && caretPos >= (opts.isNegative === false ? 1 : 0) && caretPos < opts.prefix.length - 1 + (opts.isNegative === false ? 1 : 0)) { 4010 prefix[caretPos - (opts.isNegative === false ? 1 : 0)] = "?"; 4011 } else if (opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0)) { 4012 suffix[caretPos - (maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0))] = "?"; 4013 } 4014 } 4015 } 4016 prefix = prefix.join(""); 4017 suffix = suffix.join(""); 4018 var processValue = maskedValue.join("").replace(prefix, ""); 4019 processValue = processValue.replace(suffix, ""); 4020 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 4021 processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""); 4022 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 4023 if (isNaN(opts.placeholder)) { 4024 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), ""); 4025 } 4026 if (processValue.length > 1 && processValue.indexOf(opts.radixPoint) !== 1) { 4027 if (charAtPos === "0") { 4028 processValue = processValue.replace(/^\?/g, ""); 4029 } 4030 processValue = processValue.replace(/^0/g, ""); 4031 } 4032 if (processValue.charAt(0) === opts.radixPoint && opts.radixPoint !== "" && opts.numericInput !== true) { 4033 processValue = "0" + processValue; 4034 } 4035 if (processValue !== "") { 4036 processValue = processValue.split(""); 4037 if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && isFinite(opts.digits)) { 4038 var radixPosition = $.inArray(opts.radixPoint, processValue); 4039 var rpb = $.inArray(opts.radixPoint, maskedValue); 4040 if (radixPosition === -1) { 4041 processValue.push(opts.radixPoint); 4042 radixPosition = processValue.length - 1; 4043 } 4044 for (var i = 1; i <= opts.digits; i++) { 4045 if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && (processValue[radixPosition + i] === undefined || processValue[radixPosition + i] === opts.placeholder.charAt(0))) { 4046 processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0); 4047 } else if (rpb !== -1 && maskedValue[rpb + i] !== undefined) { 4048 processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]; 4049 } 4050 } 4051 } 4052 if (opts.autoGroup === true && opts.groupSeparator !== "" && (charAtPos !== opts.radixPoint || currentResult.pos !== undefined || currentResult.dopost)) { 4053 var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint; 4054 processValue = Inputmask(buildPostMask(processValue, opts), { 4055 numericInput: true, 4056 jitMasking: true, 4057 definitions: { 4058 "*": { 4059 validator: "[0-9?]", 4060 cardinality: 1 4061 } 4062 } 4063 }).format(processValue.join("")); 4064 if (addRadix) processValue += opts.radixPoint; 4065 if (processValue.charAt(0) === opts.groupSeparator) { 4066 processValue.substr(1); 4067 } 4068 } else processValue = processValue.join(""); 4069 } 4070 if (opts.isNegative && currentResult.event === "blur") { 4071 opts.isNegative = processValue !== "0"; 4072 } 4073 processValue = prefix + processValue; 4074 processValue += suffix; 4075 if (opts.isNegative) { 4076 processValue = opts.negationSymbol.front + processValue; 4077 processValue += opts.negationSymbol.back; 4078 } 4079 processValue = processValue.split(""); 4080 if (charAtPos !== undefined) { 4081 if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) { 4082 caretPos = $.inArray("?", processValue); 4083 if (caretPos > -1) { 4084 processValue[caretPos] = charAtPos; 4085 } else caretPos = currentResult.caret || 0; 4086 } else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) { 4087 var newCaretPos = $.inArray(charAtPos, processValue); 4088 if (newCaretPos !== -1) caretPos = newCaretPos; 4089 } 4090 } 4091 if (opts.numericInput) { 4092 caretPos = processValue.length - caretPos - 1; 4093 processValue = processValue.reverse(); 4094 } 4095 var rslt = { 4096 caret: (charAtPos === undefined || currentResult.pos !== undefined) && caretPos !== undefined ? caretPos + (opts.numericInput ? -1 : 1) : caretPos, 4097 buffer: processValue, 4098 refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("") 4099 }; 4100 return rslt.refreshFromBuffer ? rslt : currentResult; 4101 }, 4102 onBeforeWrite: function onBeforeWrite(e, buffer, caretPos, opts) { 4103 function parseMinMaxOptions(opts) { 4104 if (opts.parseMinMaxOptions === undefined) { 4105 if (opts.min !== null) { 4106 opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 4107 if (opts.radixPoint === ",") opts.min = opts.min.replace(opts.radixPoint, "."); 4108 opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN; 4109 if (isNaN(opts.min)) opts.min = Number.MIN_VALUE; 4110 } 4111 if (opts.max !== null) { 4112 opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 4113 if (opts.radixPoint === ",") opts.max = opts.max.replace(opts.radixPoint, "."); 4114 opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN; 4115 if (isNaN(opts.max)) opts.max = Number.MAX_VALUE; 4116 } 4117 opts.parseMinMaxOptions = "done"; 4118 } 4119 } 4120 if (e) { 4121 switch (e.type) { 4122 case "keydown": 4123 return opts.postValidation(buffer, caretPos, { 4124 caret: caretPos, 4125 dopost: true 4126 }, opts); 4127 4128 case "blur": 4129 case "checkval": 4130 var unmasked; 4131 parseMinMaxOptions(opts); 4132 if (opts.min !== null || opts.max !== null) { 4133 unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, { 4134 unmaskAsNumber: true 4135 })); 4136 if (opts.min !== null && unmasked < opts.min) { 4137 opts.isNegative = opts.min < 0; 4138 return opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), caretPos, { 4139 caret: caretPos, 4140 dopost: true, 4141 placeholder: "0" 4142 }, opts); 4143 } else if (opts.max !== null && unmasked > opts.max) { 4144 opts.isNegative = opts.max < 0; 4145 return opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), caretPos, { 4146 caret: caretPos, 4147 dopost: true, 4148 placeholder: "0" 4149 }, opts); 4150 } 4151 } 4152 return opts.postValidation(buffer, caretPos, { 4153 caret: caretPos, 4154 placeholder: "0", 4155 event: "blur" 4156 }, opts); 4157 4158 case "_checkval": 4159 return { 4160 caret: caretPos 4161 }; 4162 4163 default: 4164 break; 4165 } 4166 } 4167 }, 4168 regex: { 4169 integerPart: function integerPart(opts, emptyCheck) { 4170 return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+"); 4171 }, 4172 integerNPart: function integerNPart(opts) { 4173 return new RegExp("[\\d" + Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeR
4173egex(opts.placeholder.charAt(0)) + "]+"); 4174 } 4175 }, 4176 definitions: { 4177 "~": { 4178 validator: function validator(chrs, maskset, pos, strict, opts, isSelection) { 4179 var isValid, l; 4180 if (chrs === "k" || chrs === "m") { 4181 isValid = { 4182 insert: [], 4183 c: 0 4184 }; 4185 for (var i = 0, l = chrs === "k" ? 2 : 5; i < l; i++) { 4186 isValid.insert.push({ 4187 pos: pos + i, 4188 c: 0 4189 }); 4190 } 4191 isValid.pos = pos + l; 4192 return isValid; 4193 } 4194 isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs); 4195 if (isValid === true) { 4196 if (opts.numericInput !== true && maskset.validPositions[pos] !== undefined && maskset.validPositions[pos].match.def === "~" && !isSelection) { 4197 var processValue = maskset.buffer.join(""); 4198 processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""); 4199 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 4200 var pvRadixSplit = processValue.split(opts.radixPoint); 4201 if (pvRadixSplit.length > 1) { 4202 pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0)); 4203 } 4204 if (pvRadixSplit[0] === "0") { 4205 pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0)); 4206 } 4207 processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || ""; 4208 var bufferTemplate = maskset._buffer.join(""); 4209 if (processValue === opts.radixPoint) { 4210 processValue = bufferTemplate; 4211 } 4212 while (processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$") === null) { 4213 bufferTemplate = bufferTemplate.slice(1); 4214 } 4215 processValue = processValue.replace(bufferTemplate, ""); 4216 processValue = processValue.split(""); 4217 if (processValue[pos] === undefined) { 4218 isValid = { 4219 pos: pos, 4220 remove: pos 4221 }; 4222 } else { 4223 isValid = { 4224 pos: pos 4225 }; 4226 } 4227 } 4228 } else if (!strict && chrs === opts.radixPoint && maskset.validPositions[pos - 1] === undefined) { 4229 isValid = { 4230 insert: { 4231 pos: pos, 4232 c: 0 4233 }, 4234 pos: pos + 1 4235 }; 4236 } 4237 return isValid; 4238 }, 4239 cardinality: 1 4240 }, 4241 "+": { 4242 validator: function validator(chrs, maskset, pos, strict, opts) { 4243 return opts.allowMinus && (chrs === "-" || chrs === opts.negationSymbol.front); 4244 }, 4245 cardinality: 1, 4246 placeholder: "" 4247 }, 4248 "-": { 4249 validator: function validator(chrs, maskset, pos, strict, opts) { 4250 return opts.allowMinus && chrs === opts.negationSymbol.back; 4251 }, 4252 cardinality: 1, 4253 placeholder: "" 4254 }, 4255 ":": { 4256 validator: function validator(chrs, maskset, pos, strict, opts) { 4257 var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]"; 4258 var isValid = new RegExp(radix).test(chrs); 4259 if (isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint) { 4260 isValid = { 4261 caret: pos + 1 4262 }; 4263 } 4264 return isValid; 4265 }, 4266 cardinality: 1, 4267 placeholder: function placeholder(opts) { 4268 return opts.radixPoint; 4269 } 4270 } 4271 }, 4272 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 4273 if (unmaskedValue === "" && opts.nullable === true) { 4274 return unmaskedValue; 4275 } 4276 var processValue = maskedValue.replace(opts.prefix, ""); 4277 processValue = processValue.replace(opts.suffix, ""); 4278 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 4279 if (opts.placeholder.charAt(0) !== "") { 4280 processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0"); 4281 } 4282 if (opts.unmaskAsNumber) { 4283 if (opts.radixPoint !== "" && processValue.indexOf(opts.radixPoint) !== -1) processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), "."); 4284 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"); 4285 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 4286 return Number(processValue); 4287 } 4288 return processValue; 4289 }, 4290 isComplete: function isComplete(buffer, opts) { 4291 var maskedValue = (opts.numericInput ? buffer.slice().reverse() : buffer).join(""); 4292 maskedValue = maskedValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"); 4293 maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 4294 maskedValue = maskedValue.replace(opts.prefix, ""); 4295 maskedValue = maskedValue.replace(opts.suffix, ""); 4296 maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator) + "([0-9]{3})", "g"), "$1"); 4297 if (opts.radixPoint === ",") maskedValue = maskedValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."); 4298 return isFinite(maskedValue); 4299 }, 4300 onBeforeMask: function onBeforeMask(initialValue, opts) { 4301 opts.isNegative = undefined; 4302 if (typeof initialValue == "number" && opts.radixPoint !== "") { 4303 initialValue = initialValue.toString().replace(".", opts.radixPoint); 4304 } 4305 initialValue = initialValue.toString().charAt(initialValue.length - 1) === opts.radixPoint ? initialValue.toString().substr(0, initialValue.length - 1) : initialValue.toString(); 4306 if (opts.radixPoint !== "" && isFinite(initialValue)) { 4307 var vs = initialValue.split("."), groupSize = opts.groupSeparator !== "" ? parseInt(opts.groupSize) : 0; 4308 if (vs.length === 2 && (vs[0].length > groupSize || vs[1].length > groupSize || vs[0].length <= groupSize && vs[1].length < groupSize)) { 4309 initialValue = initialValue.replace(".", opts.radixPoint); 4310 } 4311 } 4312 var kommaMatches = initialValue.match(/,/g); 4313 var dotMatches = initialValue.match(/\./g); 4314 if (dotMatches && kommaMatches) { 4315 if (dotMatches.length > kommaMatches.length) { 4316 initialValue = initialValue.replace(/\./g, ""); 4317 initialValue = initialValue.replace(",", opts.radixPoint); 4318 } else if (kommaMatches.length > dotMatches.length) { 4319 initialValue = initialValue.replace(/,/g, ""); 4320 initialValue = initialValue.replace(".", opts.radixPoint); 4321 } else { 4322 initialValue = initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue.replace(/,/g, ""); 4323 } 4324 } else { 4325 initialValue = initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 4326 } 4327 if (opts.digits === 0) { 4328 if (initialValue.indexOf(".") !== -1) { 4329 initialValue = initialValue.substring(0, initialValue.indexOf(".")); 4330 } else if (initialValue.indexOf(",") !== -1) { 4331 initialValue = initialValue.substring(0, initialValue.indexOf(",")); 4332 } 4333 } 4334 if (opts.radixPoint !== "" && isFinite(opts.digits)) { 4335 if (initialValue.indexOf(opts.radixPoint) !== -1) { 4336 var valueParts = initialValue.split(opts.radixPoint), decPart = valueParts[1].match(new RegExp("\\d*"))[0]; 4337 if (parseInt(opts.digits) < decPart.toString().length) { 4338 var digitsFactor = Math.pow(10, parseInt(opts.digits)); 4339 initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."); 4340 initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor; 4341 initialValue = initialValue.toString().replace(".", opts.radixPoint); 4342 } 4343 } 4344 } 4345 return alignDigits(initialValue.toString().split(""), opts).join(""); 4346 }, 4347 onKeyDown: function onKeyDown(e, buffer, caretPos, opts) { 4348 var $input = $(this); 4349 if (e.ctrlKey) { 4350 switch (e.keyCode) { 4351 case Inputmask.keyCode.UP: 4352 $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)); 4353 $input.trigger("setvalue"); 4354 break; 4355 4356 case Inputmask.keyCode.DOWN: 4357 $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)); 4358 $input.trigger("setvalue"); 4359 break; 4360 } 4361 } 4362 } 4363 }, 4364 currency: { 4365 prefix: "$ ", 4366 groupSeparator: ",", 4367 alias: "numeric", 4368 placeholder: "0", 4369 autoGroup: true, 4370 digits: 2, 4371 digitsOptional: false, 4372 clearMaskOnLostFocus: false 4373 },
4374 decimal: { 4375 alias: "numeric" 4376 }, 4377 integer: { 4378 alias: "numeric", 4379 digits: 0, 4380 radixPoint: "" 4381 }, 4382 percentage: { 4383 alias: "numeric", 4384 digits: 2, 4385 digitsOptional: true, 4386 radixPoint: ".", 4387 placeholder: "0", 4388 autoGroup: false, 4389 min: 0, 4390 max: 100, 4391 suffix: " %", 4392 allowMinus: false 4393 } 4394 }); 4395 return Inputmask; 4396 }); 4397}, function(module, exports, __webpack_require__) { 4398 "use strict"; 4399 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 4400 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 4401 return typeof obj; 4402 } : function(obj) { 4403 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 4404 }; 4405 (function(factory) { 4406 if (true) { 4407 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(4), __webpack_require__(2) ], 4408 __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 4409 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4410 } else {} 4411 })(function($, Inputmask) { 4412 if ($.fn.inputmask === undefined) { 4413 $.fn.inputmask = function(fn, options) { 4414 var nptmask, input = this[0]; 4415 if (options === undefined) options = {}; 4416 if (typeof fn === "string") { 4417 switch (fn) { 4418 case "unmaskedvalue": 4419 return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val(); 4420 4421 case "remove": 4422 return this.each(function() { 4423 if (this.inputmask) this.inputmask.remove(); 4424 }); 4425 4426 case "getemptymask": 4427 return input && input.inputmask ? input.inputmask.getemptymask() : ""; 4428 4429 case "hasMaskedValue": 4430 return input && input.inputmask ? input.inputmask.hasMaskedValue() : false; 4431 4432 case "isComplete": 4433 return input && input.inputmask ? input.inputmask.isComplete() : true; 4434 4435 case "getmetadata": 4436 return input && input.inputmask ? input.inputmask.getmetadata() : undefined; 4437 4438 case "setvalue": 4439 Inputmask.setValue(input, options); 4440 break; 4441 4442 case "option": 4443 if (typeof options === "string") { 4444 if (input && input.inputmask !== undefined) { 4445 return input.inputmask.option(options); 4446 } 4447 } else { 4448 return this.each(function() { 4449 if (this.inputmask !== undefined) { 4450 return this.inputmask.option(options); 4451 } 4452 }); 4453 } 4454 break; 4455 4456 default: 4457 options.alias = fn; 4458 nptmask = new Inputmask(options); 4459 return this.each(function() { 4460 nptmask.mask(this); 4461 }); 4462 } 4463 } else if (Array.isArray(fn)) { 4464 options.alias = fn; 4465 nptmask = new Inputmask(options); 4466 return this.each(function() { 4467 nptmask.mask(this); 4468 }); 4469 } else if ((typeof fn === "undefined" ? "undefined" : _typeof(fn)) == "object") { 4470 nptmask = new Inputmask(fn);
vendor: 12,598 bytes, lines 4471-4505
4471 if (fn.mask === undefined && fn.alias === undefined) { 4472 return this.each(function() { 4473 if (this.inputmask !== undefined) { 4474 return this.inputmask.option(fn); 4475 } else nptmask.mask(this); 4476 }); 4477 } else { 4478 return this.each(function() { 4479 nptmask.mask(this); 4480 }); 4481 } 4482 } else if (fn === undefined) { 4483 return this.each(function() { 4484 nptmask = new Inputmask(options); 4485 nptmask.mask(this); 4486 }); 4487 } 4488 }; 4489 } 4490 return $.fn.inputmask; 4491 }); 4492} ]); 4493/* End */ 4494; 4495; /* Start:"a:4:{s:4:"full";s:69:"/bitrix/templates/evolution_v2/js/vendor/slick.min.js?168190042940295";s:6:"source";s:53:"/bitrix/templates/evolution_v2/js/vendor/slick.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4496/* 4497slick.js 4498Version: 1.5.9 4499Author: Ken Wheeler 4500Website: http://kenwheeler.github.io 4501 Docs: http://kenwheeler.github.io/slick 4502 Repo: http://github.com/kenwheeler/slick 4503Issues: http://github.com/kenwheeler/slick/issues 4504*/ 4505!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};e=function(){function e(e,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(e+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!1,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.hidden="hidden",n.paused=!1,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(e),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(e).data("slick")||{},n.options=i.extend({},n.defaults,s,o),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,"undefined"!=typeof document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.instanceUid=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0),n.checkResponsive(!0)}var t=0;return e}(),e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(0>t||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):o===!0?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):s.cssTransitions===!1?(s.options.rtl===!0&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),s.options.vertical===!1?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),s.options.vertical===!1?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.asNavFor=function(e){var t=this,o=t.options.asNavFor;o&&null!==o&&(o=i(o).not(t.$slider)),null!==o&&"object"==typeof o&&o.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};e.options.fade===!1?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer),i.slideCount>i.options.slidesToShow&&i.paused!==!0&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this;i.options.infinite===!1?1===i.direction?(i.currentSlide+1===i.slideCount-1&&(i.direction=0),i.slideHandler(i.currentSlide+i.options.slidesToScroll)):(i.currentSlide-1===0&&(i.direction=1),i.slideHandler(i.currentSlide-i.options.slidesToScroll)):i.slideHandler(i.currentSlide+i.options.slidesToScroll)},e.prototype.buildArrows=function(){var e=this;e.options.arrows===!0&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),e.options.infinite!==!0&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(o.options.dots===!0&&o.slideCount>o.options.slidesToShow){for(t='<ul class="'+o.options.dotsClass+'">',e=0;e<=o.getDotCount();e+=1)t+="<li>"+o.options.customPaging.call(this,o,e)+"</li>";t+="</ul>",o.$dots=i(t).appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),(e.options.centerMode===!0||e.options.swipeToSlide===!0)&&(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.options.draggable===!0&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;s>i;i++){var a=document.createElement("div");for(e=0;e<l.options.rows;e++){var d=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&d.appendChild(n.get(c))}a.appendChild(d)}o.appendChild(a)}l.$slider.html(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,a=r.$slider.width(),d=window.innerWidth||i(window).width();if("window"===r.respondTo?n=d:"slider"===r.respondTo?n=a:"min"===r.respondTo&&(n=Math.min(d,a)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(r.originalSettings.mobileFirst===!1?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||l===!1||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.target);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!==0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var a=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(a),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t,o=this;if(e=o.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var s in e){if(i<e[s]){i=t;break}t=e[s]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide),e.options.pauseOnDotsHover===!0&&e.options.autoplay===!0&&i("li",e.$dots).off("mouseenter.slick",i.proxy(e.setPaused,e,!0)).off("mouseleave.slick",i.proxy(e.setPaused,e,!1))),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide)),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
4505slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.$list.off("mouseenter.slick",i.proxy(e.setPaused,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.setPaused,e,!1)),e.options.accessibility===!0&&e.$list.off("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).off("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&(i=e.$slides.children().children(),i.removeAttr("style"),e.$slider.html(i))},e.prototype.clickHandler=function(i){var e=this;e.shouldClick===!1&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;t.cssTransitions===!1?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;e.cssTransitions===!1?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){var i=this;return i.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(i.options.infinite===!0)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(i.options.centerMode===!0)o=i.slideCount;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;return o-1},e.prototype.getLeft=function(i){var e,t,o,s=this,n=0;return s.slideOffset=0,t=s.$slides.first().outerHeight(!0),s.options.infinite===!0?(s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideWidth*s.options.slidesToShow*-1,n=t*s.options.slidesToShow*-1),s.slideCount%s.options.slidesToScroll!==0&&i+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(i>s.slideCount?(s.slideOffset=(s.options.slidesToShow-(i-s.slideCount))*s.slideWidth*-1,n=(s.options.slidesToShow-(i-s.slideCount))*t*-1):(s.slideOffset=s.slideCount%s.options.slidesToScroll*s.slideWidth*-1,n=s.slideCount%s.options.slidesToScroll*t*-1))):i+s.options.slidesToShow>s.slideCount&&(s.slideOffset=(i+s.options.slidesToShow-s.slideCount)*s.slideWidth,n=(i+s.options.slidesToShow-s.slideCount)*t),s.slideCount<=s.options.slidesToShow&&(s.slideOffset=0,n=0),s.options.centerMode===!0&&s.options.infinite===!0?s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)-s.slideWidth:s.options.centerMode===!0&&(s.slideOffset=0,s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)),e=s.options.vertical===!1?i*s.slideWidth*-1+s.slideOffset:i*t*-1+n,s.options.variableWidth===!0&&(o=s.slideCount<=s.options.slidesToShow||s.options.infinite===!1?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow),e=s.options.rtl===!0?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,s.options.centerMode===!0&&(o=s.slideCount<=s.options.slidesToShow||s.options.infinite===!1?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow+1),e=s.options.rtl===!0?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(s.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){var e=this;return e.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(e.options.infinite===!1?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);i>t;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o,s=this;return o=s.options.centerMode===!0?s.slideWidth*Math.floor(s.options.slidesToShow/2):0,s.options.swipeToSlide===!0?(s.$slideTrack.find(".slick-slide").each(function(e,n){return n.offsetLeft-o+i(n).outerWidth()/2>-1*s.swipeLeft?(t=n,!1):void 0}),e=Math.abs(i(t).attr("data-slick-index")-s.currentSlide)||1):s.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){var t=this;
vendor: 2,854 bytes, line 4505
4505t.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots()),e&&t.$slider.trigger("init",[t]),t.options.accessibility===!0&&t.initADA()},e.prototype.initArrowEvents=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.on("click.slick",{message:"next"},i.changeSlide))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&e.options.autoplay===!0&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.setPaused,e,!0)).on("mouseleave.slick",i.proxy(e.setPaused,e,!1))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),e.$list.on("mouseenter.slick",i.proxy(e.setPaused,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.setPaused,e,!1)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).on("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.initUI=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.show(),i.options.autoplay===!0&&i.autoPlay()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&e.options.accessibility===!0?e.changeSlide({data:{message:"previous"}}):39===i.keyCode&&e.options.accessibility===!0&&e.changeSlide({data:{message:"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=document.createElement("img");o.onload=function(){e.animate({opacity:0}
4505,100,function(){e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy").removeClass("slick-loading")})})},o.src=t})}var t,o,s,n,r=this;r.options.centerMode===!0?r.options.infinite===!0?(s=r.currentSlide+(r.options.slidesToShow/2+1),n=s+r.options.slidesToShow+2):(s=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),n=2+(r.options.slidesToShow/2+1)+r.currentSlide):(s=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,n=s+r.options.slidesToShow,r.options.fade===!0&&(s>0&&s--,n<=r.slideCount&&n++)),t=r.$slider.find(".slick-slide").slice(s,n),e(t),r.slideCount<=r.options.slidesToShow?(o=r.$slider.find(".slick-slide"),e(o)):r.currentSlide>=r.slideCount-r.options.slidesToShow?(o=r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow),e(o)):0===r.currentSlide&&(o=r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow),e(o))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){var i=this;i.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.paused=!1,i.autoPlay()},e.prototype.postSlide=function(i){var e=this;e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay===!0&&e.paused===!1&&e.autoPlay(),e.options.accessibility===!0&&e.initADA()},e.prototype.prev=e.prototype.slickPrev=function(){var i=this;i.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(){var e,t,o=this;e=i("img[data-lazy]",o.$slider).length,e>0&&(t=i("img[data-lazy]",o.$slider).first(),t.attr("src",null),t.attr("src",t.attr("data-lazy")).removeClass("slick-loading").load(function(){t.removeAttr("data-lazy"),o.progressiveLazyLoad(),o.options.adaptiveHeight===!0&&o.setPosition()}).error(function(){t.removeAttr("data-lazy"),o.progressiveLazyLoad()}))},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,s.options.infinite||(s.slideCount<=s.options.slidesToShow?s.currentSlide=0:s.currentSlide>o&&(s.currentSlide=o)),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,t=n[e].breakpoint,n.hasOwnProperty(e)){for(;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.checkResponsive(!1,!0),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses(0),e.setPosition(),e.$slider.trigger("reInit",[e]),e.options.autoplay===!0&&e.focusHandler()},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;return"boolean"==typeof i?(e=i,i=e===!0?0:o.slideCount-1):i=e===!0?--i:i,o.slideCount<1||0>i||i>o.slideCount-1?!1:(o.unload(),t===!0?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,void o.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};
vendor: 1,493 bytes, line 4505
4505o.options.rtl===!0&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,o.transformsEnabled===!1?o.$slideTrack.css(s):(s={},o.cssTransitions===!1?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;i.options.vertical===!1?i.options.centerMode===!0&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),i.options.centerMode===!0&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),i.options.vertical===!1&&i.options.variableWidth===!1?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):i.options.variableWidth===!0?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();i.options.variableWidth===!1&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,t.options.rtl===!0?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
4505):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(e,t,o){var s,n,r=this;if("responsive"===e&&"array"===i.type(t))for(n in t)if("array"!==i.type(r.options.responsive))r.options.responsive=[t[n]];else{for(s=r.options.responsive.length-1;s>=0;)r.options.responsive[s].breakpoint===t[n].breakpoint&&r.options.responsive.splice(s,1),s--;r.options.responsive.push(t[n])}else r.options[e]=t;o===!0&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),i.options.fade===!1?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=i.options.vertical===!0?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),(void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.msTransition)&&i.options.useCSS===!0&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&i.animType!==!1&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&i.animType!==!1},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),n.options.centerMode===!0?(e=Math.floor(n.options.slidesToShow/2),n.options.infinite===!0&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")):i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=n.options.infinite===!0?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===n.options.lazyLoad&&n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(s.options.fade===!0&&(s.options.centerMode=!1),s.options.infinite===!0&&s.options.fade===!1&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=s.options.centerMode===!0?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;o>e;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.setPaused=function(i){var e=this;e.options.autoplay===!0&&e.options.pauseOnHover===!0&&(e.paused=i,i?e.autoPlayClear():e.autoPlay())},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));return s||(s=0),t.slideCount<=t.options.slidesToShow?(t.setSlideClasses(s),void t.asNavFor(s)):void t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l=null,a=this;return e=e||!1,a.animating===!0&&a.options.waitForAnimate===!0||a.options.fade===!0&&a.currentSlide===i||a.slideCount<=a.options.slidesToShow?void 0:(e===!1&&a.asNavFor(i),o=i,l=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,a.options.infinite===!1&&a.options.centerMode===!1&&(0>i||i>a.getDotCount()*a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0?a.animateSlide(r,function(){a.postSlide(o); 4506}):a.postSlide(o))):a.options.infinite===!1&&a.options.centerMode===!0&&(0>i||i>a.slideCount-a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):(a.options.autoplay===!0&&clearInterval(a.autoPlayTimer),s=0>o?a.slideCount%a.options.slidesToScroll!==0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
4506o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!==0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),a.options.fade===!0?(t!==!0?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight()):void(t!==!0?a.animateSlide(l,function(){a.postSlide(s)}):a.postSlide(s))))},e.prototype.startLoad=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),o=Math.round(180*t/Math.PI),0>o&&(o=360-Math.abs(o)),45>=o&&o>=0?s.options.rtl===!1?"left":"right":360>=o&&o>=315?s.options.rtl===!1?"left":"right":o>=135&&225>=o?s.options.rtl===!1?"right":"left":s.options.verticalSwiping===!0?o>=35&&135>=o?"left":"right":"vertical"},e.prototype.swipeEnd=function(i){var e,t=this;if(t.dragging=!1,t.shouldClick=t.touchObject.swipeLength>10?!1:!0,void 0===t.touchObject.curX)return!1;if(t.touchObject.edgeHit===!0&&t.$slider.trigger("edge",[t,t.swipeDirection()]),t.touchObject.swipeLength>=t.touchObject.minSwipe)switch(t.swipeDirection()){case"left":e=t.options.swipeToSlide?t.checkNavigable(t.currentSlide+t.getSlideCount()):t.currentSlide+t.getSlideCount(),t.slideHandler(e),t.currentDirection=0,t.touchObject={},t.$slider.trigger("swipe",[t,"left"]);break;case"right":e=t.options.swipeToSlide?t.checkNavigable(t.currentSlide-t.getSlideCount()):t.currentSlide-t.getSlideCount(),t.slideHandler(e),t.currentDirection=1,t.touchObject={},t.$slider.trigger("swipe",[t,"right"])}else t.touchObject.startX!==t.touchObject.curX&&(t.slideHandler(t.currentSlide),t.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,e.options.verticalSwiping===!0&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!r.dragging||n&&1!==n.length?!1:(e=r.getLeft(r.currentSlide),r.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,r.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curX-r.touchObject.startX,2))),r.options.verticalSwiping===!0&&(r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curY-r.touchObject.startY,2)))),t=r.swipeDirection(),"vertical"!==t?(void 0!==i.originalEvent&&r.touchObject.swipeLength>4&&i.preventDefault(),s=(r.options.rtl===!1?1:-1)*(r.touchObject.curX>r.touchObject.startX?1:-1),r.options.verticalSwiping===!0&&(s=r.touchObject.curY>r.touchObject.startY?1:-1),o=r.touchObject.swipeLength,r.touchObject.edgeHit=!1,r.options.infinite===!1&&(0===r.currentSlide&&"right"===t||r.currentSlide>=r.getDotCount()&&"left"===t)&&(o=r.touchObject.swipeLength*r.options.edgeFriction,r.touchObject.edgeHit=!0),r.options.vertical===!1?r.swipeLeft=e+o*s:r.swipeLeft=e+o*(r.$list.height()/r.listWidth)*s,r.options.verticalSwiping===!0&&(r.swipeLeft=e+o*s),r.options.fade===!0||r.options.touchMove===!1?!1:r.animating===!0?(r.swipeLeft=null,!1):void r.setCSS(r.swipeLeft)):void 0)},e.prototype.swipeStart=function(i){var e,t=this;return 1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(t.touchObject={},!1):(void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,void(t.dragging=!0))},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
4506,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i,e=this;i=Math.floor(e.options.slidesToShow/2),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&e.options.centerMode===!1?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&e.options.centerMode===!0&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},e.prototype.visibility=function(){var i=this;document[i.hidden]?(i.paused=!0,i.autoPlayClear()):i.options.autoplay===!0&&(i.paused=!1,i.autoPlay())},e.prototype.initADA=function(){var e=this;e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),e.$slideTrack.attr("role","listbox"),e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){i(this).attr({role:"option","aria-describedby":"slick-slide"+e.instanceUid+t})}),null!==e.$dots&&e.$dots.attr("role","tablist").find("li").each(function(t){i(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+e.instanceUid+t,id:"slick-slide"+e.instanceUid+t})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),e.activateADA()},e.prototype.activateADA=function(){var i=this;i.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.focusHandler=function(){var e=this;e.$slider.on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.isPlay&&(o.is(":focus")?(e.autoPlayClear(),e.paused=!0):(e.paused=!1,e.autoPlay()))},0)})},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;r>i;i++)if("object"==typeof s||"undefined"==typeof s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),"undefined"!=typeof t)return t;return o}}); 4507 4508/* End */ 4509; 4510; /* Start:"a:4:{s:4:"full";s:85:"/bitrix/templates/evolution_v2/js/vendor/jquery.magnific-popup.min.js?168190042920219";s:6:"source";s:69:"/bitrix/templates/evolution_v2/js/vendor/jquery.magnific-popup.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4511/*! Magnific Popup - v1.1.0 - 2016-02-20 4512* http://dimsemenov.com/plugins/magnific-popup/ 4513* Copyright (c) 2016 Dmitry Semenov; */ 4514!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.
4514st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;
4514if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},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:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
4514var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.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 c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
4514var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.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 c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); 4515/* End */ 4516; 4517; /* Start:"a:4:{s:4:"full";s:59:"/bitrix/templates/evolution_v2/js/magnific.js?1681900429470";s:6:"source";s:45:"/bitrix/templates/evolution_v2/js/magnific.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4518$.extend(true, $.magnificPopup.defaults, { 4519 tClose: '<?=GetMessage("MAGNIFIC_CLOSE")?>', 4520 tLoading: '', 4521 gallery: { 4522 tPrev: '<?=GetMessage("MAGNIFIC_LEFT")?>', 4523 tNext: '<?=GetMessage("MAGNIFIC_RIGHT")?>', 4524 tCounter: '%curr% / %total%' 4525 }, 4526 image: { 4527 tError: '<?=GetMessage("MAGNIFIC_ERROR_IMAGE")?>' 4528 }, 4529 ajax: { 4530 tError: '<?=GetMessage("MAGNIFIC_ERROR_AJAX")?>' 4531 }, 4532 closeBtnInside: false 4533}); 4534/* End */ 4535; 4536; /* Start:"a:4:{s:4:"full";
4536s:56:"/bitrix/templates/evolution_v2/js/main.js?17643230688781";s:6:"source";s:41:"/bitrix/templates/evolution_v2/js/main.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4537function is_touch_device() { 4538 return (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)); 4539} 4540 4541function itemsSliderResponsive(prerow, container){ 4542 if(!container){ 4543 if($('.with-sidebar').length){ 4544 container = 820; 4545 } 4546 else{ 4547 container = 1200; 4548 } 4549 } 4550 4551 var slideWidth = prerow / container; 4552 var psResponsive = [ 4553 { 4554 breakpoint: 1199, 4555 settings: { 4556 slidesToShow: prerow, 4557 slidesToScroll: prerow, 4558 } 4559 }, 4560 { 4561 breakpoint: 991, 4562 settings: { 4563 slidesToShow: Math.ceil(992 * slideWidth), 4564 slidesToScroll: Math.ceil(992 * slideWidth), 4565 } 4566 }, 4567 { 4568 breakpoint: 767, 4569 settings: { 4570 slidesToShow: Math.ceil(768 * slideWidth), 4571 slidesToScroll: Math.ceil(768 * slideWidth), 4572 } 4573 }, 4574 { 4575 breakpoint: 599, 4576 settings: { 4577 slidesToShow: Math.ceil(600 * slideWidth), 4578 slidesToScroll: Math.ceil(600 * slideWidth), 4579 } 4580 }, 4581 { 4582 breakpoint: 479, 4583 settings: { 4584 slidesToShow: Math.ceil(480 * slideWidth), 4585 slidesToScroll: Math.ceil(480 * slideWidth), 4586 } 4587 }, 4588 { 4589 breakpoint: 319, 4590 settings: { 4591 slidesToShow: Math.ceil(320 * slideWidth), 4592 slidesToScroll: Math.ceil(320 * slideWidth), 4593 } 4594 }, 4595 { 4596 breakpoint: 0, 4597 settings: { 4598 slidesToShow: 1, 4599 slidesToScroll: 1, 4600 speed : 250 4601 } 4602 } 4603 ]; 4604 4605 return psResponsive; 4606} 4607 4608function itemsSliderInit(el){ 4609 $(el).filter(':visible').each(function() { 4610 var self = $(this); 4611 var slider = self.find('.slider'); 4612 var maxItems = slider.data('per-row'); 4613 var sliderFilter = self.prev('.slider-filter'); 4614 4615 if(slider.hasClass('slick-initialized')){ 4616 slider.slick('setPosition'); 4617 } 4618 else{ 4619 slider.slick({ 4620 speed: 400, 4621 touchThreshold: 10, 4622 mobileFirst: true, 4623 prevArrow: self.find('.slick-prev'), 4624 nextArrow: self.find('.slick-next'), 4625 infinite: false, 4626 slide: '.item', 4627 draggable: false, 4628 responsive: itemsSliderResponsive(maxItems), 4629 useCSS: true, 4630 cssEase: 'ease', 4631 easing: 'easeInOutCubic' 4632 }); 4633 } 4634 4635 if(sliderFilter){ 4636 var hpf = 'all'; 4637 sliderFilter.find('a').on('click', function() { 4638 var category = $(this).attr('data-category'); 4639 if (!$(this).hasClass('active')) { 4640 sliderFilter.find('a').removeClass('active'); 4641 4642 if (category == 'all') { 4643 slider.slick('slickUnfilter'); 4644 hpf = 'all'; 4645 } 4646 else { 4647 slider.slick('slickUnfilter'); 4648 slider.slick('slickFilter', '.category-' + category); 4649 hpf = category; 4650 } 4651 $(this).addClass('active'); 4652 } 4653 return false; 4654 }); 4655 } 4656 }); 4657} 4658 4659$(document).ready(function() { 4660 if (is_touch_device()) { 4661 $('html').addClass('touch'); 4662 } 4663 else { 4664 $('html').addClass('no-touch'); 4665 } 4666 4667 // TABS 4668 $('.ms-tabs .tabs-ctrl a').on('click', function(){ 4669 if(!$(this).hasClass('active')){ 4670 $(this).addClass('active').siblings().removeClass('active'); 4671 $(this).tab('show'); 4672 } 4673 return false; 4674 }); 4675 4676 $('.ms-tabs .tabs-ctrl a').on('shown.bs.tab', function(event){ 4677 var activeTab = $(event.target).attr('href'); 4678 var slider = $(activeTab + ' .content-slider'); 4679 itemsSliderInit(slider); 4680 }); 4681 4682 4683 // HOME SLIDER 4684 var homeSlider = $('.homeslider .slick-slider'); 4685 if (homeSlider.length) { 4686 homeSlider.on('afterChange', function(event, slick, currentSlide) { 4687 homeSlider.find('div[data-slick-index=' + currentSlide + ']').css('z-index', '1').siblings().css('z-index', ''); 4688 }); 4689 4690 homeSlider.slick({ 4691 // fade: true, 4692 autoplay: true, 4693 autoplaySpeed: 4000, 4694 speed: 500, 4695 touchThreshold: 10, 4696 mobileFirst: true, 4697 dots: true, 4698 prevArrow: '<a class="slick-arrow slick-prev"><i class="fa fa-angle-left"></i></a>', 4699 nextArrow: '<a class="slick-arrow slick-next"><i class="fa fa-angle-right"></i></a>', 4700 infinite: true, 4701 slide: 'div.item', 4702 draggable: false, 4703 useCSS: true, 4704 cssEase: 'ease', 4705 easing: 'easeInOutCubic' 4706 }); 4707 } 4708 4709 // ITEMS SLIDERS 4710 itemsSliderInit('.products-slider'); 4711 itemsSliderInit('.items-list-slider'); 4712 4713 // SIDE BANNER 4714 $('.side-banner .slider').each(function(){ 4715 var self = $(this); 4716 var initial = Math.floor(Math.random() * self.find('.item').length); 4717 4718 self.slick({ 4719 initialSlide: initial, 4720 fade: true, 4721 autoplay: false, 4722 autoplaySpeed: 4000, 4723 speed: 250, 4724 touchThreshold: 10, 4725 mobileFirst: true, 4726 dots: true, 4727 arrows: true, 4728 prevArrow: '<a class="slick-arrow slick-prev"><i class="fa fa-angle-left"></i></a>', 4729 nextArrow: '<a class="slick-arrow slick-next"><i class="fa fa-angle-right"></i></a>', 4730 infinite: true, 4731 slide: 'div.item', 4732 draggable: false, 4733 useCSS: true, 4734 cssEase: 'ease', 4735 easing: 'easeInOutCubic' 4736 }); 4737 }); 4738 4739 // TOP PANEL SEARCH 4740 $('.top-panel .js-search-toggle').on('click', function() { 4741 $(this).toggleClass('active') 4742 .closest('.search-wrapper').find('.search-dropdown') 4743 .toggleClass('active') 4744 .find('input') 4745 .focus(); 4746 return false;
4747 }); 4748 $(document).on('click', function(e){ 4749 if($('.search-dropdown.active').length){ 4750 if (!$(e.target).is('.search-dropdown') && !$(e.target).parents('.search-dropdown').length) { 4751 $('.top-panel .js-search-toggle').click(); 4752 } 4753 } 4754 }); 4755 4756 // MOBILE SEARCH 4757 $('.top-mobile-panel .js-search-toggle').on('click', function() { 4758 $(this).toggleClass('active'); 4759 $('.search-mobile') 4760 .toggleClass('active') 4761 .find('input') 4762 .focus(); 4763 4764 $('.top-panel').removeClass('active'); 4765 return false; 4766 }); 4767 4768 // Mobile contacts 4769 $('.top-mobile-panel .js-contacts-toggle').on('click', function() { 4770 $('.top-panel').toggleClass('active'); 4771 $('.top-mobile-panel .js-search-toggle, .search-mobile').removeClass('active'); 4772 return false; 4773 }); 4774 4775 $(window).smartresize(function(){ 4776 $('.top-panel, .search-mobile').removeClass('active'); 4777 }); 4778 4779 // SCROLL TO TOP BUTTON 4780 $(document).on('scroll', function() { 4781 var doc = document.documentElement; 4782 var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); 4783 4784 if (top > 350) { 4785 $('#f_up').addClass('show'); 4786 } else { 4787 $('#f_up').removeClass('show'); 4788 } 4789 }); 4790 4791 $('#f_up').on('click', function() { 4792 $('html, body').animate({ 4793 scrollTop: 0 4794 }, 600); 4795 4796 return false; 4797 }); 4798 4799 // FIXED PANEL 4800 function fixedPanel(){ 4801 var doc = document.documentElement; 4802 var scrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); 4803 var offsetTop = $('.menubar').position().top + $('.menubar').height(); 4804 var $body = $('body'); 4805 4806 if (scrollTop > offsetTop) { 4807 $body.addClass('m_fixed_top_panel').css('padding-top', '0'); 4808 // $body.addClass('m_fixed_top_panel').css('padding-top', $('.site-header__top').height()); 4809 } else { 4810 $body.removeClass('m_fixed_top_panel').css('padding-top','0'); 4811 } 4812 } 4813 4814 if($('body').hasClass('s_fixed_top_panel')){ 4815 if (!window.matchMedia("screen and (max-width: 767px)").matches) { 4816 fixedPanel(); 4817 } 4818 4819 $(document).on('scroll', function() { 4820 if (window.matchMedia("screen and (min-width: 768px)").matches) { 4821 fixedPanel(); 4822 } 4823 }); 4824 4825 $(window).smartresize(function(){ 4826 if (window.matchMedia("screen and (max-width: 767px)").matches) { 4827 $('body').removeClass('m_fixed_top_panel').css('padding-top','0'); 4828 } 4829 else{ 4830 fixedPanel(); 4831 } 4832 }); 4833 } 4834 4835 // FIXED MENU 4836 function fixedMenu(){ 4837 var doc = document.documentElement; 4838 var scrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); 4839 var offsetTop = $('.menubar').offset().top; 4840 var $body = $('body'); 4841 4842 if (scrollTop > offsetTop) { 4843 if(!$body.hasClass('m_fixed_menu')){ 4844 $body.addClass('m_fixed_menu'); 4845 $(document).trigger('m_fixed_menu'); 4846 } 4847 } 4848 else { 4849 if($body.hasClass('m_fixed_menu')){ 4850 $body.removeClass('m_fixed_menu'); 4851 $(document).trigger('m_fixed_menu'); 4852 } 4853 } 4854 } 4855 4856 if($('.s_fixed_menu').length){ 4857 fixedMenu(); 4858 4859 $(document).on('scroll', function(){ 4860 fixedMenu(); 4861 }); 4862 } 4863 4864 // GALLERY 4865 $('.gallery').each(function() { 4866 $(this).magnificPopup({ 4867 delegate: 'a', 4868 type: 'image', 4869 closeBtnInside: true, 4870 titleSrc: 'title', 4871 overflowY: 'hidden', 4872 gallery: { 4873 preload: [0, 2], 4874 enabled:true 4875 }, 4876 callbacks: { 4877 beforeOpen: function() { 4878 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 4879 this.st.mainClass = 'mfp-zoom-in'; 4880 } 4881 } 4882 }); 4883 }); 4884 4885 // IMAGES ON PAGE 4886 $('.img-zoom').magnificPopup({ 4887 type: 'image', 4888 closeBtnInside: true, 4889 titleSrc: 'title', 4890 overflowY: 'hidden', 4891 callbacks: { 4892 beforeOpen: function() { 4893 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 4894 this.st.mainClass = 'mfp-zoom-in'; 4895 } 4896 } 4897 }); 4898 4899 // ACCORDION 4900 $('.block-accordion').on('show.bs.collapse', function() { 4901 $('.block-accordion').find('.collapse.in').collapse('hide'); 4902 }); 4903 4904 // SELECT VIEW 4905 $('.select_view .btn').on('click', function(){ 4906 window.location = $(this).attr('data-href'); 4907 }); 4908 4909}); 4910 4911/* End */ 4912; 4913; /* Start:"a:4:{s:4:"full";s:56:"/bitrix/templates/evolution_v2/js/menu.js?16819004296653";s:6:"source";s:41:"/bitrix/templates/evolution_v2/js/menu.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4914$(function(){ 4915 4916 // MENU 4917 $(".side-menu-dropdown li, .menubar .menu li").on("mouseenter", function() { 4918 var $this = $(this); 4919 4920 var leaveTimer = $this.data("leaveTimer") || 0; 4921 var enterTimer = $this.data("enterTimer") || 0; 4922 clearTimeout(leaveTimer); 4923 clearTimeout(enterTimer); 4924 4925 enterTimer = setTimeout(function() { 4926 $this.addClass("hover").siblings().removeClass("hover"); 4927 }, 50); 4928 $this.data("enterTimer", enterTimer); 4929 }); 4930 4931 $(".side-menu-dropdown li, .menubar .menu li").on("mouseleave", function() { 4932 var $this = $(this); 4933 var enterTimer = $this.data("enterTimer") || 0; 4934 var leaveTimer = $this.data("leaveTimer") || 0; 4935 clearTimeout(enterTimer); 4936 clearTimeout(leaveTimer); 4937 4938 if(!$this.hasClass('hassub') && !$this.parents('li').hasClass('hassub')){ 4939 $this.removeClass("hover rtl sub_l"); 4940 } 4941 else{ 4942 leaveTimer = setTimeout(function() { 4943 $this.removeClass("hover rtl sub_l"); 4944 }, 300); 4945 } 4946 4947 $this.data("leaveTimer", leaveTimer); 4948 }); 4949 4950 // SIDE MENU 4951 $(".side-menu-dropdown").on("mouseenter", function() { 4952 var leaveTimer = $('.main').data("leaveTimer") || 0; 4953 clearTimeout(leaveTimer); 4954 $(this).closest('.main').addClass('hover-z'); 4955 }); 4956 4957 $(".side-menu-dropdown").on("mouseleave", function() { 4958 var leaveTimer = $('.main').data("leaveTimer") || 0; 4959 leaveTimer = setTimeout(function() { 4960 $('.main').removeClass('hover-z'); 4961 }, 300); 4962 $('.main').data("leaveTimer", leaveTimer); 4963 }); 4964
4965 if(is_touch_device()){ 4966 $('.side-menu-dropdown').removeClass('side-menu-dropdown').addClass('side-menu-accordion'); 4967 } 4968 4969 $('.side-menu-accordion > li.hassub').each(function(){ 4970 if($(this).hasClass('active') || $(this).find('.active').length){ 4971 $(this).addClass('opened'); 4972 } 4973 else{ 4974 $(this).addClass('closed'); 4975 } 4976 }); 4977 4978 $(".side-menu-accordion > li.hassub > .link .js_sub_toggle").on("click", function() { 4979 var self = $(this); 4980 var li = self.closest('li'); 4981 4982 if(li.hasClass('closed')){ 4983 li.removeClass('closed').addClass('opened hover'); 4984 } 4985 else{ 4986 li.removeClass('opened hover').addClass('closed'); 4987 } 4988 }); 4989 4990 4991 // HORIZONTAL MENU 4992 $('.menubar .menu-toggle').on('click', function() { 4993 var self = $(this).parents('.menubar').find('.menu-wrapper'); 4994 var mWrapIn = $('.menu-wrapper-in', self); 4995 $(mWrapIn).addClass('drop-anim'); 4996 self.toggleClass('open'); 4997 if(self.hasClass('open')) { 4998 $('body').addClass('no-scroll'); 4999 } else { 5000 $('body').removeClass('no-scroll'); 5001 } 5002 }); 5003 $('.menubar .js-menu-close').on('click', function() { 5004 var self = $(this).parents('.menubar').find('.menu-wrapper'); 5005 var mWrapIn = $('.menu-wrapper-in', self); 5006 $(mWrapIn).addClass('drop-anim'); 5007 self.removeClass('open'); 5008 $('body').removeClass('no-scroll'); 5009 }); 5010 5011 $('.menubar .js_sub_toggle').on('click', function() { 5012 $(this).parent().parent().toggleClass('open'); 5013 }); 5014 5015 $('.menubar .link > a[href=#]').on('click', function() { 5016 return false; 5017 }); 5018 5019 function menuInit() { 5020 var mWrap = $('.menubar .menu-wrapper'); 5021 var mWrapIn = $('.menubar .menu-wrapper-in'); 5022 var m = $('.menubar .menu'); 5023 var me = m.find('> li:not(.menu-more)'); 5024 var mMore = m.find('> .menu-more'); 5025 var mMoreMenu = mMore.find('> .submenu > ul'); 5026 var transitionEnd = 'transitionend webkitTransitionEnd oTransitionEnd otransitionend update'; 5027 5028 function getMenuItemsWidth() { 5029 var totalMenuWidth = 0; 5030 me.filter(':not(:last)').each(function() { 5031 totalMenuWidth = totalMenuWidth + $(this).outerWidth(); 5032 }); 5033 return totalMenuWidth; 5034 } 5035 5036 mMore.find('.link a').on('click', function(e) { 5037 e.preventDefault(); 5038 }); 5039 5040 // clone menu to MORE 5041 me.clone().appendTo(mMoreMenu); 5042 var mme = mMoreMenu.find('>li'); 5043 mme.addClass('hidden'); 5044 5045 function menuMore(){ 5046 5047 me.removeClass('hidden'); 5048 mme.addClass('hidden'); 5049 5050 var mww = mWrapIn.width(); 5051 var mw = m.width(); 5052 5053 if(mww < mw){ 5054 mMore.removeClass('hidden'); 5055 $(me.get().reverse()).each(function(i){ 5056 var mww = mWrapIn.width() - mMore.width(); 5057 var mw = m.width() - mMore.width(); 5058 if(mww < mw){ 5059 $(this).addClass('hidden'); 5060 5061 $(mme.get().reverse()).eq(i).removeClass('hidden'); 5062 } 5063 }); 5064 } 5065 else{ 5066 mMore.addClass('hidden'); 5067 } 5068 $('.menubar').addClass('initialized'); 5069 } 5070 menuMore(); 5071 5072 5073 function menuRtl() { 5074 // level 1 submenu 5075 m.find('>li.hassub').on("mouseenter", function() { 5076 elLeft = $(this).offset().left; 5077 elWidth = $(this).width(); 5078 subWidth = $(this).find('>.submenu').width(); 5079 5080 if (elLeft + subWidth > $(window).width()) { 5081 // sub on full width 5082 if (elLeft + elWidth < subWidth) { 5083 $(this).addClass('sub_l').find('>.submenu').css('top', $(this).position().top + $(this).height()); 5084 } 5085 // sub RTL 5086 else { 5087 $(this).addClass('rtl'); 5088 } 5089 } 5090 }); 5091 5092 // level 2 submenu 5093 m.find('> li .submenu > ul > li.hassub').on({ 5094 mouseenter: function() { 5095 elLeft = $(this).offset().left; 5096 elWidth = $(this).width(); 5097 subWidth = $(this).find('>.submenu').width(); 5098 5099 if (elLeft + elWidth + subWidth > $(window).width()) { 5100 $(this).addClass('rtl'); 5101 } 5102 }, 5103 mouseleave: function() { 5104 // $(this).removeClass('rtl'); 5105 } 5106 }); 5107 } 5108 menuRtl(); 5109 5110 $(window).smartresize(function(){ 5111 menuMore(); 5112 menuRtl(); 5113 }); 5114 5115 $(document).on('m_fixed_menu', function(){ 5116 menuMore(); 5117 menuRtl(); 5118 }); 5119 5120 $(document).on('wf-active', function(){ 5121 menuMore(); 5122 }); 5123 5124 if (window.matchMedia("screen and (max-width: 1023px)").matches) { 5125 m.find('li.active.hassub').addClass('open'); 5126 } 5127 5128 // MENU 5129 $(".side-menu-dropdown li, .menubar .menu li").on("mouseenter", function() { 5130 var $this = $(this); 5131 5132 var leaveTimer = $this.data("leaveTimer") || 0; 5133 var enterTimer = $this.data("enterTimer") || 0; 5134 clearTimeout(leaveTimer); 5135 clearTimeout(enterTimer); 5136 5137 enterTimer = setTimeout(function() { 5138 $this.addClass("hover").siblings().removeClass("hover"); 5139 }, 50); 5140 $this.data("enterTimer", enterTimer); 5141 }); 5142 5143 $(".side-menu-dropdown li, .menubar .menu li").on("mouseleave", function() { 5144 var $this = $(this); 5145 var enterTimer = $this.data("enterTimer") || 0; 5146 var leaveTimer = $this.data("leaveTimer") || 0; 5147 clearTimeout(enterTimer); 5148 clearTimeout(leaveTimer); 5149 5150 if(!$this.hasClass('hassub') && !$this.parents('li').hasClass('hassub')){ 5151 $this.removeClass("hover rtl sub_l"); 5152 } 5153 else{ 5154 leaveTimer = setTimeout(function() { 5155 $this.removeClass("hover rtl sub_l"); 5156 }, 300); 5157 } 5158 5159 $this.data("leaveTimer", leaveTimer); 5160 }); 5161 5162 $(mWrapIn).on(transitionEnd, function () { 5163 $(this).removeClass('drop-anim'); 5164 }); 5165 } 5166 menuInit(); 5167}); 5168/* End */ 5169; 5170; /* Start:"a:4:{s:4:"full";s:58:"/bitrix/templates/evolution_v2/js/detail.js?16819004293412";s:6:"source";s:43:"/bitrix/templates/evolution_v2/js/detail.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5171$(document).ready(function(){ 5172 var pmi = $('.detail-main-image'); 5173 var pmiImg = pmi.find('img'); 5174 var pts = $('.detail-thumbs-slider'); 5175 var ptsMaxIndex = $('.detail-thumbs-slider .image').length-1; 5176 5177 // THUMBS SLIDER 5178 pts.slick({ 5179 speed: 200, 5180 touchThreshold: 10, 5181 mobileFirst: true, 5182 prevArrow: '<a class="slick-arrow slick-prev"><i class="fa fa-angle-left"></i></a>', 5183 nextArrow: '<a class="slick-arrow slick-next"><i class="fa fa-angle-right"></i></a>', 5184 infinite: false, 5185 draggable: false, 5186 responsive: itemsSliderResponsive(pts.data('per-row')) 5187 }); 5188 5189 // CHANGE MAIN IMAGE 5190 function setMainImg(index){ 5191 var current = pts.find('.image[data-slick-index="' + index + '"]'); 5192 var href = current.find('a').attr('href'); 5193 pts.find('.image').removeClass('active'); 5194 current.addClass('active'); 5195 pmi.find(".switching-image").show(); 5196 5197 $('<img>').attr('src', href).load(function() {
5198 pmiImg 5199 .attr({'src':href, 'data-img-index': index}); 5200 pmi.find(".switching-image").hide(); 5201 }).each(function() { 5202 if (this.complete) { 5203 $(this).trigger("load"); 5204 } 5205 }); 5206 $('.main-img-current').html(parseInt(index) + 1); 5207 pmiImg.parent().attr('href', href); 5208 } 5209 5210 $(document).on('click', '.detail-thumbs-slider .image a', function() { 5211 var index = $(this).parent().attr('data-slick-index'); 5212 setMainImg(index); 5213 return false; 5214 }); 5215 5216 // PREV 5217 $(document).on('click', '.detail-main-image .arrow-prev', function() { 5218 var currentIndex = parseInt(pmiImg.attr('data-img-index')); 5219 var newIndex = currentIndex - 1; 5220 if(newIndex >= 0){ 5221 pts.slick('slickGoTo', parseInt(newIndex)); 5222 setMainImg(newIndex); 5223 } 5224 else{ 5225 pts.slick('slickGoTo', parseInt(ptsMaxIndex)); 5226 setMainImg(ptsMaxIndex); 5227 } 5228 }); 5229 5230 // NEXT 5231 $(document).on('click', '.detail-main-image .arrow-next', function() { 5232 var currentIndex = parseInt(pmiImg.attr('data-img-index')); 5233 var newIndex = currentIndex + 1; 5234 if(newIndex <= ptsMaxIndex){ 5235 pts.slick('slickGoTo', parseInt(newIndex)); 5236 setMainImg(newIndex); 5237 } 5238 else{ 5239 pts.slick('slickGoTo', parseInt(0)); 5240 setMainImg(0); 5241 } 5242 }); 5243 5244 // OPEN GALLERY POPUP 5245 $(document).on('click', '.detail-main-image a.image', function() { 5246 var startIndex = parseInt(pts.find('.active').attr('data-slick-index')); 5247 $.magnificPopup.open({ 5248 items: productGallery, 5249 type: 'image', 5250 gallery: { 5251 enabled: true, 5252 preload: [0, 2], 5253 navigateByImgClick: true, 5254 }, 5255 closeBtnInside: true, 5256 callbacks: { 5257 beforeOpen: function() { 5258 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 5259 this.st.mainClass = 'mfp-zoom-in'; 5260 } 5261 } 5262 }, startIndex); 5263 5264 return false; 5265 }); 5266 5267 function scrollToTab(tabId){ 5268 if($(tabId).length){ 5269 var tpHeight = $('.s_top_panel_fixed .top-panel').height(); 5270 var minusOffsetTop = tpHeight !== null ? tpHeight : 0; 5271 5272 var el = $(tabId); 5273 var offsetTop; 5274 5275 if(el.closest('.tab-content').length){ 5276 offsetTop = el.closest('.tab-content').offset().top; 5277 } 5278 else{ 5279 offsetTop = $(tabId).offset().top; 5280 } 5281 5282 $('html, body').animate({scrollTop: offsetTop - minusOffsetTop - 20}, 1000); 5283 } 5284 } 5285 5286 $(document).on('click', '.all-specs-link', function() { 5287 $('.tabs-ctrl a[href="'+$(this).attr('href')+'"]').click(); 5288 scrollToTab($(this).attr('href')); 5289 }); 5290 5291}); 5292 5293/* End */ 5294; 5295; /* Start:"a:4:{s:4:"full";s:62:"/bitrix/templates/evolution_v2/js/ajax-modal.js?16819004291780";s:6:"source";s:47:"/bitrix/templates/evolution_v2/js/ajax-modal.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5296function fileUploadSetName(el) { 5297 var filename = $(el).val(); 5298 if (filename.substring(3, 11) == 'fakepath') { 5299 filename = filename.substring(12); 5300 } 5301 $("#upload-file-info").html(filename); 5302} 5303 5304function hideModal(timeout) { 5305 timeout = timeout ? timeout : 3000; 5306 5307 setTimeout(function() { 5308 $('.modal_ajax').modal('hide'); 5309 }, timeout); 5310} 5311 5312$(document).ready(function() { 5313 5314 // MODAL AJAX 5315 var $modal = $('.modal_ajax'); 5316 var $modalContent = $modal.find('.modal-content'); 5317 5318 function modalLoading() { 5319 $modal.removeClass('loaded').addClass('loading'); 5320 } 5321 5322 function modalLoaded() { 5323 $modal.removeClass('loading').addClass('loaded'); 5324 } 5325 5326 $modal.on('hidden.bs.modal', function(e) { 5327 $modal.removeClass('loaded'); 5328 $modalContent.html(''); 5329 }); 5330 5331 $(document).on('click', '.js_ajax_modal', function() { 5332 var self = $(this); 5333 5334 $modal.modal('show'); 5335 modalLoading(); 5336 5337 var params; 5338 try { 5339 params = JSON.parse(self.attr('data-params')); 5340 } catch (e) { 5341 params = ''; 5342 } 5343 5344 $.get(self.attr('data-href'), params) 5345 .done(function(data) { 5346 $modalContent.html(data); 5347 modalLoaded(); 5348 $('.js-input-mask', $modalContent).trigger("initInputMask"); 5349 }) 5350 .fail(function() { 5351 $modalContent.html('<div class="modal-header bg-danger text-danger">' + 'Error' + '</div>'); 5352 modalLoaded(); 5353 }); 5354 }); 5355 5356 // MODAL MOBILE FILTER 5357 var $f = $('.smartfilter'); 5358 var $fsc = $('.bx-filter-section .panel-body'); 5359 var $fm = $('#filter_mobile_modal'); 5360 var $fmc = $('#filter_mobile_modal .modal-body'); 5361 5362 $fm.on('show.bs.modal', function(e) { 5363 $f.appendTo($fmc); 5364 }); 5365 5366 $fm.on('hidden.bs.modal', function(e) { 5367 $f.appendTo($fsc); 5368 }); 5369 5370 $(window).smartresize(function(event) { 5371 if (window.matchMedia("screen and (min-width: 768px)").matches) { 5372 $fm.modal('hide'); 5373 } 5374 }); 5375}); 5376 5377/* End */ 5378; 5379; /* Start:"a:4:{s:4:"full";s:75:"/bitrix/templates/evolution_v2/js/fancybox/fancybox.umd.js?1681900429105639";s:6:"source";s:58:"/bitrix/templates/evolution_v2/js/fancybox/fancybox.umd.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5380// @fancyapps/ui/Fancybox v4.0.31 5381!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function i(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};
vendor: 4,434 bytes, line 5381
5381i%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,i){return e&&a(t.prototype,e),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=c(t);if(e){var o=c(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return u(this,i)}}function v(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=v(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:i):o.value}},p.apply(this,arguments)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var n,o,a=[],s=!0,r=!1;try{for(i=i.call(t);!(s=(n=i.next()).done)&&(a.push(n.value),!e||a.length!==e);s=!0);}catch(t){r=!0,o=t}finally{try{s||null==i.return||i.return()}finally{if(r)throw o}}return a}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return b(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function x(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=y(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){r=!0,a=t}
5381,f:function(){try{s||null==i.return||i.return()}finally{if(r)throw a}}}}var w=function(t){return"object"===n(t)&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t)},k=function t(){for(var e=!1,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];"boolean"==typeof o[0]&&(e=o.shift());var s=o[0];if(!s||"object"!==n(s))throw new Error("extendee must be an object");for(var r=o.slice(1),l=r.length,c=0;c<l;c++){var h=r[c];for(var d in h)if(h.hasOwnProperty(d)){var u=h[d];if(e&&(Array.isArray(u)||w(u))){var f=Array.isArray(u)?[]:{};s[d]=t(!0,s.hasOwnProperty(d)?s[d]:f,u)}else s[d]=u}}return s},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4;return t=parseFloat(t)||0,Math.round((t+Number.EPSILON)*e)/e},C=function t(e){return!!(e&&"object"===n(e)&&e instanceof Element&&e!==document.body)&&(!e.__Panzoom&&(function(t){var e=getComputedStyle(t)["overflow-y"],i=getComputedStyle(t)["overflow-x"],n=("scroll"===e||"auto"===e)&&Math.abs(t.scrollHeight-t.clientHeight)>1,o=("scroll"===i||"auto"===i)&&Math.abs(t.scrollWidth-t.clientWidth)>1;return n||o}(e)?e:t(e.parentNode)))},$="undefined"!=typeof window&&window.ResizeObserver||function(){function t(e){o(this,t),this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=e}return s(t,[{key:"observe",value:function(t){if(!this.observables.some((function(e){return e.el===t}))){var e={el:t,size:{height:t.clientHeight,width:t.clientWidth}};this.observables.push(e)}}},{key:"unobserve",value:function(t){this.observables=this.observables.filter((function(e){return e.el!==t}))}},{key:"disconnect",value:function(){this.observables=[]}},{key:"check",value:function(){var t=this.observables.filter((function(t){var e=t.el.clientHeight,i=t.el.clientWidth;if(t.size.height!==e||t.size.width!==i)return t.size.height=e,t.size.width=i,!0})).map((function(t){return t.el}));t.length>0&&this.callback(t),window.requestAnimationFrame(this.boundCheck)}}]),t}(),E=s((function t(e){o(this,t),this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY})),P=function(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0},T=function(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t},L=function(t){return"changedTouches"in t},_=function(){function t(e){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.start,s=void 0===a?function(){return!0}:a,r=n.move,l=void 0===r?function(){}:r,c=n.end,h=void 0===c?function(){}:c;o(this,t),this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=function(t){if(!(t.buttons>0&&0!==t.button)){var e=new E(t);i.currentPointers.some((function(t){return t.id===e.id}))||i._triggerPointerStart(e,t)&&(window.addEventListener("mousemove",i._move),window.addEventListener("mouseup",i._pointerEnd))}},this._touchStart=function(t){for(var e=0,n=Array.from(t.changedTouches||[]);e<n.length;e++){var o=n[e];i._triggerPointerStart(new E(o),t)}},this._move=function(t){var e,n=i.currentPointers.slice(),o=L(t)?Array.from(t.changedTouches).map((function(t){return new E(t)})):[new E(t)],a=[],s=x(o);try{var r=function(){var t=e.value,n=i.currentPointers.findIndex((function(e){return e.id===t.id}));if(n<0)return"continue";a.push(t),i.currentPointers[n]=t};for(s.s();!(e=s.n()).done;)r()}catch(t){s.e(t)}finally{s.f()}i._moveCallback(n,i.currentPointers.slice(),t)},this._triggerPointerEnd=function(t,e){var n=i.currentPointers.findIndex((function(e){return e.id===t.id}));return!(n<0)&&(i.currentPointers.splice(n,1),i.startPointers.splice(n,1),i._endCallback(t,e),!0)},this._pointerEnd=function(t){t.buttons>0&&0!==t.button||i._triggerPointerEnd(new E(t),t)&&(window.removeEventListener("mousemove",i._move,{passive:!1}),window.removeEventListener("mouseup",i._pointerEnd,{passive:!1}))},this._touchEnd=function(t){for(var e=0,n=Array.from(t.changedTouches||[]);e<n.length;e++){var o=n[e];i._triggerPointerEnd(new E(o),t)}},this._startCallback=s,this._moveCallback=l,this._endCallback=h,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}return s(t,[{key:"stop",value:function(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}},{key:"_triggerPointerStart",value:function(t,e){return!!this._startCallback(t,e)&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}}]),t}(),A=function(t,e){return t.split(".").reduce((function(t,e){return t&&t[e]}
5381),e)},O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.options=k(!0,{},e),this.plugins=[],this.events={};for(var i=0,n=["on","once"];i<n.length;i++)for(var a=n[i],s=0,r=Object.entries(this.options[a]||{});s<r.length;s++){var l=r[s];this[a].apply(this,m(l))}}return s(t,[{key:"option",value:function(t,e){t=String(t);var i=A(t,this.options);if("function"==typeof i){for(var n,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];i=(n=i).call.apply(n,[this,this].concat(a))}return void 0===i?e:i}},{key:"localize",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t=(t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,(function(t,n,o){var a="";o?a=e.option("".concat(n[0]+n.toLowerCase().substring(1),".l10n.").concat(o)):n&&(a=e.option("l10n.".concat(n))),a||(a=t);for(var s=0;s<i.length;s++)a=a.split(i[s][0]).join(i[s][1]);return a}))).replace(/\{\{(.*)\}\}/,(function(t,e){return e}))}},{key:"on",value:function(t,e){var i=this;if(w(t)){for(var n=0,o=Object.entries(t);n<o.length;n++){var a=o[n];this.on.apply(this,m(a))}return this}return String(t).split(" ").forEach((function(t){var n=i.events[t]=i.events[t]||[];-1==n.indexOf(e)&&n.push(e)})),this}},{key:"once",value:function(t,e){var i=this;if(w(t)){for(var n=0,o=Object.entries(t);n<o.length;n++){var a=o[n];this.once.apply(this,m(a))}return this}return String(t).split(" ").forEach((function(t){var n=function n(){i.off(t,n);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];e.call.apply(e,[i,i].concat(a))};n._=e,i.on(t,n)})),this}},{key:"off",value:function(t,e){var i=this;if(!w(t))return t.split(" ").forEach((function(t){var n=i.events[t];if(!n||!n.length)return i;for(var o=-1,a=0,s=n.length;a<s;a++){var r=n[a];if(r&&(r===e||r._===e)){o=a;break}}-1!=o&&n.splice(o,1)})),this;for(var n=0,o=Object.entries(t);n<o.length;n++){var a=o[n];this.off.apply(this,m(a))}}},{key:"trigger",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var o,a=x(m(this.events[t]||[]).slice());try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s&&!1===s.call.apply(s,[this,this].concat(i)))return!1}}catch(t){a.e(t)}finally{a.f()}var r,l=x(m(this.events["*"]||[]).slice());try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c&&!1===c.call.apply(c,[this,t,this].concat(i)))return!1}}catch(t){l.e(t)}finally{l.f()}return!0}},{key:"attachPlugins",value:function(t){for(var e={},i=0,n=Object.entries(t||{});i<n.length;i++){var o=g(n[i],2),a=o[0],s=o[1];!1===this.options[a]||this.plugins[a]||(this.options[a]=k({},s.defaults||{},this.options[a]),e[a]=new s(this))}for(var r=0,l=Object.entries(e);r<l.length;r++){var c=g(l[r],2);c[0],c[1].attach(this)}return this.plugins=Object.assign({},this.plugins,e),this}},{key:"detachPlugins",value:function(){for(var t in this.plugins){var e=void 0;(e=this.plugins[t])&&"function"==typeof e.detach&&e.detach(this)}return this.plugins={},this}}]),t}(),z={touch:!0,zoom:!0,pinchToZoom:!0,panOnlyZoomed:!1,lockAxis:!1,friction:.64,decelFriction:.88,zoomFriction:.74,bounceForce:.2,baseScale:1,minScale:1,maxScale:2,step:.5,textSelection:!1,click:"toggleZoom",wheel:"zoom",wheelFactor:42,wheelLimit:5,draggableClass:"is-draggable",draggingClass:"is-dragging",ratio:1},M=function(t){l(n,t);var e=f(n);function n(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n),(i=e.call(this,k(!0,{},z,a))).state="init",i.$container=t;for(var s=0,r=["onLoad","onWheel","onClick"];s<r.length;s++){var l=r[s];i[l]=i[l].bind(d(i))}return i.initLayout(),i.resetValues(),i.attachPlugins(n.Plugins),i.trigger("init"),i.updateMetrics(),i.attachEvents(),i.trigger("ready"),!1===i.option("centerOnStart")?i.state="ready":i.panTo({friction:0}),t.__Panzoom=d(i),i}return s(n,[{key:"initLayout",value:function(){var t=this.$container;if(!(t instanceof HTMLElement))throw new Error("Panzoom: Container not found");var e=this.option("content")||t.querySelector(".panzoom__content");if(!e)throw new Error("Panzoom: Content not found");this.$content=e;var i,n=this.option("viewport")||t.querySelector(".panzoom__viewport");n||!1===this.option("wrapInner")||((n=document.createElement("div")).classList.add("panzoom__viewport"),(i=n).append.apply(i,m(t.childNodes)),t.appendChild(n));this.$viewport=n||e.parentNode}},{key:"resetValues",value:function(){this.updateRate=this.option("updateRate",/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)?250:24),this.container={width:0,height:0},this.viewport={width:0,height:0},this.content={origWidth:0,origHeight:0,width:0,height:0,x:this.option("x",0),y:this.option("y",0),scale:this.option("baseScale")},this.transform={x:0,y:0,scale:1},this.resetDragPosition()}},{key:"onLoad",value:function(t){this.updateMetrics(),this.panTo({scale:this.option("baseScale"),friction:0}),this.trigger("load",t)}},{key:"onClick",value:function(t){if(!(t.defaultPrevented||document.activeElement&&document.activeElement.closest("[contenteditable]")))if(!this.option("textSelection")||!window.getSelection().toString().length||t.target&&t.target.hasAttribute("data-fancybox-close")){var e=this.$content.getClientRects()[0];if("ready"!==this.state&&(this.dragPosition.midPoint||Math.abs(e.top-this.dragStart.rect.top)>1||Math.abs(e.left-this.dragStart.rect.left)>1))return t.preventDefault(),void t.stopPropagation();!1!==this.trigger("click",t)&&this.option("zoom")&&"toggleZoom"===this.option("click")&&(t.preventDefault(),t.stopPropagation(),this.zoomWithClick(t))}else t.stopPropagation()}},{key:"onWheel",value:function(t){!1!==this.trigger("wheel",t)&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(t)}},{key:"zoomWithWheel",value:function(t){void 0===this.changedDelta&&(this.changedDelta=0);var e=Math.max(-1,Math.min(1,-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)),i=this.content.scale,n=i*(100+e*this.option("wheelFactor"))/100;if(e<0&&Math.abs(i-this.option("minScale"))<.01||e>0&&Math.abs(i-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(e),n=i):(this.changedDelta=0,n=Math.max(Math.min(n,this.option("maxScale")),this.option("minScale"))),!(this.changedDelta>this.option("wheelLimit"))&&(t.preventDefault(),n!==i)){var o=this.$content.getBoundingClientRect(),a=t.clientX-o.left,s=t.clientY-o.top;this.zoomTo(n,{x:a,y:s}
5381)}}},{key:"zoomWithClick",value:function(t){var e=this.$content.getClientRects()[0],i=t.clientX-e.left,n=t.clientY-e.top;this.toggleZoom({x:i,y:n})}},{key:"attachEvents",value:function(){var t=this;this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();var e=new _(this.$container,{start:function(i,n){if(!t.option("touch"))return!1;if(t.velocity.scale<0)return!1;var o=n.composedPath()[0];if(!e.currentPointers.length){if(-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(o.nodeName))return!1;if(t.option("textSelection")&&function(t,e,i){for(var n=t.childNodes,o=document.createRange(),a=0;a<n.length;a++){var s=n[a];if(s.nodeType===Node.TEXT_NODE){o.selectNodeContents(s);var r=o.getBoundingClientRect();if(e>=r.left&&i>=r.top&&e<=r.right&&i<=r.bottom)return s}}return!1}(o,i.clientX,i.clientY))return!1}return!C(o)&&(!1!==t.trigger("touchStart",n)&&("mousedown"===n.type&&n.preventDefault(),t.state="pointerdown",t.resetDragPosition(),t.dragPosition.midPoint=null,t.dragPosition.time=Date.now(),!0))},move:function(i,n,o){if("pointerdown"===t.state)if(!1!==t.trigger("touchMove",o)){if(!(n.length<2&&!0===t.option("panOnlyZoomed")&&t.content.width<=t.viewport.width&&t.content.height<=t.viewport.height&&t.transform.scale<=t.option("baseScale"))&&(!(n.length>1)||t.option("zoom")&&!1!==t.option("pinchToZoom"))){var a=T(i[0],i[1]),s=T(n[0],n[1]),r=s.clientX-a.clientX,l=s.clientY-a.clientY,c=P(i[0],i[1]),h=P(n[0],n[1]),d=c&&h?h/c:1;t.dragOffset.x+=r,t.dragOffset.y+=l,t.dragOffset.scale*=d,t.dragOffset.time=Date.now()-t.dragPosition.time;var u=1===t.dragStart.scale&&t.option("lockAxis");if(u&&!t.lockAxis){if(Math.abs(t.dragOffset.x)<6&&Math.abs(t.dragOffset.y)<6)return void o.preventDefault();var f=Math.abs(180*Math.atan2(t.dragOffset.y,t.dragOffset.x)/Math.PI);t.lockAxis=f>45&&f<135?"y":"x"}if("xy"===u||"y"!==t.lockAxis){if(o.preventDefault(),o.stopPropagation(),o.stopImmediatePropagation(),t.lockAxis&&(t.dragOffset["x"===t.lockAxis?"y":"x"]=0),t.$container.classList.add(t.option("draggingClass")),t.transform.scale===t.option("baseScale")&&"y"===t.lockAxis||(t.dragPosition.x=t.dragStart.x+t.dragOffset.x),t.transform.scale===t.option("baseScale")&&"x"===t.lockAxis||(t.dragPosition.y=t.dragStart.y+t.dragOffset.y),t.dragPosition.scale=t.dragStart.scale*t.dragOffset.scale,n.length>1){var v=T(e.startPointers[0],e.startPointers[1]),p=v.clientX-t.dragStart.rect.x,g=v.clientY-t.dragStart.rect.y,m=t.getZoomDelta(t.content.scale*t.dragOffset.scale,p,g),y=m.deltaX,b=m.deltaY;t.dragPosition.x-=y,t.dragPosition.y-=b,t.dragPosition.midPoint=s}else t.setDragResistance();t.transform={x:t.dragPosition.x,y:t.dragPosition.y,scale:t.dragPosition.scale},t.startAnimation()}}}else o.preventDefault()},end:function(n,o){if("pointerdown"===t.state)if(t._dragOffset=i({},t.dragOffset),e.currentPointers.length)t.resetDragPosition();else if(t.state="decel",t.friction=t.option("decelFriction"),t.recalculateTransform(),t.$container.classList.remove(t.option("draggingClass")),!1!==t.trigger("touchEnd",o)&&"decel"===t.state){var a=t.option("minScale");if(t.transform.scale<a)t.zoomTo(a,{friction:.64});else{var s=t.option("maxScale");if(t.transform.scale-s>.01){var r=t.dragPosition.midPoint||n,l=t.$content.getClientRects()[0];t.zoomTo(s,{friction:.64,x:r.clientX-l.left,y:r.clientY-l.top})}else;}}}});this.pointerTracker=e}},{key:"initObserver",value:function(){var t=this;this.resizeObserver||(this.resizeObserver=new $((function(){t.updateTimer||(t.updateTimer=setTimeout((function(){var e=t.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-t.container.width)>1||Math.abs(e.height-t.container.height)>1)&&(t.isAnimating()&&t.endAnimation(!0),t.updateMetrics(),t.panTo({x:t.content.x,y:t.content.y,scale:t.option("baseScale"),friction:0})),t.updateTimer=null):t.updateTimer=null}),t.updateRate))})),this.resizeObserver.observe(this.$container))}},{key:"resetDragPosition",value:function(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};var t=this.content,e=t.x,n=t.y,o=t.scale;
5381this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:n,scale:o},this.dragPosition=i(i({},this.dragPosition),{},{x:e,y:n,scale:o}),this.dragOffset={x:0,y:0,scale:1,time:0}}},{key:"updateMetrics",value:function(t){!0!==t&&this.trigger("beforeUpdate");var e,n=this.$container,o=this.$content,a=this.$viewport,s=o instanceof HTMLImageElement,r=this.option("zoom"),l=this.option("resizeParent",r),c=this.option("width"),h=this.option("height"),d=c||(e=o,Math.max(parseFloat(e.naturalWidth||0),parseFloat(e.width&&e.width.baseVal&&e.width.baseVal.value||0),parseFloat(e.offsetWidth||0),parseFloat(e.scrollWidth||0))),u=h||function(t){return Math.max(parseFloat(t.naturalHeight||0),parseFloat(t.height&&t.height.baseVal&&t.height.baseVal.value||0),parseFloat(t.offsetHeight||0),parseFloat(t.scrollHeight||0))}(o);Object.assign(o.style,{width:c?"".concat(c,"px"):"",height:h?"".concat(h,"px"):"",maxWidth:"",maxHeight:""}),l&&Object.assign(a.style,{width:"",height:""});var f=this.option("ratio");c=d=S(d*f),h=u=S(u*f);var v=o.getBoundingClientRect(),p=a.getBoundingClientRect(),g=a==n?p:n.getBoundingClientRect(),m=Math.max(a.offsetWidth,S(p.width)),y=Math.max(a.offsetHeight,S(p.height)),b=window.getComputedStyle(a);if(m-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),y-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=m,this.viewport.height=y,r){if(Math.abs(d-v.width)>.1||Math.abs(u-v.height)>.1){var x=function(t,e,i,n){var o=Math.min(i/t||0,n/e);return{width:t*o||0,height:e*o||0}}(d,u,Math.min(d,v.width),Math.min(u,v.height));c=S(x.width),h=S(x.height)}Object.assign(o.style,{width:"".concat(c,"px"),height:"".concat(h,"px"),transform:""})}if(l&&(Object.assign(a.style,{width:"".concat(c,"px"),height:"".concat(h,"px")}),this.viewport=i(i({},this.viewport),{},{width:c,height:h})),s&&r&&"function"!=typeof this.options.maxScale){var w=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:w}}this.content=i(i({},this.content),{},{origWidth:d,origHeight:u,fitWidth:c,fitHeight:h,width:c,height:h,scale:1,isZoomable:r}),this.container={width:g.width,height:g.height},!0!==t&&this.trigger("afterUpdate")}},{key:"zoomIn",value:function(t){this.zoomTo(this.content.scale+(t||this.option("step")))}},{key:"zoomOut",value:function(t){this.zoomTo(this.content.scale-(t||this.option("step")))}},{key:"toggleZoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.option("maxScale"),i=this.option("baseScale"),n=this.content.scale>i+.5*(e-i)?i:e;this.zoomTo(n,t)}},{key:"zoomTo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option("baseScale"),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.x,n=void 0===i?null:i,o=e.y,a=void 0===o?null:o;t=Math.max(Math.min(t,this.option("maxScale")),this.option("minScale"));var s=S(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===n&&(n=this.content.width*s*.5),null===a&&(a=this.content.height*s*.5);var r=this.getZoomDelta(t,n,a),l=r.deltaX,c=r.deltaY;n=this.content.x-l,a=this.content.y-c,this.panTo({x:n,y:a,scale:t,friction:this.option("zoomFriction")})}},{key:"getZoomDelta",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,a=e>0&&n?e/n:0,s=i>0&&o?i/o:0,r=this.content.fitWidth*t,l=this.content.fitHeight*t,c=(r-n)*a,h=(l-o)*s;return{deltaX:c,deltaY:h}}},{key:"panTo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,n=void 0===e?this.content.x:e,o=t.y,a=void 0===o?this.content.y:o,s=t.scale,r=t.friction,l=void 0===r?this.option("friction"):r,c=t.ignoreBounds,h=void 0!==c&&c;if(s=s||this.content.scale||1,!h){var d=this.getBounds(s),u=d.boundX,f=d.boundY;u&&(n=Math.max(Math.min(n,u.to),u.from)),f&&(a=Math.max(Math.min(a,f.to),f.from))}this.friction=l,this.transform=i(i({},this.transform),{},{x:n,y:a,scale:s}),l?(this.state="panning",this.velocity={x:(1/this.friction-1)*(n-this.content.x),y:(1/this.friction-1)*(a-this.content.y),scale:(1/this.friction-1)*(s-this.content.scale)},this.startAnimation()):this.endAnimation()}},{key:"startAnimation",value:function(){var t=this;this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((function(){return t.animate()}))}},{key:"animate",value:function(){var t=this;if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((function(){return t.animate()}))}},{key:"getBounds",value:function(t){var e=this.boundX,i=this.boundY;if(void 0!==e&&void 0!==i)return{boundX:e,boundY:i};e={from:0,to:0},i={from:0,to:0},t=t||this.transform.scale;var n=this.content.fitWidth*t,o=this.content.fitHeight*t,a=this.viewport.width,s=this.viewport.height;if(n<a){var r=S(.5*(a-n));e.from=r,e.to=r}else e.from=S(a-n);if(o<s){var l=.5*(s-o);i.from=l,i.to=l}else i.from=S(s-o);return{boundX:e,boundY:i}}},{key:"setEdgeForce",value:function(){if("decel"===this.state){var t,e,i,n,o=this.option("bounceForce"),a=this.getBounds(Math.max(this.transform.scale,this.content.scale)),s=a.boundX,r=a.boundY;if(s&&(t=this.content.x<s.from,e=this.content.x>s.to),r&&(i=this.content.y<r.from,n=this.content.y>r.to),t||e){var l=((t?s.from:s.to)-this.content.x)*o,c=this.content.x+(this.velocity.x+l)/this.friction;c>=s.from&&c<=s.to&&(l+=this.velocity.x),this.velocity.x=l,this.recalculateTransform()}if(i||n){var h=((i?r.from:r.to)-this.content.y)*o,d=this.content.y+(h+this.velocity.y)/this.friction;d>=r.from&&d<=r.to&&(h+=this.velocity.y),this.velocity.y=h,this.recalculateTransform()}}}},{key:"setDragResistance",value:function(){if("pointerdown"===this.state){var t,e,i,n,o=this.getBounds(this.dragPosition.scale),a=o.boundX,s=o.boundY;if(a&&(t=this.dragPosition.x<a.from,e=this.dragPosition.x>a.to),s&&(i=this.dragPosition.y<s.from,n=this.dragPosition.y>s.to),(t||e)&&(!t||!e)){var r=t?a.from:a.to,l=r-this.dragPosition.x;this.dragPosition.x=r-.3*l}if((i||n)&&(!i||!n)){var c=i?s.from:s.to,h=c-this.dragPosition.y;this.dragPosition.y=c-.3*h}}}},{key:"setDragForce",value:function(){"pointerdown"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}},{key:"recalculateTransform",value:function(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}},{key:"isAnimating",value:function(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}},{key:"setTransform",value:function(t){var e,n,o,a,s;(t?(e=S(this.transform.x),n=S(this.transform.y),o=this.transform.scale,this.content=i(i({},this.content),{},{x:e,y:n,scale:o})):(e=S(this.content.x),n=S(this.content.y),o=this.content.scale/(this.content.width/this.content.fitWidth),this.content=i(i({},this.content),{},{x:e,y:n})),this.trigger("beforeTransform"),e=S(this.content.x),n=S(this.content.y),t&&this.option("zoom"))?(a=S(this.content.fitWidth*o),s=S(this.content.fitHeight*o),this.content.width=a,this.content.height=s,this.transform=i(i({},this.transform),{},{width:a,height:s,scale:o}),Object.assign(this.$content.style,{width:"".concat(a,"px"),height:"".concat(s,"px"),maxWidth:"none",maxHeight:"none",transform:"translate3d(".concat(e,"px, ").concat(n,"px, 0) scale(1)")})):this.$content.style.transform="translate3d(".concat(e,"px, ").concat(n,"px, 0) scale(").concat(o,")");this.trigger("afterTransform")}},{key:"endAnimation",value:function(t){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0}
5381,this.setTransform(!0),this.state="ready",this.handleCursor(),!0!==t&&this.trigger("endAnimation")}},{key:"handleCursor",value:function(){var t=this.option("draggableClass");t&&this.option("touch")&&(1==this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(t):this.$container.classList.add(t))}},{key:"detachEvents",value:function(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"destroy",value:function(){"destroy"!==this.state&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}]),n}(O);M.version="4.0.31",M.Plugins={};var I=function(t,e){var i=0;return function(){var n=(new Date).getTime();if(!(n-i<e))return i=n,t.apply(void 0,arguments)}},R=function(){function t(e){o(this,t),this.$container=null,this.$prev=null,this.$next=null,this.carousel=e,this.onRefresh=this.onRefresh.bind(this)}return s(t,[{key:"option",value:function(t){return this.carousel.option("Navigation.".concat(t))}},{key:"createButton",value:function(t){var e,i=this,n=document.createElement("button");n.setAttribute("title",this.carousel.localize("{{".concat(t.toUpperCase(),"}}")));var o=this.option("classNames.button")+" "+this.option("classNames.".concat(t));return(e=n.classList).add.apply(e,m(o.split(" "))),n.setAttribute("tabindex","0"),n.innerHTML=this.carousel.localize(this.option("".concat(t,"Tpl"))),n.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),i.carousel["slide".concat("next"===t?"Next":"Prev")]()})),n}},{key:"build",value:function(){var t;this.$container||(this.$container=document.createElement("div"),(t=this.$container.classList).add.apply(t,m(this.option("classNames.main").split(" "))),this.carousel.$container.appendChild(this.$container));this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}},{key:"onRefresh",value:function(){var t=this.carousel.pages.length;t<=1||t>1&&this.carousel.elemDimWidth<this.carousel.wrapDimWidth&&!Number.isInteger(this.carousel.option("slidesPerPage"))?this.cleanup():(this.build(),this.$prev.removeAttribute("disabled"),this.$next.removeAttribute("disabled"),this.carousel.option("infiniteX",this.carousel.option("infinite"))||(this.carousel.page<=0&&this.$prev.setAttribute("disabled",""),this.carousel.page>=t-1&&this.$next.setAttribute("disabled","")))}},{key:"cleanup",value:function(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}},{key:"attach",value:function(){this.carousel.on("refresh change",this.onRefresh)}},{key:"detach",value:function(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}]),t}();R.defaults={prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>',nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};var F=function(){function t(e){o(this,t),this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}return s(t,[{key:"buildList",value:function(){var t=this;if(!(this.carousel.pages.length<this.carousel.option("Dots.minSlideCount"))){var e=document.createElement("ol");return e.classList.add("carousel__dots"),e.addEventListener("click",(function(e){if("page"in e.target.dataset){e.preventDefault(),e.stopPropagation();var i=parseInt(e.target.dataset.page,10),n=t.carousel;i!==n.page&&(n.pages.length<3&&n.option("infinite")?n[0==i?"slidePrev":"slideNext"]():n.slideTo(i))}})),this.$list=e,this.carousel.$container.appendChild(e),this.carousel.$container.classList.add("has-dots"),e}}},{key:"removeList",value:function(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}},{key:"rebuildDots",value:function(){var t=this,e=this.$list,i=!!e,n=this.carousel.pages.length;if(n<2)i&&this.removeList();else{i||(e=this.buildList());var o=this.$list.children.length;if(o>n)for(var a=n;a<o;a++)this.$list.removeChild(this.$list.lastChild);else{for(var s=function(e){var i=document.createElement("li");i.classList.add("carousel__dot"),i.dataset.page=e,i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("title",t.carousel.localize("{{GOTO}}",[["%d",e+1]])),i.addEventListener("keydown",(function(t){var e,n=t.code;"Enter"===n||"NumpadEnter"===n?e=i:"ArrowRight"===n?e=i.nextSibling:"ArrowLeft"===n&&(e=i.previousSibling),e&&e.click()})),t.$list.appendChild(i)},r=o;r<n;r++)s(r);this.setActiveDot()}}}},{key:"setActiveDot",value:function(){if(this.$list){this.$list.childNodes.forEac
5381h((function(t){t.classList.remove("is-selected")}));var t=this.$list.childNodes[this.carousel.page];t&&t.classList.add("is-selected")}}},{key:"onChange",value:function(){this.setActiveDot()}},{key:"onRefresh",value:function(){this.rebuildDots()}},{key:"attach",value:function(){this.carousel.on(this.events)}},{key:"detach",value:function(){this.removeList(),this.carousel.off(this.events),this.carousel=null}}]),t}(),N=function(){function t(e){o(this,t),this.carousel=e,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}return s(t,[{key:"addAsTargetFor",value:function(t){this.target=this.carousel,this.nav=t,this.attachEvents()}},{key:"addAsNavFor",value:function(t){this.target=t,this.nav=this.carousel,this.attachEvents()}},{key:"attachEvents",value:function(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}},{key:"onNavReady",value:function(){this.onTargetChange(!0)}},{key:"onNavClick",value:function(t,e,i){var n=i.target.closest(".carousel__slide");if(n){i.stopPropagation();var o=parseInt(n.dataset.index,10),a=this.target.findPageForSlide(o);this.target.page!==a&&this.target.slideTo(a,{friction:this.friction}),this.markSelectedSlide(o)}}},{key:"onNavCreateSlide",value:function(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}},{key:"onTargetChange",value:function(){var t=this.target.pages[this.target.page].indexes[0],e=this.nav.findPageForSlide(t);this.nav.slideTo(e),this.markSelectedSlide(t)}},{key:"markSelectedSlide",value:function(t){this.selectedIndex=t,m(this.nav.slides).filter((function(t){return t.$el&&t.$el.classList.remove("is-nav-selected")}));var e=this.nav.slides[t];e&&e.$el&&e.$el.classList.add("is-nav-selected")}},{key:"attach",value:function(t){var e=t.options.Sync;(e.target||e.nav)&&(e.target?this.addAsNavFor(e.target):e.nav&&this.addAsTargetFor(e.nav),this.friction=e.friction)}},{key:"detach",value:function(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}]),t}();N.defaults={friction:.92};var D={Navigation:R,Dots:F,Sync:N},B={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}},H=function(t){l(n,t);var e=f(n);function n(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,n),a=k(!0,{},B,a),(i=e.call(this,a)).state="init",i.$container=t,!(i.$container instanceof HTMLElement))throw new Error("No root element provided");return i.slideNext=I(i.slideNext.bind(d(i)),250),i.slidePrev=I(i.slidePrev.bind(d(i)),250),i.init(),t.__Carousel=d(i),i}return s(n,[{key:"init",value:function(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(n.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform="translate3d(".concat(-1*this.pages[this.page].left,"px, 0px, 0) scale(1)")),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}},{key:"initLayout",value:function(){var t,e,i,n,o=this.option("prefix"),a=this.option("classNames");(this.$viewport=this.option("viewport")||this.$container.querySelector(".".concat(o).concat(a.viewport)),this.$viewport)||(this.$viewport=document.createElement("div"),(t=this.$viewport.classList).add.apply(t,m((o+a.viewport).split(" "))),(e=this.$viewport).append.apply(e,m(this.$container.childNodes)),this.$container.appendChild(this.$viewport));(this.$track=this.option("track")||this.$container.querySelector(".".concat(o).concat(a.track)),this.$track)||(this.$track=document.createElement("div"),(i=this.$track.classList).add.apply(i,m((o+a.track).split(" "))),(n=this.$track).append.apply(n,m(this.$viewport.childNodes)),this.$viewport.appendChild(this.$track))}},{key:"initSlides",value:function(){var t=this;this.slides=[],this.$viewport.querySelectorAll(".".concat(this.option("prefix")).c
5381oncat(this.option("classNames.slide"))).forEach((function(e){var i={$el:e,isDom:!0};t.slides.push(i),t.trigger("createSlide",i,t.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=k(!0,m(this.slides),this.options.slides))}},{key:"updateMetrics",value:function(){var t,e=this,n=0,o=[];this.slides.forEach((function(i,a){var s=i.$el,r=i.isDom||!t?e.getSlideMetrics(s):t;i.index=a,i.width=r,i.left=n,t=r,n+=r,o.push(a)}));var a=Math.max(this.$track.offsetWidth,S(this.$track.getBoundingClientRect().width)),s=getComputedStyle(this.$track);a-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),this.contentWidth=n,this.viewportWidth=a;var r=[],l=this.option("slidesPerPage");if(Number.isInteger(l)&&n>a)for(var c=0;c<this.slides.length;c+=l)r.push({indexes:o.slice(c,c+l),slides:this.slides.slice(c,c+l)});else for(var h=0,d=0,u=0;u<this.slides.length;u+=1){var f=this.slides[u];(!r.length||d+f.width>a)&&(r.push({indexes:[],slides:[]}),h=r.length-1,d=0),d+=f.width,r[h].indexes.push(u),r[h].slides.push(f)}var v=this.option("center"),p=this.option("fill");r.forEach((function(t,i){t.index=i,t.width=t.slides.reduce((function(t,e){return t+e.width}),0),t.left=t.slides[0].left,v&&(t.left+=.5*(a-t.width)*-1),p&&!e.option("infiniteX",e.option("infinite"))&&n>a&&(t.left=Math.max(t.left,0),t.left=Math.min(t.left,n-a))}));var g,y=[];r.forEach((function(t){var e=i({},t);g&&e.left===g.left?(g.width+=e.width,g.slides=[].concat(m(g.slides),m(e.slides)),g.indexes=[].concat(m(g.indexes),m(e.indexes))):(e.index=y.length,g=e,y.push(e))})),this.pages=y;var b=this.page;if(null===b){var x=this.option("initialSlide");b=null!==x?this.findPageForSlide(x):parseInt(this.option("initialPage",0),10)||0,y[b]||(b=y.length&&b>y.length?y[y.length-1].index:0),this.page=b,this.pageIndex=b}this.updatePanzoom(),this.trigger("refresh")}},{key:"getSlideMetrics",value:function(t){if(!t){var e,i,n=this.slides[0];if((t=document.createElement("div")).dataset.isTestEl=1,t.style.visibility="hidden",(e=t.classList).add.apply(e,m((this.option("prefix")+this.option("classNames.slide")).split(" "))),n.customClass)(i=t.classList).add.apply(i,m(n.customClass.split(" ")));this.$track.prepend(t)}var o=Math.max(t.offsetWidth,S(t.getBoundingClientRect().width)),a=t.currentStyle||window.getComputedStyle(t);return o=o+(parseFloat(a.marginLeft)||0)+(parseFloat(a.marginRight)||0),t.dataset.isTestEl&&t.remove(),o}},{key:"findPageForSlide",value:function(t){t=parseInt(t,10)||0;var e=this.pages.find((function(e){return e.indexes.indexOf(t)>-1}));return e?e.index:null}},{key:"slideNext",value:function(){this.slideTo(this.pageIndex+1)}},{key:"slidePrev",value:function(){this.slideTo(this.pageIndex-1)}},{key:"slideTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.x,n=void 0===i?-1*this.setPage(t,!0):i,o=e.y,a=void 0===o?0:o,s=e.friction,r=void 0===s?this.option("friction"):s;this.Panzoom.content.x===n&&!this.Panzoom.velocity.x&&r||(this.Panzoom.panTo({x:n,y:a,friction:r,ignoreBounds:!0}),"ready"===this.state&&"ready"===this.Panzoom.state&&this.trigger("settle"))}},{key:"initPanzoom",value:function(){var t=this;this.Panzoom&&this.Panzoom.destroy();var e=k(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:function(){return t.option("textSelection",!1)},panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new M(this.$container,e),this.Panzoom.on({"*":function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return t.trigger.apply(t,["Panzoom.".concat(e)].concat(n))},afterUpdate:function(){t.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:function(){t.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}},{key:"updatePanzoom",value:function(){this.Panzoom&&(this.Panzoom.content=i(i({},this.Panzoom.content),{},{fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth}
5381),this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}},{key:"manageSlideVisiblity",value:function(){var t=this,e=this.contentWidth,i=this.viewportWidth,n=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0,o=this.option("preload"),a=this.option("infiniteX",this.option("infinite")),s=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),r=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach((function(l){var c,h,d=0;c=n-s,h=n+i+r,c-=o*(i+s+r),h+=o*(i+s+r);var u=l.left+l.width>c&&l.left<h;c=n+e-s,h=n+e+i+r,c-=o*(i+s+r);var f=a&&l.left+l.width>c&&l.left<h;c=n-e-s,h=n-e+i+r,c-=o*(i+s+r);var v=a&&l.left+l.width>c&&l.left<h;f||u||v?(t.createSlideEl(l),u&&(d=0),f&&(d=-1),v&&(d=1),l.left+l.width>n&&l.left<=n+i+r&&(d=0)):t.removeSlideEl(l),l.hasDiff=d}));var l=0,c=0;this.slides.forEach((function(t,i){var n=0;t.$el?(i!==l||t.hasDiff?n=c+t.hasDiff*e:c=0,t.$el.style.left=Math.abs(n)>.1?"".concat(c+t.hasDiff*e,"px"):"",l++):c+=t.width})),this.markSelectedSlides()}},{key:"createSlideEl",value:function(t){var e;if(t){if(!t.$el){var i,n=document.createElement("div");if(n.dataset.index=t.index,(e=n.classList).add.apply(e,m((this.option("prefix")+this.option("classNames.slide")).split(" "))),t.customClass)(i=n.classList).add.apply(i,m(t.customClass.split(" ")));t.html&&(n.innerHTML=t.html);var o=[];this.slides.forEach((function(t,e){t.$el&&o.push(e)}));var a=t.index,s=null;if(o.length){var r=o.reduce((function(t,e){return Math.abs(e-a)<Math.abs(t-a)?e:t}));s=this.slides[r]}return this.$track.insertBefore(n,s&&s.$el?s.index<t.index?s.$el.nextSibling:s.$el:null),t.$el=n,this.trigger("createSlide",t,a),t}var l,c=t.$el.dataset.index;c&&parseInt(c,10)===t.index||(t.$el.dataset.index=t.index,t.$el.querySelectorAll("[data-lazy-srcset]").forEach((function(t){t.srcset=t.dataset.lazySrcset})),t.$el.querySelectorAll("[data-lazy-src]").forEach((function(t){var e=t.dataset.lazySrc;t instanceof HTMLImageElement?t.src=e:t.style.backgroundImage="url('".concat(e,"')")})),(l=t.$el.dataset.lazySrc)&&(t.$el.style.backgroundImage="url('".concat(l,"')")),t.state="ready")}}},{key:"removeSlideEl",value:function(t){t.$el&&!t.isDom&&(this.trigger("removeSlide",t),t.$el.remove(),t.$el=null)}},{key:"markSelectedSlides",value:function(){var t=this,e=this.option("classNames.slideSelected"),i="aria-hidden";this.slides.forEach((function(n,o){var a=n.$el;if(a){var s=t.pages[t.page];s&&s.indexes&&s.indexes.indexOf(o)>-1?(e&&!a.classList.contains(e)&&(a.classList.add(e),t.trigger("selectSlide",n)),a.removeAttribute(i)):(e&&a.classList.contains(e)&&(a.classList.remove(e),t.trigger("unselectSlide",n)),a.setAttribute(i,!0))}}))}},{key:"updatePage",value:function(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}},{key:"onBeforeTransform",value:function(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}},{key:"manageInfiniteTrack",value:function(){var t=this.contentWidth,e=this.viewportWidth;if(!(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||t<e)){var i=this.Panzoom,n=!1;return i.content.x<-1*(t-e)&&(i.content.x+=t,this.pageIndex=this.pageIndex-this.pages.length,n=!0),i.content.x>e&&(i.content.x-=t,this.pageIndex=this.pageIndex+this.pages.length,n=!0),n&&"pointerdown"===i.state&&i.resetDragPosition(),n}}},{key:"onTouchEnd",value:function(t,e){var i=this.option("dragFree");if(!i&&this.pages.length>1&&t.dragOffset.time<350&&Math.abs(t.dragOffset.y)<1&&Math.abs(t.dragOffset.x)>5)this[t.dragOffset.x<0?"slideNext":"slidePrev"]();else if(i){var n=g(this.getPageFromPosition(-1*t.transform.x),2)[1];this.setPage(n)}else this.slideToClosest()}},{key:"slideToClosest",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getPageFromPosition(-1*this.Panzoom.content.x),i=g(e,2),n=i[1];this.slideTo(n,t)}},{key:"getPageFromPosition",value:function(t){var e=this.pages.length;this.option("center")&&(t+=.5*this.viewportWidth);var i=Math.floor(t/this.contentWidth);t-=i*this.contentWidth;var n=this.slides.find((function(e){return e.left<=t&&e.left+e.width>t}));if(n){var o=this.findPageForSlide(n.index);return[o,o+i*e]}return[0,0]}},{key:"setPage",value:function(t,e){var i=0,n=parseInt(t,10)||0,o=this.page,a=this.pageIndex,s=this.pages.length,r=this.contentWidth,l=this.viewportWidth;if(t=(n%s+s)%s,this.option("infiniteX",this.option("infinite"))&&r>l){var c=Math.floor(n/s)||0,h=r;if(i=this.pages[t].left+c*h,!0===e&&s>2){var d=-1*this.Panzoom.content.x,u=i-h,f=i+h,v=Math.abs(d-i),p=Math.abs(d-u),g=Math.abs(d-f);g<v&&g<=p?(i=f,n+=s):p<v&&p<g&&(i=u,n-=s)}}else t=n=Math.max(0,Math.min(n,s-1)),i=this.pages.length?this.pages[t].left:0;return this.page=t,this.pageIndex=n,null!==o&&t!==o&&(this.prevPage=o,this.prevPageIndex=a,this.trigger("change",t,o)),i}},{key:"destroy",value:function(){var t=this;
5381this.state="destroy",this.slides.forEach((function(e){t.removeSlideEl(e)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}]),n}(O);H.version="4.0.31",H.Plugins=D;var W=!("undefined"==typeof window||!window.document||!window.document.createElement),j=null,X=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],q=function(t){if(t&&W){null===j&&document.createElement("div").focus({get preventScroll(){return j=!0,!1}});try{if(t.setActive)t.setActive();else if(j)t.focus({preventScroll:!0});else{var e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch(t){}}},U=function(){function t(e){o(this,t),this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(var i=0,n=["onReady","onResize","onTouchstart","onTouchmove"];i<n.length;i++){var a=n[i];this[a]=this[a].bind(this)}}return s(t,[{key:"onReady",value:function(){var t=window.visualViewport;t&&(this.viewport=t,this.startY=0,t.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}},{key:"onResize",value:function(){this.updateViewport()}},{key:"updateViewport",value:function(){var t=this.fancybox,e=this.viewport,i=e.scale||1,n=t.$container;if(n){var o="",a="",s="";i-1>.1&&(o="".concat(e.width*i,"px"),a="".concat(e.height*i,"px"),s="translate3d(".concat(e.offsetLeft,"px, ").concat(e.offsetTop,"px, 0) scale(").concat(1/i,")")),n.style.width=o,n.style.height=a,n.style.transform=s}}},{key:"onTouchstart",value:function(t){this.startY=t.touches?t.touches[0].screenY:t.screenY}},{key:"onTouchmove",value:function(t){var e=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(t.cancelable&&!(t.touches.length>1||1!==i)){var n=C(t.composedPath()[0]);if(n){var o=window.getComputedStyle(n),a=parseInt(o.getPropertyValue("height"),10),s=t.touches?t.touches[0].screenY:t.screenY,r=e<=s&&0===n.scrollTop,l=e>=s&&n.scrollHeight-n.scrollTop===a;(r||l)&&t.preventDefault()}else t.preventDefault()}}},{key:"onWheel",value:function(t){C(t.composedPath()[0])||t.preventDefault()}},{key:"cleanup",value:function(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);var t=this.viewport;t&&(t.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}},{key:"attach",value:function(){this.fancybox.on("initLayout",this.onReady)}},{key:"detach",value:function(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}}]),t}(),Y=function(){function t(e){o(this,t),this.fancybox=e,this.$container=null,this.state="init";for(var i=0,n=["onPrepare","onClosing","onKeydown"];i<n.length;i++){var a=n[i];this[a]=this[a].bind(this)}this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}return s(t,[{key:"onPrepare",value:function(){this.getSlides().length<this.fancybox.option("Thumbs.minSlideCount")?this.state="disabled":!0===this.fancybox.option("Thumbs.autoStart")&&this.fancybox.Carousel.Panzoom.content.height>=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}},{key:"onClosing",value:function(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}},{key:"onKeydown",value:function(t,e){e===t.option("Thumbs.key")&&this.toggle()}},{key:"build",value:function(){var t=this;if(!this.$container){var e=document.createElement("div");e.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel.nextSibling),this.Carousel=new H(e,k(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",(function(e,i){i.preventDefault(),t.fancybox[i.deltaY<0?"prev":"next"]()})),this.$container=e,this.state="visible"}}},{key:"getSlides",value:function(){var t,e=[],i=x(this.fancybox.items);try{for(i.s();!(t=i.n()).done;){var n=t.value,o=n.thumb;o&&e.push({html:this.fancybox.option("Thumbs.tpl").replace(/\{\{src\}\}/gi,o),customClass:"has-thumb has-".concat(n.type||"image")})}}catch(t){i.e(t)}finally{i.f()}return e}},{key:"toggle",value:function(){"visible"===this.state?this.hide():"hidden"===this.state?this.show():this.build()}},{key:"show",value:function(){"hidden"===this.state&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}},{key:"hide",value:function(){"visible"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}},{key:"cleanup",value:function(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}},{key:"attach",value:function(){this.fancybox.on(this.events)}},{key:"detach",value:function(){this.fancybox.off(this.events),this.cleanup()}}]),t}();Y.defaults={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{},tpl:'<div class="fancybox__thumb" style="background-image:url(\'{{src}}\')"></div>'};var V=function(t,e){for(var i=new URL(t),n=new URLSearchParams(i.search),o=new URLSearchParams,a=0,s=[].concat(m(n),m(Object.entries(e)));a<s.length;a++){var r=g(s[a],2),l=r[0],c=r[1];"t"===l?o.set("start",parseInt(c)):o.set(l,c)}o=o.toString();var h=t.match(/#t=((.*)?\d+s)/);return h&&(o+="#t=".concat(h[1])),o},Z={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',format:""}}
5381,G=function(){function t(e){o(this,t),this.fancybox=e;for(var i=0,n=["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"];i<n.length;i++){var a=n[i];this[a]=this[a].bind(this)}this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}return s(t,[{key:"onInit",value:function(){var t,e=x(this.fancybox.items);try{for(e.s();!(t=e.n()).done;){var i=t.value;this.processType(i)}}catch(t){e.e(t)}finally{e.f()}}},{key:"processType",value:function(t){if(t.html)return t.src=t.html,t.type="html",void delete t.html;var e=t.src||"",i=t.type||this.fancybox.options.type,n=null;if(!e||"string"==typeof e){if(n=e.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){var o=V(e,this.fancybox.option("Html.youtube")),a=encodeURIComponent(n[1]);t.videoId=a,t.src="https://www.youtube-nocookie.com/embed/".concat(a,"?").concat(o),t.thumb=t.thumb||"https://i.ytimg.com/vi/".concat(a,"/mqdefault.jpg"),t.vendor="youtube",i="video"}else if(n=e.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){var s=V(e,this.fancybox.option("Html.vimeo")),r=encodeURIComponent(n[1]);t.videoId=r,t.src="https://player.vimeo.com/video/".concat(r,"?").concat(s),t.vendor="vimeo",i="video"}else(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src="//maps.google.".concat(n[1],"/?ll=").concat((n[2]?n[2]+"&z="+Math.floor(n[3])+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&"),"&output=").concat(n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"),i="map"):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src="//maps.google.".concat(n[1],"/maps?q=").concat(n[2].replace("query=","q=").replace("api=1",""),"&output=embed"),i="map");i||("#"===e.charAt(0)?i="inline":(n=e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i="html5video",t.format=t.format||"video/"+("ogv"===n[1]?"ogg":n[1])):e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i="image":e.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),t.type=i||this.fancybox.option("defaultType","image"),"html5video"!==i&&"video"!==i||(t.video=k({},this.fancybox.option("Html.video"),t.video),t._width&&t._height?t.ratio=parseFloat(t._width)/parseFloat(t._height):t.ratio=t.ratio||t.video.ratio||Z.video.ratio)}}},{key:"onReady",value:function(){var t=this;this.fancybox.Carousel.slides.forEach((function(e){e.$el&&(t.setContent(e),e.index===t.fancybox.getSlide().index&&t.playVideo(e))}))}},{key:"onCreateSlide",value:function(t,e,i){"ready"===this.fancybox.state&&this.setContent(i)}},{key:"loadInlineContent",value:function(t){var e;if(t.src instanceof HTMLElement)e=t.src;else if("string"==typeof t.src){var i=t.src.split("#",2),n=2===i.length&&""===i[0]?i[1]:i[0];e=document.getElementById(n)}if(e){if("clone"===t.type||e.$placeHolder){var o=(e=e.cloneNode(!0)).getAttribute("id");o=o?"".concat(o,"--clone"):"clone-".concat(this.fancybox.id,"-").concat(t.index),e.setAttribute("id",o)}else{var a=document.createElement("div");a.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(a,e),e.$placeHolder=a}this.fancybox.setContent(t,e)}else this.fancybox.setError(t,"{{ELEMENT_NOT_FOUND}}")}},{key:"loadAjaxContent",value:function(t){var e=this.fancybox,i=new XMLHttpRequest;e.showLoading(t),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&"ready"===e.state&&(e.hideLoading(t),200===i.status?e.setContent(t,i.responseText):e.setError(t,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};var n=t.ajax||null;i.open(n?"POST":"GET",t.src),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(n),t.xhr=i}},{key:"loadIframeContent",value:function(t){var e=this,i=this.fancybox,n=document.createElement("iframe");
5381if(n.className="fancybox__iframe",n.setAttribute("id","fancybox__iframe_".concat(i.id,"_").concat(t.index)),n.setAttribute("allow","autoplay; fullscreen"),n.setAttribute("scrolling","auto"),t.$iframe=n,"iframe"!==t.type||!1===t.preload)return n.setAttribute("src",t.src),this.fancybox.setContent(t,n),void this.resizeIframe(t);i.showLoading(t);var o=document.createElement("div");o.style.visibility="hidden",this.fancybox.setContent(t,o),o.appendChild(n),n.onerror=function(){i.setError(t,"{{IFRAME_ERROR}}")},n.onload=function(){i.hideLoading(t);var o=!1;n.isReady||(n.isReady=!0,o=!0),n.src.length&&(n.parentNode.style.visibility="",e.resizeIframe(t),o&&i.revealContent(t))},n.setAttribute("src",t.src)}},{key:"setAspectRatio",value:function(t){var e=t.$content,i=t.ratio;if(e){var n=t._width,o=t._height;if(i||n&&o){Object.assign(e.style,{width:n&&o?"100%":"",height:n&&o?"100%":"",maxWidth:"",maxHeight:""});var a=e.offsetWidth,s=e.offsetHeight;if(o=o||s,(n=n||a)>a||o>s){var r=Math.min(a/n,s/o);n*=r,o*=r}Math.abs(n/o-i)>.01&&(i<n/o?n=o*i:o=n/i),Object.assign(e.style,{width:"".concat(n,"px"),height:"".concat(o,"px")})}}}},{key:"resizeIframe",value:function(t){var e=t.$iframe;if(e){var i=t._width||0,n=t._height||0;i&&n&&(t.autoSize=!1);var o=e.parentNode,a=o&&o.style;if(!1!==t.preload&&!1!==t.autoSize&&a)try{var s=window.getComputedStyle(o),r=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),l=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),c=e.contentWindow.document,h=c.getElementsByTagName("html")[0],d=c.body;a.width="",d.style.overflow="hidden",i=i||h.scrollWidth+r,a.width="".concat(i,"px"),d.style.overflow="",a.flex="0 0 auto",a.height="".concat(d.scrollHeight,"px"),n=h.scrollHeight+l}catch(t){}if(i||n){var u={flex:"0 1 auto"};i&&(u.width="".concat(i,"px")),n&&(u.height="".concat(n,"px")),Object.assign(a,u)}}}},{key:"onRefresh",value:function(t,e){var i=this;e.slides.forEach((function(t){t.$el&&(t.$iframe&&i.resizeIframe(t),t.ratio&&i.setAspectRatio(t))}))}},{key:"setContent",value:function(t){if(t&&!t.isDom){switch(t.type){case"html":this.fancybox.setContent(t,t.src);break;case"html5video":this.fancybox.setContent(t,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.format||t.html5video&&t.html5video.format||"").replace("{{poster}}",t.poster||t.thumb||""));break;case"inline":case"clone":this.loadInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case"video":case"map":t.preload=!1;case"iframe":this.loadIframeContent(t)}t.ratio&&this.setAspectRatio(t)}}},{key:"onSelectSlide",value:function(t,e,i){"ready"===t.state&&this.playVideo(i)}},{key:"playVideo",value:function(t){if("html5video"===t.type&&t.video.autoplay)try{var e=t.$el.querySelector("video");if(e){var i=e.play();void 0!==i&&i.then((function(){})).catch((function(t){e.muted=!0,e.play()}))}}catch(t){}if("video"===t.type&&t.$iframe&&t.$iframe.contentWindow){!function e(){if("done"===t.state&&t.$iframe&&t.$iframe.contentWindow){var i;if(t.$iframe.isReady)return t.video&&t.video.autoplay&&(i="youtube"==t.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(i&&t.$iframe.contentWindow.postMessage(JSON.stringify(i),"*"));"youtube"===t.vendor&&(i={event:"listening",id:t.$iframe.getAttribute("id")},t.$iframe.contentWindow.postMessage(JSON.stringify(i),"*"))}t.poller=setTimeout(e,250)}()}}},{key:"onUnselectSlide",value:function(t,e,i){if("html5video"!==i.type){var n=!1;"vimeo"==i.vendor?n={method:"pause",value:"true"}:"youtube"===i.vendor&&(n={event:"command",func:"pauseVideo"}),n&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(n),"*"),clearTimeout(i.poller)}else try{i.$el.querySelector("video").pause()}catch(t){}}},{key:"onRemoveSlide",value:function(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);var n=i.$content;"inline"===i.type&&n&&(n.classList.remove("fancybox__content"),"none"!==n.style.display&&(n.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);var o=n&&n.$placeHolder;o&&(o.parentNode.insertBefore(n,o),o.remove(),n.$placeHolder=null)}},{key:"onMessage",value:function(t){try{var e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event){var i,n=x(document.getElementsByClassName("fancybox__iframe"));try{for(n.s();!(i=n.n()).done;){var o=i.value;o.contentWindow===t.source&&(o.isReady=1)}}catch(t){n.e(t)}finally{n.f()}}}else"https://www.youtube-nocookie.com"===t.origin&&"onReady"===e.event&&(document.getElementById(e.id).isReady=1)}catch(t){}}},{key:"attach",value:function(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}},{key:"detach",value:function(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}]),t}();G.defaults=Z;var K=function(){function t(e){o(this,t),this.fancybox=e;for(var i=0,n=["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"];
5381i<n.length;i++){var a=n[i];this[a]=this[a].bind(this)}this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}return s(t,[{key:"onReady",value:function(){var t=this;this.fancybox.Carousel.slides.forEach((function(e){e.$el&&t.setContent(e)}))}},{key:"onDone",value:function(t,e){this.handleCursor(e)}},{key:"onClosing",value:function(t){clearTimeout(this.clickTimer),this.clickTimer=null,t.Carousel.slides.forEach((function(t){t.$image&&(t.state="destroy"),t.Panzoom&&t.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(t.getSlide())&&this.zoomOut()}},{key:"onCreateSlide",value:function(t,e,i){"ready"===this.fancybox.state&&this.setContent(i)}},{key:"onRemoveSlide",value:function(t,e,i){i.$image&&(i.$el.classList.remove(t.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}},{key:"setContent",value:function(t){var e=this;if(!(t.isDom||t.html||t.type&&"image"!==t.type||t.$image)){t.type="image",t.state="loading";var i=document.createElement("div");i.style.visibility="hidden";var n=document.createElement("img");n.addEventListener("load",(function(i){i.stopImmediatePropagation(),e.onImageStatusChange(t)})),n.addEventListener("error",(function(){e.onImageStatusChange(t)})),n.src=t.src,n.alt="",n.draggable=!1,n.classList.add("fancybox__image"),t.srcset&&n.setAttribute("srcset",t.srcset),t.sizes&&n.setAttribute("sizes",t.sizes),t.$image=n;var o=this.fancybox.option("Image.wrap");if(o){var a=document.createElement("div");a.classList.add("string"==typeof o?o:"fancybox__image-wrap"),a.appendChild(n),i.appendChild(a),t.$wrap=a}else i.appendChild(n);t.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(t,i),n.complete||n.error?this.onImageStatusChange(t):this.fancybox.showLoading(t)}}},{key:"onImageStatusChange",value:function(t){var e=this,i=t.$image;i&&"loading"===t.state&&(i.complete&&i.naturalWidth&&i.naturalHeight?(this.fancybox.hideLoading(t),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(t),t.$el.addEventListener("wheel",(function(i){return e.onWheel(t,i)}),{passive:!1}),t.$content.addEventListener("click",(function(i){return e.onClick(t,i)}),{passive:!1}),this.revealContent(t)):this.fancybox.setError(t,"{{IMAGE_ERROR}}"))}},{key:"initSlidePanzoom",value:function(t){var e=this;t.Panzoom||(t.Panzoom=new M(t.$el,k(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:t.$wrap,content:t.$image,width:t._width,height:t._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),t.Panzoom.on("startAnimation",(function(){e.fancybox.trigger("Image.startAnimation",t)})),t.Panzoom.on("endAnimation",(function(){"zoomIn"===t.state&&e.fancybox.done(t),e.handleCursor(t),e.fancybox.trigger("Image.endAnimation",t)})),t.Panzoom.on("afterUpdate",(function(){e.handleCursor(t),e.fancybox.trigger("Image.afterUpdate",t)})))}},{key:"revealContent",value:function(t){null===this.fancybox.Carousel.prevPage&&t.index===this.fancybox.options.startIndex&&this.canZoom(t)?this.zoomIn():this.fancybox.revealContent(t)}},{key:"getZoomInfo",value:function(t){var e=t.$thumb.getBoundingClientRect(),i=e.width,n=e.height,o=t.$content.getBoundingClientRect(),a=o.width,s=o.height,r=o.top-e.top,l=o.left-e.left,c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/n-a/s)>.1),{top:r,left:l,scale:a&&i?i/a:1,opacity:c}}},{key:"canZoom",value:function(t){var e=this.fancybox,i=e.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(t.Panzoom&&!t.Panzoom.content.width)return!1;if(!e.option("Image.zoom")||"contain"!==e.option("Image.fit"))return!1;var n=t.$thumb;if(!n||"loading"===t.state)return!1;i.classList.add("fancybox__no-click");var o,a=n.getBoundingClientRect();if(this.fancybox.option("Image.ignoreCoveredThumbnail")){var s=document.elementFromPoint(a.left+1,a.top+1)===n,r=document.elementFromPoint(a.right-1,a.bottom-1)===n;o=s&&r}else o=document.elementFromPoint(a.left+.5*a.width,a.top+.5*a.height)===n;return i.classList.remove("fancybox__no-click"),o}},{key:"zoomIn",value:function(){var t=this.fancybox,e=t.getSlide(),i=e.Panzoom,n=this.getZoomInfo(e),o=n.top,a=n.left,s=n.scale,r=n.opacity;t.trigger("reveal",e),i.panTo({x:-1*a,y:-1*o,scale:s,friction:0,ignoreBounds:!0}),e.$content.style.visibility="",e.state="zoomIn",!0===r&&i.on("afterTransform",(function(t){"zoomIn"!==e.state&&"zoomOut"!==e.state||(t.$content.style.opacity=Math.min(1,1-(1-t.content.scale)/(1-s)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}},{key:"zoomOut",value:function(){var t=this,e=this.fancybox,i=e.getSlide(),n=i.Panzoom;if(n){i.state="zoomOut",e.state="customClosing",i.$caption&&(i.$caption.style.visibility="hidden");var o=this.fancybox.option("Image.zoomFriction"),a=function(e){var a=t.getZoomInfo(i),s=a.top,r=a.left,l=a.scale,c=a.opacity;e||c||(o*=.82),n.panTo({x:-1*r,y:-1*s,scale:l,friction:o,ignoreBounds:!0}),o*=.98};window.addEventListener("scroll",a),n.once("endAnimation",(function(){window.removeEventListener("scroll",a),e.destroy()})),a()}}},{key:"handleCursor",value:function(t){if("image"===t.type&&t.$el){var e=t.Panzoom,i=this.fancybox.option("Image.click",!1,t),n=this.fancybox.option("Image.touch"),o=t.$el.classList,a=this.fancybox.option("Image.canZoomInClass"),s=this.fancybox.option("Image.canZoomOutClass");if(o.remove(s),o.remove(a),e&&"toggleZoom"===i)e&&1===e.content.scale&&e.option("maxScale")-e.content.scale>.01?o.add(a):e.content.scale>1&&!n&&o.add(s);else"close"===i&&o.add(s)}}},{key:"onWheel",value:function(t,e){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.
5381wheel",e))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===t.state&&t.Panzoom&&t.Panzoom.zoomWithWheel(e);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[e.deltaY<0?"prev":"next"]()}}},{key:"onClick",value:function(t,e){var i=this;if("ready"===this.fancybox.state){var n=t.Panzoom;if(!n||!n.dragPosition.midPoint&&0===n.dragOffset.x&&0===n.dragOffset.y&&1===n.dragOffset.scale){if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;var o=function(n){switch(n){case"toggleZoom":e.stopPropagation(),t.Panzoom&&t.Panzoom.zoomWithClick(e);break;case"close":i.fancybox.close();break;case"next":e.stopPropagation(),i.fancybox.next()}},a=this.fancybox.option("Image.click"),s=this.fancybox.option("Image.doubleClick");s?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,o(s)):this.clickTimer=setTimeout((function(){i.clickTimer=null,o(a)}),300):o(a)}}}},{key:"onPageChange",value:function(t,e){var i=t.getSlide();e.slides.forEach((function(t){t.Panzoom&&"done"===t.state&&t.index!==i.index&&t.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}},{key:"attach",value:function(){this.fancybox.on(this.events)}},{key:"detach",value:function(){this.fancybox.off(this.events)}}]),t}();K.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};var J=function(){function t(e){o(this,t),this.fancybox=e;for(var i=0,n=["onChange","onClosing"];i<n.length;i++){var a=n[i];this[a]=this[a].bind(this)}this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}return s(t,[{key:"onChange",value:function(t){var e=this,i=t.Carousel;this.timer&&clearTimeout(this.timer);var n=null===i.prevPage,o=t.getSlide(),a=new URL(document.URL).hash,s=!1;if(o.slug)s="#"+o.slug;else{var r=o.$trigger&&o.$trigger.dataset,l=t.option("slug")||r&&r.fancybox;l&&l.length&&"true"!==l&&(s="#"+l+(i.slides.length>1?"-"+(o.index+1):""))}n&&(this.origHash=a!==s?a:""),s&&a!==s&&(this.timer=setTimeout((function(){try{window.history[n?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+s),n&&(e.hasCreatedHistory=!0)}catch(t){}}),300))}},{key:"onClosing",value:function(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(t){}}},{key:"attach",value:function(t){t.on(this.events)}},{key:"detach",value:function(t){t.off(this.events)}}],[{key:"startFromUrl",value:function(){var e=t.Fancybox;if(e&&!e.getInstance()&&!1!==e.defaults.Hash){var i=t.getParsedURL(),n=i.hash,o=i.slug,a=i.index;if(o){var s=document.querySelector('[data-slug="'.concat(n,'"]'));if(s&&s.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),!e.getInstance()){var r=document.querySelectorAll('[data-fancybox="'.concat(o,'"]'));r.length&&(null===a&&1===r.length?s=r[0]:a&&(s=r[a-1]),s&&s.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}}}}},{key:"onHashChange",value:function(){var e=t.getParsedURL(),i=e.slug,n=e.index,o=t.Fancybox,a=o&&o.getInstance();if(a&&a.plugins.Hash){if(i){var s=a.Carousel;if(i===a.option("slug"))return s.slideTo(n-1);var r,l=x(s.slides);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.slug&&c.slug===i)return s.slideTo(c.index)}}catch(t){l.e(t)}finally{l.f()}var h=a.getSlide(),d=h.$trigger&&h.$trigger.dataset;if(d&&d.fancybox===i)return s.slideTo(n-1)}a.plugins.Hash.hasSilentClose=!0,a.close()}t.startFromUrl()}},{key:"create",value:function(e){function i(){window.addEventListener("hashchange",t.onHashChange,!1),t.startFromUrl()}t.Fancybox=e,W&&window.requestAnimationFrame((function(){/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener("DOMContentLoaded",i)}))}},{key:"destroy",value:function(){window.removeEventListener("hashchange",t.onHashChange,!1)}},{key:"getParsedURL",value:function(){var t=window.location.hash.substr(1),e=t.split("-"),i=e.length>1&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||null;return{hash:t,slug:e.join("-"),index:i}}}]),t}(),Q={pageXOffset:0,pageYOffset:0,element:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement},activate:function(t){Q.pageXOffset=window.pageXOffset,Q.pageYOffset=window.pageYOffset,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},deactivate:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}},tt=function(){function t(e){o(this,t),this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}return s(t,[{key:"isActive",value:function(){return this.active}},{key:"setTimer",value:function(){var t=this;if(this.active&&!this.timer){var e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((function(){t.timer=null,t.fancybox.option("infinite")||t.fancybox.getSlide().index!==t.fancybox.Carousel.slides.length-1?t.fancybox.next():t.fancybox.jumpTo(0,{friction:0})}),e);var i=this.$progress;i||((i=document.createElement("div")).classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(i,this.fancybox.$carousel),this.$progress=i,i.offsetHeight),i.style.transitionDuration="".concat(e,"ms"),i.style.transform="scaleX(1)"}}},{key:"clearTimer",value:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}},{key:"activate",value:function(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}},{key:"handleVisibilityChange",value:function(){this.deactivate()}},{key:"deactivate",value:function(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}},{key:"toggle",value:function(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}]),t}(),et={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:'<span data-fancybox-index=""></span> / <span data-fancybox-count=""></span>',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'<svg viewBox="0 0 24 24">
5381<path d="M15 4l-8 8 8 8"/></svg>',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'<svg viewBox="0 0 24 24"><path d="M8 4l8 8-8 8"/></svg>',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'<svg viewBox="0 0 24 24">\n <g><path d="M3 8 V3h5"></path><path d="M21 8V3h-5"></path><path d="M8 21H3v-5"></path><path d="M16 21h5v-5"></path></g>\n <g><path d="M7 2v5H2M17 2v5h5M2 17h5v5M22 17h-5v5"/></g>\n </svg>',click:function(t){t.preventDefault(),Q.element()?Q.deactivate():Q.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'<svg viewBox="0 0 24 24">\n <g><path d="M6 4v16"/><path d="M20 12L6 20"/><path d="M20 12L6 4"/></g>\n <g><path d="M7 4v15M17 4v15"/></g>\n </svg>',click:function(t){t.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'<svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="7"></circle><path d="M16 16 L21 21"></svg>',click:function(t){t.preventDefault();var e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'<svg viewBox="0 0 24 24"><path d="M12 15V3m0 12l-4-4m4 4l4-4M2 17l.62 2.48A2 2 0 004.56 21h14.88a2 2 0 001.94-1.51L22 17"/></svg>',click:function(t){t.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'<svg viewBox="0 0 24 24"><circle cx="4" cy="4" r="1" /><circle cx="12" cy="4" r="1" transform="rotate(90 12 4)"/><circle cx="20" cy="4" r="1" transform="rotate(90 20 4)"/><circle cx="4" cy="12" r="1" transform="rotate(90 4 12)"/><circle cx="12" cy="12" r="1" transform="rotate(90 12 12)"/><circle cx="20" cy="12" r="1" transform="rotate(90 20 12)"/><circle cx="4" cy="20" r="1" transform="rotate(90 4 20)"/><circle cx="12" cy="20" r="1" transform="rotate(90 12 20)"/><circle cx="20" cy="20" r="1" transform="rotate(90 20 20)"/></svg>',click:function(t){t.stopPropagation();var e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'<svg viewBox="0 0 24 24"><path d="M20 20L4 4m16 0L4 20"></path></svg>',attr:{"data-fancybox-close":"",tabindex:0}}}},it=function(){function t(e){var i=this;o(this,t),this.fancybox=e,this.$container=null,this.state="init";for(var n=0,a=["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"];n<a.length;n++){var s=a[n];this[s]=this[s].bind(this)}this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":function(){return i.onRefresh()},"Image.startAnimation":function(t,e){return i.onRefresh(e)},"Image.afterUpdate":function(t,e){return i.onRefresh(e)}}}return s(t,[{key:"onInit",value:function(){if(this.fancybox.option("Toolbar.autoEnable")){var t,e=!1,i=x(this.fancybox.items);try{for(i.s();!(t=i.n()).done;){if("image"===t.value.type){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}if(!e)return void(this.state="disabled")}var n,o=x(this.fancybox.option("Toolbar.display"));try{for(o.s();!(n=o.n()).done;){var a=n.value;if("close"===(w(a)?a.id:a)){this.fancybox.options.closeButton=!1;break}}}catch(t){o.e(t)}finally{o.f()}}},{key:"onPrepare",value:function(){var t=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new tt(t),!t.Carousel.prevPage&&(t.option("slideshow.autoStart")&&this.Slideshow.activate(),t.option("fullscreen.autoStart")&&!Q.element())))try{Q.activate(t.$container)}catch(t){}}},{key:"onFsChange",value:function(){window.scrollTo(Q.pageXOffset,Q.pageYOffset)}},{key:"onSettle",value:function(){var t=this.fancybox,e=this.Slideshow;e&&e.isActive()&&(t.getSlide().index!==t.Carousel.slides.length-1||t.option("infinite")?"done"===t.getSlide().state&&e.setTimer():e.deactivate())}},{key:"onChange",value:function(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}},{key:"onDone",value:function(t,e){var i=this.Slideshow;e.index===t.getSlide().index&&(this.update(),i&&i.isActive()&&(t.option("infinite")||e.index!==t.Carousel.slides.length-1?i.setTimer():i.deactivate()))}},{key:"onRefresh",value:function(t){t&&t.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||t&&"done"!==t.state||this.Slideshow.deactivate())}}
5381,{key:"onKeydown",value:function(t,e,i){" "===e&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}},{key:"onClosing",value:function(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}},{key:"createElement",value:function(t){var e,i;("div"===t.type?e=document.createElement("div"):(e=document.createElement("link"===t.type?"a":"button")).classList.add("carousel__button"),e.innerHTML=t.html,e.setAttribute("tabindex",t.tabindex||0),t.class)&&(i=e.classList).add.apply(i,m(t.class.split(" ")));for(var n in t.attr)e.setAttribute(n,t.attr[n]);t.label&&e.setAttribute("title",this.fancybox.localize("{{".concat(t.label,"}}"))),t.click&&e.addEventListener("click",t.click.bind(this)),"prev"===t.id&&e.setAttribute("data-fancybox-prev",""),"next"===t.id&&e.setAttribute("data-fancybox-next","");var o=e.querySelector("svg");return o&&(o.setAttribute("role","img"),o.setAttribute("tabindex","-1"),o.setAttribute("xmlns","http://www.w3.org/2000/svg")),e}},{key:"build",value:function(){var t=this;this.cleanup();var e,i=this.fancybox.option("Toolbar.items"),n=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],o=this.fancybox.plugins.Thumbs,a=x(this.fancybox.option("Toolbar.display"));try{var s=function(){var a=e.value,s=void 0,r=void 0;if(w(a)?(s=a.id,r=k({},i[s],a)):r=i[s=a],["counter","next","prev","slideshow"].includes(s)&&t.fancybox.items.length<2)return"continue";if("fullscreen"===s){if(!document.fullscreenEnabled||window.fullScreen)return"continue";document.addEventListener("fullscreenchange",t.onFsChange)}if("thumbs"===s&&(!o||"disabled"===o.state))return"continue";if(!r)return"continue";var l=r.position||"right",c=n.find((function(t){return t.position===l}));c&&c.items.push(r)};for(a.s();!(e=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}var r=document.createElement("div");r.classList.add("fancybox__toolbar");for(var l=0,c=n;l<c.length;l++){var h=c[l];if(h.items.length){var d=document.createElement("div");d.classList.add("fancybox__toolbar__items"),d.classList.add("fancybox__toolbar__items--".concat(h.position));var u,f=x(h.items);try{for(f.s();!(u=f.n()).done;){var v=u.value;d.appendChild(this.createElement(v))}}catch(t){f.e(t)}finally{f.f()}r.appendChild(d)}}this.fancybox.$carousel.parentNode.insertBefore(r,this.fancybox.$carousel),this.$container=r}},{key:"update",value:function(){var t,e=this.fancybox.getSlide(),i=e.index,n=this.fancybox.items.length,o=e.downloadSrc||("image"!==e.type||e.error?null:e.src),a=x(this.fancybox.$container.querySelectorAll("a.fancybox__button--download"));try{for(a.s();!(t=a.n()).done;){var s=t.value;o?(s.removeAttribute("disabled"),s.removeAttribute("tabindex"),s.setAttribute("href",o),s.setAttribute("download",o),s.setAttribute("target","_blank")):(s.setAttribute("disabled",""),s.setAttribute("tabindex",-1),s.removeAttribute("href"),s.removeAttribute("download"))}}catch(t){a.e(t)}finally{a.f()}var r,l=e.Panzoom,c=l&&l.option("maxScale")>l.option("baseScale"),h=x(this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"));try{for(h.s();!(r=h.n()).done;){var d=r.value;c?d.removeAttribute("disabled"):d.setAttribute("disabled","")}}catch(t){h.e(t)}finally{h.f()}var u,f=x(this.fancybox.$container.querySelectorAll("[data-fancybox-index]"));try{for(f.s();!(u=f.n()).done;){u.value.innerHTML=e.index+1}}catch(t){f.e(t)}finally{f.f()}var v,p=x(this.fancybox.$container.querySelectorAll("[data-fancybox-count]"));try{for(p.s();!(v=p.n()).done;){v.value.innerHTML=n}}catch(t){p.e(t)}finally{p.f()}if(!this.fancybox.option("infinite")){var g,m=x(this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"));try{for(m.s();!(g=m.n()).done;){var y=g.value;0===i?y.setAttribute("disabled",""):y.removeAttribute("disabled")}}catch(t){m.e(t)}finally{m.f()}var b,w=x(this.fancybox.$container.querySelectorAll("[data-fancybox-next]"));try{for(w.s();!(b=w.n()).done;){var k=b.value;i===n-1?k.setAttribute("disabled",""):k.removeAttribute("disabled")}}catch(t){w.e(t)}finally{w.f()}}}},{key:"cleanup",value:function(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}},{key:"attach",value:function(){this.fancybox.on(this.events)}},{key:"detach",value:function(){this.fancybox.off(this.events),this.cleanup()}}]),t}();it.defaults=et;var nt={ScrollLock:U,Thumbs:Y,Html:G,Toolbar:it,Image:K,Hash:J},ot={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1">
5381<path d="M20 20L4 4m16 0L4 20"/></svg>',spinner:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="25 25 50 50" tabindex="-1"><circle cx="50" cy="50" r="20"/></svg>',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},at=new Map,st=0,rt=function(t){l(i,t);var e=f(i);function i(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,i),t=t.map((function(t){return t.width&&(t._width=t.width),t.height&&(t._height=t.height),t})),(n=e.call(this,k(!0,{},ot,a))).bindHandlers(),n.state="init",n.setItems(t),n.attachPlugins(i.Plugins),n.trigger("init"),!0===n.option("hideScrollbar")&&n.hideScrollbar(),n.initLayout(),n.initCarousel(),n.attachEvents(),at.set(n.id,d(n)),n.trigger("prepare"),n.state="ready",n.trigger("ready"),n.$container.setAttribute("aria-hidden","false"),n.option("trapFocus")&&n.focus(),n}return s(i,[{key:"option",value:function(t){for(var e,n=this.getSlide(),o=n?n[t]:void 0,a=arguments.length,s=new Array(a>1?a-1:0),r=1;r<a;r++)s[r-1]=arguments[r];if(void 0!==o){var l;if("function"==typeof o)o=(l=o).call.apply(l,[this,this].concat(s));return o}return(e=p(c(i.prototype),"option",this)).call.apply(e,[this,t].concat(s))}},{key:"bindHandlers",value:function(){for(var t=0,e=["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"];t<e.length;t++){var i=e[t];this[i]=this[i].bind(this)}}},{key:"attachEvents",value:function(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}},{key:"detachEvents",value:function(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}},{key:"initLayout",value:function(){var t=this;this.$root=this.option("parentEl")||document.body;var e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=function(){return t.$container.scrollLeft=0,!1},Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((function(e){var i;return(i=t.$container).setAttribute.apply(i,m(e))})),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++st,this.$container.setAttribute("id","fancybox-"+this.id));var i,n=this.option("mainClass");n&&(i=this.$container.classList).add.apply(i,m(n.split(" ")));return document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}},{key:"setItems",value:function(t){var e,i=[],n=x(t);try{for(n.s();!(e=n.n()).done;){var o=e.value,a=o.$trigger;if(a){var s=a.dataset||{};o.src=s.src||a.getAttribute("href")||o.src,o.type=s.type||o.type,!o.src&&a instanceof HTMLImageElement&&(o.src=a.currentSrc||o.$trigger.src)}var r=o.$thumb;if(!r){var l=o.$trigger&&o.$trigger.origTarget;l&&(r=l instanceof HTMLImageElement?l:l.querySelector("img:not([aria-hidden])")),!r&&o.$trigger&&(r=o.$trigger instanceof HTMLImageElement?o.$trigger:o.$trigger.querySelector("img:not([aria-hidden])"))}o.$thumb=r||null;var c=o.thumb;!c&&r&&!(c=r.currentSrc||r.src)&&r.dataset&&(c=r.dataset.lazySrc||r.dataset.src),c||"image"!==o.type||(c=o.src),o.thumb=c||null,o.caption=o.caption||"",i.push(o)}}catch(t){n.e(t)}finally{n.f()}this.items=i}},{key:"initCarousel",value:function(){var t=this;return this.Carousel=new H(this.$carousel,k(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:function(){return t.Carousel&&t.Carousel.pages&&t.Carousel.pages.length<2&&!t.option("dragToClose")},lockAxis:function(){if(t.Carousel){var e="x";return t.option("dragToClose")&&(e+="y"),e}}},on:{"*":function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];
5381return t.trigger.apply(t,["Carousel.".concat(e)].concat(n))},init:function(e){return t.Carousel=e},createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}},{key:"onCreateSlide",value:function(t,e){var i=e.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,e)),"string"==typeof i&&i.length){var n=document.createElement("div"),o="fancybox__caption_".concat(this.id,"_").concat(e.index);n.className="fancybox__caption",n.innerHTML=i,n.setAttribute("id",o),e.$caption=e.$el.appendChild(n),e.$el.classList.add("has-caption"),e.$el.setAttribute("aria-labelledby",o)}}},{key:"onSettle",value:function(){this.option("autoFocus")&&this.focus()}},{key:"onFocus",value:function(t){this.isTopmost()&&this.focus(t)}},{key:"onClick",value:function(t){if(!t.defaultPrevented){var e=t.composedPath()[0];if(e.matches("[data-fancybox-close]"))return t.preventDefault(),void i.close(!1,t);if(e.matches("[data-fancybox-next]"))return t.preventDefault(),void i.next();if(e.matches("[data-fancybox-prev]"))return t.preventDefault(),void i.prev();var n=document.activeElement;if(n){if(n.closest("[contenteditable]"))return;e.matches(X)||n.blur()}if(!e.closest(".fancybox__content"))if(!getSelection().toString().length)if(!1!==this.trigger("click",t))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}}},{key:"onTouchMove",value:function(){var t=this.getSlide().Panzoom;return!t||1===t.content.scale}},{key:"onTouchEnd",value:function(t){var e=t.dragOffset.y;Math.abs(e)>=150||Math.abs(e)>=35&&t.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut".concat(t.content.y<0?"Up":"Down")),this.close()):"y"===t.lockAxis&&t.panTo({y:0})}},{key:"onTransform",value:function(t){if(this.$backdrop){var e=Math.abs(t.content.y),i=e<1?"":Math.max(.33,Math.min(1,1-e/t.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}},{key:"onMousedown",value:function(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}},{key:"onKeydown",value:function(t){if(this.isTopmost()){document.body.classList.remove("is-using-mouse");var e=t.key,i=this.option("keyboard");if(i&&!t.ctrlKey&&!t.altKey&&!t.shiftKey){var n=t.composedPath()[0],o=document.activeElement&&document.activeElement.classList,a=o&&o.contains("carousel__button");if("Escape"!==e&&!a)if(t.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return;if(!1!==this.trigger("keydown",e,t)){var s=i[e];"function"==typeof this[s]&&this[s]()}}}}},{key:"getSlide",value:function(){var t=this.Carousel;if(!t)return null;var e=null===t.page?t.option("initialPage"):t.page,i=t.pages||[];return i.length&&i[e]?i[e].slides[0]:null}},{key:"focus",value:function(t){if(!(i.ignoreFocusChange||["init","closing","customClosing","destroy"].indexOf(this.state)>-1)){var e=this.$container,n=this.getSlide(),o="done"===n.state?n.$el:null;if(!o||!o.contains(document.activeElement)){t&&t.preventDefault(),i.ignoreFocusChange=!0;for(var a,s=[],r=0,l=Array.from(e.querySelectorAll(X));r<l.length;r++){var c=l[r],h=c.offsetParent,d=o&&o.contains(c),u=!this.Carousel.$viewport.contains(c);h&&(d||u)?(s.push(c),void 0!==c.dataset.origTabindex&&(c.tabIndex=c.dataset.origTabindex,c.removeAttribute("data-orig-tabindex")),(c.hasAttribute("autoFocus")||!a&&d&&!c.classList.contains("carousel__button"))&&(a=c)):(c.dataset.origTabindex=void 0===c.dataset.origTabindex?c.getAttribute("tabindex"):c.dataset.origTabindex,c.tabIndex=-1)}t?s.indexOf(t.target)>-1?this.lastFocus=t.target:this.lastFocus===e?q(s[s.length-1]):q(e):this.option("autoFocus")&&a?q(a):s.indexOf(document.activeElement)<0&&q(e),this.lastFocus=document.activeElement,i.ignoreFocusChange=!1}}}},{key:"hideScrollbar",value:function(){if(W){var t=window.innerWidth-document.documentElement.getBoundingClientRect().width,e="fancybox-style-noscroll",i=document.getElementById(e);i||t>0&&((i=document.createElement("style")).id=e,i.type="text/css",i.innerHTML=".compensate-for-scrollbar {padding-right: ".concat(t,"px;}"),document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}}},{key:"revealScrollbar",value:function(){document.body.classList.remove("compensate-for-scrollbar");var t=document.getElementById("fancybox-style-noscroll");t&&t.remove()}},{key:"clearContent",value:function(t){this.Carousel.trigger("removeSlide",t),t.$content&&(t.$content.remove(),t.$content=null),t.$closeButton&&(t.$closeButton.remove(),t.$closeButton=null),t._className&&t.$el.classList.remove(t._className)}},{key:"setContent",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.$el;if(e instanceof HTMLElement)["img","iframe","video","audio"].indexOf(e.nodeName.toLowerCase())>-1?(i=document.createElement("div")).appendChild(e):i=e;else{var a=document.createRange().createContextualFragment(e);(i=document.createElement("div")).appendChild(a)}if(t.filter&&!t.error&&(i=i.querySelector(t.filter)),i instanceof Element)return t._className="has-".concat(n.suffix||t.type||"unknown"),o.classList.add(t._className),i.classList.add("fancybox__content"),"none"!==i.style.display&&"none"!==getComputedStyle(i).getPropertyValue("display")||(i.style.display=t.display||this.option("defaultDisplay")||"flex"),t.id&&i.setAttribute("id",t.id),t.$content=i,o.prepend(i),this.manageCloseButton(t),"loading"!==t.state&&this.revealContent(t),i;this.setError(t,"{{ELEMENT_NOT_FOUND}}")}},{key:"manageCloseButton",value:function(t){var e=this,i=void 0===t.closeButton?this.option("closeButton"):t.closeButton;if(i&&("top"!==i||!this.$closeButton)){var n=document.createElement("button");n.classList.add("carousel__button","is-close"),n.setAttribute("title",this.options.l10n.CLOSE),n.innerHTML=this.option("template.closeButton"),n.addEventListener("click",(function(t){return e.close(t)})),"inside"===i?(t.$closeButton&&t.$closeButton.remove(),t.$closeButton=t.$content.appendChild(n)):this.$closeButton=this.$container.insertBefore(n,this.$container.firstChild)}}},{key:"revealContent",value:function(t){var e=this;this.trigger("reveal",t),t.$content.style.visibility="";var i=!1;t.error||"loading"===t.state||null!==this.Carousel.prevPage||t.index!==this.options.startIndex||(i=void 0===t.showClass?this.option("showClass"):t.showClass),i?(t.state="animating",this.animateCSS(t.$content,i,(function(){e.done(t)}))):this.done(t)}}
5381,{key:"animateCSS",value:function(t,e,i){if(t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),t&&e){t.addEventListener("animationend",(function n(o){o.currentTarget===this&&(t.removeEventListener("animationend",n),i&&i(),t.classList.remove(e))})),t.classList.add(e)}else"function"==typeof i&&i()}},{key:"done",value:function(t){t.state="done",this.trigger("done",t);var e=this.getSlide();e&&t.index===e.index&&this.option("autoFocus")&&this.focus()}},{key:"setError",value:function(t,e){t.error=e,this.hideLoading(t),this.clearContent(t);var i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(e||"<p>{{ERROR}}</p>"),this.setContent(t,i,{suffix:"error"})}},{key:"showLoading",value:function(t){var e=this;t.state="loading",t.$el.classList.add("is-loading");var i=t.$el.querySelector(".fancybox__spinner");i||((i=document.createElement("div")).classList.add("fancybox__spinner"),i.innerHTML=this.option("template.spinner"),i.addEventListener("click",(function(){e.Carousel.Panzoom.velocity||e.close()})),t.$el.prepend(i))}},{key:"hideLoading",value:function(t){var e=t.$el&&t.$el.querySelector(".fancybox__spinner");e&&(e.remove(),t.$el.classList.remove("is-loading")),"loading"===t.state&&(this.trigger("load",t),t.state="ready")}},{key:"next",value:function(){var t=this.Carousel;t&&t.pages.length>1&&t.slideNext()}},{key:"prev",value:function(){var t=this.Carousel;t&&t.pages.length>1&&t.slidePrev()}},{key:"jumpTo",value:function(){var t;this.Carousel&&(t=this.Carousel).slideTo.apply(t,arguments)}},{key:"isClosing",value:function(){return["closing","customClosing","destroy"].includes(this.state)}},{key:"isTopmost",value:function(){return i.getInstance().id==this.id}},{key:"close",value:function(t){var e=this;if(t&&t.preventDefault(),!this.isClosing()&&!1!==this.trigger("shouldClose",t)&&(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",t),"destroy"!==this.state)){this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");var i=this.getSlide();if(this.Carousel.slides.forEach((function(t){t.$content&&t.index!==i.index&&e.Carousel.trigger("removeSlide",t)})),"closing"===this.state){var n=void 0===i.hideClass?this.option("hideClass"):i.hideClass;this.animateCSS(i.$content,n,(function(){e.destroy()}),!0)}}}},{key:"destroy",value:function(){if("destroy"!==this.state){this.state="destroy",this.trigger("destroy");var t=this.option("placeFocusBack")?this.option("triggerTarget",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,t&&q(t),at.delete(this.id);var e=i.getInstance();e?e.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}}}],[{key:"show",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i(t,e)}},{key:"fromEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.defaultPrevented&&!(t.button&&0!==t.button||t.ctrlKey||t.metaKey||t.shiftKey)){var n,o,a,s=t.composedPath()[0],r=s;if((r.matches("[data-fancybox-trigger]")||(r=r.closest("[data-fancybox-trigger]")))&&(e.triggerTarget=r,n=r&&r.dataset&&r.dataset.fancyboxTrigger),n){var l=document.querySelectorAll('[data-fancybox="'.concat(n,'"]')),c=parseInt(r.dataset.fancyboxIndex,10)||0;r=l.length?l[c]:r}Array.from(i.openers.keys()).reverse().some((function(e){a=r||s;var i=!1;try{a instanceof Element&&("string"==typeof e||e instanceof String)&&(i=a.matches(e)||(a=a.closest(e)))}catch(t){}return!!i&&(t.preventDefault(),o=e,!0)}));var h=!1;if(o){e.event=t,e.target=a,a.origTarget=s,h=i.fromOpener(o,e);var d=i.getInstance();d&&"ready"===d.state&&t.detail&&document.body.classList.add("is-using-mouse")}return h}}},{key:"fromOpener",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){for(var e=["false","0","no","null","undefined"],i=["true","1","yes"],n=Object.assign({},t.dataset),o={},a=0,s=Object.entries(n);a<s.length;a++){var r=g(s[a],2),l=r[0],c=r[1];if("fancybox"!==l)if("width"===l||"height"===l)o["_".concat(l)]=c;else if("string"==typeof c||c instanceof String)if(e.indexOf(c)>-1)o[l]=!1;else if(i.indexOf(o[l])>-1)o[l]=!0;else try{o[l]=JSON.parse(c)}catch(t){o[l]=c}else o[l]=c}return t instanceof Element&&(o.$trigger=t),o}
5381,o=[],a=e.startIndex||0,s=e.target||null,r=void 0!==(e=k({},e,i.openers.get(t))).groupAll&&e.groupAll,l=void 0===e.groupAttr?"data-fancybox":e.groupAttr,c=l&&s?s.getAttribute("".concat(l)):"";if(!s||c||r){var h=e.root||(s?s.getRootNode():document.body);o=[].slice.call(h.querySelectorAll(t))}if(s&&!r&&(o=c?o.filter((function(t){return t.getAttribute("".concat(l))===c})):[s]),!o.length)return!1;var d=i.getInstance();return!(d&&o.indexOf(d.options.$trigger)>-1)&&(a=s?o.indexOf(s):a,new i(o=o.map(n),k({},e,{startIndex:a,$trigger:s})))}},{key:"bind",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function n(){document.body.addEventListener("click",i.fromEvent,!1)}W&&(i.openers.size||(/complete|interactive|loaded/.test(document.readyState)?n():document.addEventListener("DOMContentLoaded",n)),i.openers.set(t,e))}},{key:"unbind",value:function(t){i.openers.delete(t),i.openers.size||i.destroy()}},{key:"destroy",value:function(){for(var t;t=i.getInstance();)t.destroy();i.openers=new Map,document.body.removeEventListener("click",i.fromEvent,!1)}},{key:"getInstance",value:function(t){return t?at.get(t):Array.from(at.values()).reverse().find((function(t){return!t.isClosing()&&t}))||null}},{key:"close",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1?arguments[1]:void 0;if(t){var n,o=x(at.values());try{for(o.s();!(n=o.n()).done;){var a=n.value;a.close(e)}}catch(t){o.e(t)}finally{o.f()}}else{var s=i.getInstance();s&&s.close(e)}}},{key:"next",value:function(){var t=i.getInstance();t&&t.next()}},{key:"prev",value:function(){var t=i.getInstance();t&&t.prev()}}]),i}(O);rt.version="4.0.31",rt.defaults=ot,rt.openers=new Map,rt.Plugins=nt,rt.bind("[data-fancybox]");for(var lt=0,ct=Object.entries(rt.Plugins||{});lt<ct.length;lt++){var ht=g(ct[lt],2);ht[0];var dt=ht[1];"function"==typeof dt.create&&dt.create(rt)}t.Carousel=H,t.Fancybox=rt,t.Panzoom=M})); 5382 5383/* End */ 5384; 5385; /* Start:"a:4:{s:4:"full";s:59:"/bitrix/templates/evolution_v2/custom.min.js?17643447079681";s:6:"source";s:44:"/bitrix/templates/evolution_v2/custom.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5386var isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);function initInputMask(t){if(void 0!=$.fn.inputmask){var a=$(this);$(this).data("mask"),a.inputmask(),$(a).on("destroy",function(){a.inputmask("remove")})}}function initTabs(t){if(void 0!=$.fn.tabs){t.stopPropagation(),t.stopImmediatePropagation();var a=$(this);$("> .tabs-block__cont > .tabs-block__item.tabs-block__item--current",a).removeClass("tabs-block__item--current"),void 0==$(a).data("collapsible")&&void 0!=$(a).data("noactive")&&($("> .tabs-block__nav .tabs-nav__list",a).append($("<li>").addClass("tabs-nav__item notab-item").hide().append('<a href="#notab" class="tabs-nav__link"></a>')),$("> .tabs-block__cont",a).append($("<div>").addClass("tabs-block__item notab-item").attr("id","notab").hide())),a.tabs({collapsible:void 0!=$(a).data("collapsible"),active:void 0==$(a).data("collapsible")&&void 0==$(a).data("noactive")&&0,activate:function(t,a){if($(".slider-block__list",a.newPanel).trigger("updateSlider"),void 0!==this.synchronize&&this.synchronize.length){var i=$(".ui-tabs-anchor[data-synchronize-tab]",a.newTab).data("synchronize-tab");$("> .tabs-block__cont > .tabs-block__item",this.synchronize).hide().filter(i).show(0,function(){$(".slider-block__list",this).trigger("updateSlider")})}$(this).trigger("activate.tabs",[a])},create:function(t,a){var i=this,e=[];if(void 0==$(i).data("collapsible")&&void 0!=$(i).data("noactive")&&$("> .tabs-block__nav .notab-item a.tabs-nav__link",i).click(),$("> .tabs-block__nav .tabs-nav__item",i).each(function(t){$("a.tabs-nav__link",this).is("[href^='#']")&&$($("a.tabs-nav__link",this).attr("href"),i).length||e.push(t)}),e.length&&$(i).tabs("option","disabled",e),$("> .tabs-block__nav .tabs-nav__item input",i).on("change click",function(){$(this).is(":checked")&&$(this).closest(".tabs-nav__item").find("a.tabs-nav__link").click()}).triggerHandler("change"),$(".slider-block__list",a.panel).trigger("updateSlider"),void 0!=$(this).data("synchronize")&&$($(this).data("synchronize")).length){this.synchronize=$($(this).data("synchronize"));var s=$(".ui-tabs-anchor[data-synchronize-tab]",a.tab).data("synchronize-tab");$("> .tabs-block__cont > .tabs-block__item",this.synchronize).removeClass("tabs-block__item--current").hide().filter(s).show(0,function(){$(".slider-block__list",this).trigger("updateSlider")})}if($(".tabs-block__nav--emulation",i).length){var n=$(".tabs-block__nav--emulation",i);$(".tabs-nav__link[href='"+$(".tabs-nav__link",a.tab).attr("href")+"']",
5386n).parent().addClass("ui-tabs-active"),$(".tabs-nav__link[href^='#']",n).on("click",function(t){var a=$(this),e=$("> .tabs-block__nav .tabs-nav__link[href='"+a.attr("href")+"']",i);e.length&&(t.preventDefault(),$(e).click())})}}}),$("> .tabs-block__nav .tabs-nav__item.tabs-nav__item--current",a).length&&$("> .tabs-block__nav .tabs-nav__item.tabs-nav__item--current",a).removeClass("tabs-nav__item--current").find(".tabs-nav__link").click(),a.on("activate.tabs",function(t,i){if($(".tabs-block__nav--emulation",a).length){var e=$(".tabs-block__nav--emulation",a),s=$(".tabs-nav__link",i.oldTab).attr("href"),n=$(".tabs-nav__link",i.newTab).attr("href");void 0!=s&&$(".tabs-nav__link[href='"+s+"']",e).parent().removeClass("ui-tabs-active"),void 0!=n&&$(".tabs-nav__link[href='"+n+"']",e).parent().addClass("ui-tabs-active")}})}}function initCollapse(t){t.preventDefault(),t.stopPropagation();var a=$(this),i=$("> .js-collapse__button, > .js-collapse__head .js-collapse__button",a),e=$("> js-collapse__close, > .js-collapse__head .js-collapse__close",a),s=$("> .js-collapse__cont",a),n=void 0!=s.css("transition-duration")?parseFloat(s.css("transition-duration"),10):0,o=isMobile?"touchend":"click",l=void 0!=a.data("onlyone"),c=void 0!=a.data("closechild"),r=!1;void 0==a.data("collapseInited")&&(a.data("collapseInited",!0),s.hasClass("out")?a.addClass("out"):s.hasClass("in")&&a.addClass("in"),i.on("touchstart touchmove",function(t){r="touchstart"!=t.type}),i.on(o,function(t){t.preventDefault(),t.stopPropagation(),!r&&(s.hasClass("in")?a.trigger("collapse"):Modernizr.csstransitions?(s.removeClass("collapse"),s.addClass("in").height("1px").addClass("collapsing").height(s[0].scrollHeight),a.removeClass("out").addClass("in"),l&&a.siblings(".js-collapse").trigger("collapse")):(l&&a.siblings(".js-collapse").trigger("collapse"),s.slideDown(n,function(){s.trigger("update")}),a.removeClass("out").addClass("in")))}),e.on(o,function(t){a.trigger("collapse",!0)}),$(a).on("collapse",function(t,i){t.preventDefault(),t.stopPropagation(),s.hasClass("in")&&(s.removeClass("collapse"),Modernizr.csstransitions?(s.height(s[0].scrollHeight),s.addClass("collapsing").removeClass("in").height("1px"),a.removeClass("in").addClass("out")):(s.slideUp(n,function(){s.trigger("update")}),a.removeClass("in").addClass("out"))),!(void 0!=i&&i)&&c&&$(".js-collapse.in",a).trigger("collapse",!0)}),s.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend update",function(t){s.is(t.target)&&(s.removeClass("collapsing").addClass("collapse"),s.hasClass("in")?(s.height(""),a.removeClass("out").addClass("in"),a.trigger("collapseOpen")):(a.removeClass("in").addClass("out"),a.trigger("collapseClose")))}))}void 0!=window.jQuery&&(void 0!=$.widget&&$.widget("ui.tabs",$.ui.tabs,{_getList:function(){return this.element.find("> .tabs-block__nav .tabs-nav__list").eq(0)}}),jQuery(document).ready(function(t){t(".social-item li").on("click",function(a){a.preventDefault(),t(".social-item li.active .si span").remove(),t(".social-item li.active").removeClass("active"),t(this).addClass("active").find(".si").append("<span>"+t(this).find(".si").attr("title")+"</span>"),t(this).closest(".social-item").find("ul.tabs_content li").removeClass("active"),t(this).closest(".social-item").find("ul.tabs_content > li:eq("+t(this).index()+")").addClass("active")}),t(".fil-cat a").click(function(a){a.preventDefault(),selectedClass=t(this).attr("data-rel"),t("#staff .about-item__image").not("."+selectedClass).addClass("dark-img"),t("."+selectedClass).removeClass("dark-img")}),t(document).on("click",".about-item__image",function(a){a.preventDefault(),t(".about-item__image.on").tooltip("close"),t(".about-item__image.on").removeClass("on"),t(this).addClass("on"),t(this).tooltip({items:".about-item__image.on",position:{my:"center bottom",at:"center top",using:function(a,i){var e="arrow ",s=t(".ui-tooltip.main-staff-info").outerWidth();a.left<=0&&(a.left=0,e+="left"),a.left+s>=t(window).width()&&(a.left=t(window).width()-s,e+="right"),t(this).css(a),t("<div>").addClass(e).addClass(i.vertical).appendTo(this)}},content:function(){return t(this).closest(".about-notice__item").find(".about-item__tooltip").html()},hide:{duration:50},tooltipClass:"main-staff-info"}),t(this).trigger("mouseenter")}),t(document).on("click",".about-item__image.on",function(a){a.preventDefault(),t(this).tooltip("close"),t(this).removeClass("on")}),t(".about-item__image").on("mouseout",function(t){t.stopImmediatePropagation()}),t(document).on("click",".site-header__middle-menu .tabs-nav__link",function(a){a.preventDefault(),t(".site-header__middle-menu .tabs-nav__link.on").tooltip("close"),t(".site-header__middle-menu .tabs-nav__link.on").removeClass("on"),t(this).addClass("on"),t(this).tooltip({items:".site-header__middle-menu .tabs-nav__link.on",position:{collision:"flip",within:"body",using:function(a,i){pos=t(".site-header__middle-menu").offset(),pos.top+=117,pos.left-=25,t(this).css(pos)}}
5386,content:function(){return t(t(this).siblings(".site-header__middle-menu .header-steps-tabs__item")).clone()},hide:{duration:50},tooltipClass:"custom-tooltip-styling"}),t(this).trigger("mouseenter")}),t(document).on("click",".site-header__middle-menu .tabs-nav__link.on",function(a){a.preventDefault(),t(this).tooltip("close"),t(this).removeClass("on")}),t(".site-header__middle-menu .tabs-nav__link").on("mouseout",function(t){t.stopImmediatePropagation()}),t("body").on("initInputMask",".js-input-mask",initInputMask),t(".js-input-mask").trigger("initInputMask"),t("body").on("initTabs",".tabs-block.js-tabs",initTabs),t(".tabs-block.js-tabs").trigger("initTabs"),t("body").on("initCollapse",".js-collapse",initCollapse),t(".js-collapse").trigger("initCollapse"),t("body").on("click",".js-target-click[data-target]",function(a){var i=t(this).data("target");i.length&&(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation(),(i="#"==i[0]?t(i):t("#"+i)).trigger("click"))}),t(".cookie_picking_block__content .readmore").on("click",function(){t(".cookie_picking_block__content .mobile-text").css("display","inline"),t(".cookie_picking_block__content .mobile-link").css("display","none")}),t(".cookie_picking_block__close").click(function(){t.post("/ajax/cookie_picking.php",{}).always(function(){t(".cookie_picking_block").addClass("hidden")})})})),void 0!=$.fn.inputmask&&($.extend(Inputmask.prototype.defaults,{placeholder:"_",showMaskOnHover:!1}),Inputmask.extendAliases({"hh:mm":{placeholder:"--:--",clearMaskOnLostFocus:!1},"dd.mm.yyyy":{placeholder:"--.--.----",clearMaskOnLostFocus:!1},numeric:{rightAlign:!1},currency:{prefix:"",groupSeparator:" ",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},phoneMobile:{mask:"+7 (X99) 999-9999",clearIncomplete:!0,definitions:{X:{validator:"[012345679]"}}},cirilic:{regex:"^[а-ÑÐ-ЯÑÐ ]{0,}$",casing:!0}})),$(document).ready(function(){$(".itconstruct-form-ajax-load").each(function(){let t=$(this);$.ajax({url:"/ajax/formload.php",method:"post",dataType:"html",data:{template:$(this).data("template"),params:$(this).data("params")}}).done(function(a){t.html(a)})})}); 5387/* End */ 5388; 5389; /* Start:"a:4:{s:4:"full";s:59:"/bitrix/templates/evolution_v2/js/facebook.js?1764326958319";s:6:"source";s:45:"/bitrix/templates/evolution_v2/js/facebook.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5390(function(d, s, id) { 5391 var js, fjs = d.getElementsByTagName(s)[0]; 5392 if (d.getElementById(id)) return; 5393 js = d.createElement(s); js.id = id; 5394 js.src = 'https://connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v3.1'; 5395 fjs.parentNode.insertBefore(js, fjs); 5396 }(document, 'script', 'facebook-jssdk')); 5397/* End */ 5398;; /* /bitrix/templates/evolution_v2/js/collapse-box.babel.js?170555006325636*/ 5399; /* /bitrix/templates/evolution_v2/js/fonts.js?1766049213531*/ 5400; /* /js/modernizr-3.5.0.min.js?168190048820089*/ 5401; /* /bitrix/templates/evolution_v2/js/vendor/bootstrap.min.js?168190042936874*/ 5402; /* /bitrix/templates/evolution_v2/js/vendor/jquery.inputmask.bundle.js?1681900429222044*/ 5403; /* /bitrix/templates/evolution_v2/js/vendor/slick.min.js?168190042940295*/ 5404; /* /bitrix/templates/evolution_v2/js/vendor/jquery.magnific-popup.min.js?168190042920219*/ 5405; /* /bitrix/templates/evolution_v2/js/magnific.js?1681900429470*/ 5406; /* /bitrix/templates/evolution_v2/js/main.js?17643230688781*/ 5407; /* /bitrix/templates/evolution_v2/js/menu.js?16819004296653*/ 5408; /* /bitrix/templates/evolution_v2/js/detail.js?16819004293412*/ 5409; /* /bitrix/templates/evolution_v2/js/ajax-modal.js?16819004291780*/ 5410; /* /bitrix/templates/evolution_v2/js/fancybox/fancybox.umd.js?1681900429105639*/ 5411; /* /bitrix/templates/evolution_v2/custom.min.js?17643447079681*/ 5412; /* /bitrix/templates/evolution_v2/js/facebook.js?1764326958319*/
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.