From b1c8a35212518d95c6551252e4c6d2618a2b94c6 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 14 Jun 2024 13:21:18 +0000 Subject: [PATCH] Decode content bytes only with supplied charset or static list of charsets to try --- docs/software_architecture.md | 4 - pyproject.toml | 1 - src/warc2zim/content_rewriting/generic.py | 18 +- src/warc2zim/converter.py | 4 + src/warc2zim/items.py | 8 +- src/warc2zim/main.py | 8 + src/warc2zim/utils.py | 102 ++-- tests/encodings/definition.json | 87 ++++ tests/encodings/file01.js | 438 ++++++++++++++++ tests/encodings/file02.js | 7 + tests/encodings/file03.html | 588 ++++++++++++++++++++++ tests/encodings/file04.js | 10 + tests/encodings/file05.js | 2 + tests/encodings/file06.html | 27 + tests/encodings/file07.html | 26 + tests/encodings/file08.js | 11 + tests/test_rewriting.py | 1 + tests/test_utils.py | 272 ++++------ 18 files changed, 1343 insertions(+), 271 deletions(-) create mode 100644 tests/encodings/definition.json create mode 100644 tests/encodings/file01.js create mode 100644 tests/encodings/file02.js create mode 100644 tests/encodings/file03.html create mode 100644 tests/encodings/file04.js create mode 100644 tests/encodings/file05.js create mode 100644 tests/encodings/file06.html create mode 100644 tests/encodings/file07.html create mode 100644 tests/encodings/file08.js diff --git a/docs/software_architecture.md b/docs/software_architecture.md index 393a622c..4a12b56c 100644 --- a/docs/software_architecture.md +++ b/docs/software_architecture.md @@ -35,10 +35,6 @@ It provide two main features: Except that, scraper directly uses WarcRecord (returned by cdxj_indexer, implemented in warcio) to access metadata and such. -## chardet - -[chardet Python library](https://pypi.org/project/chardet/) is used to detect character encoding of files when it is absent (only HTML file typically specify its encoding) or incoherent. - ## zimscraperlib [zimscraperlib Python library](https://pypi.org/project/zimscraperlib) is used for ZIM operations. diff --git a/pyproject.toml b/pyproject.toml index 3e919025..50bafe55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ dependencies = [ "requests==2.32.3", "zimscraperlib==3.3.2", "jinja2==3.1.4", - "chardet==5.2.0", # to support possible brotli content in warcs, must be added separately "brotlipy==0.7.0", "cdxj_indexer==1.4.5", diff --git a/src/warc2zim/content_rewriting/generic.py b/src/warc2zim/content_rewriting/generic.py index eb2b6441..08d56c42 100644 --- a/src/warc2zim/content_rewriting/generic.py +++ b/src/warc2zim/content_rewriting/generic.py @@ -63,6 +63,7 @@ def __init__( existing_zim_paths: set[ZimPath], missing_zim_paths: set[ZimPath] | None, js_modules: set[ZimPath], + charsets_to_try: list[str], ): self.content = get_record_content(record) @@ -78,24 +79,11 @@ def __init__( self.rewrite_mode = self.get_rewrite_mode(record, mimetype) self.js_modules = js_modules + self.charsets_to_try = charsets_to_try @property def content_str(self) -> str: - try: - result = to_string(self.content, self.encoding) - if self.encoding and result.encoding and result.encoding != self.encoding: - logger.warning( - f"Encoding issue, '{result.encoding}' has been used instead of " - f"'{self.encoding}' to decode content of '{self.orig_url_str}'" - ) - if result.chars_ignored: - logger.warning( - "Encoding issue, some chars had to be ignored to properly decode " - f"content of '{self.orig_url_str}' with '{result.encoding}'" - ) - return result.value - except ValueError as e: - raise RuntimeError(f"Impossible to decode item {self.path.value}") from e + return to_string(self.content, self.encoding, self.charsets_to_try) def rewrite( self, pre_head_template: Template, post_head_template: Template diff --git a/src/warc2zim/converter.py b/src/warc2zim/converter.py index ddc4c130..11507034 100644 --- a/src/warc2zim/converter.py +++ b/src/warc2zim/converter.py @@ -192,6 +192,9 @@ def __init__(self, args): self.redirections: dict[ZimPath, ZimPath] = {} self.missing_zim_paths: set[ZimPath] | None = set() if args.verbose else None self.js_modules: set[ZimPath] = set() + self.charsets_to_try: list[str] = [ + charset_to_try.strip() for charset_to_try in args.charsets_to_try.split(",") + ] # progress file handling self.stats_filename = ( @@ -747,6 +750,7 @@ def add_items_for_warc_record(self, record): self.expected_zim_items, self.missing_zim_paths, self.js_modules, + self.charsets_to_try, ) if len(payload_item.content) != 0: diff --git a/src/warc2zim/items.py b/src/warc2zim/items.py index 7f512d77..b8b04ac8 100644 --- a/src/warc2zim/items.py +++ b/src/warc2zim/items.py @@ -33,13 +33,19 @@ def __init__( existing_zim_paths: set[ZimPath], missing_zim_paths: set[ZimPath] | None, js_modules: set[ZimPath], + charsets_to_try: list[str], ): super().__init__() self.path = path.value self.mimetype = get_record_mime_type(record) (self.title, self.content) = Rewriter( - path, record, existing_zim_paths, missing_zim_paths, js_modules + path, + record, + existing_zim_paths, + missing_zim_paths, + js_modules, + charsets_to_try, ).rewrite(pre_head_template, post_head_template) def get_hints(self): diff --git a/src/warc2zim/main.py b/src/warc2zim/main.py index 127b200c..cf89499e 100644 --- a/src/warc2zim/main.py +++ b/src/warc2zim/main.py @@ -110,6 +110,14 @@ def main(raw_args=None): dest="disable_metadata_checks", ) + parser.add_argument( + "--charsets-to-try", + help="List of charsets to try decode content when charset is not defined at " + "document or HTTP level. Single string, values separated by a comma. Default: " + "UTF-8,ISO-8859-1", + default="UTF-8,ISO-8859-1", + ) + args = parser.parse_args(args=raw_args) converter = Converter(args) return converter.run() diff --git a/src/warc2zim/utils.py b/src/warc2zim/utils.py index 50146ec0..dcbb4f53 100644 --- a/src/warc2zim/utils.py +++ b/src/warc2zim/utils.py @@ -5,9 +5,7 @@ import re from http import HTTPStatus -from typing import NamedTuple -import chardet from bs4 import BeautifulSoup from warcio.recordloader import ArcWarcRecord @@ -19,12 +17,6 @@ ) -class StringConversionResult(NamedTuple): - value: str - encoding: str | None - chars_ignored: bool - - def get_version(): return __version__ @@ -132,84 +124,58 @@ def get_record_encoding(record: ArcWarcRecord) -> str | None: return m.group("encoding") -def to_string(input_: str | bytes, encoding: str | None) -> StringConversionResult: +def to_string( + input_: str | bytes, http_encoding: str | None, charsets_to_try: list[str] +) -> str: """ - Decode content to string, trying to be the more tolerant possible to invalid - declared encoding. + Decode content to string based on charset declared in content or fallback. + + This method tries to not be smarter than necessary. - This try to decode the content using 3 methods: - - From http headers in the warc record (given as `encoding` argument) - - From encoding declaration inside the content (hopping that content can be - losely decode using ascii to something usable) - - From statistical analysis of the content (made by chardet) + First, it tries to find an charset declaration inside the first bytes of the content + (hopping that content first bytes can be losely decoded using few known encoding to + something usable). If found, it is used to decode and any bad character is + automatically replaced, assuming document editor is right. - If all these methods fails, try again with the encoding passed via http headers but - ignore all unrecognized characters. + Second, if no charset declaration has been found in content, it uses the charset + declared in HTTP `Content-Type` header. This is passed to this method as + `http_encoding` argument. If present, it is used to decode and any bad character is + automatically replaced, assuming web server is right. - Returns the decoded content, the encoding used (or None if the input was already - decoded) and a boolean indicating wether unrecognized characters had to been ignored - or not. + Finally, we fallback to use `charsets_to_try` argument, which is a list of charsets + to try. Each charset is tried in order, but any bad character found is raising an + error. If none of these charsets achieves to decode the content, an exception is + raised. + + Returns the decoded content. """ - http_encoding = encoding - tried_encodings: set[str] = set() if isinstance(input_, str): - return StringConversionResult(input_, None, False) + return input_ if not input_: # Empty bytes are easy to decode - return StringConversionResult("", None, False) - - if encoding: - try: - return StringConversionResult(input_.decode(encoding), encoding, False) - except (ValueError, LookupError): - tried_encodings.add(encoding) - pass + return "" # Search for encoding from content first bytes based on regexp - content_start = input_[:1024].decode("ascii", errors="replace") - if m := ENCODING_RE.search(content_start): - encoding = m.group("encoding") - if encoding and encoding not in tried_encodings: - try: - return StringConversionResult(input_.decode(encoding), encoding, False) - except (ValueError, LookupError): - tried_encodings.add(encoding) - pass - - # Try to detect the most probable encoding with chardet (and only most probable - # one, since otherwise we will likely find an encoding which pass but produces only - # garbage with most characters badly decoded just due to a wrongly encoded character - # see https://github.com/openzim/warc2zim/issues/221) - # Nota: we use the detect_all method of chardet even if we are interesting only in - # the most probable encoding, because (as-of chardet 5.2.0 at least) the detect - # chardet method seems to be more naive, and detect_all gives better results in our - # tests - chardet_encodings = chardet.detect_all(input_) - if len(chardet_encodings): - chardet_encoding = chardet_encodings[0]["encoding"] - if chardet_encoding and chardet_encoding not in tried_encodings: - try: - return StringConversionResult( - input_.decode(chardet_encoding), chardet_encoding, False - ) - except (ValueError, LookupError): - tried_encodings.add(chardet_encoding) - pass - - # Try again encoding detected by chardet (most probable one), but this time ignore - # all bad chars + for encoding in ["ascii", "utf-16", "utf-32"]: + content_start = input_[:1024].decode(encoding, errors="replace") + if m := ENCODING_RE.search(content_start): + head_encoding = m.group("encoding") + return input_.decode(head_encoding, errors="replace") + if http_encoding: + return input_.decode(http_encoding, errors="replace") + + # Try all charsets_to_try passed + for charset_to_try in charsets_to_try: try: - return StringConversionResult( - input_.decode(http_encoding, errors="ignore"), http_encoding, True - ) + return input_.decode(charset_to_try) except (ValueError, LookupError): pass - raise ValueError(f"Impossible to decode content {input_[:200]}") + raise ValueError(f"No suitable charset found to decode content {input_[:200]}") def get_record_content(record: ArcWarcRecord): diff --git a/tests/encodings/definition.json b/tests/encodings/definition.json new file mode 100644 index 00000000..a6e83484 --- /dev/null +++ b/tests/encodings/definition.json @@ -0,0 +1,87 @@ +{ + "files": [ + { + "filename": "file01.js", + "source": "https://www.marxists.org/espanol/menu.js", + "date": "2024-06", + "probable_charset": "ISO-8859-1", + "expected_strings": [ + "Afanásiev, Víktor", + "Andrópov, Yuri", + "Amaguaña, Tránsito", + "Cunhal, Álvaro", + "De la Cruz, Juana Inés", + "Faure, Sèbastien" + ] + }, + { + "filename": "file02.js", + "source": "https://www.cloudflare.com/vendor/onetrust/scripttemplates/202308.2.0/otBannerSdk.js", + "date": "2024-06", + "probable_charset": "UTF-8", + "expected_strings": [ + "_Container:\"#ot-ven-lst\",P_Ven_Bx:\"ot-ven-box\",P_Ven_Name:\".ot-ven-name\"", + "ist,IabType:e.IabType,InactiveText:e.InactiveText,IsConsentLoggingEnabled:e.IsConsentLoggingEnabl", + "0;\\n transition: visibility 0s \"+e+\"ms, opacity \"+e+\"ms linear;\\n \",!0);var", + "r.prototype.escapeRegExp=function(e){return e.replace(/[-/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}" + ] + }, + { + "filename": "file03.html", + "source": "https://www.solidarite-numerique.fr/tutoriels/comprendre-les-cookies/?thematique=internet", + "date": "2024-06", + "probable_charset": "UTF-8", + "contains_bad_chars": true, + "expected_strings": [ + "Vous souhaitez changer de navigateur et utiliser Firefox ? Ce tutoriel vous détaille la procédure d'installation et la configuration pour une premi�..." + ] + }, + { + "filename": "file04.js", + "source": "https://static.mailerlite.com/js/w/ml_jQuery.inputmask.bundle.min.js?v3.3.1", + "date": "2024-06", + "probable_charset": "ascii", + "expected_strings": [ + "1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlterna", + "is;if(na=!1,g.clearMaskOnLostFocus&&document.activeElement!==b){var c=x().slice(),d=b.inputmask._v" + ] + }, + { + "filename": "file05.js", + "source": "https://static.sketchfab.com/static/builds/web/dist/ac0f732c4fc1a30c77920d75c1a9be83-v2.js", + "date": "2024-06", + "probable_charset": "ascii", + "expected_strings": [ + "isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._is" + ] + }, + { + "filename": "file06.html", + "source": "https://website.test.openzim.org/chinese-encoding.html", + "date": "2024-06", + "known_charset": "gb2312", + "expected_strings": [ + "simplified chinese characters: 汉字" + ] + }, + { + "filename": "file07.html", + "source": "https://website.test.openzim.org/chinese-encoding.html without header", + "date": "2024-06", + "known_charset": "gb2312", + "http_charset": "gb2312", + "expected_strings": [ + "simplified chinese characters: 汉字" + ] + }, + { + "filename": "file08.js", + "source": "https://community.mozilla.org/wp-content/plugins/events-manager/includes/js/events-manager.min.js?ver=6.4.1", + "date": "2024-06", + "probable_charset": "UTF-8", + "expected_strings": [ + "t Array]\"===Object.prototype.toString.call(e)},s={a:\"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]\",b:\"[b␢β" + ] + } + ] +} diff --git a/tests/encodings/file01.js b/tests/encodings/file01.js new file mode 100644 index 00000000..9934f52e --- /dev/null +++ b/tests/encodings/file01.js @@ -0,0 +1,438 @@ +function selectaplace(form) { +var appname= navigator.appName; +var appversion=parseInt(navigator.appVersion); +if (appname == "Netscape" && appversion >= 3) { +var formindex=form.select1.selectedIndex; +var storage=form.select1.options[formindex].text; +if (form.select1.options[formindex].value != "none") { +var msg=storage+"You are now being transferred to the -> "+storage; +for (var spot=0;spot'); +document.write (''); +document.write ('
'); +document.write ('
'); +} +makeMyMenu(); diff --git a/tests/encodings/file02.js b/tests/encodings/file02.js new file mode 100644 index 00000000..be505854 --- /dev/null +++ b/tests/encodings/file02.js @@ -0,0 +1,7 @@ +/** + * onetrust-banner-sdk + * v202308.2.0 + * by OneTrust LLC + * Copyright 2023 + */ +!function(){"use strict";var D=function(e,t){return(D=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}))(e,t)};function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}D(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var H,F=function(){return(F=Object.assign||function(e){for(var t,o=1,n=arguments.length;oa[0]&&t[1]this.length)&&(t=this.length),this.substring(t-e.length,t)===e},writable:!0,configurable:!0})},Z.prototype.initClosestPolyfill=function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||Object.defineProperty(Element.prototype,"closest",{value:function(e){var t=this;do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null},writable:!0,configurable:!0})},Z.prototype.initIncludesPolyfill=function(){String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(e,t){return!((t="number"!=typeof t?0:t)+e.length>this.length)&&-1!==this.indexOf(e,t)},writable:!0,configurable:!0})},Z.prototype.initObjectAssignPolyfill=function(){"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),n=1;n>>0,n=arguments[1]>>0,r=n<0?Math.max(o+n,0):Math.min(n,o),n=arguments[2],n=void 0===n?o:n>>0,i=n<0?Math.max(o+n,0):Math.min(n,o);r"))if(Array.isArray(o)){var n=this;Array.prototype.forEach.call(o,function(e,t){document.querySelector(n.selector).appendChild(new l(e,"ce").el)})}else if("string"==typeof o||Array.isArray(o)){var r,i,e;"string"==typeof this.selector?document.querySelector(this.selector).appendChild(new l(o,"ce").el):this.useEl?(r=document.createDocumentFragment(),(i=!(!o.includes("\n '+e.Name+' '+T.NewWinTxt+"\n \n ":n):""},Zt.prototype.getBannerSDKAssestsUrl=function(){return this.getBannerVersionUrl()+"/assets"},Zt.prototype.getBannerVersionUrl=function(){var e=P.bannerScriptElement.getAttribute("src");return""+(-1!==e.indexOf("/consent/")?e.split("consent/")[0]+"scripttemplates/":e.split("otSDKStub")[0])+m.moduleInitializer.Version},Zt.prototype.checkMobileOfflineRequest=function(e){return m.moduleInitializer.MobileSDK&&new RegExp("^file://","i").test(e)},Zt.prototype.updateCorrectIABUrl=function(e){var t,o=m.moduleInitializer.ScriptType;return o!==ot&&o!==rt||(o=b.getURL(e),(t=(t=P.bannerScriptElement)&&t.getAttribute("src")?b.getURL(t.getAttribute("src")):null)&&o&&t.hostname!==o.hostname&&(e=(e=(t=""+P.bannerDataParentURL)+o.pathname.split("/").pop().replace(/(^\/?)/,"/")).replace(o.hostname,t.hostname))),e},Zt.prototype.updateCorrectUrl=function(e,t){if((void 0===t&&(t=!1),P.previewMode)&&new RegExp("^data:image/").test(e))return e;var o=b.getURL(e),n=P.bannerScriptElement,n=n&&n.getAttribute("src")?b.getURL(n.getAttribute("src")):null;if(n&&o&&n.hostname!==o.hostname){var r=m.moduleInitializer.ScriptType;if(r===ot||r===rt){if(t)return e;e=(n=P.bannerDataParentURL+"/"+P.getRegionRule().Id)+o.pathname.replace(/(^\/?)/,"/")}else e=null==(r=e)?void 0:r.replace(o.hostname,n.hostname)}return e},Zt.prototype.isBundleOrStackActive=function(n,r){void 0===r&&(r=null);for(var i=A.oneTrustIABConsent,s=!0,a=(r=r||A.groupsConsent,0);function(){var e,t,o=n.SubGroups[a];o.Type===Vt?(-1<(t=b.findIndex(r,function(e){return e.split(":")[0]===o.CustomGroupId}))&&"0"===r[t].split(":")[1]||!r.length)&&(s=!1):(e=o.Type===f.GroupTypes.Spl_Ft?i.specialFeatures:i.purpose,(-1<(t=b.findIndex(e,function(e){return e.split(":")[0]===o.IabGrpId}))&&"false"===e[t].split(":")[1]||!e.length)&&(s=!1)),a++}(),s&&a","ce").el,r=(I(n).html(e),n.querySelectorAll("a")),i=0;is&&(T.NewVendorsInactiveEnabled?i.initializeVendorInOverriddenVendors(t,!1):a&&(o.purposes.forEach(function(e){i.applyGlobalRestrictionsonNewVendor(o,t,e,!0)}),o.legIntPurposes.forEach(function(e){i.applyGlobalRestrictionsonNewVendor(o,t,e,!1)}))),!1),n=(T.IsIabThirdPartyCookieEnabled||(P.legIntSettings.PAllowLI?T.OverriddenVendors[t]&&!T.OverriddenVendors[t].active&&(e=!0):-1s?!0:e)&&delete r.vendors[t],e||i.setActiveVendorCount(o,t)})},o.prototype.removeElementsFromArray=function(e,t){return e.filter(function(e){return!t.includes(e)})},o.prototype.setPublisherRestrictions=function(){var i,t,s,a,e=T.Publisher;e&&e.restrictions&&(i=this.iabStringSDK(),t=e.restrictions,s=A.iabData,a=A.oneTrustIABConsent.vendorList.vendors,Object.keys(t).forEach(function(o){var n,r=t[o],e=P.iabGroups.purposes[o];e&&(n={description:e.description,purposeId:e.id,purposeName:e.name}),Object.keys(r).forEach(function(e){var t;A.vendorsSetting[e]&&(t=A.vendorsSetting[e].arrIndex,1===r[e]&&-1===a[e].purposes.indexOf(Number(o))?s.vendors[t].purposes.push(n):2===r[e]&&-1===a[e].legIntPurposes.indexOf(Number(o))&&s.vendors[t].legIntPurposes.push(n),t=i.purposeRestriction(Number(o),r[e]),A.tcModel.publisherRestrictions.add(Number(e),t))})}))},o.prototype.populateVendorListTCF=function(){return R(this,void 0,void 0,function(){var t,o,n,r,i,s,a,l,c;return M(this,function(e){switch(e.label){case 0:return(t=this.iabStringSDK(),o=A.iabData,n=y.updateCorrectIABUrl(o.globalVendorListUrl),r=!this.isIABCrossConsentEnabled(),y.checkMobileOfflineRequest(y.getBannerVersionUrl()))?[3,1]:(P.mobileOnlineURL.push(n),i=t.gvl(n,A.gvlObj),[3,3]);case 1:return a=(s=t).gvl,l=[null],[4,y.otFetchOfflineFile(b.getRelativeURL(n,!0))];case 2:i=a.apply(s,l.concat([e.sent()])),e.label=3;case 3:return this.removeInActiveVendorsForTcf(i),P.tcf2ActiveVendors.all=Object.keys(i.vendors).length,A.oneTrustIABConsent.vendorList=i,this.assignIABDataWithGlobalVendorList(i),c=A,[4,t.tcModel(i)];case 4:c.tcModel=e.sent(),r&&this.setPublisherRestrictions(),A.tcModel.cmpId=parseInt(o.cmpId),A.tcModel.cmpVersion=parseInt(o.cmpVersion);try{A.tcModel.consentLanguage=A.consentLanguage}catch(e){A.tcModel.consentLanguage="EN"}return A.tcModel.consentScreen=parseInt(o.consentScreen),A.tcModel.isServiceSpecific=r,A.tcModel.purposeOneTreatment=P.purposeOneTreatment,T.PublisherCC?A.tcModel.publisherCountryCode=T.PublisherCC:A.userLocation.country&&(A.tcModel.publisherCountryCode=A.userLocation.country),A.cmpApi=t.cmpApi(A.tcModel.cmpId,A.tcModel.cmpVersion,r,T.UseGoogleVendors?{getTCData:this.addtlConsentString,getInAppTCData:this.addtlConsentString}:void 0),null!==this.alertBoxCloseDate()&&!this.needReconsent()||this.resetTCModel(),[2]}})})},o.prototype.resetTCModel=function(){var e,t,o=this.iabStringSDK(),n=A.tcModel.clone();n.unsetAll(),P.legIntSettings.PAllowLI&&(e=P.consentableIabGrps.filter(function(e){return e.HasLegIntOptOut&&e.Type===f.GroupTypes.Pur}).map(function(e){return parseInt(P.iabGrpIdMap[e.CustomGroupId])}),t=Object.keys(A.vendorsSetting).filter(function(e){return A.vendorsSetting[e].legInt}).map(function(e){return parseInt(e)}),n.purposeLegitimateInterests.set(e),n.vendorLegitimateInterests.set(t),n.isServiceSpecific)&&n.publisherLegitimateInterests.set(e),A.cmpApi.update(o.tcString().encode(n),!0)},o.prototype.addtlConsentString=function(e,t,o){t&&t.tcString&&(t.addtlConsent=""+A.addtlConsentVersion+(A.isAddtlConsent?A.addtlVendors.vendorConsent.join("."):"")),"function"==typeof e?e(t,o):console.error("__tcfapi received invalid parameters.")},o.prototype.setIabData=function(){A.iabData=P.isTcfV2Template?m.moduleInitializer.Iab2V2Data:m.moduleInitializer.IabV2Data,A.iabData.consentLanguage=A.consentLanguage},o.prototype.assignIABDataWithGlobalVendorList=function(r){var i=this,s=T.OverriddenVendors,a=(A.iabData.vendorListVersion=r.vendorListVersion,A.iabData.vendors=[],T.IABDataCategories);Object.keys(r.vendors).forEach(function(n){A.vendorsSetting[n]={consent:!0,legInt:!0,arrIndex:0,specialPurposesOnly:!1};var e={},t=r.vendors[n],o=(e.vendorId=n,e.vendorName=t.name,e.policyUrl=t.policyUrl,i.setIAB2VendorData(t,e),e.cookieMaxAge=b.calculateCookieLifespan(t.cookieMaxAgeSeconds),e.usesNonCookieAccess=t.usesNonCookieAccess,e.deviceStorageDisclosureUrl=t.deviceStorageDisclosureUrl||null,!t.legIntPurposes.length&&!t.purposes.length&&t.specialPurposes.length);P.legIntSettings.PAllowLI&&((!s[n]||s[n].legInt)&&(s[n]||t.legIntPurposes.length)||o)||(A.vendorsSetting[n].legInt=!1),P.legIntSettings.PAllowLI&&o&&(A.vendorsSetting[n].specialPurposesOnly=!0),(!s[n]||s[n].consent)&&(s[n]||t.purposes.length||t.flexiblePurposes.length)&&(t.purposes.length||t.flexiblePurposes.length)||(A.vendorsSetting[n].consent=!1),e.features=t.features.map(function(e){var t,e=P.iabGroups.features[e];return t=e?{description:e.description,featureId:e.id,featureName:e.name}:t}),e.specialFeatures=r.vendors[n].specialFeatures.reduce(function(e,t){t=P.iabGroups.specialFeatures[t];return t&&e.push({description:t.description,featureId:t.id,featureName:t.name}),e},[]),i.mapDataDeclarationForVendor(r.vendors[n],e,a),i.mapDataRetentionForVendor(r.vendors[n],e),e.purposes=r.vendors[n].purposes.reduce(function(e,t){var o=P.iabGroups.purposes[t];return!o||s[n]&&s[n].disabledCP&&-1!==s[n].disabledCP.indexOf(t)||e.push({description:o.description,purposeId:o.id,purposeName:o.name}),e},[]),e.legIntPurposes=r.vendors[n].legIntPurposes.reduce(function(e,t){var o=P.iabGroups.purposes[t];return!o||s[n]&&s[n].disabledLIP&&-1!==s[n].disabledLIP.indexOf(t)||e.push({description:o.description,purposeId:o.id,purposeName:o.name}),e},[]),e.specialPurposes=t.specialPurposes.map(function(e){var t,e=P.iabGroups.specialPurposes[e];return t=e?{description:e.description,purposeId:e.id,purposeName:e.name}:t}),A.iabData.vendors.push(e),A.vendorsSetting[n].arrIndex=A.iabData.vendors.length-1})},o.prototype.mapDataDeclarationForVendor=function(e,t,n){var o;P.isTcfV2Template&&null!=(o=e.dataDeclaration)&&o.length&&(t.dataDeclaration=e.dataDeclaration.reduce(function(e,t){var o=n.find(function(e){return e.Id===t});return o&&e.push({Description:o.Description,Id:o.Id,Name:o.Name}),e},[]))},o.prototype.mapDataRetentionForVendor=function(o,n){var e;n.dataRetention={},P.isTcfV2Template&&o.dataRetention&&(null!==(null==(e=o.dataRetention)?void 0:e.stdRetention)&&void 0!==(null==(e=o.dataRetention)?void 0:e.stdRetention)&&(n.dataRetention={stdRetention:o.dataRetention.stdRetention}),Object.keys(null==(e=o.dataRetention)?void 0:e.purposes).length&&(n.dataRetention.purposes=JSON.parse(JSON.stringify(o.dataRetention.purposes)),Object.keys(o.dataRetention.purposes).forEach(function(e){var t=P.iabGroups.purposes[e];n.dataRetention.purposes[e]={name:t.name,id:t.id,retention:o.dataRetention.purposes[e]}})),Object.keys(null==(e=o.dataRetention)?void 0:e.specialPurposes).length)&&(n.dataRetention.specialPurposes=JSON.parse(JSON.stringify(o.dataRetention.specialPurposes)),Object.keys(o.dataRetention.specialPurposes).forEach(function(e){var t=P.iabGroups.specialPurposes[e];n.dataRetention.specialPurposes[e]={name:t.name,id:t.id,retention:o.dataRetention.specialPurposes[e]}}))},o.prototype.setIAB2VendorData=function(e,t){var o,n,r;P.isTcfV2Template&&(n=A.lang,r=(r=e.urls.find(function(e){return e.langId===n}))||e.urls[0],t.vendorPrivacyUrl=(null==(o=r)?void 0:o.privacy)||"",t.legIntClaim=(null==(o=r)?void 0:o.legIntClaim)||"",null!=(r=e.dataDeclaration)&&r.length&&(t.dataDeclaration=e.dataDeclaration),e.DataRetention)&&(t.DataRetention=e.DataRetention)},o.prototype.populateIABCookies=function(){return R(this,void 0,void 0,function(){return M(this,function(e){switch(e.label){case 0:if(!this.isIABCrossConsentEnabled())return[3,5];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.setIAB3rdPartyCookie(k.EU_CONSENT,"",0,!0)];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.setIABCookieData(),this.updateCrossConsentCookie(!1),[3,4];case 4:return[3,6];case 5:p.needReconsent()||this.setIABCookieData(),e.label=6;case 6:return[2]}})})},o.prototype.setIAB3rdPartyCookie=function(e,t,o,n){var r=T.iabThirdPartyConsentUrl;try{if(r&&document.body)return this.updateThirdPartyConsent(r,e,t,o,n);throw new ReferenceError}catch(e){throw e}},o.prototype.setIABCookieData=function(){A.oneTrustIABConsent.IABCookieValue=v.getCookie(k.EU_PUB_CONSENT)},o.prototype.updateThirdPartyConsent=function(n,r,i,s,a){return R(this,void 0,void 0,function(){var t,o;return M(this,function(e){return t=window.location.protocol+"//"+n+"/?name="+r+"&value="+i+"&expire="+s+"&isFirstRequest="+a,document.getElementById("onetrustIabCookie")?(document.getElementById("onetrustIabCookie").contentWindow.location.replace(t),[2]):(d(o=document.createElement("iframe"),"display: none;",!0),o.id="onetrustIabCookie",o.setAttribute("title","OneTrust IAB Cookie"),o.src=t,document.body.appendChild(o),[2,new Promise(function(e){o.onload=function(){P.thirdPartyiFrameResolve(),P.thirdPartyiFrameLoaded=!0,e()},o.onerror=function(){throw P.thirdPartyiFrameResolve(),P.thirdPartyiFrameLoaded=!0,e(),new URIError}})])})})},o.prototype.setIABVendor=function(o,n){var t;void 0===o&&(o=!0),void 0===n&&(n=!1),A.iabData.vendors.forEach(function(e){var t,e=e.vendorId;P.legIntSettings.PAllowLI?(t=void 0,t=(n||!!A.vendorsSetting[e].consent)&&o,A.oneTrustIABConsent.vendors.push(e.toString()+":"+t),A.oneTrustIABConsent.legIntVendors.push(e.toString()+":"+A.vendorsSetting[e].legInt)):(A.oneTrustIABConsent.legIntVendors=[],A.oneTrustIABConsent.vendors.push(e.toString()+":"+o))}),T.UseGoogleVendors&&(t=A.addtlVendors,Object.keys(A.addtlVendorsList).forEach(function(e){o&&(t.vendorSelected[""+e.toString()]=!0,t.vendorConsent.push(""+e.toString()))}))},o.prototype.setOrUpdate3rdPartyIABConsentFlag=function(){var e=this.getIABCrossConsentflagData();T.IsIabEnabled?e&&!this.needReconsent()||this.updateCrossConsentCookie(T.IsIabThirdPartyCookieEnabled):e&&!this.reconsentRequired()&&"true"!==e||this.updateCrossConsentCookie(!1)},o.prototype.isIABCrossConsentEnabled=function(){return"true"===this.getIABCrossConsentflagData()},o.prototype.getIABCrossConsentflagData=function(){return v.readCookieParam(k.OPTANON_CONSENT,Me)},o.prototype.setGeolocationInCookies=function(){var e,t=v.readCookieParam(k.OPTANON_CONSENT,Fe);A.userLocation&&!t&&this.isAlertBoxClosedAndValid()?(e=A.userLocation.country+";"+A.userLocation.state,this.setUpdateGeolocationCookiesData(e)):this.reconsentRequired()&&t&&this.setUpdateGeolocationCookiesData("")},o.prototype.iabStringSDK=function(){var e=m.moduleInitializer.otIABModuleData;if(T.IsIabEnabled&&e)return{gvl:e.tcfSdkRef.gvl,tcModel:e.tcfSdkRef.tcModel,tcString:e.tcfSdkRef.tcString,cmpApi:e.tcfSdkRef.cmpApi,purposeRestriction:e.tcfSdkRef.purposeRestriction}},o.prototype.setUpdateGeolocationCookiesData=function(e){v.writeCookieParam(k.OPTANON_CONSENT,Fe,e)},o.prototype.reconsentRequired=function(){return(m.moduleInitializer.MobileSDK||this.awaitingReconsent())&&this.needReconsent()},o.prototype.awaitingReconsent=function(){return"true"===v.readCookieParam(k.OPTANON_CONSENT,Ne)},o.prototype.needReconsent=function(){var e=this.alertBoxCloseDate(),t=T.LastReconsentDate;return e&&t&&new Date(t)>new Date(e)},o.prototype.updateCrossConsentCookie=function(e){v.writeCookieParam(k.OPTANON_CONSENT,Me,e)},o.prototype.alertBoxCloseDate=function(){return v.getCookie(k.ALERT_BOX_CLOSED)},o.prototype.isAlertBoxClosedAndValid=function(){return null!==this.alertBoxCloseDate()&&!this.reconsentRequired()},o.prototype.generateLegIntButtonElements=function(e,t,o){return'
\n \n \n '+P.legIntSettings.PRemoveObjectionText+"\n \n
"},o.prototype.syncAlertBoxCookie=function(e){var t=T.ReconsentFrequencyDays;v.setCookie(k.ALERT_BOX_CLOSED,e,t,!1,new Date(e))},o.prototype.syncCookieExpiry=function(){var e,t,o;A.syncRequired&&(e=T.ReconsentFrequencyDays,t=v.getCookie(k.ALERT_BOX_CLOSED),o=v.getCookie(k.OPTANON_CONSENT),v.setCookie(k.OPTANON_CONSENT,o,e,!1,new Date(t)),p.needReconsent()&&v.removeAlertBox(),(o=v.getCookie(k.EU_PUB_CONSENT))&&(p.isIABCrossConsentEnabled()?v.removeIab2():v.setCookie(k.EU_PUB_CONSENT,o,e,!1,new Date(t))),o=v.getCookie(k.ADDITIONAL_CONSENT_STRING))&&v.setCookie(k.ADDITIONAL_CONSENT_STRING,o,e,!1,new Date(t))},o.prototype.syncOtPreviewCookie=function(){var e=v.getCookie(k.OT_PREVIEW);e&&v.setCookie(k.OT_PREVIEW,e,1,!1)},o.prototype.dispatchConsentEvent=function(){window.dispatchEvent(new CustomEvent("OTConsentApplied",{OTConsentApplied:"yes"}))};var L,p=new o,eo=function(){};oo.prototype.isAlwaysActiveGroup=function(e){var t;return!this.getGrpStatus(e)||(t=this.getGrpStatus(e).toLowerCase(),(t=e.Parent&&t!==Qe?this.getGrpStatus(this.getParentGroup(e.Parent)).toLowerCase():t)===Qe)},oo.prototype.getGrpStatus=function(e){return e&&e.Status?P.DNTEnabled&&e.IsDntEnabled?tt:e.Status:""},oo.prototype.getParentGroup=function(t){var e;return t&&0<(e=T.Groups.filter(function(e){return e.OptanonGroupId===t})).length?e[0]:null},oo.prototype.checkIfGroupHasConsent=function(t){var e=A.groupsConsent,o=b.findIndex(e,function(e){return e.split(":")[0]===t.CustomGroupId});return-1\n \n \n
\n \n \n
Cookies Used
\n
    \n
  • Cookie 1
  • \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
caption
HostHost DescriptionCookiesLife Span
Azure\n These\n cookies are used to make sure\n visitor page requests are routed to the same server in all browsing sessions.\n \n
    \n
  • ARRAffinity
  • \n
\n
\n
    \n
  • 100 days
  • \n
\n
\n
\n
\n \n \n
Cookies Used
\n
    \n
  • Cookie 1
  • \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
caption
HostHost DescriptionCookiesLife Span
Azure\n \n \n cookies are used to make sureng sessions.\n \n \n
    \n
  • ARRAffinity
  • \n
\n
\n
    \n
  • 100 days
  • \n
\n
\n
\n\n\x3c!-- New Cookies policy Link--\x3e\n',css:".ot-sdk-cookie-policy{font-family:inherit;font-size:16px}.ot-sdk-cookie-policy.otRelFont{font-size:1rem}.ot-sdk-cookie-policy h3,.ot-sdk-cookie-policy h4,.ot-sdk-cookie-policy h6,.ot-sdk-cookie-policy p,.ot-sdk-cookie-policy li,.ot-sdk-cookie-policy a,.ot-sdk-cookie-policy th,.ot-sdk-cookie-policy #cookie-policy-description,.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group,.ot-sdk-cookie-policy #cookie-policy-title{color:dimgray}.ot-sdk-cookie-policy #cookie-policy-description{margin-bottom:1em}.ot-sdk-cookie-policy h4{font-size:1.2em}.ot-sdk-cookie-policy h6{font-size:1em;margin-top:2em}.ot-sdk-cookie-policy th{min-width:75px}.ot-sdk-cookie-policy a,.ot-sdk-cookie-policy a:hover{background:#fff}.ot-sdk-cookie-policy thead{background-color:#f6f6f4;font-weight:bold}.ot-sdk-cookie-policy .ot-mobile-border{display:none}.ot-sdk-cookie-policy section{margin-bottom:2em}.ot-sdk-cookie-policy table{border-collapse:inherit}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy{font-family:inherit;font-size:1rem}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h3,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h4,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h6,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy p,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy li,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-title{color:dimgray}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description{margin-bottom:1em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup{margin-left:1.5em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group-desc,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-table-header,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy span,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td{font-size:.9em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td span,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td a{font-size:inherit}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group{font-size:1em;margin-bottom:.6em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-title{margin-bottom:1.2em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy>section{margin-bottom:1em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th{min-width:75px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a:hover{background:#fff}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead{background-color:#f6f6f4;font-weight:bold}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-mobile-border{display:none}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy section{margin-bottom:2em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup ul li{list-style:disc;margin-left:1.5em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup ul li h4{display:inline-block}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table{border-collapse:inherit;margin:auto;border:1px solid #d7d7d7;border-radius:5px;border-spacing:initial;width:100%;overflow:hidden}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table td{border-bottom:1px solid #d7d7d7;border-right:1px solid #d7d7d7}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td{border-bottom:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr th:last-child,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr td:last-child{border-right:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-host,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-cookies-type{width:25%}.ot-sdk-cookie-policy[dir=rtl]{text-align:left}#ot-sdk-cookie-policy h3{font-size:1.5em}@media only screen and (max-width: 530px){.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) table,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) thead,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tbody,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) th,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr{display:block}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) thead tr{position:absolute;top:-9999px;left:-9999px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr{margin:0 0 1em 0}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr:nth-child(odd),.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr:nth-child(odd) a{background:#f6f6f4}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td:before{position:absolute;height:100%;left:6px;width:40%;padding-right:10px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) .ot-mobile-border{display:inline-block;background-color:#e4e4e4;position:absolute;height:100%;top:0;left:45%;width:2px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td:before{content:attr(data-label);font-weight:bold}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) li{word-break:break-word;word-wrap:break-word}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table{overflow:hidden}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table td{border:none;border-bottom:1px solid #d7d7d7}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tbody,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tr{display:block}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-host,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-cookies-type{width:auto}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tr{margin:0 0 1em 0}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td:before{height:100%;width:40%;padding-right:10px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td:before{content:attr(data-label);font-weight:bold}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy li{word-break:break-word;word-wrap:break-word}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead tr{position:absolute;top:-9999px;left:-9999px;z-index:-9999}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td{border-bottom:1px solid #d7d7d7;border-right:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td:last-child{border-bottom:0px}}",cssRTL:".ot-sdk-cookie-policy{font-family:inherit;font-size:16px}.ot-sdk-cookie-policy.otRelFont{font-size:1rem}.ot-sdk-cookie-policy h3,.ot-sdk-cookie-policy h4,.ot-sdk-cookie-policy h6,.ot-sdk-cookie-policy p,.ot-sdk-cookie-policy li,.ot-sdk-cookie-policy a,.ot-sdk-cookie-policy th,.ot-sdk-cookie-policy #cookie-policy-description,.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group,.ot-sdk-cookie-policy #cookie-policy-title{color:dimgray}.ot-sdk-cookie-policy #cookie-policy-description{margin-bottom:1em}.ot-sdk-cookie-policy h4{font-size:1.2em}.ot-sdk-cookie-policy h6{font-size:1em;margin-top:2em}.ot-sdk-cookie-policy th{min-width:75px}.ot-sdk-cookie-policy a,.ot-sdk-cookie-policy a:hover{background:#fff}.ot-sdk-cookie-policy thead{background-color:#f6f6f4;font-weight:bold}.ot-sdk-cookie-policy .ot-mobile-border{display:none}.ot-sdk-cookie-policy section{margin-bottom:2em}.ot-sdk-cookie-policy table{border-collapse:inherit}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy{font-family:inherit;font-size:1rem}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h3,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h4,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy h6,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy p,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy li,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-title{color:dimgray}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description{margin-bottom:1em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup{margin-right:1.5em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy #cookie-policy-description,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group-desc,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-table-header,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy span,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td{font-size:.9em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td span,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td a{font-size:inherit}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-group{font-size:1em;margin-bottom:.6em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-cookie-policy-title{margin-bottom:1.2em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy>section{margin-bottom:1em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th{min-width:75px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy a:hover{background:#fff}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead{background-color:#f6f6f4;font-weight:bold}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-mobile-border{display:none}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy section{margin-bottom:2em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup ul li{list-style:disc;margin-right:1.5em}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy .ot-sdk-subgroup ul li h4{display:inline-block}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table{border-collapse:inherit;margin:auto;border:1px solid #d7d7d7;border-radius:5px;border-spacing:initial;width:100%;overflow:hidden}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table td{border-bottom:1px solid #d7d7d7;border-left:1px solid #d7d7d7}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td{border-bottom:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr th:last-child,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr td:last-child{border-left:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-host,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-cookies-type{width:25%}.ot-sdk-cookie-policy[dir=rtl]{text-align:right}#ot-sdk-cookie-policy h3{font-size:1.5em}@media only screen and (max-width: 530px){.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) table,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) thead,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tbody,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) th,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td,.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr{display:block}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) thead tr{position:absolute;top:-9999px;right:-9999px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr{margin:0 0 1em 0}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr:nth-child(odd),.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) tr:nth-child(odd) a{background:#f6f6f4}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td{border:none;border-bottom:1px solid #eee;position:relative;padding-right:50%}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td:before{position:absolute;height:100%;right:6px;width:40%;padding-left:10px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) .ot-mobile-border{display:inline-block;background-color:#e4e4e4;position:absolute;height:100%;top:0;right:45%;width:2px}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) td:before{content:attr(data-label);font-weight:bold}.ot-sdk-cookie-policy:not(#ot-sdk-cookie-policy-v2) li{word-break:break-word;word-wrap:break-word}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table{overflow:hidden}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table td{border:none;border-bottom:1px solid #d7d7d7}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tbody,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy th,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tr{display:block}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-host,#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table .ot-cookies-type{width:auto}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy tr{margin:0 0 1em 0}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td:before{height:100%;width:40%;padding-left:10px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy td:before{content:attr(data-label);font-weight:bold}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy li{word-break:break-word;word-wrap:break-word}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy thead tr{position:absolute;top:-9999px;right:-9999px;z-index:-9999}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td{border-bottom:1px solid #d7d7d7;border-left:0px}#ot-sdk-cookie-policy-v2.ot-sdk-cookie-policy table tr:last-child td:last-child{border-bottom:0px}}"}}},Ao=(Io.prototype.isLandingPage=function(){var e=v.readCookieParam(k.OPTANON_CONSENT,"landingPath");return!e||e===location.href},Io.prototype.setLandingPathParam=function(e){v.writeCookieParam(k.OPTANON_CONSENT,"landingPath",e)},Io);function Io(){}_o.prototype.loadBanner=function(){m.moduleInitializer.ScriptDynamicLoadEnabled?"complete"===document.readyState?I(window).trigger("otloadbanner"):window.addEventListener("load",function(e){I(window).trigger("otloadbanner")}):"loading"!==document.readyState?I(window).trigger("otloadbanner"):window.addEventListener("DOMContentLoaded",function(e){I(window).trigger("otloadbanner")}),P.pubDomainData.IsBannerLoaded=!0},_o.prototype.OnConsentChanged=function(e){var t=e.toString();c.consentChangedEventMap[t]||(c.consentChangedEventMap[t]=!0,window.addEventListener("consent.onetrust",e))},_o.prototype.triggerGoogleAnalyticsEvent=function(e,t,o,n){var r=!1;m.moduleInitializer.GATrackToggle&&("AS"===m.moduleInitializer.GATrackAssignedCategory||""===m.moduleInitializer.GATrackAssignedCategory||window.OnetrustActiveGroups.includes(","+m.moduleInitializer.GATrackAssignedCategory+","))&&(r=!0),!P.ignoreGoogleAnlyticsCall&&r&&(void 0!==window._gaq&&window._gaq.push(["_trackEvent",e,t,o,n]),"function"==typeof window.ga&&window.ga("send","event",e,t,o,n),r=window[P.otDataLayer.name],!P.otDataLayer.ignore)&&void 0!==r&&r&&r.constructor===Array&&r.push({event:"trackOptanonEvent",optanonCategory:e,optanonAction:t,optanonLabel:o,optanonValue:n})},_o.prototype.setAlertBoxClosed=function(e){var t=(new Date).toISOString(),e=(e?v.setCookie(k.ALERT_BOX_CLOSED,t,T.ReconsentFrequencyDays):v.setCookie(k.ALERT_BOX_CLOSED,t,0),I(".onetrust-pc-dark-filter").el[0]);e&&"none"!==getComputedStyle(e).getPropertyValue("display")&&I(".onetrust-pc-dark-filter").fadeOut(400)},_o.prototype.updateConsentFromCookie=function(t){return R(this,void 0,void 0,function(){return M(this,function(e){return t?(so.isInitIABCookieData(t)||so.updateFromGlobalConsent(t),"init"===t&&(v.removeIab1(),p.isAlertBoxClosedAndValid()&&p.resetTCModel(),v.removeAlertBox())):(p.resetTCModel(),p.updateCrossConsentCookie(!1),p.setIABCookieData()),c.assetPromise.then(function(){c.loadBanner()}),[2]})})};var c,Lo=_o;function _o(){var t=this;this.consentChangedEventMap={},this.assetResolve=null,this.assetPromise=new Promise(function(e){t.assetResolve=e})}var _,Eo="opt-out",Vo="OneTrust Cookie Consent",Oo="Banner Auto Close",Bo="Banner Close Button",wo="Banner - Continue without Accepting",Go="Banner - Confirm",xo="Preferences Close Button",Do="Preference Center Opened From Banner",No="Preference Center Opened From Button",Ho="Preference Center Opened From Function",Fo="Preferences Save Settings",Ro="Vendors List Opened From Function",Mo="Floating Cookie Settings Open Button",qo="Floating Cookie Settings Close Button",Uo="Preferences Toggle On",jo="Preferences Toggle Off",zo="General Vendor Toggle On",Ko="General Vendor Toggle Off",Wo="Host Toggle On",Jo="Host Toggle Off",Yo="Preferences Legitimate Interest Objection",Xo="Preferences Legitimate Interest Remove Objection",Qo="IAB Vendor Toggle ON",$o="IAB Vendor Toggle Off",Zo="IAB Vendor Legitimate Interest Objection",en="IAB Vendor Legitimate Interest Remove Objection",tn="Vendor Service Toggle On",on="Vendor Service Toggle Off",nn=(rn.prototype.initializeFeaturesAndSpecialPurposes=function(){A.oneTrustIABConsent.features=[],A.oneTrustIABConsent.specialPurposes=[];var o=f.GroupTypes;T.Groups.forEach(function(e){var t;e.Type!==o.Ft&&e.Type!==o.Spl_Pur||((t={}).groupId=e.OptanonGroupId,t.purposeId=e.PurposeId,t.value=!0,(e.Type===o.Ft?A.oneTrustIABConsent.features:A.oneTrustIABConsent.specialPurposes).push(t))})},rn.prototype.initGrpsAndHosts=function(){this.initializeGroupData(P.consentableGrps),T.showCookieList&&y.isOptOutEnabled()?this.initializeHostData(P.consentableGrps):(A.hostsConsent=[],co.writeHstParam(k.OPTANON_CONSENT))},rn.prototype.ensureHtmlGroupDataInitialised=function(){var e,t,o,n;this.initGrpsAndHosts(),A.showGeneralVendors&&(fo.populateGenVendorLists(),fo.initGenVendorConsent()),T.IsIabEnabled&&(this.initializeIABData(),this.initializeFeaturesAndSpecialPurposes()),A.vsIsActiveAndOptOut&&this.initializeVendorsService(),p.setOrUpdate3rdPartyIABConsentFlag(),p.setGeolocationInCookies(),T.IsConsentLoggingEnabled&&(e=window.OneTrust.dataSubjectParams||{},o="",n=!1,(t=v.readCookieParam(k.OPTANON_CONSENT,"iType"))&&A.isV2Stub&&e.id&&e.token&&(n=!0,o=he[t]),no.createConsentTxn(!1,o,!1,n))},rn.prototype.initializeVendorsService=function(){var o=p.isAlertBoxClosedAndValid(),e=v.readCookieParam(k.OPTANON_CONSENT,go),n=b.strToMap(e);A.getVendorsInDomain().forEach(function(e,t){n.has(t)||(e=!o&&C.checkIsActiveByDefault(e.groupRef),n.set(t,e))}),A.vsConsent=n},rn.prototype.initializeGroupData=function(e){var t;v.readCookieParam(k.OPTANON_CONSENT,po)?(vo.synchroniseCookieGroupData(e),t=v.readCookieParam(k.OPTANON_CONSENT,po),A.groupsConsent=b.strToArr(t),A.gpcConsentTxn&&(T.IsConsentLoggingEnabled&&no.createConsentTxn(!1,"GPC value changed",!1,!0),A.gpcConsentTxn=!1,c.setAlertBoxClosed(!0))):(A.groupsConsent=[],e.forEach(function(e){A.groupsConsent.push(""+e.CustomGroupId+(C.checkIsActiveByDefault(e)&&e.HasConsentOptOut?":1":":0"))}),T.IsConsentLoggingEnabled&&window.addEventListener("beforeunload",this.consentDefaulCall))},rn.prototype.initializeHostData=function(e){var t,r;v.readCookieParam(k.OPTANON_CONSENT,"hosts")?(vo.synchroniseCookieHostData(),t=v.readCookieParam(k.OPTANON_CONSENT,"hosts"),A.hostsConsent=b.strToArr(t),e.forEach(function(e){C.isAlwaysActiveGroup(e)&&e.Hosts.length&&e.Hosts.forEach(function(e){A.oneTrustAlwaysActiveHosts.push(e.HostId)})})):(A.hostsConsent=[],r={},e.forEach(function(e){var o=C.isAlwaysActiveGroup(e),n=A.syncRequired?vo.groupHasConsent(e):C.checkIsActiveByDefault(e);e.Hosts.length&&e.Hosts.forEach(function(e){var t;r[e.HostId]?vo.updateHostStatus(e,n):(r[e.HostId]=!0,o&&A.oneTrustAlwaysActiveHosts.push(e.HostId),t=vo.isHostPartOfAlwaysActiveGroup(e.HostId),A.hostsConsent.push(e.HostId+(t||n?":1":":0")))})}))},rn.prototype.consentDefaulCall=function(){var e=parseInt(v.readCookieParam(k.OPTANON_CONSENT,Re),10);!isNaN(e)&&0!==e||(c.triggerGoogleAnalyticsEvent(Vo,"Click","No interaction"),T.IsConsentLoggingEnabled&&no.createConsentTxn(!0),window.removeEventListener("beforeunload",_.consentDefaulCall))},rn.prototype.fetchAssets=function(s){return void 0===s&&(s=null),R(this,void 0,void 0,function(){var t,o,n,r,i;return M(this,function(e){switch(e.label){case 0:return t=m.moduleInitializer,i=p.isAlertBoxClosedAndValid(),o=!!s,i=_.isFetchBanner(t.IsSuppressBanner,i),n=_.cookieSettingBtnPresent(),n=P.isIab2orv2Template?T.PCShowPersistentCookiesHoverButton&&(!T.PCenterDynamicRenderingEnable||T.PCenterDynamicRenderingEnable&&!n):T.PCShowPersistentCookiesHoverButton,r="true"===A.urlParams.get(vt),A.hideBanner=r,[4,Promise.all([!i||T.NoBanner||r?Promise.resolve(null):Yt.getBannerContent(o,s),!t.IsSuppressPC||A.isPCVisible?Yt.getPcContent():Promise.resolve(null),n?Yt.getCSBtnContent():Promise.resolve(null),Yt.getCommonStyles()])];case 1:return i=e.sent(),r=i[0],o=i[1],t=i[2],n=i[3],_.fetchContent(r,o,t,n),_.setCookieListGroupData(),[2]}})})},rn.prototype.fetchContent=function(e,t,o,n){var r;e&&(r=e.html,m.fp.CookieV2SSR||(r=atob(e.html)),this.bannerGroup={name:e.name,html:r,css:e.css}),t&&(this.preferenceCenterGroup={name:t.name,html:atob(t.html),css:t.css},m.isV2Template=T.PCTemplateUpgrade&&/otPcPanel|otPcCenter|otPcTab/.test(t.name)),o&&(this.csBtnGroup={name:"CookieSettingsButton",html:atob(o.html),css:o.css}),n&&(this.commonStyles=n)},rn.prototype.cookieSettingBtnPresent=function(){return I("#ot-sdk-btn").length||I(".ot-sdk-show-settings").length||I(".optanon-show-settings").length},rn.prototype.isFetchBanner=function(e,t){return!e||T.ShowAlertNotice&&!t&&e&&!I("#onetrust-banner-sdk").length},rn.prototype.setCookieListGroupData=function(){var e;m.fp.CookieV2TrackingTechnologies||(e=(new To).assets(),_.cookieListGroup={name:e.name,html:e.html,css:T.useRTL?e.cssRTL:e.css})},rn.prototype.initializeIabPurposeConsentOnReload=function(){var t=this;P.consentableIabGrps.forEach(function(e){t.setIABConsent(e,!1),e.IsLegIntToggle=!0,t.setIABConsent(e,!1)})},rn.prototype.initializeIABData=function(o,n,r){var i=this,e=(void 0===o&&(o=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),A.oneTrustIABConsent),t=(e.purpose=[],e.vendors=[],e.legIntVendors=[],e.specialFeatures=[],e.legimateInterest=[],A.addtlVendors),s=T.VendorConsentModel===Eo;t.vendorConsent=[],!e.IABCookieValue||o||n||p.reconsentRequired()?(P.consentableIabGrps.forEach(function(e){var t;n&&!r?i.setIABConsent(e,C.isAlwaysActiveGroup(e)):r?e.HasConsentOptOut&&i.setIABConsent(e,!1):(t=o&&e.HasConsentOptOut,i.setIABConsent(e,t),e.Type===f.GroupTypes.Pur&&(e.IsLegIntToggle=!0,i.setIABConsent(e,e.HasLegIntOptOut)))}),T.IsIabEnabled&&r&&(A.oneTrustIABConsent.legimateInterest=A.vendors.selectedLegInt.slice()),t=r?s:o||!n&&s,p.setIABVendor(t,r),!p.reconsentRequired()||o||n||p.resetTCModel()):(this.initializeIabPurposeConsentOnReload(),so.populateGoogleConsent(),so.populateVendorAndPurposeFromCookieData())},rn.prototype.canSoftOptInInsertForGroup=function(e){var e=C.getGroupById(e);if(e)return e=e&&!e.Parent?e:C.getParentGroup(e.Parent),"inactive landingpage"!==C.getGrpStatus(e).toLowerCase()||!Po.isLandingPage()},rn.prototype.setIABConsent=function(e,t){e.Type===f.GroupTypes.Spl_Ft?this.setIabSpeciFeatureConsent(e,t):e.IsLegIntToggle?(this.setIabLegIntConsent(e,t),e.IsLegIntToggle=!1):this.setIabPurposeConsent(e,t)},rn.prototype.setIabPurposeConsent=function(o,n){var r=!1;A.oneTrustIABConsent.purpose=A.oneTrustIABConsent.purpose.map(function(e){var t=e.split(":")[0];return t===o.IabGrpId&&(e=t+":"+n,r=!0),e}),r||A.oneTrustIABConsent.purpose.push(o.IabGrpId+":"+n)},rn.prototype.setIabLegIntConsent=function(o,n){var r=!1;A.oneTrustIABConsent.legimateInterest=A.oneTrustIABConsent.legimateInterest.map(function(e){var t=e.split(":")[0];return t===o.IabGrpId&&(e=t+":"+n,r=!0),e}),r||A.oneTrustIABConsent.legimateInterest.push(o.IabGrpId+":"+n)},rn.prototype.setIabSpeciFeatureConsent=function(o,n){var r=!1;A.oneTrustIABConsent.specialFeatures=A.oneTrustIABConsent.specialFeatures.map(function(e){var t=e.split(":")[0];return t===o.IabGrpId&&(e=t+":"+n,r=!0),e}),r||A.oneTrustIABConsent.specialFeatures.push(o.IabGrpId+":"+n)},rn);function rn(){}ln.prototype.getAllowAllButton=function(){return I("#onetrust-pc-sdk #accept-recommended-btn-handler")},ln.prototype.getSelectedVendors=function(){return I("#onetrust-pc-sdk "+S.P_Tgl_Cntr+" .ot-checkbox input:checked")};var sn,an=ln;function ln(){}pn.prototype.setBannerFocus=function(){var e=Array.prototype.slice.call(I("#onetrust-banner-sdk .onetrust-vendors-list-handler").el),t=Array.prototype.slice.call(I('#onetrust-banner-sdk #onetrust-policy-text [href],#onetrust-banner-sdk #onetrust-policy-text button,#onetrust-banner-sdk #onetrust-policy-text [tabindex]:not([tabindex="-1"])').el),o=Array.prototype.slice.call(I("#onetrust-banner-sdk .ot-bnr-save-handler").el),n=Array.prototype.slice.call(I("#onetrust-banner-sdk #onetrust-pc-btn-handler").el),r=Array.prototype.concat.call(Array.prototype.slice.call(I("#onetrust-banner-sdk .category-switch-handler:not([disabled])").el),Array.prototype.slice.call(I("#onetrust-banner-sdk .ot-cat-lst button").el),e),r=Array.prototype.concat.call(t,r),i=Array.prototype.slice.call(I("#onetrust-banner-sdk .onetrust-close-btn-handler").el),e=(P.bannerName===pt&&(r=Array.prototype.concat.call(e,t)),Array.prototype.slice.call(I("#onetrust-banner-sdk #onetrust-accept-btn-handler").el)),t=Array.prototype.slice.call(I("#onetrust-banner-sdk #onetrust-reject-all-handler").el),o=Array.prototype.concat.call(o,e,t,n),n=((P.bannerName!==ct||T.IsIabEnabled)&&P.bannerName!==lt&&P.bannerName!==ht||(o=Array.prototype.concat.call(n,t,e)),Array.prototype.slice.call(I("#onetrust-banner-sdk .ot-gv-list-handler").el));P.bannerName===gt?(r=Array.prototype.concat.call(n,r),o=Array.prototype.slice.call(I("#onetrust-banner-sdk #onetrust-button-group button").el)):r=Array.prototype.concat.call(r,n),this.bannerEl=Array.prototype.concat.call(Array.prototype.slice.call(I("#onetrust-banner-sdk #onetrust-cookie-btn").el),r,Array.prototype.slice.call(I("#onetrust-banner-sdk .banner-option-input").el),o,Array.prototype.slice.call(I("#onetrust-banner-sdk .ot-bnr-footer-logo a").el),i),this.banner=I("#onetrust-banner-sdk").el[0],(T.BInitialFocus||T.BInitialFocusLinkAndButton||T.ForceConsent)&&(T.BInitialFocus?this.banner:this.bannerEl[0]).focus()},pn.prototype.handleBannerFocus=function(e,t){var o=e.target,n=cn.bannerEl,r=n.indexOf(o),i=n.length-1,s=null;if(this.handleBannerFocusBodyReset(t,r,i))y.resetFocusToBody();else if(this.banner===o)s=this.handleInitialBannerFocus(t,n,i,s);else for(;!s;){var a=void 0;0!==(a=t?r<=0?n[i]:n[r-1]:r===i?n[0]:n[r+1]).clientHeight||0!==a.offsetHeight?s=a:t?r--:r++}s&&(e.preventDefault(),s.focus())},pn.prototype.handleBannerFocusBodyReset=function(e,t,o){return!(T.ForceConsent||!T.BInitialFocus&&!T.BInitialFocusLinkAndButton||!(e&&0===t||!e&&t===o))},pn.prototype.handleInitialBannerFocus=function(e,t,o,n){return e&&T.ForceConsent?n=t[o]:e||(n=t[0]),n},pn.prototype.setPCFocus=function(e){if(e&&!(e.length<=0)){for(var t=0;t"):""},n.prototype.canInsertForGroup=function(e,t){void 0===t&&(t=!1);var o=null!=e&&void 0!==e,n=v.readCookieParam(k.OPTANON_CONSENT,"groups"),r=A.groupsConsent.join(","),i=v.readCookieParam(k.OPTANON_CONSENT,"hosts"),s=A.hostsConsent.join(",");if(t)return!0;n===r&&i===s||_.ensureHtmlGroupDataInitialised();var a=[];if(A.showGeneralVendors)for(var l=0,c=Object.entries(A.genVendorsConsent);l input[checked]")?b.setCheckedAttribute("",n,!0):b.setCheckedAttribute("",n,!1),document.querySelector(e.venListId+' li:not([style^="display: none"]) '+e.ctgl+" > input:not([checked])")?n.parentElement.classList.add("line-through"):n.parentElement.classList.remove("line-through")},r.prototype.initGoogleVendors=function(){this.populateAddtlVendors(A.addtlVendorsList),this.venAdtlSelAllTglEvent()},r.prototype.initGenVendors=function(){this.populateGeneralVendors(),T.GenVenOptOut&&T.GeneralVendors&&T.GeneralVendors.length&&this.genVenSelectAllTglEvent()},r.prototype.resetAddtlVendors=function(){g.searchVendors(g.googleSearchSelectors,A.addtlVendorsList,ke.GoogleVendor),this.showConsentHeader()},r.prototype.venAdtlSelAllTglEvent=function(){g.selectAllEventHandler({vendorsList:'#ot-addtl-venlst li:not([style^="display: none"]) .ot-ven-adtlctgl input',selAllCntr:"#onetrust-pc-sdk #ot-selall-adtlvencntr",selAllChkbox:"#onetrust-pc-sdk #ot-selall-adtlven-handler"})},r.prototype.genVenSelectAllTglEvent=function(){var e={vendorsList:S.P_Gven_List+' li:not([style^="display: none"]) .ot-ven-gvctgl input',selAllCntr:"#onetrust-pc-sdk #ot-selall-gnvencntr",selAllChkbox:"#onetrust-pc-sdk #ot-selall-gnven-handler"};g.selectAllEventHandler(e)},r.prototype.selectAllEventHandler=function(e){for(var t=I(e.vendorsList).el,o=I(e.selAllCntr).el[0],n=I(e.selAllChkbox).el[0],r=!0,i=0;i li"):document.querySelectorAll(S.P_Vendor_Container+' li:not([style$="none;"]),'+S.P_Gven_List+' li:not([style$="none;"])'),o=t.length,n=I('#onetrust-pc-sdk [role="status"]');o?n.text(t.length+" "+(e?"host":"vendor")+(1\n '+e+' '+T.NewWinTxt+"\n \n "),t.querySelector(S.P_Host_Title).innerHTML=e,t.querySelector(S.P_Host_Desc).innerHTML=o[n].Description,o[n].PrivacyPolicy&&T.pcShowCookieHost&&t.querySelector(S.P_Host_Desc).insertAdjacentHTML("afterend",''+(a?T.PCGVenPolicyTxt:T.PCCookiePolicyText)+' '+T.NewWinTxt+""),t.querySelector(S.P_Host_View_Cookies));return!A.showGeneralVendors||o[n].Cookies&&o[n].Cookies.length?T.PCViewCookiesText&&(l.innerHTML=T.PCViewCookiesText):(b.removeChild(l),I(t).addClass("ot-hide-acc")),o[n].Description&&T.pcShowCookieHost||(i=t.querySelector(S.P_Host_Desc)).parentElement.removeChild(i),I(t.querySelector(S.P_Host_Opt)).html(""),null!=(a=o[n].Cookies)&&a.forEach(function(e){e=s.getCookieElement(e,o[n]);I(t.querySelector(S.P_Host_Opt)).append(e)}),r.append(t),e},r.prototype.hostsListEvent=function(){for(var e=I("#onetrust-pc-sdk "+S.P_Host_Cntr+" .ot-host-tgl input").el,t=I("#onetrust-pc-sdk #"+S.P_Sel_All_Host_El).el[0],o=I("#onetrust-pc-sdk #select-all-hosts-groups-handler").el[0],n=I("#onetrust-pc-sdk "+S.P_Cnsnt_Header).el[0],r=!0,i=0;i"+T.PCenterVendorListDisclosure+":

",r.insertAdjacentElement("beforeend",e),t.disclosures.forEach(function(e){var t,o=i.cloneNode(!0),n="

"+T.PCenterVendorListStorageIdentifier+"

"+(e.name||e.identifier)+"

";e.type&&(n+="

"+T.PCenterVendorListStorageType+"

"+e.type+"

"),e.maxAgeSeconds&&(t=b.calculateCookieLifespan(e.maxAgeSeconds),n+="

"+T.PCenterVendorListLifespan+"

"+t+"

"),e.domain&&(n+="

"+T.PCenterVendorListStorageDomain+"

"+e.domain+"

"),e.purposes&&(n+="

"+T.PCenterVendorListStoragePurposes+'

',e.purposes.forEach(function(e){e=P.iabGroups.purposes[e].name;e&&(n+='

'+e+"

")}),n+="
"),o.innerHTML=n,r.insertAdjacentElement("beforeend",o)}),this.updateDomainsUsageInDisclosures(t,i,r))},r.prototype.updateDomainsUsageInDisclosures=function(e,n,r){var t;e.domains&&e.domains.length&&((t=n.cloneNode(!0)).innerHTML="

"+T.PCVLSDomainsUsed+":

",r.insertAdjacentElement("beforeend",t),e.domains.forEach(function(e){var t,o=n.cloneNode(!0);e.domain&&(t="

"+T.PCenterVendorListStorageDomain+"

"+e.domain+"

"),e.use&&(t+="

"+T.PCVLSUse+"

"+e.use+"

"),o.innerHTML=t,r.insertAdjacentElement("beforeend",o)}))},r.prototype.addDescriptionElement=function(e,t){var o=document.createElement("p");o.innerHTML=t||"",e.parentNode.insertBefore(o,e)},r.prototype.setVdrConsentTglOrChbox=function(e,t,o,n,r,i){var s,a,l=A.vendorsSetting[e],t=t.cloneNode(!0);l.consent&&(t.classList.add(S.P_Ven_Ctgl),l=-1!==jt.inArray(e+":true",A.vendors.selectedVendors),s=t.querySelector("input"),m.isV2Template&&(s.classList.add("vendor-checkbox-handler"),a=t.querySelector(this.LABEL_STATUS),T.PCShowConsentLabels?a.innerHTML=l?T.PCActiveText:T.PCInactiveText:b.removeChild(a)),b.setCheckedAttribute("",s,l),b.setHtmlAttributes(s,{id:S.P_Vendor_CheckBx+"-"+i,vendorid:e,"aria-label":o}),t.querySelector("label").setAttribute("for",S.P_Vendor_CheckBx+"-"+i),t.querySelector(S.P_Label_Txt).textContent=o,P.pcName===h?T.PCTemplateUpgrade?n.insertAdjacentElement("beforeend",t):I(n).append(t):n.insertBefore(t,r))},r.prototype.setVndrLegIntTglTxt=function(e,t){e=e.querySelector(this.LABEL_STATUS);T.PCShowConsentLabels?e.innerHTML=t?T.PCActiveText:T.PCInactiveText:b.removeChild(e)},r.prototype.setVdrLegIntTglOrChbx=function(e,t,o,n,r,i,s){var a,l,c=A.vendorsSetting[e],o=o.cloneNode(!0);c.legInt&&!c.specialPurposesOnly&&(a=-1!==jt.inArray(e+":true",A.vendors.selectedLegIntVendors),P.legIntSettings.PShowLegIntBtn?(l=p.generateLegIntButtonElements(a,e,!0),t.querySelector(S.P_Acc_Txt).insertAdjacentHTML("beforeend",l),(l=t.querySelector(".ot-remove-objection-handler"))&&d(l,l.getAttribute("data-style"))):(l=o.querySelector("input"),m.isV2Template&&(l.classList.add("vendor-checkbox-handler"),this.setVndrLegIntTglTxt(o,a)),o.classList.add(S.P_Ven_Ltgl),l.classList.remove("vendor-checkbox-handler"),l.classList.add("vendor-leg-checkbox-handler"),b.setCheckedAttribute("",l,a),b.setHtmlAttributes(l,{id:S.P_Vendor_LegCheckBx+"-"+r,"leg-vendorid":e,"aria-label":n}),o.querySelector("label").setAttribute("for",S.P_Vendor_LegCheckBx+"-"+r),o.querySelector(S.P_Label_Txt).textContent=n,t.querySelector("."+S.P_Ven_Ctgl)&&(i=t.querySelector("."+S.P_Ven_Ctgl)),P.pcName!==h||s.children.length?s.insertBefore(o,i):I(s).append(o),c.consent||P.pcName!==h||o.classList.add(S.P_Ven_Ltgl_Only)))},r.prototype.setVndrSplPurSection=function(e,t){var o=this,n=e.querySelector(".spl-purpose"),e=e.querySelector(".spl-purpose-grp"),r=e.cloneNode(!0);e.parentElement.removeChild(e),P.isIab2orv2Template&&t.specialPurposes.forEach(function(e){I(r.querySelector(o.CONSENT_CATEGORY)).text(e.purposeName),n.insertAdjacentHTML("afterend",r.outerHTML)}),0===t.specialPurposes.length?n.parentElement.removeChild(n):I(n.querySelector("p")).text(T.SpecialPurposesText)},r.prototype.setVndrFtSection=function(e,t){var o=this,n=e.querySelector(".vendor-feature"),e=e.querySelector(".vendor-feature-group"),r=e.cloneNode(!0);e.parentElement.removeChild(e),I(n.querySelector("p")).text(T.FeaturesText),t.features.forEach(function(e){I(r.querySelector(o.CONSENT_CATEGORY)).text(e.featureName),n.insertAdjacentHTML("afterend",r.outerHTML)}),0===t.features.length&&n.parentElement.removeChild(n)},r.prototype.setVndrSplFtSection=function(e,t){var o=this,n=e.querySelector(".vendor-spl-feature"),e=e.querySelector(".vendor-spl-feature-grp"),r=e.cloneNode(!0);n.parentElement.removeChild(e),P.isIab2orv2Template&&t.specialFeatures.forEach(function(e){I(r.querySelector(o.CONSENT_CATEGORY)).text(e.featureName),n.insertAdjacentHTML("afterend",r.outerHTML)}),0===t.specialFeatures.length?n.parentElement.removeChild(n):I(n.querySelector("p")).text(T.SpecialFeaturesText)},r.prototype.setVndrAccTxt=function(e,t){t=t.querySelector(S.P_Acc_Txt);t&&b.setHtmlAttributes(t,{id:"IAB-ACC-TXT"+e,"aria-labelledby":"IAB-ACC-TXT"+e,role:"region"})},r.prototype.setVndrDisclosure=function(e,t,o){t.deviceStorageDisclosureUrl&&(b.setHtmlAttributes(o,{"disc-vid":e}),A.discVendors[e]={isFetched:!1,disclosureUrl:t.deviceStorageDisclosureUrl})},r.prototype.setVndrListSelectAllChkBoxs=function(){var e=I("#onetrust-pc-sdk "+S.P_Sel_All_Vendor_Consent_Handler).el[0],e=(e&&e.setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCenterSelectAllVendorsText+" "+T.LegitInterestText),I("#onetrust-pc-sdk "+S.P_Sel_All_Vendor_Leg_Handler).el[0]);e&&e.setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCenterSelectAllVendorsText+" "+T.ConsentText)},r.prototype.setVndrConsentPurposes=function(e,t,o){var n=this,r=e.querySelector(".vendor-consent-group"),i=e.querySelector(".vendor-option-purpose"),s=r.cloneNode(!0),a=e.querySelector(".legitimate-interest"),l=!1;return r.parentElement.removeChild(r),t.consent&&(I(i.querySelector("p")).text(T.ConsentPurposesText),o.purposes.forEach(function(e){I(s.querySelector(n.CONSENT_CATEGORY)).text(e.purposeName);e=s.querySelector(".consent-status");e&&s.removeChild(e),a.insertAdjacentHTML("beforebegin",s.outerHTML),l=!0})),t.consent||i.parentElement.removeChild(i),l},r.prototype.getVndrTglCntr=function(e){return m.isV2Template?L.chkboxEl.cloneNode(!0):e.querySelector(".ot-checkbox")},r.prototype.attachVendorsToDOM=function(){for(var p,u,h=this,g=A.vendors.list,C=A.vendors.vendorTemplate.cloneNode(!0),y=(A.discVendors={},m.isV2Template&&(p=C.querySelector(".ot-ven-pur").cloneNode(!0),u=C.querySelector(S.P_Ven_Disc).cloneNode(!0),I(C.querySelector(".ot-ven-dets")).html("")),document.createDocumentFragment()),f=this,e=0;e"+o+" "+T.NewWinTxt+"",n.insertAdjacentHTML("afterend",""),P.isTcfV2Template&&e.legIntClaim?(b.setHtmlAttributes(t,{href:e.legIntClaim,rel:"noopener",target:"_blank"}),t.innerHTML=T.PCIABVendorLegIntClaimText+" "+o+" "+T.NewWinTxt+"",t.insertAdjacentHTML("afterend","")):t.remove()},r.prototype.populateVendorDetailsHtml=function(e,t,o,n){var r,i,s,a,l,c,d,p,e=e.querySelector(".ot-ven-dets"),u=A.vendorsSetting[o.vendorId],n=n.cloneNode(!0);this.attachVendorDisclosure(n,o),e.insertAdjacentElement("beforeEnd",n),P.isTcfV2Template&&null!=(n=o.dataDeclaration)&&n.length&&(n=t.cloneNode(!0),r="

"+T.PCVListDataDeclarationText+"

",r+="
    ",o.dataDeclaration.forEach(function(e){r+="
  • "+e.Name+"

  • "}),r+="
",n.innerHTML=r,e.insertAdjacentElement("beforeEnd",n)),P.isTcfV2Template&&null!==(null==(n=o.dataRetention)?void 0:n.stdRetention)&&void 0!==(null==(n=o.dataRetention)?void 0:n.stdRetention)&&(n=t.cloneNode(!0),c=1===o.dataRetention.stdRetention?T.PCenterVendorListLifespanDay:T.PCenterVendorListLifespanDays,s="

"+T.PCVListDataRetentionText+"

",s+="
  • "+T.PCVListStdRetentionText+" ("+o.dataRetention.stdRetention+" "+c+")

  • ",n.innerHTML=s,e.insertAdjacentElement("beforeEnd",n)),u.consent&&(c=t.cloneNode(!0),i="

    "+T.ConsentPurposesText+"

    ",i+="
      ",o.purposes.forEach(function(e){var t;i+="
    • "+e.purposeName,P.isTcfV2Template&&null!=(t=o.dataRetention)&&t.purposes&&o.dataRetention.purposes[e.purposeId]&&(e=1===(t=o.dataRetention.purposes[e.purposeId].retention)?T.PCenterVendorListLifespanDay:T.PCenterVendorListLifespanDays,i+=" ("+t+" "+e+")"),i+="

    • "}),i+="
    ",c.innerHTML=i,e.insertAdjacentElement("beforeEnd",c)),u.legInt&&o.legIntPurposes.length&&(s=t.cloneNode(!0),a="

    "+T.LegitimateInterestPurposesText+"

    ",a+="
      ",o.legIntPurposes.forEach(function(e){a+="
    • "+e.purposeName+"

    • "}),a+="
    ",s.innerHTML=a,e.insertAdjacentElement("beforeEnd",s)),P.isIab2orv2Template&&o.specialPurposes.length&&(n=t.cloneNode(!0),l="

    "+T.SpecialPurposesText+"

    ",l+="
      ",o.specialPurposes.forEach(function(e){var t;l+="
    • "+e.purposeName,P.isTcfV2Template&&null!=(t=o.dataRetention)&&t.specialPurposes&&o.dataRetention.specialPurposes[e.purposeId]&&(e=1===(t=o.dataRetention.specialPurposes[e.purposeId].retention)?T.PCenterVendorListLifespanDay:T.PCenterVendorListLifespanDays,l+=" ("+t+" "+e+")"),l+="

    • "}),l+="
    ",n.innerHTML=l,e.insertAdjacentElement("beforeEnd",n)),o.features.length&&(c=t.cloneNode(!0),d="

    "+T.FeaturesText+"

    ",d+="
      ",o.features.forEach(function(e){d+="
    • "+e.featureName+"

    • "}),d+="
    ",c.innerHTML=d,e.insertAdjacentElement("beforeEnd",c)),P.isIab2orv2Template&&o.specialFeatures.length&&(u=t.cloneNode(!0),p="

    "+T.SpecialFeaturesText+"

    ",p+="
      ",o.specialFeatures.forEach(function(e){p+="
    • "+e.featureName+"

    • "}),p+="
    ",u.innerHTML=p,e.insertAdjacentElement("beforeEnd",u))},r.prototype.InitializeVendorList=function(){var e;A.vendors.list=A.iabData?A.iabData.vendors:null,A.vendors.vendorTemplate=I(S.P_Vendor_Container+" li").el[0].cloneNode(!0),I("#onetrust-pc-sdk "+S.P_Vendor_Container).html(""),m.isV2Template||P.pcName!==h||(e=A.vendors.vendorTemplate.querySelectorAll(S.P_Acc_Header),(e=P.legIntSettings.PAllowLI&&P.isIab2orv2Template?e[0]:e[1]).parentElement.removeChild(e))},r.prototype.cancelVendorFilter=function(){for(var e=I("#onetrust-pc-sdk .category-filter-handler").el,t=0;t "+t.cookieMaxAge+"";t.usesNonCookieAccess&&(o+="

    "+T.PCenterVendorListNonCookieUsage+"

    "),e.innerHTML=o},r.prototype.updateVendorFilterList=function(){for(var e=I("#onetrust-pc-sdk .category-filter-handler").el,t=0;t"+T.PCIABVendorsText+""),c.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",d),c.querySelector(".ot-acc-txt").insertAdjacentElement("beforeEnd",I("#ot-ven-lst").el[0]),I("#ot-lst-cnt .ot-sdk-column").append(c),c.querySelector("button").setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCIABVendorsText),this.iabAccInit=!0,d.cloneNode(!0)),p=(b.removeChild(c.querySelector("#ot-selall-licntr")),c.querySelector(".ot-chkbox").id="ot-selall-adtlvencntr",c.querySelector("input").id="ot-selall-adtlven-handler",c.querySelector("label").setAttribute("for","ot-selall-adtlven-handler"),L.accordionEl.cloneNode(!0)),u=(p.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",l.cloneNode(!0)),p.querySelector(".ot-acc-hdr").insertAdjacentHTML("beforeEnd","
    "+T.PCGoogleVendorsText+"
    "),p.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",c),p.querySelector(".ot-acc-txt").insertAdjacentHTML("beforeEnd","
      "),p.classList.add("ot-adtlv-acc"),p.querySelector("button").setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCGoogleVendorsText),A.vendors.vendorTemplate.cloneNode(!0));for(t in u.querySelector("button").classList.remove("ot-ven-box"),u.querySelector("button").classList.add("ot-addtl-venbox"),b.removeChild(u.querySelector(".ot-acc-txt")),e)e[t]&&(o=u.cloneNode(!0),n=e[t].name,o.querySelector(S.P_Ven_Name).innerText=n,r=o.querySelector("button"),b.setHtmlAttributes(r,{id:"Adtl-IAB"+t}),b.setHtmlAttributes(o.querySelector(S.P_Ven_Link),{href:e[t].policyUrl,rel:"noopener",target:"_blank"}),o.querySelector(S.P_Ven_Link).innerHTML=T.PCenterViewPrivacyPolicyText+" "+n+" "+T.NewWinTxt+"",(r=L.chkboxEl.cloneNode(!0)).classList.remove("ot-ven-ctgl"),r.classList.add("ot-ven-adtlctgl"),i=Boolean(A.addtlVendors.vendorSelected[t]),(s=r.querySelector("input")).classList.add("ot-addtlven-chkbox-handler"),a=r.querySelector(this.LABEL_STATUS),T.PCShowConsentLabels?a.innerHTML=i?T.PCActiveText:T.PCInactiveText:b.removeChild(a),b.setCheckedAttribute("",s,i),b.setHtmlAttributes(s,{id:"ot-addtlven-chkbox-"+t,"addtl-vid":t,"aria-label":n}),r.querySelector("label").setAttribute("for","ot-addtlven-chkbox-"+t),r.querySelector(S.P_Label_Txt).textContent=n,a=o.querySelector(S.P_Tgl_Cntr),I(a).append(r),a.insertAdjacentElement("beforeend",L.arrowEl.cloneNode(!0)),T.PCAccordionStyle!==ce.Caret&&o.querySelector(".ot-ven-hdr").insertAdjacentElement("beforebegin",L.plusMinusEl.cloneNode(!0)),I(p.querySelector("#ot-addtl-venlst")).append(o));I("#ot-lst-cnt .ot-sdk-column").append(p),I("#onetrust-pc-sdk").on("click","#ot-pc-lst .ot-acc-cntr > input",function(e){b.setCheckedAttribute(null,e.target,e.target.checked)}),this.showConsentHeader()},r.prototype.populateGeneralVendors=function(){var e,t,o,c,d,p,u=this,n=T.GeneralVendors,r=document.querySelector(".ot-gv-acc"),h=!!r;n.length?(this.hasGenVendors=!0,r&&I(r).show(),e=(T.PCAccordionStyle===ce.Caret?L.arrowEl:L.plusMinusEl).cloneNode(!0),this.iabAccInit||this.addIabAccordion(),(t=document.createElement("div")).setAttribute("class","ot-sel-all-chkbox"),o=L.chkboxEl.cloneNode(!0),o.id="ot-selall-gnvencntr",o.querySelector("input").id="ot-selall-gnven-handler",o.querySelector("label").setAttribute("for","ot-selall-gnven-handler"),I(t).append(o),c=L.accordionEl.cloneNode(!0),c.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",e.cloneNode(!0)),c.querySelector(".ot-acc-hdr").insertAdjacentHTML("beforeEnd","
      "+T.PCenterGeneralVendorsText+"
      "),T.GenVenOptOut&&c.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",t),c.querySelector(".ot-acc-txt").insertAdjacentHTML("beforeEnd","
        "),c.classList.add("ot-gv-acc"),c.querySelector("button").setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCenterGeneralVendorsText),d=A.vendors.vendorTemplate.cloneNode(!0),d.querySelector("button").classList.remove("ot-ven-box"),d.querySelector("button").classList.add("ot-gv-venbox"),I(d.querySelector(".ot-acc-txt")).html('
          '),h&&I(""+S.P_Gven_List).html(""),p=!0,n.forEach(function(e){var t,o,n=u.mapGenVendorToHostFormat(e),r=d.cloneNode(!0),i=e.VendorCustomId,s=e.Name,a=r.querySelector(S.P_Ven_Link),l=(r.querySelector(S.P_Ven_Name).innerText=s,r.querySelector("button"));b.setHtmlAttributes(l,{id:"Gn-"+i}),e.PrivacyPolicyUrl?(b.setHtmlAttributes(a,{href:e.PrivacyPolicyUrl,rel:"noopener",target:"_blank"}),a.innerHTML=T.PCGVenPolicyTxt+" "+s+" "+T.NewWinTxt+""):a.classList.add("ot-hide"),u.addDescriptionElement(a,e.Description),T.GenVenOptOut&&((l=L.chkboxEl.cloneNode(!0)).classList.remove("ot-ven-ctgl"),l.classList.add("ot-ven-gvctgl"),a=Boolean(A.genVendorsConsent[i]),(t=l.querySelector("input")).classList.add("ot-gnven-chkbox-handler"),o=l.querySelector(u.LABEL_STATUS),T.PCShowConsentLabels?o.innerHTML=a?T.PCActiveText:T.PCInactiveText:b.removeChild(o),b.setCheckedAttribute("",t,a),b.setHtmlAttributes(t,{id:"ot-gnven-chkbox-"+i,"gn-vid":i,"aria-label":s}),fo.isGenVenPartOfAlwaysActiveGroup(i)?b.setDisabledAttribute(null,t,!0):p=!1,l.querySelector("label").setAttribute("for","ot-gnven-chkbox-"+i),l.querySelector(S.P_Label_Txt).textContent=s,o=r.querySelector(S.P_Tgl_Cntr),I(o).append(l),o.insertAdjacentElement("beforeend",L.arrowEl.cloneNode(!0))),T.PCAccordionStyle!==ce.Caret&&r.querySelector(".ot-ven-hdr").insertAdjacentElement("beforebegin",L.plusMinusEl.cloneNode(!0)),e.Cookies.length||I(r).addClass("ot-hide-acc"),e.Cookies.forEach(function(e){e=u.getCookieElement(e,n);I(r.querySelector(".ot-host-opt")).append(e)}),I(h?""+S.P_Gven_List:c.querySelector(""+S.P_Gven_List)).append(r)}),h||I("#ot-lst-cnt .ot-sdk-column").append(c),I("#onetrust-pc-sdk").on("click","#ot-pc-lst .ot-acc-cntr > input",function(e){b.setCheckedAttribute(null,e.target,e.target.checked)}),this.showConsentHeader(),p&&b.setDisabledAttribute("#ot-selall-gnven-handler",null,!0)):(this.hasGenVendors=!1,r&&I(r).hide())},r.prototype.addIabAccordion=function(){var e=(T.PCAccordionStyle===ce.Caret?L.arrowEl:L.plusMinusEl).cloneNode(!0),t=document.querySelector("#onetrust-pc-sdk .ot-sel-all-chkbox"),o=t.cloneNode(!0),t=(b.removeChild(o.querySelector("#ot-selall-hostcntr")),b.removeChild(t.querySelector("#ot-selall-vencntr")),b.removeChild(t.querySelector("#ot-selall-licntr")),L.accordionEl.cloneNode(!0));t.classList.add("ot-iab-acc"),t.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",e.cloneNode(!0)),t.querySelector(".ot-acc-hdr").insertAdjacentHTML("beforeEnd","
          "+T.PCIABVendorsText+"
          "),t.querySelector(".ot-acc-hdr").insertAdjacentElement("beforeEnd",o),t.querySelector(".ot-acc-txt").insertAdjacentElement("beforeEnd",I("#ot-ven-lst").el[0]),I("#ot-lst-cnt .ot-sdk-column").append(t),t.querySelector("button").setAttribute(this.ARIA_LABEL_ATTRIBUTE,T.PCIABVendorsText),this.iabAccInit=!0},r.prototype.showConsentHeader=function(){var e=P.legIntSettings;I("#onetrust-pc-sdk .ot-sel-all-hdr").show(),e.PAllowLI&&!e.PShowLegIntBtn||I("#onetrust-pc-sdk .ot-li-hdr").hide()},r.prototype.setBackBtnTxt=function(){(m.isV2Template?(I(S.P_Vendor_List+" .back-btn-handler").attr(this.ARIA_LABEL_ATTRIBUTE,T.PCenterBackText),I(S.P_Vendor_List+" .back-btn-handler title")):I(S.P_Vendor_List+" .back-btn-handler .pc-back-button-text")).html(T.PCenterBackText)},r.prototype.getCookieElement=function(e,t){var o=A.hosts.hostCookieTemplate.cloneNode(!0),n=o.querySelector("div").cloneNode(!0),r=(n.classList.remove("cookie-name-container"),I(o).html(""),e.Name),i=(T.AddLinksToCookiepedia&&t.isFirstParty&&(r=y.getCookieLabel(e,T.AddLinksToCookiepedia)),n.cloneNode(!0));return i.classList.add(S.P_c_Name),i.querySelector("div:nth-child(1)").innerHTML=T.pcCListName,i.querySelector("div:nth-child(2)").innerHTML=r,I(o).append(i),T.pcShowCookieHost&&((r=n.cloneNode(!0)).classList.add(S.P_c_Host),r.querySelector("div:nth-child(1)").innerHTML=T.pcCListHost,r.querySelector("div:nth-child(2)").innerHTML=e.Host,I(o).append(r)),T.pcShowCookieDuration&&((i=n.cloneNode(!0)).classList.add(S.P_c_Duration),i.querySelector("div:nth-child(1)").innerHTML=T.pcCListDuration,i.querySelector("div:nth-child(2)").innerHTML=e.IsSession?T.LifespanTypeText:y.getDuration(e),I(o).append(i)),T.pcShowCookieType&&(r=t.Type===Ce.GenVendor?!e.isThirdParty:t.isFirstParty,(i=n.cloneNode(!0)).classList.add(S.P_c_Type),i.querySelector("div:nth-child(1)").innerHTML=T.pcCListType,i.querySelector("div:nth-child(2)").innerHTML=r?T.firstPartyTxt:T.thirdPartyTxt,I(o).append(i)),T.pcShowCookieCategory&&(r=void 0,r=t.Type===Ce.GenVendor?e.category:(t.isFirstParty?e:t).groupName)&&((i=n.cloneNode(!0)).classList.add(S.P_c_Category),i.querySelector("div:nth-child(1)").innerHTML=T.pcCListCategory,i.querySelector("div:nth-child(2)").innerHTML=r,I(o).append(i)),T.pcShowCookieDescription&&e.description&&((t=n.cloneNode(!0)).classList.add(S.P_c_Desc),t.querySelector("div:nth-child(1)").innerHTML=T.pcCListDescription,t.querySelector("div:nth-child(2)").innerHTML=e.description,I(o).append(t)),o},r.prototype.getNoResultsFound=function(e){e=A.showTrackingTech?T.PCTechNotFound:e?T.PCHostNotFound:T.PCVendorNotFound;return" "+e+"."},r.prototype.getAdditionalTechnologiesHtml=function(e){var t=document.createDocumentFragment(),o=T.AdditionalTechnologiesConfig,n=0"+e+""),r.querySelector("button").setAttribute(this.ARIA_LABEL_ATTRIBUTE,t),o&&r.querySelector(".ot-acc-txt").insertAdjacentHTML("beforeend",'
            '),r.cloneNode(!0)},r.prototype.setSessionLocalStorageTemplate=function(e,t,o){var n=A.hosts.hostTemplate.cloneNode(!0),r=(b.removeChild(n.querySelector(".ot-a scc-txt")),e.querySelector(".ot-acc-txt "+S.P_Host_Cntr));r.removeAttribute("style"),r.classList.add("ot-host-opt");for(var i=0,s=t;i div[role="alertdialog"]')).css("height: 100%;"),I(o(Sn+' > div[role="alertdialog"]')).attr(this._ariaLabel,T.MainText),T.PCRegionAriaLabel&&(I(o("#onetrust-pc-sdk")).attr(this._ariaLabel,T.PCRegionAriaLabel),I(o("#onetrust-pc-sdk")).attr("role","region")),P.pcName===h&&(I(o(S.P_Privacy_Txt)).html(T.AboutCookiesText),I(o(S.P_Privacy_Hdr)).html(T.AboutCookiesText)),I(o(S.P_Policy_Txt)).html(T.MainInfoText),O.configureLinkFields(o),O.configureSubjectDataFields(o),O.configureButtons(o,e),O.setManagePreferenceText(o),O.initializePreferenceCenterGroups(o,t),O.removeListsWhenAppropriate(o),T.PCTemplateUpgrade)&&O.setOptOutSignalNotification(o),document.createElement("iframe")),o=(e.setAttribute("class","ot-text-resize"),e.setAttribute("sandbox","allow-same-origin"),e.setAttribute("title","onetrust-text-resize"),d(e,"position: absolute; top: -50000px; width: 100em;"),e.setAttribute(this._ariaHidden,"true"),I(t.querySelector("#onetrust-pc-sdk")).append(e),document.getElementById("onetrust-consent-sdk")),e=(I(o).append(t),P.ignoreInjectingHtmlCss||I(document.body).append(o),(T.showCookieList||A.showGeneralVendors)&&hn.InitializeHostList(),S.P_Vendor_List+" "+S.P_Host_Cntr+" li"),o=I(e).el[0];o&&b.removeChild(o)},s.prototype.addClassesPerConfig=function(e){/Chrome|Safari/i.test(navigator.userAgent)&&/Google Inc|Apple Computer/i.test(navigator.vendor)||I(e).addClass("ot-sdk-not-webkit"),T.useRTL&&I(e).attr("dir","rtl"),P.legIntSettings.PAllowLI&&P.isIab2orv2Template&&(I(e).addClass("ot-leg-opt-out"),P.legIntSettings.PShowLegIntBtn)&&I(e).addClass("ot-leg-btn"),T.BannerRelativeFontSizesToggle&&I(e).addClass("otRelFont"),T.PCShowConsentLabels&&I(e).addClass("ot-tgl-with-label"),(T.UseGoogleVendors||A.showGeneralVendors)&&I(e).addClass("ot-addtl-vendors"),"right"===T.PreferenceCenterPosition&&I(e).addClass(T.useRTL?"right-rtl":"right")},s.prototype.manageCloseButtons=function(e,t,o){var n=I(t(S.P_Close_Btn)).el;if(T.ShowPreferenceCenterCloseButton){T.CloseText||(T.CloseText="Close Preference Center");for(var r=0,i=n;r'+T.AboutText+""),T.PCenterImprintLinkText&&(T.AboutText||e(S.P_Policy_Txt).insertAdjacentHTML("beforeend","
            "),(t=document.createElement("a")).classList.add("ot-link-btn","ot-imprint-handler"),t.textContent=T.PCenterImprintLinkText,t.setAttribute(this._ariaLabel,T.PCenterImprintLinkScreenReader),t.setAttribute("href",T.PCenterImprintLinkUrl),e(S.P_Policy_Txt).appendChild(t)),T.PCenterVendorListLinkText&&(t=!T.IsIabEnabled&&A.showGeneralVendors?"ot-gv-list-handler":"onetrust-vendors-list-handler",e(S.P_Policy_Txt).insertAdjacentHTML("beforeend",'"))},s.prototype.configureSubjectDataFields=function(e){var t;T.PCTemplateUpgrade&&T.PCenterUserIdTitleText&&T.IsConsentLoggingEnabled&&(t=v.readCookieParam(k.OPTANON_CONSENT,He),e(S.P_Policy_Txt).insertAdjacentHTML("beforeend",'
            '+T.PCenterUserIdTitleText+": "+t+"
            "),T.PCenterUserIdDescriptionText&&e(S.P_Policy_Txt).insertAdjacentHTML("beforeend",'
            '+T.PCenterUserIdDescriptionText+"
            "),T.PCenterUserIdTimestampTitleText)&&(t=(t=v.getCookie(k.ALERT_BOX_CLOSED))&&y.getUTCFormattedDate(t)||T.PCenterUserIdNotYetConsentedText,e(S.P_Policy_Txt).insertAdjacentHTML("beforeend",'
            '+T.PCenterUserIdTimestampTitleText+": "+t+"
            "))},s.prototype.setManagePreferenceText=function(e){var e=e(S.P_Manage_Cookies_Txt),t=I(e);e&&(t.html(T.ManagePreferenceText),T.ManagePreferenceText||t.attr(this._ariaHidden,!0))},s.prototype.configureButtons=function(e,t){T.ConfirmText.trim()?I(e("#accept-recommended-btn-handler")).html(T.ConfirmText):e("#accept-recommended-btn-handler").parentElement.removeChild(e("#accept-recommended-btn-handler"));for(var o=t(".save-preference-btn-handler"),n=0;nh3");I(r).html(t),I(r).attr("id",o),P.pcName===h&&(e.querySelector(S.P_Category_Header).innerHTML=t,e.querySelector(""+S.P_Desc_Container).setAttribute("id",n),e.querySelector(".category-menu-switch-handler").setAttribute("aria-controls",n))},s.prototype.setLegIntButton=function(e,t,o,n){void 0===o&&(o=!1);var r=!0,r=(-1 '+S.P_Arrw_Cntr)).el.cloneNode(!0),L.subGrpEl=I(e(S.P_Sub_Grp_Cntr)).el.cloneNode(!0),L.vListEl=I(e(S.P_Ven_Lst_Cntr)).el.cloneNode(!0),L.cListEl=I(e(S.P_Host_Lst_cntr)).el.cloneNode(!0),L.chkboxEl=I(e(S.P_CBx_Cntr)).el.cloneNode(!0),L.accordionEl=I(e(".ot-acc-cntr")).el.cloneNode(!0),t.test(P.pcName)&&(L.plusMinusEl=I(e(".ot-plus-minus")).el.cloneNode(!0)),b.removeChild(e(".ot-tgl")),b.removeChild(e('#onetrust-pc-sdk [role="alertdialog"] > '+S.P_Arrw_Cntr)),b.removeChild(e(S.P_Sub_Grp_Cntr)),b.removeChild(e(S.P_Ven_Lst_Cntr)),b.removeChild(e(S.P_Host_Lst_cntr)),b.removeChild(e(S.P_CBx_Cntr)),b.removeChild(e(".ot-acc-cntr")),t.test(P.pcName)&&b.removeChild(e(".ot-plus-minus"))},s.prototype.insertSelectAllEls=function(e){var e=e(S.P_Select_Cntr+" .ot-sel-all-chkbox"),t=A.showVendorService?fn():L.chkboxEl.cloneNode(!0),t=(t.id=S.P_Sel_All_Host_El,t.querySelector("input").id="select-all-hosts-groups-handler",t.querySelector("label").setAttribute("for","select-all-hosts-groups-handler"),I(e).append(t),A.showVendorService?fn():L.chkboxEl.cloneNode(!0)),t=(t.id=S.P_Sel_All_Vendor_Consent_El,t.querySelector("input").id="select-all-vendor-groups-handler",t.querySelector("label").setAttribute("for","select-all-vendor-groups-handler"),I(e).append(t),A.showVendorService?fn():L.chkboxEl.cloneNode(!0));t.id=S.P_Sel_All_Vendor_Leg_El,t.querySelector("input").id="select-all-vendor-leg-handler",t.querySelector("label").setAttribute("for","select-all-vendor-leg-handler"),I(e).append(t)},s.prototype.initializePreferenceCenterGroups=function(e,t){var o,n=P.pcName,r=(m.isV2Template&&(O.cloneOtHtmlEls(e),(r=L.chkboxEl.cloneNode(!0)).querySelector("input").classList.add("category-filter-handler"),I(e(S.P_Fltr_Modal+" "+S.P_Fltr_Option)).append(r),O.insertSelectAllEls(e)),I(e("#onetrust-pc-sdk "+S.P_Category_Grp))),i=(n===yt||n===mt||n===ft?T.PCenterEnableAccordion?b.removeChild(r.el.querySelector(S.P_Category_Item+":not(.ot-accordion-layout)")):b.removeChild(r.el.querySelector(S.P_Category_Item+".ot-accordion-layout")):n===h&&(T.PCenterEnableAccordion=!1),e("#onetrust-pc-sdk "+S.P_Category_Item)),s=m.isV2Template?L.subGrpEl.cloneNode(!0):I(e(S.P_Sub_Grp_Cntr)),a=m.isV2Template?null:I(e(S.P_Acc_Container+" "+S.P_Sub_Grp_Cntr));T.PCTemplateUpgrade&&/otPcTab/.test(n)&&(o=e(".ot-abt-tab").cloneNode(!0),b.removeChild(e(".ot-abt-tab"))),r.el.removeChild(i),O.setVendorListClass(e,i),O.setPCHeader(e,i),O.createHtmlForEachGroup({fm:e,fragment:t,categoryGroupTemplate:i,cookiePreferencesContainer:r,popupSubGrpContainer:a,subGrpContainer:s}),O.setPcTabLayout(e,t,o)},s.prototype.getActiveVendorCount=function(e){var t=parseInt(e.IabGrpId),o=0;return e.Type===f.GroupTypes.Pur?o=P.tcf2ActiveVendors.pur.get(t):e.Type===f.GroupTypes.Ft?o=P.tcf2ActiveVendors.ft.get(t):e.Type===f.GroupTypes.Spl_Pur?o=P.tcf2ActiveVendors.spl_pur.get(t):e.Type===f.GroupTypes.Spl_Ft&&(o=P.tcf2ActiveVendors.spl_ft.get(t)),o||0},s.prototype.getActiveVendorCountForStack=function(e){return P.tcf2ActiveVendors.stack.get(e)||0},s.prototype.getVendorCountEl=function(e){var t="[VENDOR_NUMBER]";return T.PCVendorsCountText&&-1 '+T.PCVendorsCountText.replace(t,e.toString())+" ":""},s.prototype.createHtmlForEachGroup=function(e){var t=e.fm,o=e.fragment,n=e.categoryGroupTemplate,r=e.cookiePreferencesContainer,i=e.popupSubGrpContainer,s=e.subGrpContainer,e=T.Groups.filter(function(e){return e.Order}),a=0===r.el.children.length;T.PCTemplateUpgrade&&(A.showVendorService?V.setHtmlTemplate(t('#onetrust-pc-sdk div[role="alertdialog"]')):V.removeVSUITemplate(t('#onetrust-pc-sdk div[role="alertdialog"]')));for(var l=0,c=e;l"),e.insertAdjacentHTML("afterend"," | "+o.PCVendorFullLegalText+' '+T.NewWinTxt+""))},s.prototype.setHostListBtn=function(e,t,o,n){var r,i=P.pcName,s=!1,a=(T.showCookieList&&(s=-1h4, .cookie-subgroup>h5, .cookie-subgroup>h6, .ot-subgrp>h4, .ot-subgrp>h5, .ot-subgrp>h6"),g=c.querySelector(S.P_Tgl_Cntr),d=(c.setAttribute("data-optanongroupid",d),m.isV2Template?((t=O.getInputEle()).querySelector("input").setAttribute("data-optanongroupid",d),t.querySelector("input").classList.add("cookie-subgroup-handler"),t=t.cloneNode(!0),g.insertAdjacentElement("beforeend",t)):(t=c.querySelector(".ot-toggle")).querySelector("input").setAttribute("data-optanongroupid",d),I(i.querySelector(S.P_Subgp_ul)).html(""),O.addSubgroupName(n,h),O.setDataIfVendorServiceEnabled(h,c,t),t.querySelector("input").setAttribute("id",p),t.querySelector("input").setAttribute(this._ariaLabel,n.GroupName),t.querySelector("label").setAttribute("for",p),O.setSubGroupDescription({json:e,group:o,subgroup:n,subGroupClone:c}),P.isTcfV2Template&&An.addIllustrationsLink(c,n,o.ShowVendorList,!0),q(wt,Bt));o.ShowSubgroupToggle&&-1"+T.AlwaysActiveText+"","ce").el):(t=e.querySelector(S.P_Category_Header),!m.isV2Template&&T.PCenterEnableAccordion&&(t=e.querySelector(S.P_Arrw_Cntr)),I(t).el.insertAdjacentElement("afterend",I("
            "+T.AlwaysActiveText+"
            ","ce").el)),T.PCenterEnableAccordion?(o=e.querySelector(S.P_Acc_Header))&&o.classList.add("ot-always-active-group"):((t=e.querySelector(""+S.P_Desc_Container))&&t.classList.add("ot-always-active-group"),e.classList.add("ot-always-active-group"))},s.prototype.setPcTabLayout=function(e,t,o){var n=e(".ot-tab-desc");"otPcTab"===P.pcName&&(o&&e("#onetrust-pc-sdk "+S.P_Category_Grp).insertAdjacentElement("afterbegin",o),n&&640e.clientHeight&&(this.bodyStyleChanged=!0,e=I("body"))&&e.length&&wn.addOTCssPropertiesToBody(Bn.PC,{overflow:"hidden"})},Wn.prototype.checkIfPcSdkContainerExist=function(){return!I("#onetrust-pc-sdk").length};var zn,Kn=Wn;function Wn(){this.ONETRUST_PC_SDK="#onetrust-pc-sdk",this.ONETRUST_PC_DARK_FILTER=".onetrust-pc-dark-filter",this.bodyStyleChanged=!1}Xn.prototype.init=function(){this.insertHtml(),this.insertCss(),this.showNty(),this.initHandler()},Xn.prototype.getContent=function(){return R(this,void 0,void 0,function(){return M(this,function(e){return[2,Yt.getSyncNtfyContent().then(function(e){A.syncNtfyGrp={name:e.name,html:atob(e.html),css:e.css}})]})})},Xn.prototype.insertHtml=function(){this.removeHtml();function e(e){return t.querySelector(e)}var t=document.createDocumentFragment(),o=document.createElement("div"),o=(I(o).html(A.syncNtfyGrp.html),o.querySelector(this.El)),n=(T.BannerRelativeFontSizesToggle&&I(o).addClass("otRelFont"),T.useRTL&&I(o).attr("dir","rtl"),I(t).append(o),T.NtfyConfig),n=(this.initHtml("Sync",n.Sync,e,t.querySelector(this.El)),n.ShowCS?I(e(".ot-pc-handler")).html(n.CSTxt):(I(o).addClass("ot-hide-csbtn"),e(".ot-sync-btncntr").parentElement.removeChild(e(".ot-sync-btncntr"))),document.createElement("div"));I(n).append(t),I("#onetrust-consent-sdk").append(n.firstChild)},Xn.prototype.initHandler=function(){I(this.El+" .ot-sync-close-handler").on("click",function(){return Jn.close()})},Xn.prototype.showNty=function(){var e=I(this.El);e.css("bottom: -300px;"),e.animate({bottom:"1em;"},1e3),setTimeout(function(){e.css("bottom: 1rem;")},1e3),e.focus()},Xn.prototype.changeState=function(){setTimeout(function(){Jn.refreshState()},1500)},Xn.prototype.refreshState=function(){function e(e){return t.querySelector(e)}var t=I(this.El).el[0],o=(t.classList.add("ot-nty-complete"),t.classList.remove("ot-nty-sync"),T.NtfyConfig);this.initHtml("Complete",o.Complete,e,t),o.ShowCS&&("LINK"===o.CSType&&I(e(".ot-pc-handler")).addClass("ot-pc-link"),I(".ot-sync-btncntr").show("inline-block"),this.alignContent(),I(window).on("resize",function(){return Jn.resizeEvent})),setTimeout(function(){Jn.close()},1e3*T.NtfyConfig.NtfyDuration)},Xn.prototype.insertCss=function(){var e=document.getElementById("onetrust-style");e.innerHTML+=A.syncNtfyGrp.css,e.innerHTML+=this.addCustomStyles()},Xn.prototype.addCustomStyles=function(){var e=T.NtfyConfig,t=e.Sync,o=e.Complete,n=e.CSButton,r=e.CSLink;return"\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-sync {\n background-color: "+t.BgColor+";\n border: 1px solid "+t.BdrColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy .ot-sync-refresh>g {\n fill: "+t.IconBgColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-sync #ot-sync-title {\n text-align: "+t.TitleAlign+";\n color: "+t.TitleColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-sync .ot-sync-desc {\n text-align: "+t.DescAlign+";\n color: "+t.DescColor+"; \n }\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-complete {\n background-color: "+o.BgColor+";\n border: 1px solid "+o.BdrColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy .ot-sync-check>g {\n fill: "+o.IconBgColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-complete #ot-sync-title {\n text-align: "+o.TitleAlign+";\n color: "+o.TitleColor+";\n }\n #onetrust-consent-sdk #ot-sync-ntfy.ot-nty-complete .ot-sync-desc {\n text-align: "+o.DescAlign+";\n color: "+o.DescColor+"; \n }\n "+("BUTTON"===e.CSType?"\n #onetrust-consent-sdk #ot-sync-ntfy .ot-pc-handler {\n background-color: "+n.BgColor+";\n border: 1px solid "+n.BdrColor+";\n color: "+n.Color+";\n text-align: "+n.Align+";\n }":" #onetrust-consent-sdk #ot-sync-ntfy .ot-pc-handler.ot-pc-link {\n color: "+r.Color+";\n text-align: "+r.Align+";\n }")+"\n "},Xn.prototype.initHtml=function(e,t,o,n){var r="Complete"===e?".ot-sync-refresh":".ot-sync-check";t.ShowIcon?(I(o("Sync"===e?".ot-sync-refresh":".ot-sync-check")).show(),I(o(r)).hide(),I(o(".ot-sync-icon")).show("inline-block"),n.classList.remove("ot-hide-icon")):(I(o(".ot-sync-icon")).hide(),n.classList.add("ot-hide-icon")),t.Title?I(o("#ot-sync-title")).html(t.Title):I(o("#ot-sync-title")).hide(),t.Desc?I(o(".ot-sync-desc")).html(t.Desc):I(o(".ot-sync-desc")).hide(),t.ShowClose?(I(o(".ot-sync-close-handler")).show("inline-block"),I(o(".ot-close-icon")).attr("aria-label",t.CloseAria),n.classList.remove("ot-hide-close")):(I(o(".ot-sync-close-handler")).hide(),n.classList.add("ot-hide-close"))},Xn.prototype.close=function(){this.hideSyncNtfy(),y.resetFocusToBody()},Xn.prototype.hideSyncNtfy=function(){T.NtfyConfig.ShowCS&&window.removeEventListener("resize",Jn.resizeEvent),I("#ot-sync-ntfy").fadeOut(400)},Xn.prototype.removeHtml=function(){var e=I(this.El).el;e&&b.removeChild(e)},Xn.prototype.alignContent=function(){I(".ot-sync-btncntr").el[0].clientHeight>I(".ot-sync-titlecntr").el[0].clientHeight&&(I(".ot-sync-titlecntr").addClass("ot-pos-abs"),I(".ot-sync-btncntr").addClass("ot-pos-rel"))},Xn.prototype.resizeEvent=function(){window.innerWidth<=896&&Jn.alignContent()};var Jn,Yn=Xn;function Xn(){this.El="#ot-sync-ntfy"}Zn.prototype.toggleVendorConsent=function(e,t){void 0===t&&(t=null),(e=(e=void 0===e?[]:e).length?e:A.oneTrustIABConsent.vendors).forEach(function(e){var e=e.split(":"),t=e[0],e=e[1],t=I(S.P_Vendor_Container+" ."+S.P_Ven_Ctgl+' [vendorid="'+t+'"]').el[0];t&&b.setCheckedAttribute("",t,"true"===e)});var o,n=I("#onetrust-pc-sdk #select-all-vendor-groups-handler").el[0];n&&(o=b.getActiveIdArray(b.distinctArray(e)),(t=null===t?o.length===e.length:t)||0===o.length?n.parentElement.classList.remove(Ft.P_Line_Through):n.parentElement.classList.add(Ft.P_Line_Through),b.setCheckedAttribute("",n,t))},Zn.prototype.toggleVendorLi=function(e,t){void 0===t&&(t=null),(e=(e=void 0===e?[]:e).length?e:A.oneTrustIABConsent.legIntVendors).forEach(function(e){var e=e.split(":"),t=e[0],e=e[1],t=I(S.P_Vendor_Container+" ."+S.P_Ven_Ltgl+' [leg-vendorid="'+t+'"]').el[0];t&&b.setCheckedAttribute("",t,"true"===e)});var o,n=I("#onetrust-pc-sdk #select-all-vendor-leg-handler").el[0];n&&(o=b.getActiveIdArray(b.distinctArray(e)),(t=null===t?o.length===e.length:t)||0===o.length?n.parentElement.classList.remove(Ft.P_Line_Through):n.parentElement.classList.add(Ft.P_Line_Through),b.setCheckedAttribute("",n,t))},Zn.prototype.updateVendorLegBtns=function(e){(e=(e=void 0===e?[]:e).length?e:A.oneTrustIABConsent.legIntVendors).forEach(function(e){var e=e.split(":"),t=e[0],e=e[1],t=I(S.P_Vendor_Container+' .ot-leg-btn-container[data-group-id="'+t+'"]').el[0];t&&E.updateLegIntBtnElement(t,"true"===e)})};var Qn,$n=Zn;function Zn(){}or.prototype.setFilterList=function(o){var n=this,r=I("#onetrust-pc-sdk "+S.P_Fltr_Modal+" "+S.P_Fltr_Option).el[0].cloneNode(!0);I("#onetrust-pc-sdk "+S.P_Fltr_Modal+" "+S.P_Fltr_Options).html(""),(m.isV2Template||T.PCLayout.Popup)&&I("#onetrust-pc-sdk #filter-cancel-handler").html(T.PCenterCancelFiltersText||"Cancel"),!m.isV2Template&&T.PCLayout.Popup||(I("#onetrust-pc-sdk "+S.P_Clr_Fltr_Txt).html(T.PCenterClearFiltersText),I("#filter-btn-handler").el[0].setAttribute("aria-label",T.PCenterFilterText)),I("#onetrust-pc-sdk #filter-apply-handler").html(T.PCenterApplyFiltersText),o?P.consentableGrps.forEach(function(e){var t=A.cookieListType===ye.GenVen||A.cookieListType===ye.HostAndGenVen?e.Hosts.length||e.FirstPartyCookies.length||e.GeneralVendorsIds&&e.GeneralVendorsIds.length:e.Hosts.length||e.FirstPartyCookies.length;t&&n.filterGroupOptionSetter(r,e,o)}):P.iabGrps.forEach(function(e){n.filterGroupOptionSetter(r,e,o)})},or.prototype.setFilterListByGroup=function(e,t){var o,n=this;!e||e.length<=0?I("#onetrust-pc-sdk "+S.P_Fltr_Modal+" "+S.P_Fltr_Options).html(""):(o=I("#onetrust-pc-sdk "+S.P_Fltr_Modal+" "+S.P_Fltr_Option).el[0].cloneNode(!0),I("#onetrust-pc-sdk "+S.P_Fltr_Modal+" "+S.P_Fltr_Options).html(""),(m.isV2Template||T.PCLayout.Popup)&&I("#onetrust-pc-sdk #filter-cancel-handler").html(T.PCenterCancelFiltersText||"Cancel"),!m.isV2Template&&T.PCLayout.Popup||(I("#onetrust-pc-sdk "+S.P_Clr_Fltr_Txt).html(T.PCenterClearFiltersText),I("#filter-btn-handler").el[0].setAttribute("aria-label",T.PCenterFilterText)),I("#onetrust-pc-sdk #filter-apply-handler").html(T.PCenterApplyFiltersText),e.forEach(function(e){n.filterGroupOptionSetter(o,e,t)}))},or.prototype.filterGroupOptionSetter=function(e,t,o){var n=t.CustomGroupId,r=n+"-filter",e=e.cloneNode(!0);I(S.P_Fltr_Modal+" "+S.P_Fltr_Options).append(e),I(e.querySelector("input")).attr("id",r),I(e.querySelector("label")).attr("for",r),(m.isV2Template?I(e.querySelector(S.P_Label_Txt)):I(e.querySelector("label span"))).html(t.GroupName),I(e.querySelector("input")).attr(o?"data-optanongroupid":"data-purposeid",n)};var er,tr=or;function or(){this.bodyScrollProp="",this.htmlScrollProp="",this.ONETRUST_PC_SDK="#onetrust-pc-sdk",this.ONETRUST_PC_DARK_FILTER=".onetrust-pc-dark-filter"}cr.prototype.initialiseCssReferences=function(){var e,t="";document.getElementById("onetrust-style")?e=document.getElementById("onetrust-style"):((e=document.createElement("style")).id="onetrust-style",m.moduleInitializer.CookieV2CSPEnabled&&A.nonce&&e.setAttribute("nonce",A.nonce)),_.commonStyles&&(t+=_.commonStyles),_.bannerGroup&&(t+=_.bannerGroup.css,m.fp.CookieV2SSR||(t+=this.addCustomBannerCSS()),T.bannerCustomCSS)&&(t+=T.bannerCustomCSS),_.preferenceCenterGroup&&(t=(t+=_.preferenceCenterGroup.css)+this.addCustomPreferenceCenterCSS()),_.cookieListGroup&&!m.fp.CookieV2TrackingTechnologies&&(t=(t+=_.cookieListGroup.css)+this.addCustomCookieListCSS()),T.cookiePersistentLogo&&!T.cookiePersistentLogo.includes("ot_guard_logo.svg")&&(t+=".ot-floating-button__front{background-image:url('"+y.updateCorrectUrl(T.cookiePersistentLogo)+"')}"),this.processedCSS=t,P.ignoreInjectingHtmlCss||(e.textContent=t,I(document.head).append(e))},cr.prototype.setButonColor=function(){var e,t=T.pcButtonColor,o=T.pcButtonTextColor,n=T.pcLegIntButtonColor,r=T.pcLegIntButtonTextColor,i="";return(t||o)&&(e=P.pcName===ft?"#onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Category_Item+",\n #onetrust-consent-sdk #onetrust-pc-sdk.ot-leg-opt-out "+S.P_Li_Hdr+"{\n border-color: "+t+";\n }":"",i="#onetrust-consent-sdk #onetrust-pc-sdk\n button:not(#clear-filters-handler):not(.ot-close-icon):not(#filter-btn-handler):not(.ot-remove-objection-handler):not(.ot-obj-leg-btn-handler):not([aria-expanded]):not(.ot-link-btn),\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-leg-btn-container .ot-active-leg-btn {\n "+(t?"background-color: "+t+";border-color: "+t+";":"")+"\n "+(o?"color: "+o+";":"")+"\n }\n #onetrust-consent-sdk #onetrust-pc-sdk ."+S.P_Active_Menu+" {\n "+(t?"border-color: "+t+";":"")+"\n }\n "+e+"\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-leg-btn-container .ot-remove-objection-handler{\n background-color: transparent;\n border: 1px solid transparent;\n }\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-leg-btn-container .ot-inactive-leg-btn {\n "+(n?"background-color: "+n+";":"")+"\n "+(r?"color: "+r+"; border-color: "+r+";":"")+"\n }"),i},cr.prototype.setFocusBorderColor=function(){var e="",t=T.PCFocusBorderColor;return t&&(e+='\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl input:focus + .ot-switch, .ot-switch .ot-switch-nob, .ot-switch .ot-switch-nob:before,\n #onetrust-pc-sdk .ot-checkbox input[type="checkbox"]:focus + label::before,\n #onetrust-pc-sdk .ot-chkbox input[type="checkbox"]:focus + label::before {\n outline-color: '+t+";\n outline-width: 1px;\n }\n #onetrust-pc-sdk .ot-host-item > button:focus, #onetrust-pc-sdk .ot-ven-item > button:focus {\n border: 1px solid "+t+";\n }\n #onetrust-consent-sdk #onetrust-pc-sdk *:focus,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-vlst-cntr > a:focus {\n outline: 1px solid "+t+";\n }"),e},cr.prototype.setCloseIconColor=function(){var e="";return T.PCCloseButtonType===Se.Link&&(e+="#onetrust-pc-sdk.ot-close-btn-link .ot-close-icon {color: "+T.PCContinueColor+"}"),e},cr.prototype.setTabLayoutStyles=function(){var e="",t=T.pcMenuColor,o=T.pcMenuHighLightColor;return P.pcName===h&&(t&&(e+="#onetrust-consent-sdk #onetrust-pc-sdk .category-menu-switch-handler {\n background-color: "+t+"\n }"),o)&&(e+="#onetrust-consent-sdk #onetrust-pc-sdk ."+S.P_Active_Menu+" {\n background-color: "+o+"\n }"),e},cr.prototype.setFocusIfTemplateUpgrade=function(){var e="",t=T.PCFocusBorderColor;return!T.PCTemplateUpgrade&&t&&(e+='\n #onetrust-pc-sdk input[type="checkbox"]:focus + .accordion-header,\n #onetrust-pc-sdk .category-item .ot-switch.ot-toggle input:focus + .ot-switch-label,\n #onetrust-pc-sdk .checkbox input:focus + label::after {\n outline-color: '+t+";\n outline-width: 1px;\n }"),e},cr.prototype.setExtLnkUrl=function(){var e="",t=y.updateCorrectUrl(T.OTExternalLinkLogo);return t&&(e+="#onetrust-pc-sdk .ot-vlst-cntr .ot-ext-lnk, #onetrust-pc-sdk .ot-ven-hdr .ot-ext-lnk{\n background-image: url('"+t+"');\n }\n "),e},cr.prototype.setCustomCss=function(){var e="";return T.pcCustomCSS&&(e+=T.pcCustomCSS),e};var nr,rr,ir,sr,ar,lr=cr;function cr(){this.processedCSS="",this.addCustomBannerCSS=function(){var e=T.backgroundColor,t=T.buttonColor,o=T.textColor,n=T.buttonTextColor,r=T.bannerMPButtonColor,i=T.bannerMPButtonTextColor,s=T.bannerAccordionBackgroundColor,a=T.BSaveBtnColor,l=T.BCategoryContainerColor,c=T.BLineBreakColor,d=T.BCategoryStyleColor,p=T.bannerLinksTextColor,u=T.BFocusBorderColor,o="\n "+(P.bannerName===pt?e?"#onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-container {\n background-color: "+e+";}":"":e?"#onetrust-consent-sdk #onetrust-banner-sdk {background-color: "+e+";}":"")+"\n "+(o?"#onetrust-consent-sdk #onetrust-policy-title,\n #onetrust-consent-sdk #onetrust-policy-text,\n #onetrust-consent-sdk .ot-b-addl-desc,\n #onetrust-consent-sdk .ot-dpd-desc,\n #onetrust-consent-sdk .ot-dpd-title,\n #onetrust-consent-sdk #onetrust-policy-text *:not(.onetrust-vendors-list-handler),\n #onetrust-consent-sdk .ot-dpd-desc *:not(.onetrust-vendors-list-handler),\n #onetrust-consent-sdk #onetrust-banner-sdk #banner-options *,\n #onetrust-banner-sdk .ot-cat-header,\n #onetrust-banner-sdk .ot-optout-signal\n {\n color: "+o+";\n }":"")+"\n "+(s?"#onetrust-consent-sdk #onetrust-banner-sdk .banner-option-details {\n background-color: "+s+";}":"")+"\n "+(p?" #onetrust-consent-sdk #onetrust-banner-sdk a[href],\n #onetrust-consent-sdk #onetrust-banner-sdk a[href] font,\n #onetrust-consent-sdk #onetrust-banner-sdk .ot-link-btn\n {\n color: "+p+";\n }":"");return(t||n)&&(o+="#onetrust-consent-sdk #onetrust-accept-btn-handler,\n #onetrust-banner-sdk #onetrust-reject-all-handler {\n "+(t?"background-color: "+t+";border-color: "+t+";":"")+"\n "+(n?"color: "+n+";":"")+"\n }"),u&&(o+="\n #onetrust-consent-sdk #onetrust-banner-sdk *:focus,\n #onetrust-consent-sdk #onetrust-banner-sdk:focus {\n outline-color: "+u+";\n outline-width: 1px;\n }"),(i||r)&&(o+="\n #onetrust-consent-sdk #onetrust-pc-btn-handler,\n #onetrust-consent-sdk #onetrust-pc-btn-handler.cookie-setting-link {\n "+(i?"color: "+i+"; border-color: "+i+";":"")+"\n background-color:\n "+(r&&!T.BannerSettingsButtonDisplayLink?r:e)+";\n }"),P.bannerName===gt&&(r=i=t=p=s=void 0,d&&(i="background-color: "+d+";",r="border-color: "+d+";"),u&&(o+="\n #onetrust-consent-sdk #onetrust-banner-sdk .ot-tgl input:focus+.ot-switch .ot-switch-nob,\n #onetrust-consent-sdk #onetrust-banner-sdk .ot-chkbox input:focus + label::before {\n outline-color: "+u+";\n outline-width: 1px;\n }"),o+="#onetrust-banner-sdk .ot-bnr-save-handler {"+(s=a?"color: "+n+";border-color: "+n+";background-color: "+a+";":s)+"}#onetrust-banner-sdk .ot-cat-lst {"+(p=l?"background-color: "+l+";":p)+"}#onetrust-banner-sdk .ot-cat-bdr {"+(t=c?"border-color: "+c+";":t)+"}#onetrust-banner-sdk .ot-tgl input:checked+.ot-switch .ot-switch-nob:before,#onetrust-banner-sdk .ot-chkbox input:checked~label::before {"+i+"}#onetrust-banner-sdk .ot-chkbox label::before,#onetrust-banner-sdk .ot-tgl input:checked+.ot-switch .ot-switch-nob {"+r+"}#onetrust-banner-sdk #onetrust-pc-btn-handler.cookie-setting-link {background: inherit}"),T.BCloseButtonType===Se.Link&&(o+="#onetrust-banner-sdk.ot-close-btn-link .banner-close-button {color: "+T.BContinueColor+"}"),o},this.addCustomPreferenceCenterCSS=function(){var e=T.pcBackgroundColor,t=T.pcTextColor,o=T.pcLinksTextColor,n=T.PCenterEnableAccordion,r=T.pcAccordionBackgroundColor,e="\n "+(e?(P.pcName===ft?"#onetrust-consent-sdk #onetrust-pc-sdk .group-parent-container,\n #onetrust-consent-sdk #onetrust-pc-sdk .manage-pc-container,\n #onetrust-pc-sdk "+S.P_Vendor_List:"#onetrust-consent-sdk #onetrust-pc-sdk")+",\n #onetrust-consent-sdk "+S.P_Search_Cntr+",\n "+(n&&P.pcName===ft?"#onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout"+S.P_Category_Item:"#onetrust-consent-sdk #onetrust-pc-sdk .ot-switch.ot-toggle")+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Tab_Grp_Hdr+" .checkbox,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Title+":after\n "+(m.isV2Template?",#onetrust-consent-sdk #onetrust-pc-sdk #ot-sel-blk,\n #onetrust-consent-sdk #onetrust-pc-sdk #ot-fltr-cnt,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Triangle:"")+" {\n background-color: "+e+";\n }\n ":"")+"\n "+(t?"#onetrust-consent-sdk #onetrust-pc-sdk h3,\n #onetrust-consent-sdk #onetrust-pc-sdk h4,\n #onetrust-consent-sdk #onetrust-pc-sdk h5,\n #onetrust-consent-sdk #onetrust-pc-sdk h6,\n #onetrust-consent-sdk #onetrust-pc-sdk p,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_Container+" "+S.P_Ven_Opts+" p,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Policy_Txt+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Title+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Li_Title+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Leg_Select_All+" span,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Host_Cntr+" "+S.P_Host_Info+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Fltr_Modal+" #modal-header,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-checkbox label span,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_List+" "+S.P_Select_Cntr+" p,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_List+" "+S.P_Vendor_Title+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_List+" .back-btn-handler p,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_List+" "+S.P_Ven_Name+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Vendor_List+" "+S.P_Vendor_Container+" .consent-category,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-leg-btn-container .ot-inactive-leg-btn,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-label-status,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-chkbox label span,\n #onetrust-consent-sdk #onetrust-pc-sdk #clear-filters-handler,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-optout-signal\n {\n color: "+t+";\n }":"")+"\n "+(o?" #onetrust-consent-sdk #onetrust-pc-sdk .privacy-notice-link,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-pgph-link,\n #onetrust-consent-sdk #onetrust-pc-sdk .category-vendors-list-handler,\n #onetrust-consent-sdk #onetrust-pc-sdk .category-vendors-list-handler + a,\n #onetrust-consent-sdk #onetrust-pc-sdk .category-host-list-handler,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Ven_Link+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Ven_Leg_Claim+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Host_Cntr+" "+S.P_Host_Title+" a,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Host_Cntr+" "+S.P_Acc_Header+" "+S.P_Host_View_Cookies+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Host_Cntr+" "+S.P_Host_Info+" a,\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Content+" "+S.P_Policy_Txt+" .ot-link-btn,\n #onetrust-consent-sdk #onetrust-pc-sdk .ot-vnd-serv .ot-vnd-item .ot-vnd-info a,\n #onetrust-consent-sdk #onetrust-pc-sdk #ot-lst-cnt .ot-vnd-info a\n {\n color: "+o+";\n }":"")+"\n #onetrust-consent-sdk #onetrust-pc-sdk .category-vendors-list-handler:hover { text-decoration: underline;}\n "+(n&&r?"#onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Acc_Container+S.P_Acc_Txt+",\n #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Acc_Txt+" "+S.P_Subgrp_Tgl_Cntr+" .ot-switch.ot-toggle\n {\n background-color: "+r+";\n }":"")+"\n "+(r?" #onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Host_Cntr+" "+S.P_Host_Info+",\n "+(m.isV2Template?"#onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Acc_Txt+" .ot-ven-dets":"#onetrust-consent-sdk #onetrust-pc-sdk "+S.P_Acc_Txt+" "+S.P_Ven_Opts)+"\n {\n background-color: "+r+";\n }":"")+"\n ";return(e+=nr.setButonColor())+nr.setFocusBorderColor()+nr.setCloseIconColor()+nr.setTabLayoutStyles()+nr.setTabLayoutStyles()+nr.setFocusIfTemplateUpgrade()+nr.setExtLnkUrl()+nr.setCustomCss()},this.addCustomCookieListCSS=function(){var e=T.CookiesV2NewCookiePolicy?"-v2.ot-sdk-cookie-policy":"",e="\n "+(T.cookieListPrimaryColor?"\n #ot-sdk-cookie-policy"+e+" h5,\n #ot-sdk-cookie-policy"+e+" h6,\n #ot-sdk-cookie-policy"+e+" li,\n #ot-sdk-cookie-policy"+e+" p,\n #ot-sdk-cookie-policy"+e+" a,\n #ot-sdk-cookie-policy"+e+" span,\n #ot-sdk-cookie-policy"+e+" td,\n #ot-sdk-cookie-policy"+e+" #cookie-policy-description {\n color: "+T.cookieListPrimaryColor+";\n }":"")+"\n "+(T.cookieListTableHeaderColor?"#ot-sdk-cookie-policy"+e+" th {\n color: "+T.cookieListTableHeaderColor+";\n }":"")+"\n "+(T.cookieListGroupNameColor?"#ot-sdk-cookie-policy"+e+" .ot-sdk-cookie-policy-group {\n color: "+T.cookieListGroupNameColor+";\n }":"")+"\n "+(T.cookieListTitleColor?"\n #ot-sdk-cookie-policy"+e+" #cookie-policy-title {\n color: "+T.cookieListTitleColor+";\n }\n ":"")+"\n "+(e&&T.CookieListTableHeaderBackgroundColor?"\n #ot-sdk-cookie-policy"+e+" table th {\n background-color: "+T.CookieListTableHeaderBackgroundColor+";\n }\n ":"")+"\n ";return T.cookieListCustomCss&&(e+=T.cookieListCustomCss),e}}(a=rr=rr||{}).SaleOptOut="SaleOptOutCID",a.SharingOptOut="SharingOptOutCID",a.PersonalDataConsents="PersonalDataCID",(a=ir=ir||{}).SharingOptOutNotice="SharingOptOutCID",a.SaleOptOutNotice="SaleOptOutCID",a.SensitiveDataLimitUseNotice="SensitivePICID || SensitiveSICID || GeolocationCID || RREPInfoCID || CommunicationCID || GeneticCID|| BiometricCID || HealthCID || SexualOrientationCID",(a=sr=sr||{}).KnownChildSensitiveDataConsents1="KnownChildSellPICID",a.KnownChildSensitiveDataConsents2="KnownChildSharePICID",(a=ar=ar||{}).SensitiveDataProcessing1="SensitivePICID",a.SensitiveDataProcessing2="SensitiveSICID",a.SensitiveDataProcessing3="GeolocationCID",a.SensitiveDataProcessing4="RREPInfoCID",a.SensitiveDataProcessing5="CommunicationCID",a.SensitiveDataProcessing6="GeneticCID",a.SensitiveDataProcessing7="BiometricCID",a.SensitiveDataProcessing8="HealthCID",a.SensitiveDataProcessing9="SexualOrientationCID";ur.prototype.initialiseLandingPath=function(){var e=p.needReconsent();Po.isLandingPage()?Po.setLandingPathParam(location.href):e&&!p.awaitingReconsent()?(Po.setLandingPathParam(location.href),v.writeCookieParam(k.OPTANON_CONSENT,Ne,!0)):(e||v.writeCookieParam(k.OPTANON_CONSENT,Ne,!1),Po.setLandingPathParam(qe),P.isSoftOptInMode&&!m.moduleInitializer.MobileSDK&&c.setAlertBoxClosed(!0),T.NextPageCloseBanner&&T.ShowAlertNotice&&G.nextPageCloseBanner())};var dr,pr=ur;function ur(){}Cr.prototype.insertCookiePolicyHtml=function(){if(I(this.ONETRUST_COOKIE_POLICY).length){var e,t,o,n=document.createDocumentFragment(),r=(_.cookieListGroup&&(t=T.CookiesV2NewCookiePolicy?".ot-sdk-cookie-policy":"#ot-sdk-cookie-policy-v2",o=document.createElement("div"),I(o).html(_.cookieListGroup.html),o.removeChild(o.querySelector(t)),e=o.querySelector(".ot-sdk-cookie-policy"),T.useRTL)&&I(e).attr("dir","rtl"),e.querySelector("#cookie-policy-title").innerHTML=T.CookieListTitle||"",e.querySelector("#cookie-policy-description").innerHTML=T.CookieListDescription||"",e.querySelector("section")),i=e.querySelector("section tbody tr"),s=null,a=null;T.CookiesV2NewCookiePolicy||(s=e.querySelector("section.subgroup"),a=e.querySelector("section.subgroup tbody tr"),I(e).el.removeChild(e.querySelector("section.subgroup"))),I(e).el.removeChild(e.querySelector("section")),!I(this.COOKIE_POLICY_SELECTOR).length&&I(this.OPTANON_POLICY_SELECTOR).length?I(this.OPTANON_POLICY_SELECTOR).append(''):(I(this.COOKIE_POLICY_SELECTOR).html(""),I(this.OPTANON_POLICY_SELECTOR).html(""));for(var l=0,c=T.Groups;l\n '+l.Name+"\n "),r.push(a)}h.setDataLabelAttribute(o,c),h.createCookieRowHtmlElement({host:e,subGroupCookie:l,trt:o,json:c,lifespanText:n.join(", "),hostType:r.join(", ")}),h.removeLifeSpanOrHostDescription(c,p,t,o),I(u("tbody")).append(t)}(n[o])},Cr.prototype.insertGroupHTML=function(e){function t(e){return l.querySelector(e)}var o,n=e.json,r=e.group,i=e.sectionTemplate,s=e.tableRowTemplate,a=e.cookieList,e=e.fragment,l=i.cloneNode(!0),i=(I(t("caption")).el.innerHTML=r.GroupName,I(t("tbody")).html(""),I(t("thead tr")),n.IsLifespanEnabled?I(t("th.life-span")).el.innerHTML=n.LifespanText:I(t("thead tr")).el.removeChild(I(t("th.life-span")).el),I(t("th.cookies")).el.innerHTML=n.CookiesText,I(t("th.host")).el.innerHTML=n.CategoriesText,!1);if(r.Hosts.some(function(e){return e.description})?i=!0:I(t("thead tr")).el.removeChild(I(t("th.host-description")).el),I(t(".ot-sdk-cookie-policy-group")).html(r.GroupName),I(t(".ot-sdk-cookie-policy-group-desc")).html(this.groupsClass.safeFormattedGroupDescription(r)),0 "+y.getCookieLabel(o,n.AddLinksToCookiepedia)+"
          • ")}else l.removeChild(t(".cookies-used-header")),l.removeChild(t(".cookies-list"));this.insertHostHtmlV1({json:n,hosts:r.Hosts,tableRowTemplate:s,showHostDescription:i,st:t}),I(a).append(l),I(e).append(a),I(this.COOKIE_POLICY_SELECTOR).append(e)},Cr.prototype.insertHostHtmlV1=function(e){for(var l=e.json,t=e.hosts,c=e.tableRowTemplate,d=e.showHostDescription,p=e.st,o=0,n=t;o

            '+e.Description+"

            "),0),r=0,i=e.Cookies;r "+s.Name+" "+a+"
          • "),l.IsLifespanEnabled&&(a=s.Length?s.Length+" days":"N/A",I(o(".life-span-td ul")).append("
          • "+a+"
          • ")),0===n&&(I(o(".host-td")).append(''),I(o(".host-td")).append(''+(e.DisplayName||e.HostName)+"")),n++}d||t.removeChild(o("td.host-description-td")),I(p("tbody")).append(t)}(n[o]);0===t.length&&I(p("table")).el.removeChild(I(p("thead")).el)},Cr.prototype.transformFirstPartyCookies=function(e,t,o){var n=this,r=t.slice(),t=(e.forEach(function(e){n.populateHostGroup(e,r,T.firstPartyTxt)}),o.GeneralVendorsIds),e=(this.populateGenVendor(t,o,r),o.SubGroups||[]);return e.length&&e.forEach(function(e){var t=e.GeneralVendorsIds;n.populateGenVendor(t,e,r)}),r},Cr.prototype.populateGenVendor=function(e,o,n){var r=this;e.length&&e.forEach(function(t){var e=T.GeneralVendors.find(function(e){return e.VendorCustomId===t});e.Cookies.length&&e.Cookies.forEach(function(e){var t;e.category===o.GroupName&&(t=e.isThirdParty?"":T.firstPartyTxt,r.populateHostGroup(e,n,t))})})},Cr.prototype.populateHostGroup=function(t,e,o){e.some(function(e){if(e.HostName===t.Host&&e.Type===o)return e.Cookies.push(t),!0})||e.unshift({HostName:t.Host,DisplayName:t.Host,HostId:"",Description:"",Type:o,Cookies:[t]})},Cr.prototype.insertCookieLineByLine=function(e){for(var t=e.json,o=e.hosts,n=e.tableRowTemplate,r=e.showHostDescription,i=e.st,s=0,a=o;s'+h+"\n "),n.cloneNode(!0)),C=this.queryToHtmlElement(g);this.clearCookieRowElement(C),this.createCookieRowHtmlElement({host:l,subGroupCookie:p,trt:C,json:t,lifespanText:u,hostType:h}),this.removeLifeSpanOrHostDescription(t,r,g,C),I(i("tbody")).append(g)}},Cr.prototype.removeLifeSpanOrHostDescription=function(e,t,o,n){e.IsLifespanEnabled||o.removeChild(n("td.ot-life-span-td")),t||o.removeChild(n("td.ot-host-description-td"))},Cr.prototype.createCookieRowHtmlElement=function(e){var t=e.host,o=e.subGroupCookie,n=e.trt,r=e.json,i=e.lifespanText,e=e.hostType,s=".ot-host-td",r=(this.setDataLabelAttribute(n,r),I(n(".ot-host-description-td")).html('

            '+o.description+"

            "),I(n(s)).append(''),t.DisplayName||t.HostName);I(n(s)).append(t.Type?r:'\n '+r+"\n "),n(".ot-cookies-td .ot-cookies-td-content").insertAdjacentHTML("beforeend",e),n(".ot-life-span-td .ot-life-span-td-content").innerText=i,n(".ot-cookies-type .ot-cookies-type-td-content").innerText=t.Type?T.firstPartyTxt:T.thirdPartyTxt},Cr.prototype.setDataLabelAttribute=function(e,t){var o="data-label";e(".ot-host-td").setAttribute(o,t.CategoriesText),e(".ot-cookies-td").setAttribute(o,t.CookiesText),e(".ot-cookies-type").setAttribute(o,t.CookiesUsedText),e(".ot-life-span-td").setAttribute(o,t.LifespanText)},Cr.prototype.clearCookieRowElement=function(e){I(e(".ot-cookies-td span")).text(""),I(e(".ot-life-span-td span")).text(""),I(e(".ot-cookies-type span")).text(""),I(e(".ot-cookies-td .ot-cookies-td-content")).html(""),I(e(".ot-host-td")).html("")},Cr.prototype.setCookieListHeaderOrder=function(e){var e=e.querySelector("section table thead tr"),t=e.querySelector("th.ot-host"),o=e.querySelector("th.ot-cookies"),n=e.querySelector("th.ot-life-span"),r=e.querySelector("th.ot-cookies-type"),i=e.querySelector("th.ot-host-description");e.innerHTML="",e.appendChild(o.cloneNode(!0)),e.appendChild(t.cloneNode(!0)),e.appendChild(n.cloneNode(!0)),e.appendChild(r.cloneNode(!0)),e.appendChild(i.cloneNode(!0))},Cr.prototype.setCookieListBodyOrder=function(e){var t=e.querySelector("td.ot-host-td"),o=e.querySelector("td.ot-cookies-td"),n=e.querySelector("td.ot-life-span-td"),r=e.querySelector("td.ot-cookies-type"),i=e.querySelector("td.ot-host-description-td");e.innerHTML="",e.appendChild(o.cloneNode(!0)),e.appendChild(t.cloneNode(!0)),e.appendChild(n.cloneNode(!0)),e.appendChild(r.cloneNode(!0)),e.appendChild(i.cloneNode(!0))},Cr.prototype.queryToHtmlElement=function(t){return function(e){return t.querySelector(e)}};var hr,gr=Cr;function Cr(){this.groupsClass=E,this.COOKIE_POLICY_SELECTOR="#ot-sdk-cookie-policy",this.OPTANON_POLICY_SELECTOR="#optanon-cookie-policy",this.ONETRUST_COOKIE_POLICY="#ot-sdk-cookie-policy, #optanon-cookie-policy"}mr.prototype.IsAlertBoxClosedAndValid=function(){return p.isAlertBoxClosedAndValid()},mr.prototype.LoadBanner=function(){c.loadBanner()},mr.prototype.Init=function(e){void 0===e&&(e=!1),De.insertViewPortTag(),_.ensureHtmlGroupDataInitialised(),En.updateGtmMacros(!1),dr.initialiseLandingPath(),e||nr.initialiseCssReferences()},mr.prototype.FetchAndDownloadPC=function(){B.fetchAndSetupPC()},mr.prototype.ToggleInfoDisplay=function(){c.triggerGoogleAnalyticsEvent(Vo,Ho),B.toggleInfoDisplay()},mr.prototype.Close=function(e){B.close(e)},mr.prototype.AllowAll=function(e){G.allowAllEvent(e)},mr.prototype.RejectAll=function(e){G.rejectAllEvent(e)},mr.prototype.setDataSubjectIdV2=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=""),e&&e.trim()&&(e=e.replace(/ /g,""),v.writeCookieParam(k.OPTANON_CONSENT,He,e,!0),A.dsParams.isAnonymous=t),null!=(t=null==(e=T)?void 0:e.ConsentIntegration)&&t.IdentifiedReceiptsAllowed&&null!=(e=o)&&e.trim()&&v.writeCookieParam(k.OPTANON_CONSENT,ze,o.trim())},mr.prototype.getDataSubjectId=function(){return v.readCookieParam(k.OPTANON_CONSENT,He,!0)},mr.prototype.synchroniseCookieWithPayload=function(n){var e=v.readCookieParam(k.OPTANON_CONSENT,"groups"),e=b.strToArr(e),r=[];e.forEach(function(e){var e=e.split(":"),t=C.getGroupById(e[0]),o=b.findIndex(n,function(e){return e.Id===t.PurposeId}),o=n[o];o?o.TransactionType===Ke?(r.push(e[0]+":1"),t.Parent?B.toggleSubCategory(null,t.CustomGroupId,!0,t.CustomGroupId):B.toggleV2Category(null,t,!0,t.CustomGroupId)):(r.push(e[0]+":0"),t.Parent?B.toggleSubCategory(null,t.CustomGroupId,!1,t.CustomGroupId):B.toggleV2Category(null,t,!1,t.CustomGroupId)):r.push(e[0]+":"+e[1])}),co.writeGrpParam(k.OPTANON_CONSENT,r)},mr.prototype.getGeolocationData=function(){return A.userLocation},mr.prototype.TriggerGoogleAnalyticsEvent=function(e,t,o,n){c.triggerGoogleAnalyticsEvent(e,t,o,n)},mr.prototype.ReconsentGroups=function(){var n=!1,e=v.readCookieParam(k.OPTANON_CONSENT,"groups"),r=b.strToArr(e),i=b.strToArr(e.replace(/:0|:1/g,"")),s=!1,t=v.readCookieParam(k.OPTANON_CONSENT,"hosts"),a=b.strToArr(t),l=b.strToArr(t.replace(/:0|:1/g,"")),c=["inactive","inactive landingpage","do not track"];e&&(T.Groups.forEach(function(e){q(e.SubGroups,[e]).forEach(function(e){var t=e.CustomGroupId,o=b.indexOf(i,t);-1!==o&&(e=C.getGrpStatus(e).toLowerCase(),-1Ve.ChunkSize?s=Ve.ChunkSize:(s=n.length,o=1===r),o?(t[Ve.Name]=n,n=""):(i=n.slice(0,s),n=n.slice(s,n.length),t[""+Ve.Name+r]=i),r++}return t},ni.prototype.writeGppCookies=function(e,t){v.writeCookieParam(k.OPTANON_CONSENT,Ve.ChunkCountParam,e);for(var o=0,n=Object.entries(t);o\n '+T.BannerIABPartnersLink+"\n "),o},si.prototype.setBannerData=function(e){var t;T.BannerTitle?(I(e("#onetrust-policy-title")).html(T.BannerTitle),I(e('[role="alertdialog"]')).attr(Lt,T.BannerTitle)):(b.removeChild(e("#onetrust-policy-title")),I(e("#onetrust-banner-sdk")).addClass("ot-wo-title"),I(e('[role="alertdialog"]')).attr(Lt,T.AriaPrivacy)),!T.IsIabEnabled&&A.showGeneralVendors&&T.BannerNonIABVendorListText&&((t=document.createElement("div")).setAttribute("id","ot-gv-link-ctnr"),I(t).html('"),I(e("#onetrust-policy")).el.appendChild(t)),I(e(ri.POLICY_TEXT_SELECTOR)).html(T.AlertNoticeText),T.BShowPolicyLink&&T.BShowImprintLink&&I(e(this.cookiePolicyLinkSelector)).length?(I(e(ri.POLICY_TEXT_SELECTOR+" a:first-child")).attr(Lt,T.BCookiePolicyLinkScreenReader),I(e(ri.POLICY_TEXT_SELECTOR+" a:last-child")).attr(Lt,T.BImprintLinkScreenReader)):T.BShowPolicyLink&&I(e(this.cookiePolicyLinkSelector)).length?I(e(this.cookiePolicyLinkSelector)).attr(Lt,T.BCookiePolicyLinkScreenReader):T.BShowImprintLink&&I(e(this.cookiePolicyLinkSelector)).length&&I(e(this.cookiePolicyLinkSelector)).attr(Lt,T.BImprintLinkScreenReader)},si.prototype.isCmpEnabled=function(){return T.BannerPurposeTitle||T.BannerPurposeDescription||T.BannerFeatureTitle||T.BannerFeatureDescription||T.BannerInformationTitle||T.BannerInformationDescription},si.prototype.ssrAndNonSSRCommonHtml=function(t){function e(e){return t.querySelector(e)}var o,n=this,r=this.isCmpEnabled(),i=(this.setOptOutSignalNotification(e),"[VENDOR_NUMBER]"),s=I(e(ri.POLICY_TEXT_SELECTOR)).html(),i=(P.isIab2orv2Template&&-1'+P.tcf2ActiveVendors.all.toString()+"",s=s.split(i).join(o),I(e(ri.POLICY_TEXT_SELECTOR)).html(s)),T.BRegionAriaLabel&&(I(e("#onetrust-banner-sdk")).attr("role","region"),I(e("#onetrust-banner-sdk")).attr(Lt,T.BRegionAriaLabel)),P.bannerName===gt&&m.moduleInitializer.IsSuppressPC&&(A.dataGroupState=T.Groups.filter(function(e){return e.Order})),P.bannerName===gt&&(this._fourBtns=T.BannerShowRejectAllButton&&T.showBannerAcceptButton&&T.showBannerCookieSettings&&T.BShowSaveBtn,this._saveBtn=e(".ot-bnr-save-handler"),this._settingsBtn=e("#onetrust-pc-btn-handler"),this._btnsCntr=e(".banner-actions-container"),T.BShowSaveBtn?I(this._saveBtn).html(T.BSaveBtnTxt):(b.removeChild(this._saveBtn),this._saveBtn=null),y.insertFooterLogo(t.querySelectorAll(".ot-bnr-footer-logo a")),this._descriptCntr=e(".ot-cat-lst"),this.setBannerBtn(),window.addEventListener("resize",function(){n.setBannerBtn()}),this._fourBtns&&I(e("#onetrust-banner-sdk")).addClass("has-reject-all-button"),this.insertGrps(e)),document.createElement("div"));I(i).append(t),P.ignoreInjectingHtmlCss||(I("#onetrust-consent-sdk").append(i.firstChild),r&&this.setBannerOptionContent()),this.setBnrBtnGrpAlignment()},si.prototype.setAriaModalForBanner=function(e){T.ForceConsent&&e.querySelector('[role="alertdialog"]').setAttribute("aria-modal","true")},si.prototype.setBnrBtnGrpAlignment=function(){var e=I(this._otGrpContainerSelector).el,t=I(this._btnGrpParentSelector).el,e=((e.length&&e[0].clientHeight)<(t.length&&t[0].clientHeight)?I("#onetrust-banner-sdk").removeClass("vertical-align-content"):I("#onetrust-banner-sdk").addClass("vertical-align-content"),document.querySelector("#onetrust-button-group-parent button:first-of-type")),t=document.querySelector("#onetrust-button-group-parent button:last-of-type");t&&e&&1"+T.AlwaysActiveText+"","ce").el)):I(e).attr("disabled",!0)),e.classList.add("category-switch-handler"),E.setInputID(e,i,r,a,s),t.querySelector("h4"));I(l).html(n),I(l).attr("id",s),I(d).append(t)})},si.prototype.setBannerLogo=function(e,t){var o,n;m.fp.CookieV2BannerLogo&&T.BnrLogo&&(o=t(bn),n="afterend",P.bannerName===ut&&(o=t("#onetrust-cookie-btn"),n="beforeend"),t=y.updateCorrectUrl(T.BnrLogo),I(e).addClass("ot-bnr-w-logo"),I(o).el.innerHTML="",o.insertAdjacentHTML(n,""))},si.prototype.setOptOutSignalNotification=function(e){var t=!0===navigator.globalPrivacyControl&&P.gpcForAGrpEnabled;T.BShowOptOutSignal&&(t||P.previewMode)&&y.createOptOutSignalElement(e,!1)};var ri,ii=si;function si(){this.POLICY_TEXT_SELECTOR="#onetrust-policy-text",this.El="#onetrust-banner-sdk",this._saveBtn=null,this._settingsBtn=null,this._acceptBtn=null,this._rejectBtn=null,this._descriptCntr=null,this._btnsCntr=null,this._fourBtns=!1,this._bannerOptionsSelector="#banner-options",this._btnGrpParentSelector="#onetrust-button-group-parent",this._otGrpContainerSelector="#onetrust-group-container",this.cookiePolicyLinkSelector="#onetrust-policy-text a"}li.prototype.setHeaderConfig=function(){u.setHeader(),u.setSearchInput(),u.setHeaderUIConsent();var e=u.getGroupsForFilter();er.setFilterListByGroup(e,!1)},li.prototype.filterVendorByString=function(e){u.searchQuery=e,u.filterVendorByGroupOrQuery()},li.prototype.filterVendorByGroup=function(e){u.filterGroups=e,u.filterVendorByGroupOrQuery()},li.prototype.showVSList=function(){u.removeListeners(),u.showEmptyResults(!1,""),u.clearUIElementsInMain(),u.addVSList(A.getVendorsInDomain())},li.prototype.showEmptyResults=function(e,t){e?this.setNoResultsContent(t):(I("#onetrust-pc-sdk "+S.P_Vendor_Content).removeClass("no-results"),(e=I("#onetrust-pc-sdk #no-results")).length&&e.remove())},li.prototype.setNoResultsContent=function(e){var t,o,n,r,i=I("#onetrust-pc-sdk #no-results").el[0];if(!i)return t=document.createElement("div"),o=document.createElement("p"),n=document.createTextNode(" "+T.PCVendorNotFound+"."),r=document.createElement("span"),t.id="no-results",r.id="user-text",r.innerText=e,o.appendChild(r),o.appendChild(n),t.appendChild(o),I("#onetrust-pc-sdk "+S.P_Vendor_Content).addClass("no-results"),I("#vendor-search-handler").el[0].setAttribute("aria-describedby",t.id),I("#onetrust-pc-sdk "+S.P_Vendor_Content).append(t);i.querySelector("span").innerText=e},li.prototype.getGroupsFilter=function(){for(var e=[],t=0,o=I("#onetrust-pc-sdk .category-filter-handler").el;t input:first-child,"+S.P_Category_Item+" > button:first-child",B.onCategoryItemToggle.bind(this)),(T.showCookieList||A.showGeneralVendors)&&(I("#onetrust-pc-sdk .category-host-list-handler").on("click",function(e){A.showGeneralVendors&&T.showCookieList?A.cookieListType=ye.HostAndGenVen:A.showGeneralVendors?A.cookieListType=ye.GenVen:A.cookieListType=ye.Host,B.pcLinkSource=e.target,B.loadCookieList(e.target)}),y.isOptOutEnabled()?(I("#onetrust-pc-sdk #select-all-hosts-groups-handler").on("click",B.selectAllHostsGroupsHandler),I("#onetrust-pc-sdk "+S.P_Host_Cntr).on("click",B.selectHostsGroupHandler)):I("#onetrust-pc-sdk "+S.P_Host_Cntr).on("click",B.toggleAccordionStatus)),B.addListenerWhenIabEnabled(),B.addEventListenerWhenIsHostOrVendorsAreEnabled(),B.adddListenerWhenNoBanner(),I("#onetrust-pc-sdk .ot-gv-list-handler").on("click",function(t){return R(e,void 0,void 0,function(){return M(this,function(e){return A.cookieListType=ye.GenVen,B.loadCookieList(t.target),[2]})})}),B.addListenerWhenVendorServices()},w.prototype.addEventListenerWhenIsHostOrVendorsAreEnabled=function(){var e;(T.IsIabEnabled||T.showCookieList||A.showGeneralVendors||A.showVendorService)&&(I(document).on("click",".back-btn-handler",B.backBtnHandler),B.addListenerSearchKeyEvent(),I("#onetrust-pc-sdk #filter-btn-handler").on("click",B.toggleVendorFiltersHandler),I("#onetrust-pc-sdk #filter-apply-handler").on("click",B.applyFilterHandler),I("#onetrust-pc-sdk "+S.P_Fltr_Modal).on("click",B.tglFltrOptionHandler),!m.isV2Template&&P.pcName!==kt||I("#onetrust-pc-sdk #filter-cancel-handler").on("click",B.cancelFilterHandler),!m.isV2Template&&P.pcName===kt||I("#onetrust-pc-sdk #clear-filters-handler").on("click",B.clearFiltersHandler),m.isV2Template?I("#onetrust-pc-sdk #filter-cancel-handler").on("keydown",function(e){9!==e.keyCode&&"tab"!==e.code||e.shiftKey||(e.preventDefault(),I("#onetrust-pc-sdk #clear-filters-handler").el[0].focus())}):I("#onetrust-pc-sdk #filter-apply-handler").on("keydown",function(e){9!==e.keyCode&&"tab"!==e.code||e.shiftKey||(e.preventDefault(),I("#onetrust-pc-sdk .category-filter-handler").el[0].focus())}),e=I("#onetrust-pc-sdk .category-filter-handler").el,I(e[0]).on("keydown",function(e){9!==e.keyCode&&"tab"!==e.code||!e.shiftKey||(e.preventDefault(),I("#onetrust-pc-sdk #filter-apply-handler").el[0].focus())}))},w.prototype.addListenerSearchKeyEvent=function(){I(B.VENDOR_SEARCH_SELECTOR).on("keyup",function(e){e=e.target.value.trim();B.currentSearchInput!==e&&(A.showVendorService?u.filterVendorByString(e):B.isCookieList?(g.searchHostList(e),A.showTrackingTech&&B.addEventAdditionalTechnologies()):(g.loadVendorList(e,[]),T.UseGoogleVendors&&g.searchVendors(g.googleSearchSelectors,A.addtlVendorsList,ke.GoogleVendor,e),A.showGeneralVendors&&T.GeneralVendors.length&&g.searchVendors(g.genVendorSearchSelectors,T.GeneralVendors,ke.GeneralVendor,e)),g.playSearchStatus(B.isCookieList),B.currentSearchInput=e)})},w.prototype.addListenerWhenIabEnabled=function(){T.IsIabEnabled&&(I("#onetrust-pc-sdk .category-vendors-list-handler").on("click",function(e){B.pcLinkSource=e.target,B.showVendorsList(e.target)}),I("#onetrust-pc-sdk .ot-pgph-link").on("click",function(e){B.pcLinkSource=e.target,B.showIllustrations(e.target)}),I("#onetrust-pc-sdk "+S.P_Vendor_Container).on("click",B.selectVendorsGroupHandler),T.UseGoogleVendors||B.bindSelAllHandlers(),B.initialiseLegIntBtnHandlers())},w.prototype.adddListenerWhenNoBanner=function(){T.NoBanner&&(T.OnClickCloseBanner&&document.body.addEventListener("click",G.bodyClickEvent),T.ScrollCloseBanner)&&window.addEventListener("scroll",G.scrollCloseBanner)},w.prototype.addListenerWhenVendorServices=function(){A.showVendorService&&(B.bindSelAllHandlers(),I("#onetrust-pc-sdk .onetrust-vendors-list-handler").on("click",function(){return B.showVendorsList(null,!0)}))},w.prototype.bindSelAllHandlers=function(){I("#onetrust-pc-sdk #select-all-vendor-leg-handler").on("click",B.selectAllVendorsLegIntHandler),I("#onetrust-pc-sdk #select-all-vendor-groups-handler").on("click",B.SelectAllVendorConsentHandler)},w.prototype.hideCookieSettingsHandler=function(e){return void 0===e&&(e=window.event),c.triggerGoogleAnalyticsEvent(Vo,xo),wn.removeAddedOTCssStyles(Bn.PC),zn.hideConsentNoticeV2(),I(document).off("keydown",B.closePCWhenEscPressed),B.getResizeElement().removeEventListener("resize",B.setCenterLayoutFooterHeight),window.removeEventListener("resize",B.setCenterLayoutFooterHeight),!m.isV2Template&&P.pcName!==kt||B.closeFilter(!1),P.pcName===ft&&I("#onetrust-pc-sdk "+S.P_Content).removeClass("ot-hide"),G.hideVendorsList(),_.csBtnGroup&&(I(B.fltgBtnSltr).removeClass("ot-pc-open"),B.floatingCookieSettingCloseBtnClicked(null)),B.confirmPC(e),G.resetConsent(),!1},w.prototype.selectAllHostsGroupsHandler=function(e){var t=e.target.checked,e=I("#onetrust-pc-sdk #"+S.P_Sel_All_Host_El).el[0],o=e.classList.contains("line-through"),n=I("#onetrust-pc-sdk .host-checkbox-handler").el;b.setCheckedAttribute("#select-all-hosts-groups-handler",null,t);for(var r=0;r button",B.toggleAccordionStatus.bind(this)))),A.vendorDomInit||(A.vendorDomInit=!0,B.initialiseLegIntBtnHandlers(),T.UseGoogleVendors&&(B.initialiseAddtlVenHandler(),B.bindSelAllHandlers())),A.showGeneralVendors&&!A.genVendorDomInit&&(A.genVendorDomInit=!0,g.initGenVendors(),B.initializeGenVenHandlers(),T.UseGoogleVendors||(B.bindSelAllHandlers(),I("#onetrust-pc-sdk").on("click",".ot-acc-cntr > button",B.toggleAccordionStatus.bind(this))))},w.prototype.addEventAdditionalTechnologies=function(){var e=document.querySelectorAll("#onetrust-pc-sdk .ot-acc-cntr.ot-add-tech > button");0=e?d(I("#onetrust-pc-sdk").el[0],"height: "+e+"px;",!0):d(I("#onetrust-pc-sdk").el[0],"height: auto;",!0)})},w.prototype.changeSelectedTab=function(e){var t,o=I("#onetrust-pc-sdk .category-menu-switch-handler"),n=0,r=I(o.el[0]);o.each(function(e,t){I(e).el.classList.contains(S.P_Active_Menu)&&(n=t,I(e).el.classList.remove(S.P_Active_Menu),r=I(e))}),e.keyCode===ae.RightArrow?t=n+1>=o.el.length?I(o.el[0]):I(o.el[n+1]):e.keyCode===ae.LeftArrow&&(t=I(n-1<0?o.el[o.el.length-1]:o.el[n-1])),this.tabMenuToggle(t,r)},w.prototype.changeSelectedTabV2=function(e){var t,o=e.target.parentElement,e=(e.keyCode===ae.RightArrow?t=o.nextElementSibling||o.parentElement.firstChild:e.keyCode===ae.LeftArrow&&(t=o.previousElementSibling||o.parentElement.lastChild),t.querySelector(".category-menu-switch-handler"));e.focus(),this.groupTabClick(e)},w.prototype.categoryMenuSwitchHandler=function(){for(var t=this,e=I("#onetrust-pc-sdk .category-menu-switch-handler").el,o=0;o.8*window.innerHeight||0===this.pcBodyHeight?d(e,"height: "+.8*window.innerHeight+"px;",!0):d(e,"height: "+i+"px;",!0):d(e,"height: 100%;",!0)):d(e.querySelector(""+S.P_Content),"height: "+(e.clientHeight-t.clientHeight-o.clientHeight-3)+"px;",!0)},w.prototype.allowAllVisible=function(e){e!==this.allowVisible&&T.PCLayout.Tab&&T.PCTemplateUpgrade&&(this.pc&&this.setMainContentHeight(),this.allowVisible=e)},w.prototype.restorePc=function(){A.pcLayer===se.CookieList?(B.hideCategoryContainer(!0),g.loadHostList("",A.filterByCategories),A.showTrackingTech&&B.addEventAdditionalTechnologies(),I("#onetrust-pc-sdk #filter-count").text(A.filterByCategories.length.toString())):A.pcLayer===se.VendorList&&(B.hideCategoryContainer(!1),B.setVendorContent()),A.isPCVisible=!1,B.toggleInfoDisplay(),A.pcLayer!==se.VendorList&&A.pcLayer!==se.CookieList||(hn.updateFilterSelection(A.pcLayer===se.CookieList),B.setBackButtonFocus(),cn.setPCFocus(cn.getPCElements()))},w.prototype.toggleInfoDisplay=function(){return R(this,void 0,void 0,function(){var t;return M(this,function(e){switch(e.label){case 0:return _.csBtnGroup&&(I(B.fltgBtnSltr).addClass("ot-pc-open"),B.otGuardLogoPromise.then(function(){T.cookiePersistentLogo.includes("ot_guard_logo.svg")&&I(B.fltgBtnFSltr).attr(_t,"true")}),I(B.fltgBtnBSltr).attr(_t,"")),[4,B.fetchAndSetupPC()];case 1:return e.sent(),P.pcName===ft&&this.setPcListContainerHeight(),void 0!==A.pcLayer&&A.pcLayer!==se.Banner||(A.pcLayer=se.PrefCenterHome),t=I("#onetrust-pc-sdk").el[0],I(".onetrust-pc-dark-filter").el[0].removeAttribute("style"),t.removeAttribute("style"),A.isPCVisible||(zn.showConsentNotice(),A.isPCVisible=!0,T.PCTemplateUpgrade&&(this.pc=t,t=t.querySelector("#accept-recommended-btn-handler"),this.allowVisible=t&&0new Date(o))){var g=this.getConsentValue(c.status),i=!0,C=c.lastInteractionDate;if(!t&&this.isCookieGroup(p)){for(var y=p+":"+g,f=-1,h=0;h + + + + + + + Comprendre les cookies + + + + + + + + Les cookies | A quoi servent-ils ? | Solidarité Numérique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +
            + + +
            + +

            Le numéro d'appel n'est pas accessible aujourd'hui. Veuillez nous excuser pour la gêne occasionnée.

            + + +

            + Le numéro d'appel n'est pas accessible aujourd'hui. Veuillez nous excuser pour la gêne occasionnée.
            +

            + +
            + +
            + +
            + + + + + + + + + + + + + + + + +
            +
            + +
            + +

            Dernière modification : 17 septembre 2021

            + +
            +

            Vous souhaitez en savoir plus sur les cookies ? Cette foire aux questions vous aidera à comprendre et à en apprendre davantage sur leurs spécificités.

            +
            + +

            Tags : #Confidentialité #Cookies #DonnéesDeNavigation #DonnéesPersonnelles #RGPD

            +

            Prérequis

            +
            +
              +
            • Maîtriser la navigation sur Internet
            • +
            +
            + + +
            Photo d'un ordinateur sur une table avec en fond d'écran des gâteaux
            +

            Les cookies sont des petits fichiers informatiques déposés par le site Internet que vous visitez. Il s'installe sur votre ordinateur, tablette ou smartphone par le navigateur web.

            +
            Questions - réponses
            + +

            4 types de cookies les plus courants :

            +
              +
            • Nécessaires : pour le bon fonctionnement du site Internet. Ils conservent des données pour simplifier votre navigation. Par exemple, les sites les utilisent pour mémoriser le panier sur un site de commerce en ligne ou pour authentifier directement l'internaute. Ils sont nécessaires au bon fonctionnement d'un site Internet. Ils personnalisent également l'expérience de l'utilisateur sur un site Internet, en mémorisant ses préférences (sans consentement).
            • +
            • Statistiques : pistent un utilisateur pour mesurer l'audience afin de réaliser des statistiques de fréquentation d'un site Internet.
            • +
            • Internes : pour connaître votre comportement et proposer de la publicité ciblée
            • +
            • Tierces parties : déposés par un site différent du site que vous visitez. Généralement utilisés par des régies publicitaires pour adapter l'affichage de leurs publicités, ou bien par les réseaux sociaux (Facebook par exemple)
            • +
            +

            Que dit la loi sur l'utilisation des cookies ?

            +

            Ceux nécessaires au bon fonctionnement d'un site Internet ne nécessitent pas le consentement de l'utilisateur.
            +Ceux utilisés par les réseaux sociaux, ou à des fins publicitaires, doivent faire l'objet d'un consentement préalable de l'utilisateur. C'est le rôle des bandeaux affichés lors de l'ouverture d'un site Internet.
            +Il doit respecter les conditions du Règlement Général sur la Protection des Données (RGPD)
            : libre, spécifique, éclairé, univoque, et doit pouvoir être retiré à tout moment. 

            +

            Certains sites proposent de payer un abonnement mensuel contre l'absence d'utilisation de cookies. Ce type de dispositif profite d'un flou juridique. La Commission Nationale Informatique et Liberté (CNIL) évalue au cas par cas la légalité de ces dispositifs.

            +

            +

            Puis-je paramétrer ou bloquer l'utilisation des cookies ?

            +

            Vous pouvez les paramétrer, voire les bloquer directement sur le navigateur Internet, ou encore par l'intermédiaire du bandeau proposé par les sites Internet.

            +

            Depuis le navigateur Internet

            +

            Les navigateurs Internet permettent de paramétrer le pistage des sites Internet :

            +
              +
            • Microsoft Edge : cliquez sur Paramètres > Cookies et autorisations de site > Gérer et supprimer les cookies et les données du site
            • +
            • Google Chrome : cliquez sur Paramètres > Confidentialité et sécurité > Cookies et autres données des sites
            • +
            • Mozilla Firefox : dans les Paramètres > Vie privée et sécurité > Protection renforcée contre le pistage, ainsi que Cookies et données de site
            • +
            +

            À SAVOIR

            +
              +
            • Le paramétrage au niveau du navigateur bloque les cookies techniques nécessaires au bon fonctionnement des sites Internet : cette configuration doit être effectué avec prudence.
              +
            • +
            • La navigation en mode privée empêche le dépôt de cookies par le navigateur Internet, mais ne bloque pas forcément les autres moyens de pistage d’un site (pixel espion, collecte d’informations du navigateur…).
            • +
            • Pour supprimer des cookies déjà déposés sur votre appareil, consultez le tutoriel à ce sujet : Supprimer les cookies sur les navigateurs Firefox, Chrome et Edge.
            • +
            +

            +

            Depuis le bandeau de connexion sur le site Internet

            +

            Les sites Internet qui les emploient à des fins de pistage sont dans l'obligation de proposer aux utilisateurs d'accepter, refuser ou paramétrer l'utilisation de ces cookies de manière consentie, libre, et éclairée.
            +Quand vous accédez à un site, n'hésitez pas à cliquer sur : Continuer sans accepter ou Refuser, placé en haut ou en bas du bandeau.
            +Sur notre exemple, l'indication se trouve en plus petit, en bas à gauche.

            +

            Bandeau de paramétrage des cookies du site Le Bon Coin

            +

            Si cette mention n'apparait pas, sélectionnez ceux que vous souhaitez autoriser ou bloquer en cliquant sur Personnaliser. En fonction des sites Internet, l'affichage des options de personnalisation peuvent varier.

            +

            Bandeau de paramétrage détaillé des cookies du site Le Bon Coin

            +

             

            +
            Liens Utiles
            + + + +
            Licence
            +

            Ce tutoriel est mis à disposition sous les termes de la Licence Ouverte 2.0 (ou cc by SA) Ce tutoriel a été produit dans le cadre du projet Solidarité Numérique. L’objectif est d’accompagner les citoyens dans leurs besoins numériques. Tous les éléments reproduits dans les captures d’écran sont la propriété des sites desquels ils sont tirés.

            + +

            Dernière modification : 17 septembre 2021

            + +
            + +
            +
            + + + +
            +
            +

            Les tutoriels sur la même thématique

            +
            + + + + +
            +

            Voir plus

            +
            +
            + +
            +
            +

            Les autres thématiques

            +
            + + + + + + + + + + + + +
            +
            +
            + + + +
            + + + + + + + + + + + + + + + + + + +
            + + \ No newline at end of file diff --git a/tests/encodings/file04.js b/tests/encodings/file04.js new file mode 100644 index 00000000..2b207f80 --- /dev/null +++ b/tests/encodings/file04.js @@ -0,0 +1,10 @@ +/*! +* ml_jQuery.inputmask.bundle.js +* https://github.com/RobinHerbots/jquery.inputmask +* Copyright (c) 2010 - 2016 Robin Herbots +* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) +* Version: 3.3.1 +*/ +!function(a){function b(c,d){return this instanceof b?(a.isPlainObject(c)?d=c:(d=d||{},d.alias=c),this.el=void 0,this.opts=a.extend(!0,{},this.defaults,d),this.noMasksCache=d&&void 0!==d.definitions,this.userOptions=d||{},this.events={},void e(this.opts.alias,d,this.opts)):new b(c,d)}function c(a){var b=document.createElement("input"),c="on"+a,d=c in b;return d||(b.setAttribute(c,"return;"),d="function"==typeof b[c]),b=null,d}function d(b,c){var d=b.getAttribute("type"),e="INPUT"===b.tagName&&-1!==a.inArray(d,c.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!e&&"INPUT"===b.tagName){var f=document.createElement("input");f.setAttribute("type",d),e="text"===f.type,f=null}return e}function e(b,c,d){var f=d.aliases[b];return f?(f.alias&&e(f.alias,void 0,d),a.extend(!0,d,f),a.extend(!0,d,c),!0):(null===d.mask&&(d.mask=b),!1)}function f(b,c,d){function f(a,c){c=void 0!==c?c:b.getAttribute("data-inputmask-"+a),null!==c&&("string"==typeof c&&(0===a.indexOf("on")?c=window[c]:"false"===c?c=!1:"true"===c&&(c=!0)),d[a]=c)}var g,h,i,j,k=b.getAttribute("data-inputmask");if(k&&""!==k&&(k=k.replace(new RegExp("'","g"),'"'),h=JSON.parse("{"+k+"}")),h){i=void 0;for(j in h)if("alias"===j.toLowerCase()){i=h[j];break}}f("alias",i),d.alias&&e(d.alias,d,c);for(g in c){if(h){i=void 0;for(j in h)if(j.toLowerCase()===g.toLowerCase()){i=h[j];break}}f(g,i)}return a.extend(!0,c,d),c}function g(c,d){function e(b){function d(a,b,c,d){this.matches=[],this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function e(b,d,e){var f=c.definitions[d];e=void 0!==e?e:b.matches.length;var g=b.matches[e-1];if(f&&!r){f.placeholder=a.isFunction(f.placeholder)?f.placeholder(c):f.placeholder;for(var h=f.prevalidator,i=h?h.length:0,j=1;j=j?h[j-1]:[],l=k.validator,m=k.cardinality;b.matches.splice(e++,0,{fn:l?"string"==typeof l?new RegExp(l):new function(){this.test=l}:new RegExp("."),cardinality:m?m:1,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==(f.definitionSymbol||d),casing:f.casing,def:f.definitionSymbol||d,placeholder:f.placeholder,mask:d}),g=b.matches[e-1]}b.matches.splice(e++,0,{fn:f.validator?"string"==typeof f.validator?new RegExp(f.validator):new function(){this.test=f.validator}:new RegExp("."),cardinality:f.cardinality,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==(f.definitionSymbol||d),casing:f.casing,def:f.definitionSymbol||d,placeholder:f.placeholder,mask:d})}else b.matches.splice(e++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==d,casing:null,def:c.staticDefinitionSymbol||d,placeholder:void 0!==c.staticDefinitionSymbol?d:void 0,mask:d}),r=!1}function f(a,b){a.isGroup&&(a.isGroup=!1,e(a,c.groupmarker.start,0),b!==!0&&e(a,c.groupmarker.end))}function g(a,b,c,d){b.matches.length>0&&(void 0===d||d)&&(c=b.matches[b.matches.length-1],f(c)),e(b,a)}function h(){if(t.length>0){if(m=t[t.length-1],g(k,m,o,!m.isAlternator),m.isAlternator){n=t.pop();for(var a=0;a0?(m=t[t.length-1],m.matches.push(n)):s.matches.push(n)}}else g(k,s,o)}function i(a){function b(a){return a===c.optionalmarker.start?a=c.optionalmarker.end:a===c.optionalmarker.end?a=c.optionalmarker.start:a===c.groupmarker.start?a=c.groupmarker.end:a===c.groupmarker.end&&(a=c.groupmarker.start),a}a.matches=a.matches.reverse();for(var d in a.matches){var e=parseInt(d);if(a.matches[d].isQuantifier&&a.matches[e+1]&&a.matches[e+1].isGroup){var f=a.matches[d];a.matches.splice(d,1),a.matches.splice(e+1,0,f)}void 0!==a.matches[d].matches?a.matches[d]=i(a.matches[d]):a.matches[d]=b(a.matches[d])}return a}for(var j,k,l,m,n,o,p,q=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,r=!1,s=new d,t=[],u=[];j=q.exec(b);)if(k=j[0],r)h();else switch(k.charAt(0)){case c.escapeChar:r=!0;break;case c.optionalmarker.end:case c.groupmarker.end:if(l=t.pop(),void 0!==l)if(t.length>0){if(m=t[t.length-1],m.matches.push(l),m.isAlternator){n=t.pop();for(var v=0;v0?(m=t[t.length-1],m.matches.push(n)):s.matches.push(n)}}else s.matches.push(l);else h();break;case c.optionalmarker.start:t.push(new d(!1,!0));break;case c.groupmarker.start:t.push(new d(!0));break;case c.quantifiermarker.start:var w=new d(!1,!1,!0);k=k.replace(/[{}]/g,"");var x=k.split(","),y=isNaN(x[0])?x[0]:parseInt(x[0]),z=1===x.length?y:isNaN(x[1])?x[1]:parseInt(x[1]);if(("*"===z||"+"===z)&&(y="*"===z?0:1),w.quantifier={min:y,max:z},t.length>0){var A=t[t.length-1].matches;j=A.pop(),j.isGroup||(p=new d(!0),p.matches.push(j),j=p),A.push(j),A.push(w)}else j=s.matches.pop(),j.isGroup||(p=new d(!0),p.matches.push(j),j=p),s.matches.push(j),s.matches.push(w);break;case c.alternatormarker:t.length>0?(m=t[t.length-1],o=m.matches.pop()):o=s.matches.pop(),o.isAlternator?t.push(o):(n=new d(!1,!1,!1,!0),n.matches.push(o),t.push(n));break;default:h()}for(;t.length>0;)l=t.pop(),f(l,!0),s.matches.push(l);return s.matches.length>0&&(o=s.matches[s.matches.length-1],f(o),u.push(s)),c.numericInput&&i(u[0]),u}function f(f,g){if(null===f||""===f)return void 0;if(1===f.length&&c.greedy===!1&&0!==c.repeat&&(c.placeholder=""),c.repeat>0||"*"===c.repeat||"+"===c.repeat){var h="*"===c.repeat?0:"+"===c.repeat?1:c.repeat;f=c.groupmarker.start+f+c.groupmarker.end+c.quantifiermarker.start+h+","+c.repeat+c.quantifiermarker.end}var i;return void 0===b.prototype.masksCache[f]||d===!0?(i={mask:f,maskToken:e(f),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:g},d!==!0&&(b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]=i,i=a.extend(!0,{},b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]))):i=a.extend(!0,{},b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]),i}function g(a){return a=a.toString()}var h;if(a.isFunction(c.mask)&&(c.mask=c.mask(c)),a.isArray(c.mask)){if(c.mask.length>1){c.keepStatic=null===c.keepStatic?!0:c.keepStatic;var i="(";return a.each(c.numericInput?c.mask.reverse():c.mask,function(b,c){i.length>1&&(i+=")|("),i+=g(void 0===c.mask||a.isFunction(c.mask)?c:c.mask)}),i+=")",f(i,c.mask)}c.mask=c.mask.pop()}return c.mask&&(h=void 0===c.mask.mask||a.isFunction(c.mask.mask)?f(g(c.mask),c.mask):f(g(c.mask.mask),c.mask)),h}function h(e,f,g){function i(a,b,c){b=b||0;var d,e,f,h=[],i=0,j=o();do{if(a===!0&&m().validPositions[i]){var k=m().validPositions[i];e=k.match,d=k.locator.slice(),h.push(c===!0?k.input:I(i,e))}else f=r(i,d,i-1),e=f.match,d=f.locator.slice(),(g.jitMasking===!1||j>i||isFinite(g.jitMasking)&&g.jitMasking>i)&&h.push(I(i,e));i++}while((void 0===ha||ha>i-1)&&null!==e.fn||null===e.fn&&""!==e.def||b>=i);return""===h[h.length-1]&&h.pop(),h}function m(){return f}function n(a){var b=m();b.buffer=void 0,a!==!0&&(b.tests={},b._buffer=void 0,b.validPositions={},b.p=0)}function o(a,b,c){var d=-1,e=-1,f=c||m().validPositions;void 0===a&&(a=-1);for(var g in f){var h=parseInt(g);f[h]&&(b||null!==f[h].match.fn)&&(a>=h&&(d=h),h>=a&&(e=h))}return-1!==d&&a-d>1||a>e?d:e}function p(b,c,d,e){if(e||g.insertMode&&void 0!==m().validPositions[b]&&void 0===d){var f,h=a.extend(!0,{},m().validPositions),i=o();for(f=b;i>=f;f++)delete m().validPositions[f];m().validPositions[b]=c;var j,k=!0,l=m().validPositions,p=!1;for(f=j=b;i>=f;f++){var q=h[f];if(void 0!==q)for(var r=j,s=-1;r1||void 0!==l[f].alternation)?r++:r=E(j),p===!1&&h[r]&&h[r].match.def===q.match.def){m().validPositions[r]=a.extend(!0,{},h[r]),m().validPositions[r].input=q.input,j=r,k=!0;break}if(t(r,q.match.def)){var u=B(r,q.input,!0,!0);if(k=u!==!1,j=u.caret||u.insert?o():r,p=!0,k)break}else{if(k=null==q.match.fn,s===r)break;s=r}}if(!k)break}if(!k)return m().validPositions=a.extend(!0,{},h),n(!0),!1}else m().validPositions[b]=c;return n(!0),!0}function q(b,c,d,e){function f(a){var b=m().validPositions[a];if(void 0!==b&&null===b.match.fn){var c=m().validPositions[a-1],d=m().validPositions[a+1];return void 0!==c&&void 0!==d}return!1}var h,i=b,j=a.extend(!0,{},m().validPositions),k=!1;for(m().p=b,h=c-1;h>=i;h--)void 0!==m().validPositions[h]&&(d===!0||!f(h)&&g.canClearPosition(m(),h,o(),e,g)!==!1)&&delete m().validPositions[h];for(n(!0),h=i+1;h<=o();){for(;void 0!==m().validPositions[i];)i++;var l=m().validPositions[i];if(i>h&&(h=i+1),void 0===m().validPositions[h]&&C(h)||void 0!==l)h++;else{var p=r(h);k===!1&&j[i]&&j[i].match.def===p.match.def?(m().validPositions[i]=a.extend(!0,{},j[i]),m().validPositions[i].input=p.input,delete m().validPositions[h],h++):t(i,p.match.def)?B(i,p.input||I(h),!0)!==!1&&(delete m().validPositions[h],h++,k=!0):C(h)||(h++,i--),i++}}n(!0)}function r(a,b,c){var d=m().validPositions[a];if(void 0===d)for(var e=v(a,b,c),f=o(),h=m().validPositions[f]||v(0)[0],i=void 0!==h.alternation?h.locator[h.alternation].toString().split(","):[],j=0;jf)&&-1!==f&&(d=b,e=f)}),d}function v(b,c,d){function e(c,d,f,h){function j(f,h,o){function p(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){return e.isQuantifier===!0&&(d=p(b,c.matches[a-1]))?!1:void 0}),d}function q(a,b){var c=u(a,b);return c?c.locator.slice(c.alternation+1):[]}if(i>1e4)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. "+m().mask;if(i===b&&void 0===f.matches)return k.push({match:f,locator:h.reverse(),cd:n}),!0;if(void 0!==f.matches){if(f.isGroup&&o!==f){if(f=j(c.matches[a.inArray(f,c.matches)+1],h))return!0}else if(f.isOptional){var r=f;if(f=e(f,d,h,o)){if(g=k[k.length-1].match,!p(g,r))return!0;l=!0,i=b}}else if(f.isAlternator){var s,t=f,v=[],w=k.slice(),x=h.length,y=d.length>0?d.shift():-1;if(-1===y||"string"==typeof y){var z,A=i,B=d.slice(),C=[];if("string"==typeof y)C=y.split(",");else for(z=0;zE&&(f=j(c.matches[E],[E].concat(h.slice(1,h.length)),o),f&&(C.push(E.toString()),a.each(k,function(a,b){b.alternation=h.length-1})))}s=k.slice(),i=A,k=[];for(var F=0;F0}else f=j(t.matches[y]||c.matches[y],[y].concat(h),o);if(f)return!0}else if(f.isQuantifier&&o!==c.matches[a.inArray(f,c.matches)-1])for(var K=f,L=d.length>0?d.shift():0;L<(isNaN(K.quantifier.max)?L+1:K.quantifier.max)&&b>=i;L++){var M=c.matches[a.inArray(K,c.matches)-1];if(f=j(M,[L].concat(h),M)){if(g=k[k.length-1].match,g.optionalQuantifier=L>K.quantifier.min-1,p(g,M)){if(L>K.quantifier.min-1){l=!0,i=b;break}return!0}return!0}}else if(f=e(f,d,h,o))return!0}else i++}for(var o=d.length>0?d.shift():0;ob)break}}function f(b){var c=[];return a.isArray(b)||(b=[b]),void 0===b[0].alternation?c=b[0].locator.slice():a.each(b,function(a,b){if(""!==b.def)if(0===c.length)c=b.locator.slice();else for(var d=0;d-1){if(void 0===c){for(var o,p=b-1;void 0===(o=m().validPositions[p]||m().tests[p])&&p>-1;)p--;void 0!==o&&p>-1&&(j=f(o),n=j.join(""),i=p)}if(m().tests[b]&&m().tests[b][0].cd===n)return m().tests[b];for(var q=j.shift();qb)break}}return(0===k.length||l)&&k.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]}),m().tests[b]=a.extend(!0,[],k),m().tests[b]}function w(){return void 0===m()._buffer&&(m()._buffer=i(!1,1)),m()._buffer}function x(a){if(void 0===m().buffer||a===!0){if(a===!0)for(var b in m().tests)void 0===m().validPositions[b]&&delete m().tests[b];m().buffer=i(!0,o(),!0)}return m().buffer}function y(a,b,c){var d;if(c=c,a===!0)n(),a=0,b=c.length;else for(d=a;b>d;d++)delete m().validPositions[d],delete m().tests[d];for(d=a;b>d;d++)n(!0),c[d]!==g.skipOptionalPartCharacter&&B(d,c[d],!0,!0)}function z(a,b){switch(b.casing){case"upper":a=a.toUpperCase();break;case"lower":a=a.toLowerCase()}return a}function A(b,c){for(var d=g.greedy?c:c.slice(0,1),e=!1,f=0;f1||a.begin-a.end===1&&g.insertMode:a.end-a.begin>1||a.end-a.begin===1&&g.insertMode}function i(b,d,e,f){var i=!1;return a.each(v(b),function(j,k){for(var l=k.match,r=d?1:0,s="",t=l.cardinality;t>r;t--)s+=G(b-(t-1));if(d&&(s+=d),x(!0),i=null!=l.fn?l.fn.test(s,m(),b,e,g,h(c)):d!==l.def&&d!==g.skipOptionalPartCharacter||""===l.def?!1:{c:l.placeholder||l.def,pos:b},i!==!1){var u=void 0!==i.c?i.c:d;u=u===g.skipOptionalPartCharacter&&null===l.fn?l.placeholder||l.def:u;var v=b,w=x();if(void 0!==i.remove&&(a.isArray(i.remove)||(i.remove=[i.remove]),a.each(i.remove.sort(function(a,b){return b-a}),function(a,b){q(b,b+1,!0)})),void 0!==i.insert&&(a.isArray(i.insert)||(i.insert=[i.insert]),a.each(i.insert.sort(function(a,b){return a-b}),function(a,b){B(b.pos,b.c,!1,f)})),i.refreshFromBuffer){var A=i.refreshFromBuffer;if(e=!0,y(A===!0?A:A.start,A.end,w),void 0===i.pos&&void 0===i.c)return i.pos=o(),!1;if(v=void 0!==i.pos?i.pos:b,v!==b)return i=a.extend(i,B(v,u,!0,f)),!1}else if(i!==!0&&void 0!==i.pos&&i.pos!==b&&(v=i.pos,y(b,v,x().slice()),v!==b))return i=a.extend(i,B(v,u,!0)),!1;return i!==!0&&void 0===i.pos&&void 0===i.c?!1:(j>0&&n(!0),p(v,a.extend({},k,{input:z(u,l)}),f,h(c))||(i=!1),!1)}}),i}function j(b,c,d,e){for(var f,h,i,j,k,l,p=a.extend(!0,{},m().validPositions),q=a.extend(!0,{},m().tests),s=o();s>=0&&(j=m().validPositions[s],!j||void 0===j.alternation||(f=s,h=m().validPositions[f].alternation,r(f).locator[j.alternation]===j.locator[j.alternation]));s--);if(void 0!==h){f=parseInt(f);for(var t in m().validPositions)if(t=parseInt(t),j=m().validPositions[t],t>=f&&void 0!==j.alternation){var v;0===f?(v=[],a.each(m().tests[f],function(a,b){void 0!==b.locator[h]&&(v=v.concat(b.locator[h].toString().split(",")))})):v=m().validPositions[f].locator[h].toString().split(",");var w=void 0!==j.locator[h]?j.locator[h]:v[0];w.length>0&&(w=w.split(",")[0]);for(var x=0;x=0;E--)if(C=m().validPositions[E],void 0!==C){var F=u(E,v[x]);m().validPositions[E].match.def!==F.match.def&&(y.push(m().validPositions[E].input),m().validPositions[E]=F,m().validPositions[E].input=I(E),null===m().validPositions[E].match.fn&&A++,C=F),D=C.locator[h],C.locator[h]=parseInt(v[x]);break}if(w!==C.locator[h]){for(k=t+1;kk&&z++,delete m().validPositions[k],delete m().tests[k];for(n(!0),g.keepStatic=!g.keepStatic,i=!0;y.length>0;){var G=y.shift();if(G!==g.skipOptionalPartCharacter&&!(i=B(o(void 0,!0)+1,G,!1,e)))break}if(C.alternation=h,C.locator[h]=D,i){var H=o(b)+1;for(k=t+1;kk&&A++;b+=A-z,i=B(b>H?H:b,c,d,e)}if(g.keepStatic=!g.keepStatic,i)return i;n(),m().validPositions=a.extend(!0,{},p),m().tests=a.extend(!0,{},q)}}}break}}return!1}function k(b,c){for(var d=m().validPositions[c],e=d.locator,f=e.length,g=b;c>g;g++)if(void 0===m().validPositions[g]&&!C(g,!0)){var h=v(g),i=h[0],j=-1;a.each(h,function(a,b){for(var c=0;f>c&&(void 0!==b.locator[c]&&A(b.locator[c].toString().split(","),e[c].toString().split(",")));c++)c>j&&(j=c,i=b)}),p(g,a.extend({},i,{input:i.match.placeholder||i.match.def}),!0)}}e=e===!0;var l=c;void 0!==c.begin&&(l=ja&&!h(c)?c.end:c.begin);for(var s=!1,t=a.extend(!0,{},m().validPositions),w=l-1;w>-1&&!m().validPositions[w];w--);var F;for(w++;l>w;w++)void 0===m().validPositions[w]&&(g.jitMasking===!1||g.jitMasking>w)&&((F=r(w)).match.def===g.radixPointDefinitionSymbol||!C(w,!0)||a.inArray(g.radixPoint,x())=K;K++)if(s=i(K,d,e,f),s!==!1){k(l,K),l=K;break}}}else s={caret:E(l)}}return s===!1&&g.keepStatic&&(s=j(l,d,e,f)),s===!0&&(s={pos:l}),a.isFunction(g.postValidation)&&s!==!1&&!e&&f!==!0&&(s=g.postValidation(x(!0),s,g)?s:!1),void 0===s.pos&&(s.pos=l),s===!1&&(n(!0),m().validPositions=a.extend(!0,{},t)),s}function C(a,b){var c;if(b?(c=r(a).match,""===c.def&&(c=s(a))):c=s(a),null!=c.fn)return c.fn;if(b!==!0&&a>-1&&!g.keepStatic&&void 0===m().validPositions[a]){var d=v(a);return d.length>2}return!1}function D(){var a;ha=void 0!==fa?fa.maxLength:void 0,-1===ha&&(ha=void 0);var b,c=o(),d=m().validPositions[c],e=void 0!==d?d.locator.slice():void 0;for(b=c+1;void 0===d||null!==d.match.fn||null===d.match.fn&&""!==d.match.def;b++)d=r(b,e,b-1),e=d.locator.slice();var f=s(b-1);return a=""!==f.def?b:b-1,void 0===ha||ha>a?a:ha}function E(a,b){var c=D();if(a>=c)return c;for(var d=a;++dd)););return d}function F(a,b){var c=a;if(0>=c)return 0;for(;--c>0&&(b===!0&&s(c).newBlockMarker!==!0||b!==!0&&!C(c)););return c}function G(a){return void 0===m().validPositions[a]?I(a):m().validPositions[a].input}function H(b,c,d,e,f){if(e&&a.isFunction(g.onBeforeWrite)){var h=g.onBeforeWrite(e,c,d,g);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;y(i===!0?i:i.start,i.end,h.buffer||c),c=x(!0)}void 0!==d&&(d=void 0!==h.caret?h.caret:d)}}b.inputmask._valueSet(c.join("")),void 0===d||void 0!==e&&"blur"===e.type||L(b,d),f===!0&&(la=!0,a(b).trigger("input"))}function I(a,b){if(b=b||s(a),void 0!==b.placeholder)return b.placeholder;if(null===b.fn){if(a>-1&&!g.keepStatic&&void 0===m().validPositions[a]){var c,d=v(a),e=[];if(d.length>2)for(var f=0;f1))return g.placeholder.charAt(a%g.placeholder.length)}return b.def}return g.placeholder.charAt(a%g.placeholder.length)}function J(c,d,e,f){function h(){var a=!1,b=w().slice(l,E(l)).join("").indexOf(k);if(-1!==b&&!C(l)){a=!0;for(var c=w().slice(l,l+b),d=0;d0&&(j.splice(0,q.length*p.length),l=E(l))}else l=E(l);a.each(j,function(b,d){if(void 0!==d){var f=new a.Event("keypress");f.which=d.charCodeAt(0),k+=d;var j=o(void 0,!0),p=m().validPositions[j],q=r(j+1,p?p.locator.slice():void 0,j);if(!h()||e||g.autoUnmask){var s=e?b:null==q.match.fn&&q.match.optionality&&j+1a.scrollWidth?h:0,j||g.insertMode!==!1||b!==c||c++,a.setSelectionRange)a.selectionStart=b,a.selectionEnd=c;else if(window.getSelection){if(f=document.createRange(),void 0===a.firstChild||null===a.firstChild){var i=document.createTextNode("");a.appendChild(i)}f.setStart(a.firstChild,bg&&(d=h[c],(d.match.optionality||d.match.optionalQuantifier||k&&(k!==h[c].locator[i.alternation]&&null!=d.match.fn||null===d.match.fn&&d.locator[i.alternation]&&A(d.locator[i.alternation].toString().split(","),k.toString().split(","))&&""!==v(c)[0].def))&&e[c]===I(c,d.match));c--)f--;return b?{l:f,def:h[f]?h[f].match:void 0}:f}function N(a){for(var b=M(),c=a.length-1;c>b&&!C(c);c--);return a.splice(b,c+1-b),a}function O(b){if(a.isFunction(g.isComplete))return g.isComplete(b,g);if("*"===g.repeat)return void 0;var c=!1,d=M(!0),e=F(d.l);if(void 0===d.def||d.def.newBlockMarker||d.def.optionality||d.def.optionalQuantifier){c=!0;for(var f=0;e>=f;f++){var h=r(f).match;if(null!==h.fn&&void 0===m().validPositions[f]&&h.optionality!==!0&&h.optionalQuantifier!==!0||null===h.fn&&b[f]!==I(f,h)){c=!1;break}}}return c}function P(b){function c(b){if(a.valHooks&&(void 0===a.valHooks[b]||a.valHooks[b].inputmaskpatch!==!0)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},d=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==o(void 0,void 0,a.inputmask.maskset.validPositions)||g.nullable!==!0?b:""}return c(a)},set:function(b,c){var e,f=a(b);return e=d(b,c),b.inputmask&&f.trigger("setvalue"),e},inputmaskpatch:!0}}}function d(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==o()||g.nullable!==!0?document.activeElement===this&&g.clearMaskOnLostFocus?(ja?N(x().slice()).reverse():N(x().slice())).join(""):h.call(this):"":h.call(this)}function e(b){i.call(this,b),this.inputmask&&a(this).trigger("setvalue")}function f(b){oa.on(b,"mouseenter",function(b){var c=a(this),d=this,e=d.inputmask._valueGet();e!==x().join("")&&c.trigger("setvalue")})}var h,i;if(!b.inputmask.__valueGet){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var j=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):void 0;j&&j.get&&j.set?(h=j.get,i=j.set,Object.defineProperty(b,"value",{get:d,set:e,configurable:!0})):"INPUT"!==b.tagName&&(h=function(){return this.textContent},i=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:d,set:e,configurable:!0}))}else document.__lookupGetter__&&b.__lookupGetter__("value")&&(h=b.__lookupGetter__("value"),i=b.__lookupSetter__("value"),b.__defineGetter__("value",d),b.__defineSetter__("value",e));b.inputmask.__valueGet=h,b.inputmask._valueGet=function(a){return ja&&a!==!0?h.call(this.el).split("").reverse().join(""):h.call(this.el)},b.inputmask.__valueSet=i,b.inputmask._valueSet=function(a,b){i.call(this.el,null===a||void 0===a?"":b!==!0&&ja?a.split("").reverse().join(""):a)},void 0===h&&(h=function(){return this.value},i=function(a){this.value=a},c(b.type),f(b))}}function Q(c,d,e,f){function h(){if(g.keepStatic){n(!0);var b,d=[],e=a.extend(!0,{},m().validPositions);for(b=o();b>=0;b--){var f=m().validPositions[b];if(f&&(null!=f.match.fn&&d.push(f.input),delete m().validPositions[b],void 0!==f.alternation&&f.locator[f.alternation]===r(b).locator[f.alternation]))break}if(b>-1)for(;d.length>0;){m().p=E(o());var h=new a.Event("keypress");h.which=d.pop().charCodeAt(0),S.call(c,h,!0,!1,!1,m().p)}else m().validPositions=a.extend(!0,{},e)}}if((g.numericInput||ja)&&(d===b.keyCode.BACKSPACE?d=b.keyCode.DELETE:d===b.keyCode.DELETE&&(d=b.keyCode.BACKSPACE),ja)){var i=e.end;e.end=e.begin,e.begin=i}d===b.keyCode.BACKSPACE&&(e.end-e.begin<1||g.insertMode===!1)?(e.begin=F(e.begin),void 0===m().validPositions[e.begin]||m().validPositions[e.begin].input!==g.groupSeparator&&m().validPositions[e.begin].input!==g.radixPoint||e.begin--):d===b.keyCode.DELETE&&e.begin===e.end&&(e.end=C(e.end)?e.end+1:E(e.end)+1,void 0===m().validPositions[e.begin]||m().validPositions[e.begin].input!==g.groupSeparator&&m().validPositions[e.begin].input!==g.radixPoint||e.end++),q(e.begin,e.end,!1,f),f!==!0&&h();var j=o(e.begin);j1||void 0!==s[r].alternation)?r+1:E(r)}m().p=l}if(e!==!1){var t=this;if(setTimeout(function(){g.onKeyValidation.call(t,k,q,g)},0),m().writeOutBuffer&&q!==!1){var u=x();H(i,u,g.numericInput&&void 0===q.caret?F(l):l,c,d!==!0),d!==!0&&setTimeout(function(){O(u)===!0&&j.trigger("complete")},0)}}if(g.showTooltip&&(i.title=g.tooltip||m().mask),c.preventDefault(),d)return q.forwardPosition=l,q}}function T(b){var c,d=this,e=b.originalEvent||b,f=a(d),h=d.inputmask._valueGet(!0),i=L(d);ja&&(c=i.end,i.end=i.begin,i.begin=c);var j=h.substr(0,i.begin),k=h.substr(i.end,h.length);j===(ja?w().reverse():w()).slice(0,i.begin).join("")&&(j=""),k===(ja?w().reverse():w()).slice(i.end).join("")&&(k=""),ja&&(c=j,j=k,k=c),window.clipboardData&&window.clipboardData.getData?h=j+window.clipboardData.getData("Text")+k:e.clipboardData&&e.clipboardData.getData&&(h=j+e.clipboardData.getData("text/plain")+k);var l=h;if(a.isFunction(g.onBeforePaste)){if(l=g.onBeforePaste(h,g),l===!1)return b.preventDefault();l||(l=h)}return J(d,!1,!1,ja?l.split("").reverse():l.toString().split("")),H(d,x(),E(o()),b,!0),O(x())===!0&&f.trigger("complete"),b.preventDefault()}function U(c){var d=this,e=d.inputmask._valueGet();if(x().join("")!==e){var f=L(d);if(e=e.replace(new RegExp("("+b.escapeRegex(w().join(""))+")*"),""),k){var g=e.replace(x().join(""),"");if(1===g.length){var h=new a.Event("keypress");return h.which=g.charCodeAt(0),S.call(d,h,!0,!0,!1,m().validPositions[f.begin-1]?f.begin:f.begin-1),!1}}if(f.begin>e.length&&(L(d,e.length),f=L(d)),x().length-e.length!==1||e.charAt(f.begin)===x()[f.begin]||e.charAt(f.begin+1)===x()[f.begin]||C(f.begin)){for(var i=o()+1,j=x().slice(i).join("");null===e.match(b.escapeRegex(j)+"$");)j=j.slice(1);e=e.replace(j,""),e=e.split(""),J(d,!0,!1,e),O(x())===!0&&a(d).trigger("complete")}else c.keyCode=b.keyCode.BACKSPACE,R.call(d,c);c.preventDefault()}}function V(b){var c=this,d=c.inputmask._valueGet();J(c,!0,!1,(a.isFunction(g.onBeforeMask)?g.onBeforeMask(d,g)||d:d).split("")),ea=x().join(""),(g.clearMaskOnLostFocus||g.clearIncomplete)&&c.inputmask._valueGet()===w().join("")&&c.inputmask._valueSet("")}function W(a){var b=this,c=b.inputmask._valueGet();g.showMaskOnFocus&&(!g.showMaskOnHover||g.showMaskOnHover&&""===c)?b.inputmask._valueGet()!==x().join("")&&H(b,x(),E(o())):na===!1&&L(b,E(o())),g.positionCaretOnTab===!0&&setTimeout(function(){ +L(b,E(o()))},0),ea=x().join("")}function X(a){var b=this;if(na=!1,g.clearMaskOnLostFocus&&document.activeElement!==b){var c=x().slice(),d=b.inputmask._valueGet();d!==b.getAttribute("placeholder")&&""!==d&&(-1===o()&&d===w().join("")?c=[]:N(c),H(b,c))}}function Y(b){function c(b){if(g.radixFocus&&""!==g.radixPoint){var c=m().validPositions;if(void 0===c[b]||c[b].input===I(b)){if(bd&&c[e].input!==I(e))return!1;return!0}}}return!1}var d=this;setTimeout(function(){if(document.activeElement===d){var b=L(d);if(b.begin===b.end)if(c(b.begin))L(d,g.numericInput?E(a.inArray(g.radixPoint,x())):a.inArray(g.radixPoint,x()));else{var e=b.begin,f=o(e,!0),h=E(f);if(h>e)L(d,C(e)||C(e-1)?e:E(e));else{var i=I(h);(""!==i&&x()[h]!==i||!C(h,!0)&&s(h).def===i)&&(h=E(h)),L(d,h)}}}},0)}function Z(a){var b=this;setTimeout(function(){L(b,0,E(o()))},0)}function $(c){var d=this,e=a(d),f=L(d),h=c.originalEvent||c,i=window.clipboardData||h.clipboardData,j=ja?x().slice(f.end,f.begin):x().slice(f.begin,f.end);i.setData("text",ja?j.reverse().join(""):j.join("")),document.execCommand&&document.execCommand("copy"),Q(d,b.keyCode.DELETE,f),H(d,x(),m().p,c,ea!==x().join("")),d.inputmask._valueGet()===w().join("")&&e.trigger("cleared"),g.showTooltip&&(d.title=g.tooltip||m().mask)}function _(b){var c=a(this),d=this;if(d.inputmask){var e=d.inputmask._valueGet(),f=x().slice();ea!==f.join("")&&setTimeout(function(){c.trigger("change"),ea=f.join("")},0),""!==e&&(g.clearMaskOnLostFocus&&(-1===o()&&e===w().join("")?f=[]:N(f)),O(f)===!1&&(setTimeout(function(){c.trigger("incomplete")},0),g.clearIncomplete&&(n(),f=g.clearMaskOnLostFocus?[]:w().slice())),H(d,f,void 0,b))}}function aa(a){var b=this;na=!0,document.activeElement!==b&&g.showMaskOnHover&&b.inputmask._valueGet()!==x().join("")&&H(b,x())}function ba(a){ea!==x().join("")&&ga.trigger("change"),g.clearMaskOnLostFocus&&-1===o()&&fa.inputmask._valueGet&&fa.inputmask._valueGet()===w().join("")&&fa.inputmask._valueSet(""),g.removeMaskOnSubmit&&(fa.inputmask._valueSet(fa.inputmask.unmaskedvalue(),!0),setTimeout(function(){H(fa,x())},0))}function ca(a){setTimeout(function(){ga.trigger("setvalue")},0)}function da(b){if(fa=b,ga=a(fa),g.showTooltip&&(fa.title=g.tooltip||m().mask),("rtl"===fa.dir||g.rightAlign)&&(fa.style.textAlign="right"),("rtl"===fa.dir||g.numericInput)&&(fa.dir="ltr",fa.removeAttribute("dir"),fa.inputmask.isRTL=!0,ja=!0),oa.off(fa),P(fa),d(fa,g)&&(oa.on(fa,"submit",ba),oa.on(fa,"reset",ca),oa.on(fa,"mouseenter",aa),oa.on(fa,"blur",_),oa.on(fa,"focus",W),oa.on(fa,"mouseleave",X),oa.on(fa,"click",Y),oa.on(fa,"dblclick",Z),oa.on(fa,"paste",T),oa.on(fa,"dragdrop",T),oa.on(fa,"drop",T),oa.on(fa,"cut",$),oa.on(fa,"complete",g.oncomplete),oa.on(fa,"incomplete",g.onincomplete),oa.on(fa,"cleared",g.oncleared),oa.on(fa,"keydown",R),oa.on(fa,"keypress",S),oa.on(fa,"input",U)),oa.on(fa,"setvalue",V),""!==fa.inputmask._valueGet()||g.clearMaskOnLostFocus===!1||document.activeElement===fa){var c=a.isFunction(g.onBeforeMask)?g.onBeforeMask(fa.inputmask._valueGet(),g)||fa.inputmask._valueGet():fa.inputmask._valueGet();J(fa,!0,!1,c.split(""));var e=x().slice();ea=e.join(""),O(e)===!1&&g.clearIncomplete&&n(),g.clearMaskOnLostFocus&&document.activeElement!==fa&&(-1===o()?e=[]:N(e)),H(fa,e),document.activeElement===fa&&L(fa,E(o()))}}var ea,fa,ga,ha,ia,ja=!1,ka=!1,la=!1,ma=!1,na=!0,oa={on:function(c,d,e){var f=function(c){if(void 0===this.inputmask&&"FORM"!==this.nodeName){var d=a.data(this,"_inputmask_opts");d?new b(d).mask(this):oa.off(this)}else{if("setvalue"===c.type||!(this.disabled||this.readOnly&&!("keydown"===c.type&&c.ctrlKey&&67===c.keyCode||g.tabThrough===!1&&c.keyCode===b.keyCode.TAB))){switch(c.type){case"input":if(la===!0)return la=!1,c.preventDefault();break;case"keydown":ka=!1,la=!1;break;case"keypress":if(ka===!0)return c.preventDefault();ka=!0;break;case"click":if(k){var f=this;return setTimeout(function(){e.apply(f,arguments)},0),!1}}var h=e.apply(this,arguments);return h===!1&&(c.preventDefault(),c.stopPropagation()),h}c.preventDefault()}};c.inputmask.events[d]=c.inputmask.events[d]||[],c.inputmask.events[d].push(f),-1!==a.inArray(d,["submit","reset"])?null!=c.form&&a(c.form).on(d,f):a(c).on(d,f)},off:function(b,c){if(b.inputmask&&b.inputmask.events){var d;c?(d=[],d[c]=b.inputmask.events[c]):d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!=b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]})}}};if(void 0!==e)switch(e.action){case"isComplete":return fa=e.el,O(x());case"unmaskedvalue":return fa=e.el,void 0!==fa&&void 0!==fa.inputmask?(f=fa.inputmask.maskset,g=fa.inputmask.opts,ja=fa.inputmask.isRTL):(ia=e.value,g.numericInput&&(ja=!0),ia=(a.isFunction(g.onBeforeMask)?g.onBeforeMask(ia,g)||ia:ia).split(""),J(void 0,!1,!1,ja?ia.reverse():ia),a.isFunction(g.onBeforeWrite)&&g.onBeforeWrite(void 0,x(),0,g)),K(fa);case"mask":fa=e.el,f=fa.inputmask.maskset,g=fa.inputmask.opts,ja=fa.inputmask.isRTL,ea=x().join(""),da(fa);break;case"format":return g.numericInput&&(ja=!0),ia=(a.isFunction(g.onBeforeMask)?g.onBeforeMask(e.value,g)||e.value:e.value).split(""),J(void 0,!1,!1,ja?ia.reverse():ia),a.isFunction(g.onBeforeWrite)&&g.onBeforeWrite(void 0,x(),0,g),e.metadata?{value:ja?x().slice().reverse().join(""):x().join(""),metadata:h({action:"getmetadata"},f,g)}:ja?x().slice().reverse().join(""):x().join("");case"isValid":g.numericInput&&(ja=!0),e.value?(ia=e.value.split(""),J(void 0,!1,!0,ja?ia.reverse():ia)):e.value=x().join("");for(var pa=x(),qa=M(),ra=pa.length-1;ra>qa&&!C(ra);ra--);return pa.splice(qa,ra+1-qa),O(pa)&&e.value===x().join("");case"getemptymask":return w().join("");case"remove":fa=e.el,ga=a(fa),f=fa.inputmask.maskset,g=fa.inputmask.opts,fa.inputmask._valueSet(K(fa)),oa.off(fa);var sa;Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?(sa=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(fa),"value"),sa&&fa.inputmask.__valueGet&&Object.defineProperty(fa,"value",{get:fa.inputmask.__valueGet,set:fa.inputmask.__valueSet,configurable:!0})):document.__lookupGetter__&&fa.__lookupGetter__("value")&&fa.inputmask.__valueGet&&(fa.__defineGetter__("value",fa.inputmask.__valueGet),fa.__defineSetter__("value",fa.inputmask.__valueSet)),fa.inputmask=void 0;break;case"getmetadata":if(a.isArray(f.metadata)){for(var ta,ua=o(void 0,!0),va=ua;va>=0;va--)if(m().validPositions[va]&&void 0!==m().validPositions[va].alternation){ta=m().validPositions[va].alternation;break}return void 0!==ta?f.metadata[m().validPositions[va].locator[ta]]:[]}return f.metadata}}b.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask(b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",showTooltip:!1,tooltip:void 0,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",radixFocus:!1,nojumps:!1,nojumpsThreshold:0,keepStatic:null,positionCaretOnTab:!1,tabThrough:!1,supportsInputType:["text","tel","password"],definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1}},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],isComplete:null,canClearPosition:a.noop,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0},masksCache:{},mask:function(c){var d=this;return"string"==typeof c&&(c=document.getElementById(c)||document.querySelectorAll(c)),c=c.nodeName?[c]:c,a.each(c,function(c,e){var i=a.extend(!0,{},d.opts);f(e,i,a.extend(!0,{},d.userOptions));var j=g(i,d.noMasksCache);void 0!==j&&(void 0!==e.inputmask&&e.inputmask.remove(),e.inputmask=new b,e.inputmask.opts=i,e.inputmask.noMasksCache=d.noMasksCache,e.inputmask.userOptions=a.extend(!0,{},d.userOptions),e.inputmask.el=e,e.inputmask.maskset=j,e.inputmask.isRTL=!1,a.data(e,"_inputmask_opts",i),h({action:"mask",el:e}))}),c&&c[0]?c[0].inputmask||this:this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"==typeof b?(a.extend(this.userOptions,b),this.el&&c!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return h({action:"unmaskedvalue",el:this.el,value:a},this.el&&this.el.inputmask?this.el.inputmask.maskset:g(this.opts,this.noMasksCache),this.opts)},remove:function(){return this.el?(h({action:"remove",el:this.el}),this.el.inputmask=void 0,this.el):void 0},getemptymask:function(){return h({action:"getemptymask"},this.maskset||g(this.opts,this.noMasksCache),this.opts)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return h({action:"isComplete",el:this.el},this.maskset||g(this.opts,this.noMasksCache),this.opts)},getmetadata:function(){return h({action:"getmetadata"},this.maskset||g(this.opts,this.noMasksCache),this.opts)},isValid:function(a){return h({action:"isValid",value:a},this.maskset||g(this.opts,this.noMasksCache),this.opts)},format:function(a,b){return h({action:"format",value:a,metadata:b},this.maskset||g(this.opts,this.noMasksCache),this.opts)}},b.extendDefaults=function(c){a.extend(!0,b.prototype.defaults,c)},b.extendDefinitions=function(c){a.extend(!0,b.prototype.defaults.definitions,c)},b.extendAliases=function(c){a.extend(!0,b.prototype.defaults.aliases,c)},b.format=function(a,c,d){return b(c).format(a,d)},b.unmask=function(a,c){return b(c).unmaskedvalue(a)},b.isValid=function(a,c){return b(c).isValid(a)},b.remove=function(b){a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},b.escapeRegex=function(a){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return a.replace(new RegExp("(\\"+b.join("|\\")+")","gim"),"\\$1")},b.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88};var i=navigator.userAgent,j=/mobile/i.test(i),k=/iemobile/i.test(i),l=/iphone/i.test(i)&&!k;/android.*safari.*/i.test(i)&&!k;return window.Inputmask=b,b}(ml_jQuery),function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return f&&f.inputmask?f.inputmask.hasMaskedValue():!1;case"isComplete":return f&&f.inputmask?f.inputmask.isComplete():!0;case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":a(f).val(d),f&&void 0!==f.inputmask&&a(f).triggerHandler("setvalue");break;case"option":if("string"!=typeof d)return this.each(function(){return void 0!==this.inputmask?this.inputmask.option(d):void 0});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==typeof c)return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){return void 0!==this.inputmask?this.inputmask.option(c):void e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){e=new b(d),e.mask(this)})}}),a.fn.inputmask}(ml_jQuery,Inputmask),function(a,b){return b.extendDefinitions({h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}}),b.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+c+"[01])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9])"+c+"(0[1-9]|1[012]))|(30"+c+"(0[13-9]|1[012]))|(31"+c+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,b,c){if(isNaN(a))return!1;var d=parseInt(a.concat(b.toString().slice(a.length))),e=parseInt(a.concat(c.toString().slice(a.length)));return(isNaN(d)?!1:d>=b&&c>=d)||(isNaN(e)?!1:e>=b&&c>=e)},determinebaseyear:function(a,b,c){var d=(new Date).getFullYear();if(a>d)return a;if(d>b){for(var e=b.toString().slice(0,2),f=b.toString().slice(2,4);e+c>b;)e--;var g=e+f;return a>g?a:g}if(d>=a&&b>=d){for(var h=d.toString().slice(0,2);h+c>b;)h--;var i=h+c;return a>i?a:i}return d},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getDate().toString()+(h.getMonth()+1).toString()+h.getFullYear().toString()),g.trigger("setvalue")}},getFrontValue:function(a,b,c){for(var d=0,e=0,f=0;fg?(b.buffer[c]=g.toString(),b.buffer[c-1]="0"):(b.buffer[c]=g.toString().charAt(1),b.buffer[c-1]=g.toString().charAt(0)),{refreshFromBuffer:{start:c-1,end:c+6},c:b.buffer[c]}}return f},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.hrspre.test(a);return d||f||!(f=e.regex.hrs.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.mspre.test(a);return d||f||!(f=e.regex.ms.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},t:{validator:function(a,b,c,d,e){return e.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val((h.getMonth()+1).toString()+h.getDate().toString()+h.getFullYear().toString()),g.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"[0-3])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+c+"30)|((0[1-6])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0}}),b}(ml_jQuery,Inputmask),function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),b.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)},cardinality:1}},onUnMask:function(a,b,c){return a}},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(a,b){return a=a.toLowerCase(),a.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(a,b,c){return a}},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b}(ml_jQuery,Inputmask),function(a,b){return b.extendAliases({numeric:{mask:function(a){function c(b){for(var c="",d=0;d1&&(a.placeholder=a.placeholder.charAt(0)),a.radixFocus=a.radixFocus&&""!==a.placeholder&&a.integerOptional===!0,a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",a.numericInput===!0&&(a.radixFocus=!1,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f=c(a.prefix);return f+="[+]",f+=a.integerOptional===!0?"~{1,"+a.integerDigits+"}":"~{"+a.integerDigits+"}",void 0!==a.digits&&(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.decimalProtect&&(a.radixPointDefinitionSymbol=":"),f+=a.digitsOptional?"["+(a.decimalProtect?":":a.radixPoint)+";{1,"+a.digits+"}]":(a.decimalProtect?":":a.radixPoint)+";{"+a.digits+"}"),f+="[-]",f+=c(a.suffix),a.greedy=!1,null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,"."))),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,"."))),f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,radixPoint:".",radixFocus:!0,groupSize:3,groupSeparator:"",autoGroup:!1,allowPlus:!0,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,postFormat:function(c,d,e){e.numericInput===!0&&(c=c.reverse(),isFinite(d)&&(d=c.join("").length-d-1));var f,g,h=!1;c.length>=e.suffix.length&&c.join("").indexOf(e.suffix)===c.length-e.suffix.length&&(c.length=c.length-e.suffix.length,h=!0),d=d>=c.length?c.length-1:d0&&e.autoGroup||-1!==l.indexOf(e.groupSeparator)){var n=b.escapeRegex(e.groupSeparator);i=0===l.indexOf(e.groupSeparator),l=l.replace(new RegExp(n,"g"),"");var o=l.split(e.radixPoint);if(l=""===e.radixPoint?l:o[0],l!==e.prefix+"?0"&&l.length>=e.groupSize+e.prefix.length)for(var p=new RegExp("([-+]?[\\d?]+)([\\d?]{"+e.groupSize+"})");p.test(l)&&""!==e.groupSeparator;)l=l.replace(p,"$1"+e.groupSeparator+"$2"),l=l.replace(e.groupSeparator+e.groupSeparator,e.groupSeparator);""!==e.radixPoint&&o.length>1&&(l+=e.radixPoint+o[1])}for(i=m!==l,c.length=l.length,f=0,g=l.length;g>f;f++)c[f]=l.charAt(f);var q=a.inArray("?",c);if(-1===q&&(q=a.inArray(j,c)),c[q]=j,!i&&h)for(f=0,g=e.suffix.length;g>f;f++)c.push(e.suffix.charAt(f));return q=e.numericInput&&isFinite(d)?c.join("").length-q-1:q,e.numericInput&&(c=c.reverse(),a.inArray(e.radixPoint,c)parseFloat(f.max)&&(k=Math.abs(f.max),j=f.max<0,h=void 0),i=k.toString().replace(".",f.radixPoint).split(""),isFinite(f.digits)){var m=a.inArray(f.radixPoint,i),n=a.inArray(f.radixPoint,h);-1===m&&(i.push(f.radixPoint),m=i.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional||void 0!==i[m+o]&&i[m+o]!==f.placeholder.charAt(0)?-1!==n&&void 0!==h[n+o]&&(i[m+o]=i[m+o]||h[n+o]):i[m+o]="0";i[i.length-1]===f.radixPoint&&delete i[i.length-1]}if(k.toString()!==i&&k.toString()+"."!==i||j)return!j||0===k&&"blur"===c.type||(i.unshift(f.negationSymbol.front),i.push(f.negationSymbol.back)),i=(f.prefix+i.join("")).split(""),f.numericInput&&(i=i.reverse()),g=f.postFormat(i,f.numericInput?e:e-1,f),g.buffer&&(g.refreshFromBuffer=g.buffer.join("")!==d.join("")),g}}return f.autoGroup?(g=f.postFormat(d,f.numericInput?e:e-1,f),g.caret=e<=f.prefix.length?g.pos:g.pos+1,g):void 0},regex:{integerPart:function(a){return new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},signHandler:function(a,b,c,d,e){if(!d&&e.allowMinus&&"-"===a||e.allowPlus&&"+"===a){var f=b.buffer.join("").match(e.regex.integerPart(e));if(f&&f[0].length>0)return b.buffer[f.index]===("-"===a?"+":e.negationSymbol.front)?"-"===a?""!==e.negationSymbol.back?{pos:f.index,c:e.negationSymbol.front,remove:f.index,caret:c,insert:{pos:b.buffer.length-e.suffix.length-1,c:e.negationSymbol.back}}:{pos:f.index,c:e.negationSymbol.front,remove:f.index,caret:c}:""!==e.negationSymbol.back?{pos:f.index,c:"+",remove:[f.index,b.buffer.length-e.suffix.length-1],caret:c}:{pos:f.index,c:"+",remove:f.index,caret:c}:b.buffer[f.index]===("-"===a?e.negationSymbol.front:"+")?"-"===a&&""!==e.negationSymbol.back?{remove:[f.index,b.buffer.length-e.suffix.length-1],caret:c-1}:{remove:f.index,caret:c-1}:"-"===a?""!==e.negationSymbol.back?{pos:f.index,c:e.negationSymbol.front,caret:c+1,insert:{pos:b.buffer.length-e.suffix.length,c:e.negationSymbol.back}}:{pos:f.index,c:e.negationSymbol.front,caret:c+1}:{pos:f.index,c:a,caret:c+1}}return!1},radixHandler:function(b,c,d,e,f){if(!e&&f.numericInput!==!0&&b===f.radixPoint&&void 0!==f.digits&&(isNaN(f.digits)||parseInt(f.digits)>0)){var g=a.inArray(f.radixPoint,c.buffer),h=c.buffer.join("").match(f.regex.integerPart(f));if(-1!==g&&c.validPositions[g])return c.validPositions[g-1]?{caret:g+1}:{pos:h.index,c:h[0],caret:g+1};if(!h||"0"===h[0]&&h.index+1!==d)return c.buffer[h?h.index:d]="0",{pos:(h?h.index:d)+1,c:f.radixPoint}}return!1},leadingZeroHandler:function(b,c,d,e,f,g){if(!e)if(f.numericInput===!0){var h=c.buffer.slice("").reverse(),i=h[f.prefix.length];if("0"===i&&void 0===c.validPositions[d-1])return{pos:d,remove:h.length-f.prefix.length-1}}else{var j=a.inArray(f.radixPoint,c.buffer),k=c.buffer.slice(0,-1!==j?j:void 0).join("").match(f.regex.integerNPart(f));if(k&&(-1===j||j>=d)){var l=-1===j?0:parseInt(c.buffer.slice(j+1).join(""));if(0===k[0].indexOf(""!==f.placeholder?f.placeholder.charAt(0):"0")&&(k.index+1===d||g!==!0&&0===l))return c.buffer.splice(k.index,1),{pos:k.index,remove:k.index};if("0"===b&&d<=k.index&&k[0]!==f.groupSeparator)return!1}}return!0},definitions:{"~":{validator:function(c,d,e,f,g,h){var i=g.signHandler(c,d,e,f,g);if(!i&&(i=g.radixHandler(c,d,e,f,g),!i&&(i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(c):new RegExp("[0-9]").test(c),i===!0&&(i=g.leadingZeroHandler(c,d,e,f,g,h),i===!0)))){var j=a.inArray(g.radixPoint,d.buffer);i=-1!==j&&(g.digitsOptional===!1||d.validPositions[e])&&g.numericInput!==!0&&e>j&&!f?{ +pos:e,remove:e}:{pos:e}}return i},cardinality:1},"+":{validator:function(a,b,c,d,e){var f=e.signHandler(a,b,c,d,e);return!f&&(d&&e.allowMinus&&a===e.negationSymbol.front||e.allowMinus&&"-"===a||e.allowPlus&&"+"===a)&&(f=d||"-"!==a?!0:""!==e.negationSymbol.back?{pos:c,c:"-"===a?e.negationSymbol.front:"+",caret:c+1,insert:{pos:b.buffer.length,c:e.negationSymbol.back}}:{pos:c,c:"-"===a?e.negationSymbol.front:"+",caret:c+1}),f},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){var f=e.signHandler(a,b,c,d,e);return!f&&d&&e.allowMinus&&a===e.negationSymbol.back&&(f=!0),f},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g=f.signHandler(a,c,d,e,f);if(!g){var h="["+b.escapeRegex(f.radixPoint)+"]";g=new RegExp(h).test(a),g&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(g={caret:d+1})}return g?{c:f.radixPoint}:g},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){var e=a.replace(d.prefix,"");return e=e.replace(d.suffix,""),e=e.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),Number(e)):e},isComplete:function(a,c){var d=a.join(""),e=a.slice();if(c.postFormat(e,0,c),e.join("")!==d)return!1;var f=d.replace(c.prefix,"");return f=f.replace(c.suffix,""),f=f.replace(new RegExp(b.escapeRegex(c.groupSeparator),"g"),""),","===c.radixPoint&&(f=f.replace(b.escapeRegex(c.radixPoint),".")),isFinite(f)},onBeforeMask:function(a,c){if(""!==c.radixPoint&&isFinite(a))a=a.toString().replace(".",c.radixPoint);else{var d=a.match(/,/g),e=a.match(/\./g);e&&d?e.length>d.length?(a=a.replace(/\./g,""),a=a.replace(",",c.radixPoint)):d.length>e.length?(a=a.replace(/,/g,""),a=a.replace(".",c.radixPoint)):a=a.indexOf(".")1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c}},phonebe:{alias:"phone",url:"phone-codes/phone-be.js",countrycode:"32",nojumpsThreshold:4}}),b}(ml_jQuery,Inputmask),function(a,b){return b.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\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,quantifierFilter:/[0-9]+[^,]/,isComplete:function(a,b){return new RegExp(b.regex).test(a.join(""))},definitions:{r:{validator:function(b,c,d,e,f){function g(a,b){this.matches=[],this.isGroup=a||!1,this.isQuantifier=b||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function h(){var a,b,c=new g,d=[];for(f.regexTokens=[];a=f.tokenizer.exec(f.regex);)switch(b=a[0],b.charAt(0)){case"(":d.push(new g(!0));break;case")":k=d.pop(),d.length>0?d[d.length-1].matches.push(k):c.matches.push(k);break;case"{":case"+":case"*":var e=new g(!1,!0);b=b.replace(/[{}]/g,"");var h=b.split(","),i=isNaN(h[0])?h[0]:parseInt(h[0]),j=1===h.length?i:isNaN(h[1])?h[1]:parseInt(h[1]);if(e.quantifier={min:i,max:j},d.length>0){var l=d[d.length-1].matches;a=l.pop(),a.isGroup||(k=new g(!0),k.matches.push(a),a=k),l.push(a),l.push(e)}else a=c.matches.pop(),a.isGroup||(k=new g(!0),k.matches.push(a),a=k),c.matches.push(a),c.matches.push(e);break;default:d.length>0?d[d.length-1].matches.push(b):c.matches.push(b)}c.matches.length>0&&f.regexTokens.push(c)}function i(b,c){var d=!1;c&&(m+="(",o++);for(var e=0;em.length&&!(d=i(h,!0)););d=d||i(h,!0),d&&(f.repeaterPart=m),m=k+f.quantifier.max}else{for(var l=0,n=f.quantifier.max-1;n>l&&!(d=i(h,!0));l++);m=k+"{"+f.quantifier.min+","+f.quantifier.max+"}"}}else if(void 0!==f.matches)for(var p=0;pr;r++)q+=")";var s=new RegExp("^("+q+")$");d=s.test(j)}else for(var t=0,u=f.length;u>t;t++)if("\\"!==f.charAt(t)){q=m,q+=f.substr(0,t+1),q=q.replace(/\|$/,"");for(var r=0;o>r;r++)q+=")";var s=new RegExp("^("+q+")$");if(d=s.test(j))break}m+=f}if(d)break}return c&&(m+=")",o--),d}var j,k,l=c.buffer.slice(),m="",n=!1,o=0;null===f.regexTokens&&h(),l.splice(d,0,b),j=l.join("");for(var p=0;p{var r=n("Oyie"),i;i=function(){var t,e,n;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,(function(t){var n=e[s][1][t];return i(n||t)}),u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}s.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},s.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout((function(){t(e)}),0);else try{this._schedule((function(){t(e)}))}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=function(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()},s.prototype.invoke=function(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()},s.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},s.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},e.exports=s,e.exports.firstLineError=r},{"./queue":26,"./schedule":29}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";var i;void 0!==r&&(i=r);var o=t("./promise")();o.noConflict=function(){try{r===o&&(r=i)}catch(t){}return o},e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){var n=t("./util"),r=n.canEvaluate;function i(t){var r=function(t,r){var i;if(null!=t&&(i=t[r]),"function"!=typeof i){var o="Object "+n.classString(t)+" has no method '"+n.toString(r)+"'";throw new e.TypeError(o)}return i}(t,this.pop());return r.apply(t,this)}function o(t){return t[this]}function s(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}n.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(i,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=s;else if(r){var n=(void 0)(t);e=null!==n?n:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0)return n[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},r.CapturedTrace=null,r.create=function(){if(e)return new r},r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;r.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,e=!1},e=!0,t.prototype._pushContext=r.prototype._pushContext,t.prototype._popContext=r.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},r}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o,s,a,c,l=e._async,u=t("./errors").Warning,p=t("./util"),h=t("./es5"),f=p.canAttachTrace,_=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,d=/\((?:timers\.js):\d+:\d+\)/,v=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,g=null,m=!1,b=!(0==p.env("BLUEBIRD_DEBUG")),w=!(0==p.env("BLUEBIRD_WARNINGS")||!b&&!p.env("BLUEBIRD_WARNINGS")),C=!(0==p.env("BLUEBIRD_LONG_STACK_TRACES")||!b&&!p.env("BLUEBIRD_LONG_STACK_TRACES")),j=0!=p.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!p.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var t=[];function n(){for(var e=0;e0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return q(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var n=e._getContext();s=p.contextBind(n,t)},e.onUnhandledRejectionHandled=function(t){var n=e._getContext();o=p.contextBind(n,t)};var k=function(){};e.longStackTraces=function(){if(l.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!et.longStackTraces&&W()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;et.longStackTraces=!0,k=function(){if(l.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),et.longStackTraces=!1},e.prototype._captureStackTrace=U,e.prototype._attachExtraTrace=B,e.prototype._dereferenceTrace=M,n.activateLongStackTraces()}},e.hasLongStackTraces=function(){return et.longStackTraces&&W()};var E={unhandledrejection:{before:function(){var t=p.global.onunhandledrejection;return p.global.onunhandledrejection=null,t},after:function(t){p.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=p.global.onrejectionhandled;return p.global.onrejectionhandled=null,t},after:function(t){p.global.onrejectionhandled=t}}},F=function(){var t=function(t,e){if(!t)return!p.global.dispatchEvent(e);var n;try{return n=t.before(),!p.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return p.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new CustomEvent(e,{detail:n,cancelable:!0});return h.defineProperty(r,"promise",{value:n.promise}),h.defineProperty(r,"reason",{value:n.reason}),t(E[e],r)}}return"function"==typeof Event?(e=new Event("CustomEvent"),p.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,h.defineProperty(r,"promise",{value:n.promise}),h.defineProperty(r,"reason",{value:n.reason}),t(E[e],r)}):((e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),p.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(E[e],r)})}catch(t){}return function(){return!1}}(),x=p.isNode?function(){return process.emit.apply(process,arguments)}:p.global?function(t){var e="on"+t.toLowerCase(),n=p.global[e];return!!n&&(n.apply(p.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function T(t,e){return{promise:e}}var R={promiseCreated:T,promiseFulfilled:T,promiseRejected:T,promiseResolved:T,promiseCancelled:T,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:T},P=function(t){var e=!1;try{e=x.apply(null,arguments)}catch(t){l.throwLater(t),e=!0}var n=!1;try{n=F(t,R[t].apply(null,arguments))}catch(t){l.throwLater(t),n=!0}return n||e};function S(){return!1}function O(t,e,n){var r=this;try{t(e,n,(function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+p.toString(t));r._attachCancellationCallback(t)}))}catch(t){return t}}function A(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?p.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function H(){return this._onCancelField}function V(t){this._onCancelField=t}function D(){this._cancellationParent=void 0,this._onCancelField=void 0}function I(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&k()),"warnings"in t){var n=t.warnings;et.warnings=!!n,j=et.warnings,p.isObject(n)&&"wForgottenReturn"in n&&(j=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!et.cancellation){if(l.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=D,e.prototype._propagateFrom=I,e.prototype._onCancel=H,e.prototype._setOnCancel=V,e.prototype._attachCancellationCallback=A,e.prototype._execute=O,L=I,et.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!et.monitoring?(et.monitoring=!0,e.prototype._fireEvent=P):!t.monitoring&&et.monitoring&&(et.monitoring=!1,e.prototype._fireEvent=S)),"asyncHooks"in t&&p.nodeSupportsAsyncResource){var o=et.asyncHooks,s=!!t.asyncHooks;o!==s&&(et.asyncHooks=s,s?r():i())}return e},e.prototype._fireEvent=S,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var L=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function N(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function U(){this._trace=new Z(this._peekContext())}function B(t,e){if(f(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=Q(t);p.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),p.notEnumerableProp(t,"__stackCleaned__",!0)}}}function M(){this._trace=void 0}function q(t,n,r){if(et.warnings){var i,o=new u(t);if(n)r._attachExtraTrace(o);else if(et.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=Q(o);o.stack=s.message+"\n"+s.stack.join("\n")}P("warning",o)||G(o,"",!0)}}function $(t){for(var e=[],n=0;n0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:$(e)}}function G(t,e,n){if("undefined"!=typeof console){var r;if(p.isObject(t)){var i=t.stack;r=e+g(i,t)}else r=e+String(t);"function"==typeof a?a(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function z(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){l.throwLater(t)}"unhandledRejection"===t?P(t,n,r)||i||G(n,"Unhandled rejection "):P(t,r)}function X(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():p.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){var e=41;return t.length, no stack trace)"}function W(){return"function"==typeof tt}var K=function(){return!1},J=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Y(t){var e=t.match(J);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function Z(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);tt(this,Z),e>32&&this.uncycle()}p.inherits(Z,Error),n.CapturedTrace=Z,Z.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;for(r=(t=this._length=r)-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(r=0;r0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var a=r>0?e[r-1]:this;s=0;--l)e[l]._length=c,c++;return}}}},Z.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Q(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push($(i.stack.split("\n"))),i=i._parent;!function(t){for(var e=t[0],n=1;n=0;--a)if(r[a]===o){s=a;break}for(a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}(r),function(t){for(var e=0;e=0)return y=/@/,g=e,m=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){r="stack"in t}return!("stack"in i)&&r&&"number"==typeof Error.stackTraceLimit?(y=t,g=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}):(g=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?X(e):e.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(t){console.warn(t)},p.isNode&&process.stderr.isTTY?a=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:p.isNode||"string"!=typeof(new Error).stack||(a=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var et={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return C&&e.longStackTraces(),{asyncHooks:function(){return et.asyncHooks},longStackTraces:function(){return et.longStackTraces},warnings:function(){return et.warnings},cancellation:function(){return et.cancellation},monitoring:function(){return et.monitoring},propagateFromFunction:function(){return L},boundValueFunction:function(){return N},checkForgottenReturns:function(t,e,n,r,i){if(void 0===t&&null!==e&&j){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=$(a),l=c.length-1;l>=0;--l){var u=c[l];if(!d.test(u)){var p=u.match(v);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0){var h=c[0];for(l=0;l0&&(s="\n"+a[l-1]);break}}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}},setBounds:function(t,e){if(W()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,c=0;c=a||(K=function(t){if(_.test(t))return!0;var e=Y(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}},warn:q,deprecated:function(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),q(n)},CapturedTrace:Z,fireDomEvent:F,fireGlobalEvent:x}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.reduce,r=t.all;function i(){return r(this)}t.prototype.each=function(t){return n(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return n(this,t,e,e)},t.each=function(t,r){return n(t,r,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,r){return n(t,r,e,e)}}},{}],12:[function(t,e,n){"use strict";var r,i,o=t("./es5"),s=o.freeze,a=t("./util"),c=a.inherits,l=a.notEnumerableProp;function u(t,e){function n(r){if(!(this instanceof n))return new n(r);l(this,"message","string"==typeof r?r:e),l(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(n,Error),n}var p=u("Warning","warning"),h=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),_=u("AggregateError","aggregate error");try{r=TypeError,i=RangeError}catch(t){r=u("TypeError","type error"),i=u("RangeError","range error")}for(var d="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function p(){return f.call(this,this.promise._target()._settledValue())}function h(t){if(!u(this,t))return s.e=t,s}function f(t){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),t);if(c===r)return c;if(void 0!==c){i._setReturnedNonUndefined();var f=n(c,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new o("late cancellation observer");return i._attachExtraTrace(_),s.e=_,s}f.isPending()&&f._attachCancellationCallback(new l(this))}return f._then(p,h,void 0,this,void 0)}}}return i.isRejected()?(u(this),s.e=t,s):(u(this),t)}return c.prototype.isFinallyHandler=function(){return 0===this.type},l.prototype._resultCancelled=function(){u(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new c(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,f,f)},e.prototype.tap=function(t){return this._passThrough(t,1,f)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,f);var r,o=new Array(n-1),s=0;for(r=0;r0&&"function"==typeof arguments[e]&&(t=arguments[e]);var r=[].slice.call(arguments);t&&r.pop();var i=new n(r).promise();return void 0!==t?i.spread(t):i}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util"),c=a.tryCatch,l=a.errorObj,u=e._async;function p(t,n,r,i){this.constructor$(t),this._promise._captureStackTrace();var s=e._getContext();if(this._callback=a.contextBind(s,n),this._preservedValues=i===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],u.invoke(this._asyncInit,this,void 0),a.isArray(t))for(var c=0;c=1?s:0,o).promise()}a.inherits(p,n),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(n<0){if(r[n=-1*n-1]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var p=this._promise,h=this._callback,f=p._boundValue();p._pushContext();var _=c(h).call(f,t,n,o),d=p._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",p),_===l)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}return++this._totalResolved>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},p.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];r=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else r=a(t)();var p=c._popContext();return o.checkForgottenReturns(r,p,"Promise.try",c),c._resolveFromSyncValue(r),c},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";var r=t("./util"),i=r.maybeWrapAsError,o=t("./errors").OperationalError,s=t("./es5"),a=/^(?:name|message|stack|cause)$/;function c(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var n=s.keys(t),i=0;i1){var n,r=new Array(e-1),o=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+a.classString(t);arguments.length>1&&(n+=", "+a.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},O.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},O.prototype.spread=function(t){return"function"!=typeof t?i("expecting a function but got "+a.classString(t)):this.all()._then(t,void 0,void 0,b,void 0)},O.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},O.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new j(this).promise()},O.prototype.error=function(t){return this.caught(a.originatesFromRejection,t)},O.getNewLibraryCopy=e.exports,O.is=function(t){return t instanceof O},O.fromNode=O.fromCallback=function(t){var e=new O(m);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=S(t)(R(e,n));return r===P&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},O.all=function(t){return new j(t).promise()},O.cast=function(t){var e=C(t);return e instanceof O||((e=new O(m))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},O.resolve=O.fulfilled=O.cast,O.reject=O.rejected=function(t){var e=new O(m);return e._captureStackTrace(),e._rejectCallback(t,!0),e},O.setScheduler=function(t){if("function"!=typeof t)throw new y("expecting a function but got "+a.classString(t));return d.setScheduler(t)},O.prototype._then=function(t,e,n,r,i){var o=void 0!==i,s=o?i:new O(m),c=this._target(),l=c._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var u=h();if(0!=(50397184&l)){var p,f,_=c._settlePromiseCtx;0!=(33554432&l)?(f=c._rejectionHandler0,p=t):0!=(16777216&l)?(f=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(_=c._settlePromiseLateCancellationObserver,f=new g("late cancellation observer"),c._attachExtraTrace(f),p=e),d.invoke(_,c,{handler:a.contextBind(u,p),promise:s,receiver:r,value:f})}else c._addCallbacks(t,e,s,r,u);return s},O.prototype._length=function(){return 65535&this._bitField},O.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},O.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},O.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},O.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},O.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},O.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},O.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},O.prototype._isFinal=function(){return(4194304&this._bitField)>0},O.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},O.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},O.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},O.prototype._setAsyncGuaranteed=function(){if(!d.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},O.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},O.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==s)return void 0===e&&this._isBound()?this._boundValue():e},O.prototype._promiseAt=function(t){return this[4*t-4+2]},O.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},O.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},O.prototype._boundValue=function(){},O.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=s),this._addCallbacks(e,n,r,i,null)},O.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=s),this._addCallbacks(n,r,i,o,null)},O.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=a.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=a.contextBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=a.contextBind(i,t)),"function"==typeof e&&(this[s+1]=a.contextBind(i,e))}return this._setLength(o+1),o},O.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},O.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=C(t,this);if(!(r instanceof O))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():d.settlePromises(this),this._dereferenceTrace())}},O.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return d.fatalError(t,a.isNode);(65535&e)>0?d.settlePromises(this):this._ensurePossibleRejectionHandled()}},O.prototype._fulfillPromises=function(t,e){for(var n=1;n0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},O.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&f.defineProperty(O.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),O.defer=O.pending=function(){return F.deprecated("Promise.defer","new Promise"),{promise:new O(m),resolve:A,reject:H}},a.notEnumerableProp(O,"_makeSelfResolutionError",n),t("./method")(O,m,C,i,F),t("./bind")(O,m,C,F),t("./cancel")(O,j,i,F),t("./direct_resolve")(O),t("./synchronous_inspection")(O),t("./join")(O,j,C,m,d),O.Promise=O,O.version="3.7.2",t("./call_get.js")(O),t("./generators.js")(O,i,m,C,o,F),t("./map.js")(O,j,i,C,m,F),t("./nodeify.js")(O),t("./promisify.js")(O,m),t("./props.js")(O,j,C,i),t("./race.js")(O,m,C,i),t("./reduce.js")(O,j,i,C,m,F),t("./settle.js")(O,j,F),t("./some.js")(O,j,i),t("./timers.js")(O,m,F),t("./using.js")(O,i,C,E,m,F),t("./any.js")(O),t("./each.js")(O,m),t("./filter.js")(O,m),a.toFastProperties(O),a.toFastProperties(O.prototype),V({a:1}),V({b:2}),V({c:3}),V(1),V((function(){})),V(void 0),V(!1),V(new O(m)),F.setBounds(_.firstLineError,a.lastLineError),O}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util");function a(t){var r=this._promise=new e(n);t instanceof e&&(r._propagateFrom(t,3),t.suppressUnhandledRejections()),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(n,o){var a=r(this._values,this._promise);if(a instanceof e){var c=(a=a._target())._bitField;if(this._values=a,0==(50397184&c))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var l=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(l,!1)}},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;a=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=function(t){for(var e=new o,n=t.length/2|0,r=0;r>1},e.prototype.props=function(){return p(this)},e.props=function(t){return p(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t){this._capacity=t,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var n=new i;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},o.prototype._promiseRejected=function(t,e){var n=new i;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new o(t).promise()},e.allSettled=function(t){return new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){var i=t("./util"),o=t("./errors").RangeError,s=t("./errors").AggregateError,a=i.isArray,c={};function l(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new l(t),i=n.promise();return n.setHowMany(e),n.init(),i}i.inherits(l,n),l.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},l.prototype.init=function(){this._initialized=!0,this._init()},l.prototype.setUnwrap=function(){this._unwrap=!0},l.prototype.howMany=function(){return this._howMany},l.prototype.setHowMany=function(t){this._howMany=t},l.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},l.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},l.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},l.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},l.prototype._fulfilled=function(){return this._totalResolved},l.prototype._rejected=function(){return this._values.length-this.length()},l.prototype._addRejected=function(t){this._values.push(t)},l.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},l.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},l.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},l.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return u(t,e)},e.prototype.some=function(t){return u(this,t)},e._SomePromiseArray=l}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){var r=t("./util"),i=r.errorObj,o=r.isObject,s={}.hasOwnProperty;return function(t,a){if(o(t)){if(t instanceof e)return t;var c=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(t);if(c===i){a&&a._pushContext();var l=e.reject(c.e);return a&&a._popContext(),l}if("function"==typeof c)return function(t){try{return s.call(t,"_promise0")}catch(t){return!1}}(t)?(l=new e(n),t._then(l._fulfill,l._reject,void 0,l,null),l):function(t,o,s){var a=new e(n),c=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var l=!0,u=r.tryCatch(o).call(t,p,h);function p(t){a&&(a._resolveCallback(t),a=null)}function h(t){a&&(a._rejectCallback(t,l,!0),a=null)}return l=!1,a&&u===i&&(a._rejectCallback(u.e,!0,!0),a=null),c}(t,c,a)}return t}}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){var i=t("./util"),o=e.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,i){var o,c;return void 0!==i?(o=e.resolve(i)._then(a,null,null,t,void 0),r.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(n),c=setTimeout((function(){o._fulfill()}),+t),r.cancellation()&&o._setOnCancel(new s(c)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};function l(t){return clearTimeout(this.handle),t}function u(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return c(t,this)},e.prototype.timeout=function(t,e){var n,a;t=+t;var c=new s(setTimeout((function(){n.isPending()&&function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()}(n,e,a)}),t));return r.cancellation()?(a=this.then(),(n=a._then(l,u,void 0,c,void 0))._setOnCancel(c)):n=this._then(l,u,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util"),c=t("./errors").TypeError,l=t("./util").inherits,u=a.errorObj,p=a.tryCatch,h={};function f(t){setTimeout((function(){throw t}),0)}function _(t,n){var i=0,s=t.length,a=new e(o);return function o(){if(i>=s)return a._fulfill();var c=function(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[i++]);if(c instanceof e&&c._isDisposable()){try{c=r(c._getDisposer().tryDispose(n),t.promise)}catch(t){return f(t)}if(c instanceof e)return c._then(o,f,null,null,null)}o()}(),a}function d(t,e,n){this._data=t,this._promise=e,this._context=n}function v(t,e,n){this.constructor$(t,e,n)}function y(t){return d.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function g(t){this.length=t,this.promise=null,this[t-1]=null}d.prototype.data=function(){return this._data},d.prototype.promise=function(){return this._promise},d.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},d.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==h?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},d.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},l(v,d),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},g.prototype._resultCancelled=function(){for(var t=this.length,n=0;n0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,i());throw new c}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";var i=t("./es5"),o="undefined"==typeof navigator,s={e:{}},a,c="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function l(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function u(t){return a=t,l}var p=function(t,e){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=t,this.constructor$=e,e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}return r.prototype=e.prototype,t.prototype=new r,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function f(t){return"function"==typeof t||"object"==typeof t&&null!==t}function _(t){return h(t)?new Error(F(t)):t}function d(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;n1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=b.test(t+"")&&i.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function C(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.foo}return r(),r(),t}var j=/^[a-z$_][a-z$_0-9]*$/i;function k(t){return j.test(t)}function E(t,e,n){for(var r=new Array(t),i=0;i10||q[0]>0),M.nodeSupportsAsyncResource=M.isNode&&function(){var e=!1;try{e="function"==typeof t("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),M.isNode&&M.toFastProperties(process);try{throw new Error}catch(t){M.lastLineError=t}e.exports=M},{"./es5":13,async_hooks:void 0}]},{},[4])(4)},t.exports=i(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}}]); \ No newline at end of file diff --git a/tests/encodings/file06.html b/tests/encodings/file06.html new file mode 100644 index 00000000..eac26baf --- /dev/null +++ b/tests/encodings/file06.html @@ -0,0 +1,27 @@ + + + + + + Test website + + + + + + + + + + +

            Chinese encoding

            + +

            + +

            + +

            This file has been encoded with Simplified Chinese gb2312 encoding and simplified chinese characters: .

            + + + + diff --git a/tests/encodings/file07.html b/tests/encodings/file07.html new file mode 100644 index 00000000..b939710f --- /dev/null +++ b/tests/encodings/file07.html @@ -0,0 +1,26 @@ + + + + + Test website + + + + + + + + + + +

            Chinese encoding

            + +

            + +

            + +

            This file has been encoded with Simplified Chinese gb2312 encoding and simplified chinese characters: .

            + + + + diff --git a/tests/encodings/file08.js b/tests/encodings/file08.js new file mode 100644 index 00000000..3227e027 --- /dev/null +++ b/tests/encodings/file08.js @@ -0,0 +1,11 @@ +function em_load_jquery_css(e=!1){if(EM.ui_css&&0==jQuery("link#jquery-ui-em-css").length){var t=document.createElement("link");t.id="jquery-ui-em-css",t.rel="stylesheet",t.href=EM.ui_css,document.body.appendChild(t),e&&em_setup_jquery_ui_wrapper()}}function em_setup_jquery_ui_wrapper(){0===jQuery("#em-jquery-ui").length&&jQuery("body").append('
            ')}jQuery(document).ready((function(e){e("#recurrence-frequency").length>0&&(e("#recurrence-frequency").addClass("em-recurrence-frequency"),e(".event-form-when .interval-desc").each((function(){this.classList.add(this.id)})),e(".event-form-when .alternate-selector").each((function(){this.classList.add("em-"+this.id)})),e("#recurrence-interval").addClass("em-recurrence-interval")),e("#em-wrapper").addClass("em");var t=!1;if(e("#start-time").each((function(t,n){e(n).addClass("em-time-input em-time-start").next("#end-time").addClass("em-time-input em-time-end").parent().addClass("em-time-range")})),e(".em-time-input").length>0&&em_setup_timepicker("body"),e(".events-table").on("click",".em-event-delete",(function(){if(!confirm("Are you sure you want to delete?"))return!1;window.location.href=this.href})),e("#event-form #event-image-delete, #location-form #location-image-delete").on("click",(function(){var t=e(this);t.is(":checked")?t.closest(".event-form-image, .location-form-image").find("#event-image-img, #location-image-img").hide():t.closest(".event-form-image, .location-form-image").find("#event-image-img, #location-image-img").show()})),e(".event-form-with-recurrence").each((function(){let t=e(this);t.on("change",".em-recurrence-checkbox",(function(){this.checked?(t.find(".em-recurring-text").each((function(){this.style.removeProperty("display")})),t.find(".em-event-text").each((function(){this.style.setProperty("display","none","important")}))):(t.find(".em-recurring-text").each((function(){this.style.setProperty("display","none","important")})),t.find(".em-event-text").each((function(){this.style.removeProperty("display")})))}))})),e(".event-form-with-recurrence .em-recurrence-checkbox").trigger("change"),e("#event-form.em-event-admin-recurring").on("submit",(function(t){var n=e(this);if(1==n.find('input[name="event_reschedule"]').first().val())var i=EM.event_reschedule_warning;else if(1==n.find('input[name="event_recreate_tickets"]').first().val())i=EM.event_recurrence_bookings;else i=EM.event_recurrence_overwrite;confirmation=confirm(i),0==confirmation&&t.preventDefault()})),e(".em-reschedule-trigger").on("click",(function(t){t.preventDefault();var n=e(this);n.closest(".em-recurrence-reschedule").find(n.data("target")).removeClass("reschedule-hidden"),n.siblings(".em-reschedule-value").val(1),n.addClass("reschedule-hidden").siblings("a").removeClass("reschedule-hidden")})),e(".em-reschedule-cancel").on("click",(function(t){t.preventDefault();var n=e(this);n.closest(".em-recurrence-reschedule").find(n.data("target")).addClass("reschedule-hidden"),n.siblings(".em-reschedule-value").val(0),n.addClass("reschedule-hidden").siblings("a").removeClass("reschedule-hidden")})),e("#em-tickets-form").length>0){e("#event-rsvp").on("click",(function(t){this.checked?e("#event-rsvp-options").fadeIn():(confirmation=confirm(EM.disable_bookings_warning),0==confirmation?t.preventDefault():e("#event-rsvp-options").hide())})),e("input#event-rsvp").is(":checked")?e("div#rsvp-data").fadeIn():e("div#rsvp-data").hide();var n=function(){e("#em-tickets-form table tbody tr.em-tickets-row").show(),e("#em-tickets-form table tbody tr.em-tickets-row-form").hide()};e("#em-recurrence-checkbox").length>0?e("#em-recurrence-checkbox").on("change",(function(){e("#em-recurrence-checkbox").is(":checked")?(e("#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring").show(),e("#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal, #em-tickets-form .hidden").hide()):(e("#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal").show(),e("#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring, #em-tickets-form .hidden").hide())})).trigger("change"):e("#em-form-recurrence").length>0?(e("#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring").show(),e("#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal, #em-tickets-form .hidden").hide()):e("#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring, #em-tickets-form .hidden").hide(),e("#em-tickets-add").on("click",(function(t){t.preventDefault(),n();var o=e("#em-tickets-form table tbody");o.first(".em-ticket-template").find("input.em-date-input.flatpickr-input").each((function(){"_flatpickr"in this&&this._flatpickr.destroy()}));var a=o.length+1,r=o.first(".em-ticket-template").clone(!0).attr("id","em-ticket-"+a).removeClass("em-ticket-template").addClass("em-ticket").appendTo(e("#em-tickets-form table"));r.find("*[name]").each((function(t,n){(n=e(n)).attr("name",n.attr("name").replace("em_tickets[0]","em_tickets["+a+"]"))}));let s=r.find(".ticket-dates-from-normal").first();if(s.attr("data-until-id")){let e=s.attr("data-until-id").replace("-0","-"+a);s.attr("data-until-id",e),r.find(".ticket-dates-to-normal").attr("id",s.attr("data-until-id"))}r.show().find(".ticket-actions-edit").trigger("click"),r.find(".em-time-input").off().each((function(e,t){"object"==typeof this.em_timepickerObj&&this.em_timepicker("remove")})),em_setup_datepicker(r),em_setup_timepicker(r),e("html, body").animate({scrollTop:r.offset().top-30}),i()})),e(document).on("click",".ticket-actions-edit",(function(t){t.preventDefault(),n();var i=e(this).closest("tbody");return i.find("tr.em-tickets-row").hide(),i.find("tr.em-tickets-row-form").fadeIn(),!1})),e(document).on("click",".ticket-actions-edited",(function(t){t.preventDefault();var n=e(this).closest("tbody"),i=n.attr("id").replace("em-ticket-","");return n.find(".em-tickets-row").fadeIn(),n.find(".em-tickets-row-form").hide(),n.find("*[name]").each((function(t,o){if("ticket_start_pub"==(o=e(o)).attr("name"))n.find("span.ticket_start").text(o.val());else if("ticket_end_pub"==o.attr("name"))n.find("span.ticket_end").text(o.val());else if(o.attr("name")=="em_tickets["+i+"][ticket_type]")"members"==o.find(":selected").val()&&n.find("span.ticket_name").prepend("* ");else if(o.attr("name")=="em_tickets["+i+"][ticket_start_recurring_days]"){var a="before"==n.find("select.ticket-dates-from-recurring-when").val()?"-"+o.val():o.val();""!=o.val()?(n.find("span.ticket_start_recurring_days").text(a),n.find("span.ticket_start_recurring_days_text, span.ticket_start_time").removeClass("hidden").show()):(n.find("span.ticket_start_recurring_days").text(" - "),n.find("span.ticket_start_recurring_days_text, span.ticket_start_time").removeClass("hidden").hide())}else if(o.attr("name")=="em_tickets["+i+"][ticket_end_recurring_days]"){a="before"==n.find("select.ticket-dates-to-recurring-when").val()?"-"+o.val():o.val();""!=o.val()?(n.find("span.ticket_end_recurring_days").text(a),n.find("span.ticket_end_recurring_days_text, span.ticket_end_time").removeClass("hidden").show()):(n.find("span.ticket_end_recurring_days").text(" - "),n.find("span.ticket_end_recurring_days_text, span.ticket_end_time").removeClass("hidden").hide())}else{var r=o.attr("name").replace("em_tickets["+i+"][","").replace("]","").replace("[]","");n.find(".em-tickets-row ."+r).text(o.val())}})),e(document).triggerHandler("em_maps_tickets_edit",[n,i,!0]),e("html, body").animate({scrollTop:n.parent().offset().top-30}),!1})),e(document).on("change",".em-ticket-form select.ticket_type",(function(t){var n=e(this);"members"==n.find("option:selected").val()?n.closest(".em-ticket-form").find(".ticket-roles").fadeIn():n.closest(".em-ticket-form").find(".ticket-roles").hide()})),e(document).on("click",".em-ticket-form .ticket-options-advanced",(function(t){t.preventDefault();var n=e(this);n.hasClass("show")?(n.closest(".em-ticket-form").find(".em-ticket-form-advanced").fadeIn(),n.find(".show,.show-advanced").hide(),n.find(".hide,.hide-advanced").show()):(n.closest(".em-ticket-form").find(".em-ticket-form-advanced").hide(),n.find(".show,.show-advanced").show(),n.find(".hide,.hide-advanced").hide()),n.toggleClass("show")})),e(".em-ticket-form").each((function(){var t=!1,n=e(this);n.find('.em-ticket-form-advanced input[type="text"]').each((function(){""!=this.value&&(t=!0)})),n.find('.em-ticket-form-advanced input[type="checkbox"]:checked').length>0&&(t=!0),n.find(".em-ticket-form-advanced option:selected").each((function(){""!=this.value&&(t=!0)})),t&&n.find(".ticket-options-advanced").trigger("click")})),e(document).on("click",".ticket-actions-delete",(function(t){t.preventDefault();var n=e(this),o=n.closest("tbody");return o.find("input.ticket_id").val()>0?(n.text("Deleting..."),e.getJSON(e(this).attr("href"),{em_ajax_action:"delete_ticket",id:o.find("input.ticket_id").val()},(function(e){e.result?o.remove():(n.text("Delete"),alert(e.error))}))):o.remove(),i(),!1})),e("#em-tickets-form.em-tickets-sortable table").sortable({items:"> tbody",placeholder:"em-ticket-sortable-placeholder",handle:".ticket-status",helper:function(t,n){var i=e(n).clone().addClass("em-ticket-sortable-helper"),o=i.find(".em-tickets-row td").length;return i.children().remove(),i.append(''),i}});var i=function(){var t=e("#em-tickets-form table tbody.em-ticket");1==t.length?(t.find(".ticket-status").addClass("single"),e("#em-tickets-form.em-tickets-sortable table").sortable("option","disabled",!0)):(t.find(".ticket-status").removeClass("single"),e("#em-tickets-form.em-tickets-sortable table").sortable("option","disabled",!1))};i()}let o=e(".em-bookings-table");if(o.length>0){t=!0,e(document).on("click",".em-bookings-table .tablenav-pages a",(function(){var t=e(this),n=t.closest(".em-bookings-table form.bookings-filter"),i=t.attr("href").match(/#[0-9]+/);if(null!=i&&i.length>0){var o=i[0].replace("#","");n.find("input[name=pno]").val(o)}else{let e=new URL(t.attr("href"));e.searchParams.has("paged")?(n.find("input[name=pno]").val(e.searchParams.get("paged")),n.find("input[name=paged]").val(e.searchParams.get("paged"))):(n.find("input[name=pno]").val(1),n.find("input[name=paged]").val(1))}return n.trigger("submit"),!1})),e(document).on("change",".em-bookings-table .tablenav-pages input[name=paged]",(function(t){var n=e(this).closest(".em-bookings-table form.bookings-filter"),i=n.find(".tablenav-pages a.last-page");if(i.length>0){let e=new URL(i.attr("href"));if(e.searchParams.has("paged")){let t=parseInt(e.searchParams.get("paged"));parseInt(this.value)>t&&(this.value=t)}}else{let e=n.find("input[name=pno]").val();if(e&&parseInt(this.value)>parseInt(e))return this.value=e,t.preventDefault(),!1}n.find("input[name=pno]").val(this.value),n.trigger("submit")})),e(document).on("click",".em-bookings-table-trigger",(function(t){t.preventDefault();let i=e(this.getAttribute("rel"));i.find("input[name=show_tickets]").each(n),openModal(i)})),e(document).on("submit",".em-bookings-table-settings form",(function(t){t.preventDefault();let n=e(this),i=n.closest(".em-modal"),o=e(n.attr("rel")),a=o.find("[name=cols]").val(""),r=n.find(".em-bookings-cols-selected .item");e.each(r,(function(e,t){t.classList.contains("hidden")||(""!==a.val()?a.val(a.val()+","+t.getAttribute("data-value")):a.val(t.getAttribute("data-value")))}));let s=n.find('select[name="limit"]').val();o.find('[name="limit"]').val(s),i.trigger("submitted"),o.trigger("submit"),closeModal(i)})),e(document).on("submit",".em-bookings-table-export form",(function(t){let n=e(this.getAttribute("rel"));var i=e(this).find(".em-bookings-table-filters").empty();n.find(".em-bookings-table-filter").clone().appendTo(i)}));let n=function(){let t=e(this),n=t.closest("form").find('[data-type="ticket"]');t.is(":checked")?n.show().find("input").val(1):n.hide().find("input").val(0)};e(document).on("click",".em-bookings-table-export input[name=show_tickets]",n),e(document).on("em_selectize_loaded",(function(t,n){n.find(".em-bookings-table-modal .em-bookings-table-cols").each((function(){let t=e(this),i=e(this).find(".em-bookings-cols-sortable");n.find(".em-selectize.always-open").each((function(){if("selectize"in this){let n=this.selectize;n.on("item_add",(function(t,o){let a=o.clone(),r=n.getOption(t).attr("data-type");a.appendTo(i),a.attr("data-type",r),e('').appendTo(a)})),n.on("item_remove",(function(e){t.find('.item[data-value="'+e+'"]').remove()})),t.on("click",".em-bookings-cols-selected .item .remove",(function(){let e=this.parentElement.getAttribute("data-value");n.removeItem(e,!0)}))}}))}))})),e(document).on("keypress",'.em-bookings-table .tablenav .actions input[type="text"]',(function(t){13===(t.keyCode?t.keyCode:t.which)&&e(this).closest("form").submit()})),e(document).on("click",".em-bookings-table button.em-bookings-table-bulk-action",(function(t){t.preventDefault();let n=e(this).closest("form"),i=n.find("select.bulk-action-selector").val();if(EM.bulk_action=!0,"delete"===i&&!confirm(EM.booking_delete))return!1;n.find("tbody .check-column input:checked").each((function(){e(this.parentElement).find("a.em-bookings-"+i).trigger("click")})),EM.bulk_action=!1})),e(document).on("click",'.em-bookings-table th[scope="col"].sortable a, .em-bookings-table th[scope="col"].sorted a',(function(t){t.preventDefault();let n=new URL(this.href).searchParams,i=e(this).closest("form");if(n.get("orderby")){i.find('input[name="orderby"]').val(n.get("orderby"));let e=n.get("order")?n.get("order"):"asc";i.find('input[name="order"]').val(e),i.submit()}}));let i=function(e){em_setup_tippy(e),em_setup_selectize(e)},a=function(e){e.find(".em-bookings-cols-sortable").sortable().disableSelection();EM_ResizeObserver({small:600,large:!1},e.toArray())};o.each((function(){a(e(this))})),e(document).on("submit",".em-bookings-table form.bookings-filter",(function(t){var n=e(this);let o=n.parents(".em-bookings-table").first();return o.find(".table-wrap").first().append('
            '),e.post(EM.ajaxurl,n.serializeArray(),(function(t){let r=e(t);o.find(".em-bookings-table-trigger").each((function(){e(this.getAttribute("rel")).remove()})),o.replaceWith(r),a(r),i(r),jQuery(document).triggerHandler("em_bookings_filtered",[r,o,n])})),!1})),e(document).on("click",".em-bookings-approve,.em-bookings-reject,.em-bookings-unapprove,.em-bookings-delete,.em-bookings-ajax-action",(function(){let t=e(this);if(t.hasClass("em-bookings-delete")&&(!("bulk_action"in EM)||!EM.bulk_action)&&!confirm(EM.booking_delete))return!1;let n=em_ajaxify(t.attr("href")),o=t.parents("td").first();if(o.length>0&&(o.hasClass("column-actions")||o.hasClass("em-bt-col-actions")))o.html(EM.txt_loading),o.load(n);else{let o=t.closest("[data-tippy-root], .em-tooltip-ddm-content");if(o.length>0){"_tippy"in o[0]&&o[0]._tippy.hide();let a=t.closest("tr");n.match(/^\//)&&(n=window.location.origin+n);let r=new URL(n).searchParams,s=new FormData(a.closest("form")[0]);s.set("action","em_bookings_table_row"),s.set("row_action",r.get("action")),s.set("booking_id",r.get("booking_id"));t.closest("form").find('[name="cols"]').val();a.addClass("loading"),e.ajax({url:EM.ajaxurl,data:s,processData:!1,contentType:!1,type:"POST",success:function(t){let n=e(t);n.addClass("faded-out"),a.replaceWith(n).delay(200),i(n),n.fadeIn(),n.removeClass("faded-out")}})}}return!1}))}function a(){e(".interval-desc").hide();var t="-plural";1!=e("input.em-recurrence-interval").val()&&""!=e("input.em-recurrence-interval").val()||(t="-singular");var n="span.interval-desc.interval-"+e("select.em-recurrence-frequency").val()+t;e(n).show()}function r(){e(".alternate-selector").hide(),e(".em-"+e("select.em-recurrence-frequency").val()+"-selector").show()}if(e(".em_bookings_events_table").length>0&&(e(document).on("submit",".em_bookings_events_table form",(function(t){var n=e(this),i=em_ajaxify(n.attr("action"));return n.parents(".em_bookings_events_table").find(".table-wrap").first().append('
            '),e.get(i,n.serializeArray(),(function(e){n.parents(".em_bookings_events_table").first().replaceWith(e)})),!1})),e(document).on("click",".em_bookings_events_table .tablenav-pages a",(function(){var t=e(this),n=em_ajaxify(t.attr("href"));return t.parents(".em_bookings_events_table").find(".table-wrap").first().append('
            '),e.get(n,(function(e){t.parents(".em_bookings_events_table").first().replaceWith(e)})),!1}))),e(document).on("click","a.em-booking-button",(function(t){t.preventDefault();var n=e(this);if(n.text()!=EM.bb_booked&&e(this).text()!=EM.bb_booking){n.text(EM.bb_booking);var i=n.attr("id").split("_");e.ajax({url:EM.ajaxurl,dataType:"jsonp",data:{event_id:i[1],_wpnonce:i[2],action:"booking_add_one"},success:function(t,i,o,a){t.result?(n.text(EM.bb_booked),n.addClass("disabled")):n.text(EM.bb_error),""!=t.message&&alert(t.message),e(document).triggerHandler("em_booking_button_response",[t,n])},error:function(){n.text(EM.bb_error)}})}return!1})),e(document).on("click","a.em-cancel-button",(function(t){t.preventDefault();var n=e(this);if(n.text()!=EM.bb_cancelled&&n.text()!=EM.bb_canceling){n.text(EM.bb_canceling);var i=n.attr("id").split("_");e.ajax({url:EM.ajaxurl,dataType:"jsonp",data:{booking_id:i[1],_wpnonce:i[2],action:"booking_cancel"},success:function(e,t,i,o){e.result?(n.text(EM.bb_cancelled),n.addClass("disabled")):n.text(EM.bb_cancel_error)},error:function(){n.text(EM.bb_cancel_error)}})}return!1})),e(document).on("click","a.em-booking-button-action",(function(t){t.preventDefault();var n=e(this),i={_wpnonce:n.attr("data-nonce"),action:n.attr("data-action")};return n.attr("data-event-id")&&(i.event_id=n.attr("data-event-id")),n.attr("data-booking-id")&&(i.booking_id=n.attr("data-booking-id")),n.text()!=EM.bb_booked&&e(this).text()!=EM.bb_booking&&(n.attr("data-loading")?n.text(n.attr("data-loading")):n.text(EM.bb_booking),e.ajax({url:EM.ajaxurl,dataType:"jsonp",data:i,success:function(t,i,o,a){t.result?(n.attr("data-success")?n.text(n.attr("data-success")):n.text(EM.bb_booked),n.addClass("disabled")):n.attr("data-error")?n.text(n.attr("data-error")):n.text(EM.bb_error),""!=t.message&&alert(t.message),e(document).triggerHandler("em_booking_button_action_response",[t,n])},error:function(){n.attr("data-error")?n.text(n.attr("data-error")):n.text(EM.bb_error)}})),!1})),e(".em-date-single, .em-date-range, #em-date-start").length>0&&(t=!0,em_setup_datepicker("body")),t&&em_load_jquery_css(),e(".em-datepicker").length>0&&em_setup_datepicker("body"),e("#em-wrapper input.select-all").on("change",(function(){e(this).is(":checked")?(e("input.row-selector").prop("checked",!0),e("input.select-all").prop("checked",!0)):(e("input.row-selector").prop("checked",!1),e("input.select-all").prop("checked",!1))})),a(),r(),e("input.em-recurrence-interval").on("keyup",a),e("select.em-recurrence-frequency").on("change",a),e("select.em-recurrence-frequency").on("change",r),(e(".em-location-map").length>0||e(".em-locations-map").length>0||e("#em-map").length>0||e(".em-search-geo").length>0)&&em_maps_load(),e(".em-location-types .em-location-types-select").on("change",(function(){let t=e(this);if(0==t.val())e(".em-location-type").hide();else{let n=t.find("option:selected").data("display-class");e(".em-location-type").hide(),e(".em-location-type."+n).show(),"em-location-type-place"!=n&&jQuery("#em-location-reset a").trigger("click")}""!==t.data("active")&&t.val()!==t.data("active")?(e(".em-location-type-delete-active-alert").hide(),e(".em-location-type-delete-active-alert").show()):e(".em-location-type-delete-active-alert").hide()})).trigger("change"),jQuery('div.em-location-data [name="location_name"]').length>0&&(e('div.em-location-data [name="location_name"]').selectize({plugins:["restore_on_backspace"],valueField:"id",labelField:"label",searchField:"label",create:!0,createOnBlur:!0,maxItems:1,persist:!1,addPrecedence:!0,selectOnTab:!0,diacritics:!0,render:{item:function(e,t){return"
            "+e.label+"
            "},option:function(e,t){let n="";return void 0!==e.address&&(""!==e.address&&""!==e.town?n=t(e.address)+", "+t(e.town):""!==e.address?n=t(e.address):""!==e.town&&(n=t(e.town))),'
            '+t(e.label)+'
            '+n+"
            "}},load:function(t,n){if(!t.length)return n();e.ajax({url:EM.locationajaxurl,data:{q:t,method:"selectize"},dataType:"json",type:"POST",error:function(){n()},success:function(e){n(e)}})},onItemAdd:function(e,t){this.clearCache();var n=this.options[e];e!==n.label?(jQuery("input#location-name").val(n.value),jQuery("input#location-address").val(n.address),jQuery("input#location-town").val(n.town),jQuery("input#location-state").val(n.state),jQuery("input#location-region").val(n.region),jQuery("input#location-postcode").val(n.postcode),jQuery("input#location-latitude").val(n.latitude),jQuery("input#location-longitude").val(n.longitude),void 0===n.country||""===n.country?jQuery("select#location-country option:selected").removeAttr("selected"):jQuery('select#location-country option[value="'+n.country+'"]').attr("selected","selected"),jQuery("input#location-id").val(n.id).trigger("change"),jQuery("div.em-location-data input, div.em-location-data select").prop("readonly",!0).css("opacity","0.5"),jQuery("#em-location-reset").show(),jQuery("#em-location-search-tip").hide(),this.disable(),this.$control.blur(),jQuery('div.em-location-data [class^="em-selectize"]').each((function(){this.selectize.disable()})),jQuery(document).triggerHandler("em_locations_autocomplete_selected",[event,n])):jQuery("input#location-address").focus()}}),jQuery("#em-location-reset a").on("click",(function(){jQuery("div.em-location-data input, div.em-location-data select").each((function(){this.style.removeProperty("opacity"),this.readOnly=!1,"text"==this.type&&(this.value="")})),jQuery("div.em-location-data option:selected").removeAttr("selected"),jQuery("input#location-id").val(""),jQuery("#em-location-reset").hide(),jQuery("#em-location-search-tip").show(),jQuery("#em-map").hide(),jQuery("#em-map-404").show(),"undefined"!=typeof marker&&(marker.setPosition(new google.maps.LatLng(0,0)),infoWindow.close(),marker.setDraggable(!0));let t=e("div.em-location-data input#location-name")[0].selectize;return t.enable(),t.clear(!0),t.clearOptions(),jQuery("div.em-location-data select.em-selectize").each((function(){"selectize"in this&&(this.selectize.enable(),this.selectize.clear(!0))})),!1})),"0"!=jQuery("input#location-id").val()&&""!=jQuery("input#location-id").val()&&(jQuery("div.em-location-data input, div.em-location-data select").each((function(){this.style.setProperty("opacity","0.5","important"),this.readOnly=!0})),jQuery("#em-location-reset").show(),jQuery("#em-location-search-tip").hide(),jQuery("div.em-location-data select.em-selectize, div.em-location-data input.em-selectize-autocomplete").each((function(){"selectize"in this&&this.selectize.disable()})))),em_setup_selectize(document),window.moment){var s=function(e,t){return t=(t=(t=(t=(t=t.replace(/##T/g,Intl.DateTimeFormat().resolvedOptions().timeZone)).replace(/#T/g,"GMT"+e.format("Z"))).replace(/###t/g,-60*e.utcOffset())).replace(/##t/g,e.isDST())).replace(/#t/g,e.daysInMonth())};e(".em-date-momentjs").each((function(){var t=e(this),n=moment.unix(t.data("date-start")),i=s(n,n.format(t.data("date-format")));if(t.data("date-start")!==t.data("date-end"))var o=moment.unix(t.data("date-end")),a=s(n,o.format(t.data("date-format"))),r=i+t.data("date-separator")+a;else r=i;t.text(r)}));var l=function(e,t){let n=new Date(1e3*e),i=n.getMinutes();if(24==t){let e=n.getHours();return e=e<10?"0"+e:e,i=i<10?"0"+i:i,e+":"+i}{let e=n.getHours()%12,t=e>=12?"PM":"AM";return 0===e&&(e=12),i=i<10?"0"+i:i,e+":"+i+" "+t}};e(".em-time-localjs").each((function(){var t=e(this),n=l(t.data("time"),t.data("time-format"));t.data("time-end")&&(n=n+(t.data("time-separator")?t.data("time-separator"):" - ")+l(t.data("time-end"),t.data("time-format")));t.text(n)}))}let c=jQuery(document);em_setup_tippy(c),c.triggerHandler("em_javascript_loaded")}));var em_ajaxify=function(e){return-1!=e.search("em_ajax=0")?e=e.replace("em_ajax=0","em_ajax=1"):-1!=e.search(/\?/)?e+="&em_ajax=1":e+="?em_ajax=1",e};function em_setup_datepicker(e){let t=(e=jQuery(e)).find(".em-date-single, .em-date-range");if(t.length>0){var n={dateFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,firstDay:EM.firstDay,yearRange:"c-100:c+15",beforeShow:function(e,t){em_setup_jquery_ui_wrapper(),t.dpDiv.appendTo("#em-jquery-ui")}};EM.dateFormat&&(n.dateFormat=EM.dateFormat),EM.yearRange&&(n.yearRange=EM.yearRange),jQuery(document).triggerHandler("em_datepicker",n),t.find("input.em-date-input-loc").each((function(e,t){var i=(t=jQuery(t)).nextAll("input.em-date-input").first(),o=i.val();if(t.datepicker(n),t.datepicker("option","altField",i),o){var a=jQuery.datepicker.formatDate(EM.dateFormat,jQuery.datepicker.parseDate("yy-mm-dd",o));t.val(a),i.val(o)}t.on("change",(function(){""==jQuery(this).val()&&jQuery(this).nextAll(".em-date-input").first().val("")}))})),t.filter(".em-date-range").find('input.em-date-input-loc[type="text"]').each((function(e,t){if((t=jQuery(t)).hasClass("em-date-start"))t.datepicker("option","onSelect",(function(e){var t=jQuery(this),n=t.parents(".em-date-range").find(".em-date-end").first(),i=t.nextAll("input.em-date-input").first().val(),o=n.nextAll("input.em-date-input").first().val();t.trigger("em_datepicker_change"),i>o&&""!=o&&(n.datepicker("setDate",e),n.trigger("change").trigger("em_datepicker_change")),n.datepicker("option","minDate",e)}));else if(t.hasClass("em-date-end")){var n=t.parents(".em-date-range").find(".em-date-start").first();""!=n.val()&&t.datepicker("option","minDate",n.val())}}))}let i=e.find(".em-datepicker, .em-datepicker-range");if(i.length>0){let t=jQuery("#em-flatpickr");0===t.length&&(t=jQuery('
            ').appendTo("body")),"locale"in EM.datepicker&&(flatpickr.localize(flatpickr.l10ns[EM.datepicker.locale]),flatpickr.l10ns.default.firstDayOfWeek=EM.firstDay);let n={appendTo:t[0],dateFormat:"Y-m-d",disableMoble:"true",allowInput:!0,onChange:[function(e,t,n){let i=jQuery(n.input).closest(".em-datepicker"),o=i.find(".em-datepicker-data"),a=o.find("input"),r=function(e){let t=""+(e.getMonth()+1),n=""+e.getDate(),i=e.getFullYear();return t.length<2&&(t="0"+t),n.length<2&&(n="0"+n),[i,t,n].join("-")};if(0===e.length)a.attr("value","");else if("range"===n.config.mode&&void 0!==e[1])a[0].setAttribute("value",r(e[0])),a[1].setAttribute("value",r(e[1]));else if("single"===n.config.mode&&i.hasClass("em-datepicker-until"))if(n.input.classList.contains("em-date-input-start")){let t;if(a[0].setAttribute("value",r(e[0])),i.attr("data-until-id")){t=jQuery("#"+i.attr("data-until-id")+" .em-date-input-end")[0]._flatpickr}else t=i.find(".em-date-input-end")[0]._flatpickr;void 0!==t.selectedDates[0]&&t.selectedDates[0]=n&&t.em_timepicker("setTime",new Date(e.em_timepicker("getTime").getTime()+i)),e.data("oldTime",o)}})),e.find(".event-form-when .em-time-range input.em-time-end").on("change",(function(){var e=jQuery(this),t=e.prevAll(".em-time-start"),n=e.closest(".event-form-when"),i=n.find(".em-date-end").val(),o=n.find(".em-date-start").val();t.val()&&(t.em_timepicker("getTime")>e.em_timepicker("getTime")&&(0==o.length||i==o)?e.addClass("error"):e.removeClass("error"))})),e.find(".event-form-when .em-date-end").on("change",(function(){jQuery(this).closest(".event-form-when").find(".em-time-end").trigger("change")})),e.find(".em-time-range input.em-time-all-day").on("change",(function(){var e=jQuery(this);e.is(":checked")?e.closest(".em-time-range").find(".em-time-input").each((function(){this.style.setProperty("background-color","#ccc","important"),this.readOnly=!0})):e.closest(".em-time-range").find(".em-time-input").each((function(){this.style.removeProperty("background-color"),this.readOnly=!1}))})).trigger("change")}function em_setup_selectize(e){(e=jQuery(e)).find("select:not([multiple]).em-selectize, .em-selectize select:not([multiple])").selectize(),e.find("select[multiple].em-selectize, .em-selectize select[multiple]").selectize({hideSelected:!1,plugins:["remove_button","click2deselect"],diacritics:!0,render:{item:function(e,t){return'
            '+e.text.replace(/^\s+/i,"")+"
            "},option:function(e,t){let n='
            "):n+=e.text,n+="
            ",n},optgroup:function(e,t){let n='
            "}}}),e.find(".em-selectize.always-open").each((function(){if("selectize"in this){let e=this.selectize;e.open(),e.advanceSelection=function(){},e.setActiveItem=function(){},this.selectize.$control.on("click",".remove",(function(t){if(t.preventDefault(),!e.isLocked){var n=jQuery(t.currentTarget).parent();return e.removeItem(n.attr("data-value")),e.refreshOptions(),!1}}))}})),jQuery(document).triggerHandler("em_selectize_loaded",[e])}function em_setup_tippy(e){let t=jQuery(e);var n={theme:"light-border",appendTo:"parent",content:e=>e.getAttribute("aria-label"),touch:["hold",300]};jQuery(document).trigger("em-tippy-vars",[n,t]),tippy(".em-tooltip",n);let i={theme:"light-border",arrow:!1,allowHTML:!0,interactive:!0,trigger:"manual",placement:"bottom",zIndex:1e6,touch:!0};jQuery(document).trigger("em-tippy-ddm-vars",[i,t]),t.find(".em-tooltip-ddm").each((function(){let e,t;this.getAttribute("data-content")?(e=document.getElementById(this.getAttribute("data-content")),t=e.previousElementSibling):(e=this.nextElementSibling,t=e.previousElementSibling);let n=document.createElement("div"),o=this.getAttribute("data-button-width");o&&(i.maxWidth="match"==o?this.clientWidth:this.getAttribute("data-button-width")),i.content=n;let a=tippy(this,i);a.props.distance=50,a.setProps({onShow(t){t.reference.getAttribute("data-tooltip-class")&&t.popper.classList.add(t.reference.getAttribute("data-tooltip-class")),t.popper.classList.add("em-tooltip-ddm-display"),n.append(e),e.classList.remove("em-tooltip-ddm-content")},onShown(t){e.firstElementChild.focus()},onHidden(n){e.previousElementSibling!==t&&(t.after(e),e.classList.add("em-tooltip-ddm-content"))}});let r=function(e){if("keydown"===e.type&&13!==e.which&&40!==e.which)return!1;e.preventDefault(),e.stopPropagation(),this._tippy.show()};this.addEventListener("click",r),this.addEventListener("keydown",r),n.addEventListener("blur",(function(){n.hide()})),n.addEventListener("mouseover",(function(){e.firstElementChild.blur()}))}))}var infoWindow,em_maps_loaded=!1,maps={},maps_markers={};function em_maps_load(){if(!em_maps_loaded)if(0!=jQuery("script#google-maps").length||"object"==typeof google&&"object"==typeof google.maps)"object"!=typeof google||"object"!=typeof google.maps||em_maps_loaded?jQuery("script#google-maps").length>0&&jQuery(window).load((function(){em_maps_loaded||em_maps()})):em_maps();else{var e=document.createElement("script");e.type="text/javascript",e.id="google-maps";var t=EM.is_ssl?"https:":"http:";void 0!==EM.google_maps_api?e.src=t+"//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps&key="+EM.google_maps_api:e.src=t+"//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps",document.body.appendChild(e)}}function em_maps_load_locations(e){var t=(e=jQuery(e)).attr("id").replace("em-locations-map-","");if(null==(n=jQuery.parseJSON(e.nextAll(".em-locations-map-coords").first().text())))var n=jQuery.parseJSON(jQuery("#em-locations-map-coords-"+t).text());jQuery.getJSON(document.URL,n,(function(n){if(n.length>0){var i={mapTypeId:google.maps.MapTypeId.ROADMAP};"object"==typeof EM.google_map_id_styles&&void 0!==EM.google_map_id_styles[t]?(console.log(EM.google_map_id_styles[t]),i.styles=EM.google_map_id_styles[t]):void 0!==EM.google_maps_styles&&(i.styles=EM.google_maps_styles),jQuery(document).triggerHandler("em_maps_locations_map_options",i);var o={};jQuery(document).triggerHandler("em_maps_location_marker_options",o),maps[t]=new google.maps.Map(e[0],i),maps_markers[t]=[];var a=new google.maps.LatLngBounds;jQuery.map(n,(function(e,n){if(0!=e.location_latitude||0!=e.location_longitude){var i=parseFloat(e.location_latitude),r=parseFloat(e.location_longitude),s=new google.maps.LatLng(i,r);jQuery.extend(o,{position:s,map:maps[t]});var l=new google.maps.Marker(o);maps_markers[t].push(l),l.setTitle(e.location_name),em_map_infobox(l,'
            '+e.location_balloon+"
            ",maps[t]),a.extend(new google.maps.LatLng(i,r))}})),maps[t].fitBounds(a),jQuery(document).triggerHandler("em_maps_locations_hook",[maps[t],n,t,maps_markers[t]])}else e.children().first().html("No locations found"),jQuery(document).triggerHandler("em_maps_locations_hook_not_found",[e])}))}function em_maps_load_location(e){var t=(e=jQuery(e)).attr("id").replace("em-location-map-","");em_LatLng=new google.maps.LatLng(jQuery("#em-location-map-coords-"+t+" .lat").text(),jQuery("#em-location-map-coords-"+t+" .lng").text());var n={zoom:14,center:em_LatLng,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,gestureHandling:"cooperative"};"object"==typeof EM.google_map_id_styles&&void 0!==EM.google_map_id_styles[t]?(console.log(EM.google_map_id_styles[t]),n.styles=EM.google_map_id_styles[t]):void 0!==EM.google_maps_styles&&(n.styles=EM.google_maps_styles),jQuery(document).triggerHandler("em_maps_location_map_options",n),maps[t]=new google.maps.Map(document.getElementById("em-location-map-"+t),n);var i={position:em_LatLng,map:maps[t]};jQuery(document).triggerHandler("em_maps_location_marker_options",i),maps_markers[t]=new google.maps.Marker(i),(infoWindow=new google.maps.InfoWindow({content:jQuery("#em-location-map-info-"+t+" .em-map-balloon").get(0)})).open(maps[t],maps_markers[t]),maps[t].panBy(40,-70),jQuery(document).triggerHandler("em_maps_location_hook",[maps[t],infoWindow,maps_markers[t],t]),jQuery(window).on("resize",(function(e){google.maps.event.trigger(maps[t],"resize"),maps[t].setCenter(maps_markers[t].getPosition()),maps[t].panBy(40,-70)}))}function em_maps(){if(jQuery(".em-location-map").each((function(e,t){em_maps_load_location(t)})),jQuery(".em-locations-map").each((function(e,t){em_maps_load_locations(t)})),jQuery("select#location-select-id, input#location-address").length>0){var e,t=function(){var t=jQuery("#location-latitude").val(),n=jQuery("#location-longitude").val();if(0!=t||0!=n){var i=new google.maps.LatLng(t,n);o.setPosition(i);var a=jQuery("input#location-name").length>0?jQuery("input#location-name").val():jQuery("input#title").val();a=em_esc_attr(a),o.setTitle(a),jQuery("#em-map").show(),jQuery("#em-map-404").hide(),google.maps.event.trigger(e,"resize"),e.setCenter(i),e.panBy(40,-55),infoWindow.setContent('
            '+a+"
            "+em_esc_attr(jQuery("#location-address").val())+"
            "+em_esc_attr(jQuery("#location-town").val())+"
            "),infoWindow.open(e,o),jQuery(document).triggerHandler("em_maps_location_hook",[e,infoWindow,o,0])}else jQuery("#em-map").hide(),jQuery("#em-map-404").show()};if(jQuery("#location-select-id, input#location-id").on("change",(function(){var t;t=jQuery(this).val(),jQuery("#em-map").length>0&&(jQuery("#em-map-404 .em-loading-maps").show(),jQuery.getJSON(document.URL,{em_ajax_action:"get_location",id:t},(function(t){0!=t.location_latitude&&0!=t.location_longitude?(loc_latlng=new google.maps.LatLng(t.location_latitude,t.location_longitude),o.setPosition(loc_latlng),o.setTitle(t.location_name),o.setDraggable(!1),jQuery("#em-map").show(),jQuery("#em-map-404").hide(),jQuery("#em-map-404 .em-loading-maps").hide(),e.setCenter(loc_latlng),e.panBy(40,-55),infoWindow.setContent('
            '+t.location_balloon+"
            "),infoWindow.open(e,o),google.maps.event.trigger(e,"resize"),jQuery(document).triggerHandler("em_maps_location_hook",[e,infoWindow,o,0])):(jQuery("#em-map").hide(),jQuery("#em-map-404").show(),jQuery("#em-map-404 .em-loading-maps").hide())})))})),jQuery("#location-name, #location-town, #location-address, #location-state, #location-postcode, #location-country").on("change",(function(){if(!0!==jQuery(this).prop("readonly")){var e=[jQuery("#location-address").val(),jQuery("#location-town").val(),jQuery("#location-state").val(),jQuery("#location-postcode").val()],n="";if(jQuery.each(e,(function(e,t){""!=t&&(n=""==n?n+t:n+", "+t)})),""==n)return jQuery("#em-map").hide(),jQuery("#em-map-404").show(),!1;0!=jQuery("#location-country option:selected").val()&&(n=""==n?n+jQuery("#location-country option:selected").text():n+", "+jQuery("#location-country option:selected").text()),jQuery("#em-map-404 .em-loading-maps").show(),""!=n&&jQuery("#em-map").length>0&&a.geocode({address:n},(function(e,n){n==google.maps.GeocoderStatus.OK&&(jQuery("#location-latitude").val(e[0].geometry.location.lat()),jQuery("#location-longitude").val(e[0].geometry.location.lng())),t()}))}})),jQuery("#em-map").length>0){var n=new google.maps.LatLng(0,0),i={zoom:14,center:n,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,gestureHandling:"cooperative"};void 0!==EM.google_maps_styles&&(i.styles=EM.google_maps_styles),e=new google.maps.Map(document.getElementById("em-map"),i);var o=new google.maps.Marker({position:n,map:e,draggable:!0});infoWindow=new google.maps.InfoWindow({content:""});var a=new google.maps.Geocoder;google.maps.event.addListener(infoWindow,"domready",(function(){document.getElementById("location-balloon-content").parentNode.style.overflow="",document.getElementById("location-balloon-content").parentNode.parentNode.style.overflow=""})),google.maps.event.addListener(o,"dragend",(function(){var t=o.getPosition();jQuery("#location-latitude").val(t.lat()),jQuery("#location-longitude").val(t.lng()),e.setCenter(t),e.panBy(40,-55)})),jQuery("#location-select-id").length>0?jQuery("#location-select-id").trigger("change"):t(),jQuery(document).triggerHandler("em_map_loaded",[e,infoWindow,o])}jQuery(window).on("resize",(function(t){google.maps.event.trigger(e,"resize"),e.setCenter(o.getPosition()),e.panBy(40,-55)}))}em_maps_loaded=!0,jQuery(document).triggerHandler("em_maps_loaded")}function em_map_infobox(e,t,n){var i=new google.maps.InfoWindow({content:t});google.maps.event.addListener(e,"click",(function(){infoWindow&&infoWindow.close(),infoWindow=i,i.open(n,e)}))}function em_esc_attr(e){return"string"!=typeof e?"":e.replace(//gi,">")}jQuery(document).on("em_view_loaded_map",(function(e,t,n){if(em_maps_loaded){em_maps_load_locations(t.find(".em-locations-map"))}else em_maps_load()})),jQuery(document).on("em_search_ajax",(function(e,t,n){em_maps_loaded&&(n.find(".em-location-map").each((function(e,t){em_maps_load_location(t)})),n.find(".em-locations-map").each((function(e,t){em_maps_load_locations(t)})))}));let openModal=function(e,t=null){(e=jQuery(e)).appendTo(document.body),setTimeout((function(){e.addClass("active").find(".em-modal-popup").addClass("active"),jQuery(document).triggerHandler("em_modal_open",[e]),"function"==typeof t&&setTimeout(t,200)}),100)},closeModal=function(e,t=null){(e=jQuery(e)).removeClass("active").find(".em-modal-popup").removeClass("active"),setTimeout((function(){if(e.attr("data-parent")){let t=jQuery("#"+e.attr("data-parent"));t.length&&e.appendTo(t)}e.triggerHandler("em_modal_close"),"function"==typeof t&&t()}),500)};function EM_Alert(e){let t=document.getElementById("em-alert-modal");null===t&&(t=document.createElement("div"),t.setAttribute("class","em pixelbones em-modal"),t.id="em-alert-modal",t.innerHTML='
             
            ',document.body.append(t)),document.getElementById("em-alert-modal-content").innerHTML=e,openModal(t)}jQuery(document).on("click",".em-modal .em-close-modal",(function(e){let t=jQuery(this).closest(".em-modal");t.attr("data-prevent-close")||closeModal(t)})),jQuery(document).on("click",".em-modal",(function(e){if(jQuery(e.target).hasClass("em-modal")){let e=jQuery(this);e.attr("data-prevent-close")||closeModal(e)}})),jQuery(document).ready((function(t){let n={theme:"light-border",allowHTML:!0,interactive:!0,trigger:"manual",placement:"bottom",zIndex:1e6,touch:!0};t(document).trigger("em-search-views-trigger-vars",[n]);let i={theme:"light-border",appendTo:"parent",touch:!1};t(document).trigger("em-tippy-vars",[i]),t(".em-search").each((function(){let e=t(this),o=e.attr("id").replace("em-search-",""),r=e.find(".em-search-form").first(),s=e.find(".em-search-advanced");const l=function(e,t=1){let n=t>0?t:null;jQuery(e).attr("data-advanced-total-input",n),c()},c=function(n=!1){e.find("span.total-count").remove();let i=0;s.find("[data-advanced-total-input]").each((function(){let e=this.getAttribute("data-advanced-total-input");i+=Math.abs(e)})),e.attr("data-advanced-total",i),d(n),s.find(".em-search-advanced-section").each((function(){let e=t(this),n=0;e.attr("data-advanced-total",0),e.find("[data-advanced-total-input]").each((function(){let e=this.getAttribute("data-advanced-total-input");n+=Math.abs(e)})),e.attr("data-advanced-total",n),p(e)})),(i>0||!e.attr("data-advanced-previous-total")||i!=e.attr("data-advanced-previous-total"))&&u(!0),f()},d=function(t=!1){let n=jQuery('.em-search-advanced-trigger[data-search-advanced-id="em-search-advanced-'+o+'"]');n.find("span.total-count").remove();let i=e.attr("data-advanced-total");if(i>0){let e=jQuery(''+i+"").appendTo(n);t||e.addClass("tentative")}},u=function(t=!1){let n=s.find('button[type="submit"]'),i=e.find('.em-search-main-bar button[type="submit"]'),o=n.add(i);t?o.removeClass("disabled").attr("aria-disabled","false"):o.addClass("disabled").attr("aria-disabled","true")},p=function(e){let n=e.attr("data-advanced-total");e.find("header span.total-count").remove(),n>0&&t(''+n+"").appendTo(e.find("header"))},f=function(){let t=s.find('button[type="reset"]');t.attr("data-placeholder")||t.attr("data-placeholder",t.text());let n=e.attr("data-advanced-total");n>0?(t.text(t.attr("data-placeholder")+" ("+n+")").prop("disabled",!1),t.removeClass("disabled").attr("aria-disabled","false")):(t.text(t.attr("data-placeholder")),t.addClass("disabled").attr("aria-disabled","true"))};e.find(".em-search-views-trigger").each((function(){i.content=this.parentElement.getAttribute("aria-label");let a=tippy(this.parentElement,i),s=this.parentElement.querySelector(".em-search-views-options"),l=s.parentElement,c=document.createElement("div");n.content=c;let d=tippy(this,n);d.setProps({onShow(e){a.disable(),c.append(s)},onShown(e){s.querySelector("input:checked").focus()},onHidden(e){a.enable(),s.parentElement!==l&&l.append(s)}});let u=function(e){if("keydown"===e.type&&13!==e.which&&40!==e.which)return!1;e.preventDefault(),e.stopPropagation(),this._tippy.show(),a.hide()};this.addEventListener("click",u),this.addEventListener("keydown",u),this.firstElementChild.addEventListener("focus",(function(e){d.hide(),a.enable(),a.show()})),this.firstElementChild.addEventListener("blur",(function(){a.hide()})),e.on("focus blur",".em-search-views-options input",(function(){document.activeElement===this?this.parentElement.classList.add("focused"):this.parentElement.classList.remove("focused")})),e.on("keydown click",".em-search-views-options input",(function(e){if("keydown"===e.type&&13!==e.which)return-1!==[37,38,39,40].indexOf(e.which)?(38===e.which?this.parentElement.previousElementSibling&&this.parentElement.previousElementSibling.focus():40===e.which&&this.parentElement.nextElementSibling&&this.parentElement.nextElementSibling.focus(),!1):(9===e.which&&d.hide(),!0);this.checked=!0;let n=t(this);n.closest("fieldset").find("label").removeClass("checked"),n.parent().addClass("checked");let i=t(this).closest(".em-search-views"),a=this.value,s=i.children(".em-search-views-trigger").children(".em-search-view-option");a!==s.attr("data-view")&&(s.attr("data-view",this.value).text(this.parentElement.innerText),t("#em-view-"+o).find("#em-view-custom-data-search-"+o).remove(),r.find('button[type="submit"]').focus(),r.trigger("forcesubmit")),d.hide()}))})),e.on("click","button.em-search-advanced-trigger",(function(){if(e.hasClass("advanced-mode-inline"))s.hasClass("visible")?(s.slideUp().removeClass("visible"),"_tippy"in this&&this._tippy.setContent(this.getAttribute("data-label-show"))):(s.slideDown().addClass("visible"),"_tippy"in this&&this._tippy.setContent(this.getAttribute("data-label-hide")));else if(!s.hasClass("active")){let e=t('
            ');e.appendTo(s),s.find(".em-modal-popup").appendTo(e);let n=this;openModal(s,(function(){n.blur(),s.find("input.em-search-text").focus()}))}})),s.on("em_modal_close",(function(){s.find(".em-modal-popup").appendTo(s),s.children("form").remove();let t=e.find("button.em-search-advanced-trigger").focus();"_tippy"in t[0]&&t[0]._tippy.hide()})),s.find(".em-search-advanced-section > header").on("click",(function(){let e=t(this),n=e.closest("section"),i=e.siblings(".em-search-section-content");n.hasClass("active")?(i.slideUp(),n.removeClass("active")):(i.slideDown(),n.addClass("active"))}));let m=function(e){let n=t(e),i=""!==n.val()?1:0;l(n,i)};e.on("change input",".em-search-main-bar input.em-search-text",(function(e){let t=s.find("input.em-search-text");t.val(this.value),m(t[0])})),e.on("change",".em-search-main-bar input.em-search-geo-coords",(function(){let e=t(this),n=s.find("div.em-search-geo"),i=n.find("input.em-search-geo-coords");i.val(e.val()).attr("class",e.attr("class"));let o=e.siblings("input.em-search-geo").first();n.find("input.em-search-geo").val(o.val()).attr("class",o.attr("class")),m(i)})),e.find(".em-search-main-bar .em-datepicker input.em-search-scope.flatpickr-input").each((function(){"_flatpickr"in this&&this._flatpickr.config.onClose.push((function(e,t,n){let i=s.find(".em-datepicker input.em-search-scope.flatpickr-input");i[0]._flatpickr.setDate(e,!0),i[0]._flatpickr.close()}))})),s.on("change input","input.em-search-text",(function(t){"change"===t.type?e.find(".em-search-main input.em-search-text").val(this.value):m(this)})),s.on("change","input.em-search-geo-coords",(function(n){m(this);let i=t(this),o=e.find(".em-search-main div.em-search-geo");if(o.length>0){o.find("input.em-search-geo-coords").val(i.val()).attr("class",i.attr("class"));let e=i.siblings("input.em-search-geo");o.find("input.em-search-geo").val(e.val()).attr("class",e.attr("class"))}})),s.on("change","input.em-search-eventful",(function(e){let n=t(this),i=n.prop("checked")?1:0;l(n,i)})),s.on("calculate_totals",(function(){t(this).find("input.em-search-text, input.em-search-geo-coords").each((function(){m(this)})),t(this).find("input.em-search-eventful").trigger("change")})),s.on("clear_search",(function(){t(this).find("input.em-search-geo").removeClass("off").removeClass("on").val("")})),s.find(".em-datepicker input.em-search-scope.flatpickr-input").each((function(){"_flatpickr"in this&&this._flatpickr.config.onClose.push((function(t,n,i){if(i.input.getAttribute("data-previous-value")!==n){let o=n?1:0;l(i.input,o);let a=e.find(".em-search-main-bar .em-datepicker input.em-search-scope.flatpickr-input");a.length>0&&a[0]._flatpickr.setDate(t,!0),i.input.setAttribute("data-previous-value",n)}}))})),s.on("calculate_totals",(function(){s.find(".em-datepicker input.em-search-scope.flatpickr-input").first().each((function(){let e=this._flatpickr.selectedDates.length>0?1:0;l(this,e)}))})),s.on("clear_search",(function(){s.find(".em-datepicker input.em-search-scope.flatpickr-input").each((function(){this._flatpickr.clear(),l(this,0)}))}));let h=function(){e.find(".em-datepicker input.em-search-scope.flatpickr-input").each((function(){if("calendar"==e.attr("data-view"))this.setAttribute("data-advanced-total-input",0),this._flatpickr.input.disabled=!0;else{this._flatpickr.input.disabled=!1;let e=this._flatpickr.selectedDates.length>0?1:0;this.setAttribute("data-advanced-total-input",e)}}))};t(document).on("em_search_loaded",h),h(),s.find("select.em-selectize").each((function(){this.selectize.on("change",(function(){g(this)}))})),s.on("calculate_totals",(function(){t(this).find("select.em-selectize").each((function(){g(this.selectize)}))})),s.on("clear_search",(function(){s.find("select.em-selectize").each((function(){this.selectize.clear(),this.selectize.refreshItems(),this.selectize.refreshOptions(),this.classList.contains("always-open")||(this.selectize.close(),this.selectize.$dropdown.hide())}))}));let g=function(e){let t=e.items.length;1!=t||e.items[0]||(t=0),l(e.$input,t)},v=function(){if("selectize"in this){this.selectize.settings.placeholder=this.selectize.settings.original_placeholder,this.selectize.updatePlaceholder();let e=[];this.selectize.$input.find("option").each((function(){let t=null!==this.value?this.value:this.innerHTML;e.push({value:t,text:this.innerHTML})})),this.selectize.addOption(e),this.selectize.refreshOptions(!1)}},y=function(){"selectize"in this&&(this.selectize.clearOptions(),"original_placeholder"in this.selectize.settings||(this.selectize.settings.original_placeholder=this.selectize.settings.placeholder),this.selectize.settings.placeholder=EM.txt_loading,this.selectize.updatePlaceholder())};t(".em-search-advanced select[name=country], .em-search select[name=country]").on("change",(function(){var e=t(this);let n=e.closest(".em-search-location");if(n.find("select[name=state]").html('"),n.find("select[name=region]").html('"),n.find("select[name=town]").html('"),n.find("select[name=state], select[name=region], select[name=town]").each(y),""!=e.val()){n.find(".em-search-location-meta").slideDown();var i={action:"search_states",country:e.val(),return_html:!0};n.find("select[name=state]").load(EM.ajaxurl,i,v),i.action="search_regions",n.find("select[name=region]").load(EM.ajaxurl,i,v),i.action="search_towns",n.find("select[name=town]").load(EM.ajaxurl,i,v)}else n.find(".em-search-location-meta").slideUp()})),t(".em-search-advanced select[name=region], .em-search select[name=region]").on("change",(function(){var e=t(this);let n=e.closest(".em-search-location");n.find("select[name=state]").html('"),n.find("select[name=town]").html('"),n.find("select[name=state], select[name=town]").each(y);var i={action:"search_states",region:e.val(),country:n.find("select[name=country]").val(),return_html:!0};n.find("select[name=state]").load(EM.ajaxurl,i,v),i.action="search_towns",n.find("select[name=town]").load(EM.ajaxurl,i,v)})),t(".em-search-advanced select[name=state], .em-search select[name=state]").on("change",(function(){var e=t(this);let n=e.closest(".em-search-location");n.find("select[name=town]").html('").each(y);var i={action:"search_towns",state:e.val(),region:n.find("select[name=region]").val(),country:n.find("select[name=country]").val(),return_html:!0};n.find("select[name=town]").load(EM.ajaxurl,i,v)})),s.on("click",'button[type="reset"]',(function(){0!=e.attr("data-advanced-total")&&(s.find("input.em-search-text, input.em-search-geo").val("").attr("data-advanced-total-input",null).trigger("change"),e.trigger("clear_search"),s.trigger("clear_search"),c(!0),s.find(".em-search-advanced-section").removeClass("active").children(".em-search-section-content").slideUp(),s.find('button[type="submit"]').trigger("forceclick"),f())})).each((function(){s.trigger("calculate_totals"),c(!0)}));const b=function(e,t=!0){d(t)};e.on("update_trigger_count",b),s.on("update_trigger_count",b),s.on("click forceclick",'button[type="submit"]',(function(e){return e.preventDefault(),this.classList.contains("disabled")&&"forceclick"!==e.type||(s.hasClass("em-modal")?closeModal(s,(function(){r.submit()})):r.submit()),!1})),e.on("submit forcesubmit",".em-search-form",(function(n){n.preventDefault();let i=t(this),r=i.find('button[type="submit"]');if("forcesubmit"!==n.type&&r.hasClass("disabled"))return!1;let l=i.closest(".em-search");if(l.hasClass("em-search-legacy"))a(i);else{let a=t("#em-view-"+o),p=i.find('[name="view"]:checked, .em-search-view-option-hidden').val();Array.isArray(p)&&(p=p.shift());let f=a.find("#em-view-custom-data-search-"+o).clone(),m=t('
            ');f.children().appendTo(m),f.remove(),m.appendTo(i),a.append('
            '),r.each((function(){EM.txt_searching!==this.innerHTML&&(this.setAttribute("data-button-text",this.innerHTML),this.innerHTML=EM.txt_searching)}));var d=i.serialize();t.ajax(EM.ajaxurl,{type:"POST",dataType:"html",data:d,success:function(t){r.each((function(){this.innerHTML=this.getAttribute("data-button-text")})),a=EM_View_Updater(a,t),a.attr("data-view",p),e.attr("data-view",p),s.attr("data-view",p),jQuery(document).triggerHandler("em_view_loaded_"+p,[a,i,n]),jQuery(document).triggerHandler("em_search_loaded",[a,i,n]),jQuery(document).triggerHandler("em_search_result",[d,a,n]),l.find(".count.tentative").removeClass("tentative"),r.addClass("disabled").attr("aria-disabled","true"),c(!0),e.attr("data-advanced-previous-total",e.attr("data-advanced-total")),u(!1),m.remove()}})}return!1})),EM_ResizeObserver(EM.search.breakpoints,[e[0]])})),t(document).on("click",".em-search-advanced-trigger[data-search-advanced-id]",(function(){this.getAttribute("data-parent-trigger")&&document.getElementById(this.getAttribute("data-parent-trigger")).click()})),t(document).on("click",".em-view-container .em-ajax.em-pagination a.page-numbers",(function(e){let n=t(this),i=n.closest(".em-view-container"),a=n.attr("href"),r=n.closest(".em-pagination").attr("data-em-ajax");r&&(a+="&"+r);let s=new URL(a,window.location.origin).searchParams;return i.attr("data-view")&&s.set("view",i.attr("data-view")),i.append('
            '),t.ajax(EM.ajaxurl,{type:"POST",dataType:"html",data:s.toString(),success:function(e){i=EM_View_Updater(i,e),i.find(".em-pagination").each((function(){o.observe(this)})),jQuery(document).triggerHandler("em_page_loaded",[i])}}),e.preventDefault(),!1}));const o=new ResizeObserver((function(e){for(let t of e){let e=t.target;if(!e.classList.contains("observing")){e.classList.add("observing");let t=!1;e.classList.remove("overflowing");for(const n of e.querySelectorAll(".not-current"))if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth){t=!0;break}t&&e.classList.add("overflowing"),e.classList.remove("observing")}}}));t(".em-pagination").each((function(){o.observe(this)})),t(document).on("click change",".em-search-legacy .em-toggle",(function(e){e.preventDefault();var n=t(this),i=n.attr("rel").split(":");n.hasClass("show-search")?(i.length>1?n.closest(i[1]).find(i[0]).slideUp():t(i[0]).slideUp(),n.find(".show, .show-advanced").show(),n.find(".hide, .hide-advanced").hide(),n.removeClass("show-search")):(i.length>1?n.closest(i[1]).find(i[0]).slideDown():t(i[0]).slideDown(),n.find(".show, .show-advanced").hide(),n.find(".hide, .hide-advanced").show(),n.addClass("show-search"))}));let a=function(n){this.em_search&&this.em_search.value==EM.txt_search&&(this.em_search.value="");var i=n.closest(".em-search-wrapper").find(".em-search-ajax");if(0==i.length&&(i=t(".em-search-ajax")),i.length>0){i.append('
            ');var o=n.find(".em-search-submit button");o.attr("data-button-text",o.val()).val(EM.txt_searching);var a=o.children("img");a.length>0&&a.attr("src",a.attr("src").replace("search-mag.png","search-loading.gif"));var r=n.serialize();return t.ajax(EM.ajaxurl,{type:"POST",dataType:"html",data:r,success:function(s){o.val(o.attr("data-button-text")),a.length>0&&a.attr("src",a.attr("src").replace("search-loading.gif","search-mag.png")),i.replaceWith(s),""==n.find("input[name=em_search]").val()&&n.find("input[name=em_search]").val(EM.txt_search),0==(i=n.closest(".em-search-wrapper").find(".em-search-ajax")).length&&(i=t(".em-search-ajax")),jQuery(document).triggerHandler("em_search_ajax",[r,i,e])}}),e.preventDefault(),!1}};t(".em-search-ajax").length>0&&t(document).on("click",".em-search-ajax a.page-numbers",(function(e){var n=t(this),i=n.closest(".em-pagination").attr("data-em-ajax"),o=n.closest(".em-search-ajax"),a=o.parent(),r=n.attr("href").split("?")[1];return""!=i&&(r=""!=r?r+"&"+i:i),r+="&legacy=1",o.append('
            '),t.ajax(EM.ajaxurl,{type:"POST",dataType:"html",data:r,success:function(t){o.replaceWith(t),o=a.find(".em-search-ajax"),jQuery(document).triggerHandler("em_search_ajax",[r,o,e])}}),e.preventDefault(),!1}))})),jQuery(document).ready((function(e){const t=function(t){(t=e(t)).attr("id")&&t.attr("id").match(/^em-calendar-[0-9+]$/)||t.attr("id","em-calendar-"+Math.floor(1e4*Math.random())),t.find("a").off("click"),t.on("click","a.em-calnav, a.em-calnav-today",(function(n){n.preventDefault();const i=e(this);if(1==i.data("disabled")||""===i.attr("href"))return;i.closest(".em-calendar").prepend('
            ');let o=em_ajaxify(i.attr("href"));const a=t.attr("id").replace("em-calendar-",""),r=e("form#em-view-custom-data-calendar-"+a);let s=new FormData;if(r.length>0){s=new FormData(r[0]);let e=new URL(o,window.location.origin).searchParams;for(const[t,n]of e.entries())s.set(t,n)}t.hasClass("with-advanced")&&s.set("has_advanced_trigger",1),e.ajax({url:o,data:s,processData:!1,contentType:!1,method:"POST",success:function(e){let n=EM_View_Updater(t,e);(t=n.hasClass("em-view-container")?n.find(".em-calendar"):n).trigger("em_calendar_load")},dataType:"html"})}));let n=function(t,n){let i=e(''+n+"");i.insertAfter(t);let o=i.width()+40;i.remove(),t.style.setProperty("width",o+"px","important")};!function(){let i=t.find(".month form");if(t.find(".event-style-pill .em-cal-event").on("click",(function(e){if(e.preventDefault(),!(t.hasClass("preview-tooltips")&&t.data("preview-tooltips-trigger")||t.hasClass("preview-modal"))){let e=this.getAttribute("data-event-url");null!==e&&(window.location.href=e)}})),i.length>0){i.find('input[type="submit"]').hide();let o=e('').appendTo(i),a=(e("").appendTo(o),t.find('select[name="month"]').val(),t.find('select[name="year"]').val(),t.find('select[name="month"]'),t.find('select[name="year"]'),t.find(".em-month-picker")),r=a.data("month-value");a.prop("type","text").prop("value",r),n(a[0],r);let s=e("#em-flatpickr");0===s.length&&(s=e('
            ').appendTo("body"));let l=null;"future"===t.data("scope")&&(l=new Date,l.setMonth(l.getMonth()-1)),"locale"in EM.datepicker&&(flatpickr.localize(flatpickr.l10ns[EM.datepicker.locale]),flatpickr.l10ns.default.firstDayOfWeek=EM.firstDay),a.flatpickr({appendTo:s[0],dateFormat:"F Y",minDate:l,disableMobile:"true",plugins:[new monthSelectPlugin({shorthand:!0,dateFormat:"F Y",altFormat:"F Y"})],onChange:function(e,i,o){n(o.input,i),function(e,t,n){let i=e.find(".em-calnav-next"),o=new URL(i.attr("href"),window.location.origin);o.searchParams.set("mo",n),o.searchParams.set("yr",t),i.attr("href",o.toString()).trigger("click")}(t,e[0].getFullYear(),e[0].getMonth()+1)}}),a.addClass("select-toggle")}if(t.hasClass("preview-tooltips")){var o={theme:"light-border",allowHTML:!0,interactive:!0,trigger:"mouseenter focus click",content:e=>document.createElement("div"),onShow(e){const n=e.reference.getAttribute("data-event-id"),i=t.find('section.em-cal-events-content .em-cal-event-content[data-event-id="'+n+'"]');e.props.content.append(i.first().clone()[0])},onHide(e){e.props.content.innerHTML=""}};t.data("preview-tooltips-trigger")&&(o.trigger=t.data("preview-tooltips-trigger")),e(document).trigger("em-tippy-cal-event-vars",[o]),tippy(t.find(".em-cal-event").toArray(),o)}else t.hasClass("preview-modal")&&t.find(".em-cal-event").on("click",(function(){const e=this.getAttribute("data-event-id"),n=t.find('section.em-cal-events-content .em-cal-event-content[data-event-id="'+e+'"]');n.attr("data-calendar-id",t.attr("id")),openModal(n)}));t.hasClass("responsive-dateclick-modal")&&t.find(".eventful .em-cal-day-date, .eventful-post .em-cal-day-date, .eventful-pre .em-cal-day-date").on("click",(function(e){e.preventDefault();const n=this.getAttribute("data-calendar-date"),i=t.find('.em-cal-date-content[data-calendar-date="'+n+'"]');i.attr("data-calendar-id",t.attr("id")),openModal(i)})),t.hasClass("size-fixed")||EM_ResizeObserver(EM.calendar.breakpoints,[t[0],t[0]]);let a=t.find(".em-cal-body");if(a.hasClass("even-aspect")){let e=function(e){let t=e.firstElementChild.getBoundingClientRect().width;t>0&&e.style.setProperty("--grid-auto-rows","minmax("+t+"px, auto)")};new ResizeObserver((function(t){for(let n of t)e(n.target)})).observe(a[0]),e(a[0])}if(t.find(".date-day-colors").each((function(){let t=JSON.parse(this.getAttribute("data-colors")),n=e(this).siblings(".em-cal-day-date.colored"),i={1:{1:"--date-border-color",class:"one"},2:{1:"--date-border-color-top",2:"--date-border-color-bottom",class:"two"},3:{1:"--date-border-color-top",2:"--date-border-color-right",3:"--date-border-color-bottom",class:"three"},4:{1:"--date-border-color-top",2:"--date-border-color-right",3:"--date-border-color-bottom",4:"--date-border-color-left",class:"four"}};for(let o=0;o
            ').prependTo(n);r.appendTo(s),s.addClass(i[a.length].class);for(let e=0;e0)n.hasClass("em-view-container")?(i.replaceWith(n),i=n):i.empty().append(n);else if(n.hasClass("em-view-container"))e.replaceWith(n),i=n;else if(n.attr("data-view-id")){let t=jQuery('
            '),i=n.attr("data-view-id");t.attr("data-view-id",i),t.attr("id","em-view-"+i),t.attr("data-view-type",n.attr("data-view-type")),t.append(n),e.replaceWith(t)}return i},EM_ResizeObserver=function(e,t){const n=new ResizeObserver((function(t){for(let n of t){let t=n.target;if(!t.classList.contains("size-fixed"))for(const[n,i]of Object.entries(e))if(t.offsetWidth<=i||!1===i){for(let i of Object.keys(e))i!==n&&t.classList.remove("size-"+i);t.classList.add("size-"+n);break}}}));return t.forEach((function(e){void 0!==e&&n.observe(e)})),n};jQuery(document).ready((function(e){let t={small:600,large:!1};const n=EM_ResizeObserver(t,e(".em-list").toArray());e(document).on("em_page_loaded em_view_loaded_list em_view_loaded_list-grouped em_view_loaded_grid",(function(e,t){t.find(".em-list").each((function(){this.classList.contains("size-fixed")||n.observe(this)}))})),e(document).on("click",".em-grid .em-item[data-href]",(function(e){"a"!==e.target.type&&(window.location.href=this.getAttribute("data-href"))})),t={small:600,medium:900,large:!1};const i=EM_ResizeObserver(t,e(".em-item-single").toArray());e(document).on("em_view_loaded",(function(e,t){t.find(".em-event-single").each((function(){this.classList.contains("size-fixed")||i.observe(this)}))})),e(document).on("click",".em-event-booking-form .em-login-trigger a",(function(t){t.preventDefault();var n=e(this).closest(".em-event-booking-form");n.find(".em-login-trigger").hide(),n.find(".em-login-content").fadeIn();let i=n.find(".em-login");i[0].scrollIntoView({behavior:"smooth"}),i.first().find('input[name="log"]').focus()})),e(document).on("click",".em-event-booking-form .em-login-cancel",(function(t){t.preventDefault();let n=e(this).closest(".em-event-booking-form");n.find(".em-login-content").hide(),n.find(".em-login-trigger").show()})),EM_ResizeObserver({small:500,large:!1},e(".em-login").toArray())})),document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("form.em-ajax-form").forEach((function(e){e.addEventListener("submit",(function(e){e.preventDefault();let t=e.currentTarget,n=new FormData(t);t.querySelector('button[type="submit"]');if(t.classList.contains("no-overlay-spinner"))t.classList.add("loading");else{let e=document.createElement("div");e.id="em-loading",t.append(e)}var i=new XMLHttpRequest;return t.getAttribute("data-api-url")?(i.open("POST",t.getAttribute("data-api-url"),!0),i.setRequestHeader("X-WP-Nonce",EM.api_nonce)):i.open("POST",EM.ajaxurl,!0),i.onload=function(){if(this.status>=200&&this.status<400)try{let e,i=JSON.parse(this.response);t.classList.contains("no-inline-notice")||(e=t.querySelector(".em-notice"),e||(e=document.createElement("li"),t.prepend(e),n.get("action")&&t.dispatchEvent(new CustomEvent("em_ajax_form_success_"+n.get("action"),{detail:{form:t,notice:e,response:i}}))),e.innerHTML="",e.setAttribute("class","em-notice")),i.result?t.classList.contains("no-inline-notice")?(t.classList.add("load-successful"),t.classList.remove("loading"),i.message&&EM_Alert(i.message)):(e.classList.add("em-notice-success"),e.innerHTML=i.message,t.replaceWith(e)):t.classList.contains("no-inline-notice")?EM_Alert(i.errors):(e.classList.add("em-notice-error"),e.innerHTML=i.errors)}catch(e){alert("Error Encountered : "+e)}else alert("Error encountered... please see debug logs or contact support.");t.classList.remove("loading")},i.onerror=function(){alert("Connection error encountered... please see debug logs or contact support.")},i.send(n),!1}))}))})), +/*! + * jquery-timepicker v1.13.16 - Copyright (c) 2020 Jon Thornton - https://www.jonthornton.com/jquery-timepicker/ + * Did a search/replace of timepicker to em_timepicker to prevent conflicts. + */ +function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 i,o,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,o=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw o}}}}var s=86400,l=function(e,t){if(null===e)return null;if("number"!=typeof t.step)return e;var n=e%(60*t.step);return(n-=(t.minTime||0)%(60*t.step))>=30*t.step?e+=60*t.step-n:e-=n,function(e,t){if(e==s&&t.show2400)return e;return e%s}(e,t)};var c,d={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,lang:{},listWidth:null,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:l,scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},u={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},p=function(){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this._handleFormatValue=this._handleFormatValue.bind(this),this._handleKeyUp=this._handleKeyUp.bind(this),this.targetEl=e;var i=n.extractAttrOptions(e,Object.keys(d));this.settings=this.parseSettings(o(o(o({},d),t),i))}var i,a,l;return i=n,l=[{key:"extractAttrOptions",value:function(e,t){var n,i={},o=r(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;a in e.dataset&&(i[a]=e.dataset[a])}}catch(e){o.e(e)}finally{o.f()}return i}},{key:"isVisible",value:function(e){var t=e[0];return t.offsetWidth>0&&t.offsetHeight>0}},{key:"hideAll",value:function(){var e,t=r(document.getElementsByClassName("ui-em_timepicker-input"));try{for(t.s();!(e=t.n()).done;){var n=e.value.em_timepickerObj;n&&n.hideMe()}}catch(e){t.e(e)}finally{t.f()}}}],(a=[{key:"hideMe",value:function(){if(this.settings.useSelect)this.targetEl.blur();else if(this.list&&n.isVisible(this.list)){this.settings.selectOnBlur&&this._selectValue(),this.list.hide();var e=new CustomEvent("hideTimepicker");this.targetEl.dispatchEvent(e)}}},{key:"_findRow",value:function(e){if(!e&&0!==e)return!1;var t=!1;return e=this.settings.roundingFunction(e,this.settings),!!this.list&&(this.list.find("li").each((function(n,i){var o=Number.parseInt(i.dataset.time);if(!Number.isNaN(o))return o==e?(t=i,!1):void 0})),t)}},{key:"_hideKeyboard",value:function(){return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.settings.disableTouchKeyboard}},{key:"_setTimeValue",value:function(e,t){if("INPUT"===this.targetEl.nodeName){null===e&&""==this.targetEl.value||(this.targetEl.value=e);var n=this;n.settings.useSelect&&"select"!=t&&n.list&&n.list.val(n._roundAndFormatTime(n.time2int(e)))}var i=new Event("selectTime");if(this.selectedValue!=e){this.selectedValue=e;var o=new Event("changeTime"),a=new CustomEvent("change",{detail:"em_timepicker"});return"select"==t?(this.targetEl.dispatchEvent(i),this.targetEl.dispatchEvent(o),this.targetEl.dispatchEvent(a)):-1==["error","initial"].indexOf(t)&&this.targetEl.dispatchEvent(o),!0}return-1==["error","initial"].indexOf(t)&&this.targetEl.dispatchEvent(i),!1}},{key:"_getTimeValue",value:function(){return"INPUT"===this.targetEl.nodeName?this.targetEl.value:this.selectedValue}},{key:"_selectValue",value:function(){var e=this,t=(e.settings,e.list.find(".ui-em_timepicker-selected"));if(t.hasClass("ui-em_timepicker-disabled"))return!1;if(!t.length)return!0;var n=t.get(0).dataset.time;if(n){var i=Number.parseInt(n);Number.isNaN(i)||(n=i)}return null!==n&&("string"!=typeof n&&(n=e._int2time(n)),e._setTimeValue(n,"select")),!0}},{key:"time2int",value:function(e){if(""===e||null==e)return null;if(e instanceof Date)return 3600*e.getHours()+60*e.getMinutes()+e.getSeconds();if("string"!=typeof e)return e;"a"!=(e=e.toLowerCase().replace(/[\s\.]/g,"")).slice(-1)&&"p"!=e.slice(-1)||(e+="m");var t=/^(([^0-9]*))?([0-9]?[0-9])(([0-5][0-9]))?(([0-5][0-9]))?(([^0-9]*))$/;e.match(/\W/)&&(t=/^(([^0-9]*))?([0-9]?[0-9])(\W+([0-5][0-9]?))?(\W+([0-5][0-9]))?(([^0-9]*))$/);var n=e.match(t);if(!n)return null;var i=parseInt(1*n[3],10),o=n[2]||n[9],a=i,r=1*n[5]||0,l=1*n[7]||0;if(o||2!=n[3].length||"0"!=n[3][0]||(o="am"),i<=12&&o){var c=(o=o.trim())==this.settings.lang.pm||o==this.settings.lang.PM;a=12==i?c?12:0:i+(c?12:0)}else if(3600*i+60*r+l>=s+(this.settings.show2400?1:0)){if(!1===this.settings.wrapHours)return null;a=i%24}var d=3600*a+60*r+l;if(i<12&&!o&&this.settings._twelveHourTime&&this.settings.scrollDefault){var u=d-this.settings.scrollDefault();u<0&&u>=s/-2&&(d=(d+s/2)%s)}return d}},{key:"parseSettings",value:function(e){var t=this;if(e.lang=o(o({},u),e.lang),this.settings=e,e.minTime&&(e.minTime=this.time2int(e.minTime)),e.maxTime&&(e.maxTime=this.time2int(e.maxTime)),e.listWidth&&(e.listWidth=this.time2int(e.listWidth)),e.durationTime&&"function"!=typeof e.durationTime&&(e.durationTime=this.time2int(e.durationTime)),"now"==e.scrollDefault)e.scrollDefault=function(){return e.roundingFunction(t.time2int(new Date),e)};else if(e.scrollDefault&&"function"!=typeof e.scrollDefault){var n=e.scrollDefault;e.scrollDefault=function(){return e.roundingFunction(t.time2int(n),e)}}else e.minTime&&(e.scrollDefault=function(){return e.roundingFunction(e.minTime,e)});if("string"==typeof e.timeFormat&&e.timeFormat.match(/[gh]/)&&(e._twelveHourTime=!0),!1===e.showOnFocus&&-1!=e.showOn.indexOf("focus")&&e.showOn.splice(e.showOn.indexOf("focus"),1),e.disableTimeRanges||(e.disableTimeRanges=[]),e.disableTimeRanges.length>0){for(var i in e.disableTimeRanges)e.disableTimeRanges[i]=[this.time2int(e.disableTimeRanges[i][0]),this.time2int(e.disableTimeRanges[i][1])];for(e.disableTimeRanges=e.disableTimeRanges.sort((function(e,t){return e[0]-t[0]})),i=e.disableTimeRanges.length-1;i>0;i--)e.disableTimeRanges[i][0]<=e.disableTimeRanges[i-1][1]&&(e.disableTimeRanges[i-1]=[Math.min(e.disableTimeRanges[i][0],e.disableTimeRanges[i-1][0]),Math.max(e.disableTimeRanges[i][1],e.disableTimeRanges[i-1][1])],e.disableTimeRanges.splice(i,1))}return e}},{key:"_disableTextInputHandler",value:function(e){switch(e.keyCode){case 13:case 9:return;default:e.preventDefault()}}},{key:"_int2duration",value:function(e,t){e=Math.abs(e);var n,i,o=Math.round(e/60),a=[];return o<60?a=[o,this.settings.lang.mins]:(n=Math.floor(o/60),i=o%60,30==t&&30==i&&(n+=this.settings.lang.decimal+5),a.push(n),a.push(1==n?this.settings.lang.hr:this.settings.lang.hrs),30!=t&&i&&(a.push(i),a.push(this.settings.lang.mins))),a.join(" ")}},{key:"_roundAndFormatTime",value:function(e){if(null!==(e=this.settings.roundingFunction(e,this.settings)))return this._int2time(e)}},{key:"_int2time",value:function(e){if("number"!=typeof e)return null;var t=parseInt(e%60),n=parseInt(e/60%60),i=parseInt(e/3600%24),o=new Date(1970,0,2,i,n,t,0);if(isNaN(o.getTime()))return null;if("function"==typeof this.settings.timeFormat)return this.settings.timeFormat(o);for(var a,r,l="",c=0;c11?this.settings.lang.pm:this.settings.lang.am;break;case"A":l+=o.getHours()>11?this.settings.lang.PM:this.settings.lang.AM;break;case"g":l+=0==(a=o.getHours()%12)?"12":a;break;case"G":a=o.getHours(),e===s&&(a=this.settings.show2400?24:0),l+=a;break;case"h":0!=(a=o.getHours()%12)&&a<10&&(a="0"+a),l+=0===a?"12":a;break;case"H":a=o.getHours(),e===s&&(a=this.settings.show2400?24:0),l+=a>9?a:"0"+a;break;case"i":l+=(n=o.getMinutes())>9?n:"0"+n;break;case"s":l+=(t=o.getSeconds())>9?t:"0"+t;break;case"\\":c++,l+=this.settings.timeFormat.charAt(c);break;default:l+=r}return l}},{key:"_setSelected",value:function(){var e=this.list;e.find("li").removeClass("ui-em_timepicker-selected");var t=this.time2int(this._getTimeValue());if(null!==t){var n=this._findRow(t);if(n){var i=n.getBoundingClientRect(),o=e.get(0).getBoundingClientRect(),a=i.top-o.top;if(a+i.height>o.height||a<0){var r=e.scrollTop()+(i.top-o.top)-i.height;e.scrollTop(r)}var s=Number.parseInt(n.dataset.time);(this.settings.forceRoundTime||s===t)&&n.classList.add("ui-em_timepicker-selected")}}}},{key:"_isFocused",value:function(e){return e===document.activeElement}},{key:"_handleFormatValue",value:function(e){e&&"em_timepicker"==e.detail||this._formatValue(e)}},{key:"_formatValue",value:function(e,t){if(""!==this.targetEl.value){if(!this._isFocused(this.targetEl)||e&&"change"==e.type){var n=this.settings,i=this.time2int(this.targetEl.value);if(null!==i){var o=!1;null!==n.minTime&&null!==n.maxTime&&(in.maxTime)&&(o=!0);var a,s=r(n.disableTimeRanges);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(i>=l[0]&&it(window).height()+t(window).scrollTop()?"t":"b")?(s.addClass("ui-em_timepicker-positioned-top"),l.top=n.offset().top-s.outerHeight()+parseInt(s.css("marginTop").replace("px",""),10)):(s.removeClass("ui-em_timepicker-positioned-top"),l.top=n.offset().top+n.outerHeight()+parseInt(s.css("marginTop").replace("px",""),10)),s.offset(l);var c=s.find(".ui-em_timepicker-selected");if(!c.length){var d=a.time2int(a._getTimeValue());null!==d?c=t(a._findRow(d)):r.scrollDefault&&(c=t(a._findRow(r.scrollDefault())))}if(c.length&&!c.hasClass("ui-em_timepicker-disabled")||(c=s.find("li:not(.ui-em_timepicker-disabled):first")),c&&c.length){var u=s.scrollTop()+c.position().top-c.outerHeight();s.scrollTop(u)}else s.scrollTop(0);return r.stopScrollPropagation&&t(document).on("wheel.ui-em_timepicker",".ui-em_timepicker-wrapper",(function(e){e.preventDefault();var n=t(this).scrollTop();t(this).scrollTop(n+e.originalEvent.deltaY)})),t(document).on("mousedown.ui-em_timepicker",o),t(window).on("resize.ui-em_timepicker",o),r.closeOnWindowScroll&&t(document).on("scroll.ui-em_timepicker",o),n.trigger("showTimepicker"),this}}},hide:function(e){var t=this[0].em_timepickerObj;return t&&t.hideMe(),p.hideAll(),this},option:function(n,o){return"string"==typeof n&&void 0===o?this[0].em_timepickerObj.settings[n]:this.each((function(){var a=t(this),r=a[0].em_timepickerObj,s=r.settings,l=r.list;"object"==e(n)?s=t.extend(s,n):"string"==typeof n&&(s[n]=o),s=r.parseSettings(s),r.settings=s,r._formatValue({type:"change"},"initial"),l&&(l.remove(),r.list=null),s.useSelect&&i(a)}))},getSecondsFromMidnight:function(){var e=this[0].em_timepickerObj;return e.time2int(e._getTimeValue())},getTime:function(e){var t=this[0].em_timepickerObj,n=t._getTimeValue();if(!n)return null;var i=t.time2int(n);if(null===i)return null;e||(e=new Date);var o=new Date(e);return o.setHours(i/3600),o.setMinutes(i%3600/60),o.setSeconds(i%60),o.setMilliseconds(0),o},isVisible:function(){var e=this[0].em_timepickerObj;return!!(e&&e.list&&p.isVisible(e.list))},setTime:function(e){var t=this[0].em_timepickerObj,n=t.settings;if(n.forceRoundTime)var i=t._roundAndFormatTime(t.time2int(e));else i=t._int2time(t.time2int(e));return e&&null===i&&n.noneOption&&(i=e),t._setTimeValue(i,"initial"),t._formatValue({type:"change"},"initial"),t&&t.list&&t._setSelected(),this},remove:function(){var e=this;if(e.hasClass("ui-em_timepicker-input")){var t=e[0].em_timepickerObj,n=t.settings;return e.removeAttr("autocomplete","off"),e.removeClass("ui-em_timepicker-input"),e.removeData("em_timepicker-obj"),e.off(".em_timepicker"),t.list&&t.list.remove(),n.useSelect&&e.show(),t.list=null,this}}};function i(e){var i=e[0].em_timepickerObj,o=i.list,a=i.settings;if(o&&o.length&&(o.remove(),i.list=null),a.useSelect){o=t("",{class:"ui-em_timepicker-select"}),e.attr("name")&&o.attr("name","ui-em_timepicker-"+e.attr("name"));var r=o}else o=t("
              ",{class:"ui-em_timepicker-list"}),(r=t("
              ",{class:"ui-em_timepicker-wrapper",tabindex:-1})).css({display:"none",position:"absolute"}).append(o);if(a.noneOption)if(!0===a.noneOption&&(a.noneOption=a.useSelect?"Time...":"None"),t.isArray(a.noneOption)){for(var c in a.noneOption)if(parseInt(c,10)==c){var d=i._generateNoneElement(a.noneOption[c],a.useSelect);o.append(d)}}else d=i._generateNoneElement(a.noneOption,a.useSelect),o.append(d);a.className&&r.addClass(a.className),null===a.minTime&&null===a.durationTime||!a.showDuration||("function"==typeof a.step||a.step,r.addClass("ui-em_timepicker-with-duration"),r.addClass("ui-em_timepicker-step-"+a.step));var u=a.minTime;"function"==typeof a.durationTime?u=i.time2int(a.durationTime()):null!==a.durationTime&&(u=a.durationTime);var p=null!==a.minTime?a.minTime:0,f=null!==a.maxTime?a.maxTime:p+s-1;f",{value:_})).text(_):((b=t("
            • ")).addClass(w%s",{class:"ui-em_timepicker-duration"});x.text(" ("+k+")"),b.append(x)}}h=m[h][1]&&(h+=1),m[h]&&w>=m[h][0]&&w0)return r=t(n),!1})),r.addClass("ui-em_timepicker-selected")),!1;case 40:return 0===(r=a.find(".ui-em_timepicker-selected")).length?(a.find("li").each((function(e,n){if(t(n).position().top>0)return r=t(n),!1})),r.addClass("ui-em_timepicker-selected")):r.is(":last-child")||(r.removeClass("ui-em_timepicker-selected"),r.next().addClass("ui-em_timepicker-selected"),r.next().position().top+2*r.outerHeight()>a.outerHeight()&&a.scrollTop(a.scrollTop()+r.outerHeight())),!1;case 27:a.find("li").removeClass("ui-em_timepicker-selected"),o.hideMe();break;case 9:o.hideMe();break;default:return!0}}t.fn.em_timepicker=function(i){return this.length?n[i]?this.hasClass("ui-em_timepicker-input")?n[i].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!==e(i)&&i?void t.error("Method "+i+" does not exist on jQuery.em_timepicker"):n.init.apply(this,arguments):this},t.fn.em_timepicker.defaults=d},"object"===("undefined"==typeof exports?"undefined":e(exports))&&exports&&"object"===("undefined"==typeof module?"undefined":e(module))&&module&&module.exports===exports?c(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],c):c(jQuery)}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},a=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},r=function(e){return!0===e?1:0};function s(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(i,o)}),t)}}var l=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function p(e,t){return t(e)?e:e.parentNode?p(e.parentNode,t):void 0}function f(e,t){var n=d("div","numInputWrapper"),i=d("input","numInput "+e),o=d("span","arrowUp"),a=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var r in t)i.setAttribute(r,t[r]);return n.appendChild(i),n.appendChild(o),n.appendChild(a),n}function m(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var h=function(){},g=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},v={D:h,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*r(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:h,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:h,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},y={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},b={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[b.w(e,t,n)]},F:function(e,t,n){return g(b.n(e,t,n)-1,!1,t)},G:function(e,t,n){return a(b.h(e,t,n))},H:function(e){return a(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[r(e.getHours()>11)]},M:function(e,t){return g(e.getMonth(),!0,t)},S:function(e){return a(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return a(e.getFullYear(),4)},d:function(e){return a(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return a(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return a(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},w=function(e){var t=e.config,n=void 0===t?i:t,a=e.l10n,r=void 0===a?o:a,s=e.isMobile,l=void 0!==s&&s;return function(e,t,i){var o=i||r;return void 0===n.formatDate||l?t.split("").map((function(t,i,a){return b[t]&&"\\"!==a[i-1]?b[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}},_=function(e){var t=e.config,n=void 0===t?i:t,a=e.l10n,r=void 0===a?o:a;return function(e,t,o,a){if(0===e||e){var s,l=a||r,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var d=t||(n||i).dateFormat,u=String(e).trim();if("today"===u)s=new Date,o=!0;else if(n&&n.parseDate)s=n.parseDate(e,d);else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else{for(var p=void 0,f=[],m=0,h=0,g="";m=0?new Date:new Date(b.config.minDate.getTime()),n=D(b.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),b.selectedDates=[t],b.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=m(e),i=n;void 0!==b.amPM&&n===b.amPM&&(b.amPM.textContent=b.l10n.amPM[r(b.amPM.textContent===b.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),s=parseFloat(i.getAttribute("max")),l=parseFloat(i.getAttribute("step")),c=parseInt(i.value,10),d=c+l*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==i.value&&2===i.value.length){var u=i===b.hourElement,p=i===b.minuteElement;ds&&(d=i===b.hourElement?d-s-r(!b.amPM):o,p&&N(void 0,1,b.hourElement)),b.amPM&&u&&(1===l?d+c===23:Math.abs(d-c)>l)&&(b.amPM.textContent=b.l10n.amPM[r(b.amPM.textContent===b.l10n.amPM[0])]),i.value=a(d)}}(e);var i=b._input.value;S(),xe(),b._input.value!==i&&b._debouncedChange()}function S(){if(void 0!==b.hourElement&&void 0!==b.minuteElement){var e,t,n=(parseInt(b.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(b.minuteElement.value,10)||0)%60,o=void 0!==b.secondElement?(parseInt(b.secondElement.value,10)||0)%60:0;void 0!==b.amPM&&(e=n,t=b.amPM.textContent,n=e%12+12*r(t===b.l10n.amPM[1]));var a=void 0!==b.config.minTime||b.config.minDate&&b.minDateHasTime&&b.latestSelectedDateObj&&0===k(b.latestSelectedDateObj,b.config.minDate,!0),s=void 0!==b.config.maxTime||b.config.maxDate&&b.maxDateHasTime&&b.latestSelectedDateObj&&0===k(b.latestSelectedDateObj,b.config.maxDate,!0);if(void 0!==b.config.maxTime&&void 0!==b.config.minTime&&b.config.minTime>b.config.maxTime){var l=x(b.config.minTime.getHours(),b.config.minTime.getMinutes(),b.config.minTime.getSeconds()),c=x(b.config.maxTime.getHours(),b.config.maxTime.getMinutes(),b.config.maxTime.getSeconds()),d=x(n,i,o);if(d>c&&d=12)]),void 0!==b.secondElement&&(b.secondElement.value=a(n)))}function F(e){var t=m(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&ee(n)}function P(e,t,n,i){return t instanceof Array?t.forEach((function(t){return P(e,t,n,i)})):e instanceof Array?e.forEach((function(e){return P(e,t,n,i)})):(e.addEventListener(t,n,i),void b._handlers.push({remove:function(){return e.removeEventListener(t,n,i)}}))}function L(){ye("onChange")}function H(e,t){var n=void 0!==e?b.parseDate(e):b.latestSelectedDateObj||(b.config.minDate&&b.config.minDate>b.now?b.config.minDate:b.config.maxDate&&b.config.maxDate=0&&k(e,b.selectedDates[1])<=0}(t)&&!we(t)&&a.classList.add("inRange"),b.weekNumbers&&1===b.config.showMonths&&"prevMonthDay"!==e&&i%7==6&&b.weekNumbers.insertAdjacentHTML("beforeend",""+b.config.getWeek(t)+""),ye("onDayCreate",a),a}function z(e){e.focus(),"range"===b.config.mode&&ae(e)}function R(e){for(var t=e>0?0:b.config.showMonths-1,n=e>0?b.config.showMonths:-1,i=t;i!=n;i+=e)for(var o=b.daysContainer.children[i],a=e>0?0:o.children.length-1,r=e>0?o.children.length:-1,s=a;s!=r;s+=e){var l=o.children[s];if(-1===l.className.indexOf("hidden")&&te(l.dateObj))return l}}function V(e,t){var n=O(),i=ne(n||document.body),o=void 0!==e?e:i?n:void 0!==b.selectedDateElem&&ne(b.selectedDateElem)?b.selectedDateElem:void 0!==b.todayDateElem&&ne(b.todayDateElem)?b.todayDateElem:R(t>0?1:-1);void 0===o?b._input.focus():i?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():b.currentMonth,i=t>0?b.config.showMonths:-1,o=t>0?1:-1,a=n-b.currentMonth;a!=i;a+=o)for(var r=b.daysContainer.children[a],s=n-b.currentMonth===a?e.$i+t:t<0?r.children.length-1:0,l=r.children.length,c=s;c>=0&&c0?l:-1);c+=o){var d=r.children[c];if(-1===d.className.indexOf("hidden")&&te(d.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return z(d)}b.changeMonth(o),V(R(o),0)}(o,t):z(o)}function Y(e,t){for(var n=(new Date(e,t,1).getDay()-b.l10n.firstDayOfWeek+7)%7,i=b.utils.getDaysInMonth((t-1+12)%12,e),o=b.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),r=b.config.showMonths>1,s=r?"prevMonthDay hidden":"prevMonthDay",l=r?"nextMonthDay hidden":"nextMonthDay",c=i+1-n,u=0;c<=i;c++,u++)a.appendChild(Q("flatpickr-day "+s,new Date(e,t-1,c),0,u));for(c=1;c<=o;c++,u++)a.appendChild(Q("flatpickr-day",new Date(e,t,c),0,u));for(var p=o+1;p<=42-n&&(1===b.config.showMonths||u%7!=0);p++,u++)a.appendChild(Q("flatpickr-day "+l,new Date(e,t+1,p%o),0,u));var f=d("div","dayContainer");return f.appendChild(a),f}function W(){if(void 0!==b.daysContainer){u(b.daysContainer),b.weekNumbers&&u(b.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==b.config.monthSelectorType)){var e=function(e){return!(void 0!==b.config.minDate&&b.currentYear===b.config.minDate.getFullYear()&&eb.config.maxDate.getMonth())};b.monthsDropdownContainer.tabIndex=-1,b.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=d("option","flatpickr-monthDropdown-month");n.value=new Date(b.currentYear,t).getMonth().toString(),n.textContent=g(t,b.config.shorthandCurrentMonth,b.l10n),n.tabIndex=-1,b.currentMonth===t&&(n.selected=!0),b.monthsDropdownContainer.appendChild(n)}}}function B(){var e,t=d("div","flatpickr-month"),n=window.document.createDocumentFragment();b.config.showMonths>1||"static"===b.config.monthSelectorType?e=d("span","cur-month"):(b.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),b.monthsDropdownContainer.setAttribute("aria-label",b.l10n.monthAriaLabel),P(b.monthsDropdownContainer,"change",(function(e){var t=m(e),n=parseInt(t.value,10);b.changeMonth(n-b.currentMonth),ye("onMonthChange")})),q(),e=b.monthsDropdownContainer);var i=f("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",b.l10n.yearAriaLabel),b.config.minDate&&o.setAttribute("min",b.config.minDate.getFullYear().toString()),b.config.maxDate&&(o.setAttribute("max",b.config.maxDate.getFullYear().toString()),o.disabled=!!b.config.minDate&&b.config.minDate.getFullYear()===b.config.maxDate.getFullYear());var a=d("div","flatpickr-current-month");return a.appendChild(e),a.appendChild(i),n.appendChild(a),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function U(){u(b.monthNav),b.monthNav.appendChild(b.prevMonthNav),b.config.showMonths&&(b.yearElements=[],b.monthElements=[]);for(var e=b.config.showMonths;e--;){var t=B();b.yearElements.push(t.yearElement),b.monthElements.push(t.monthElement),b.monthNav.appendChild(t.container)}b.monthNav.appendChild(b.nextMonthNav)}function K(){b.weekdayContainer?u(b.weekdayContainer):b.weekdayContainer=d("div","flatpickr-weekdays");for(var e=b.config.showMonths;e--;){var t=d("div","flatpickr-weekdaycontainer");b.weekdayContainer.appendChild(t)}return J(),b.weekdayContainer}function J(){if(b.weekdayContainer){var e=b.l10n.firstDayOfWeek,n=t(b.l10n.weekdays.shorthand);e>0&&e\n "+n.join("")+"\n \n "}}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-b.currentMonth;n<0&&!0===b._hidePrevMonthArrow||n>0&&!0===b._hideNextMonthArrow||(b.currentMonth+=n,(b.currentMonth<0||b.currentMonth>11)&&(b.currentYear+=b.currentMonth>11?1:-1,b.currentMonth=(b.currentMonth+12)%12,ye("onYearChange"),q()),W(),ye("onMonthChange"),_e())}function X(e){return b.calendarContainer.contains(e)}function Z(e){if(b.isOpen&&!b.config.inline){var t=m(e),n=X(t),i=!(t===b.input||t===b.altInput||b.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(b.input)||~e.path.indexOf(b.altInput))||n||X(e.relatedTarget)),o=!b.config.ignoredFocusElements.some((function(e){return e.contains(t)}));i&&o&&(b.config.allowInput&&b.setDate(b._input.value,!1,b.config.altInput?b.config.altFormat:b.config.dateFormat),void 0!==b.timeContainer&&void 0!==b.minuteElement&&void 0!==b.hourElement&&""!==b.input.value&&void 0!==b.input.value&&j(),b.close(),b.config&&"range"===b.config.mode&&1===b.selectedDates.length&&b.clear(!1))}}function ee(e){if(!(!e||b.config.minDate&&eb.config.maxDate.getFullYear())){var t=e,n=b.currentYear!==t;b.currentYear=t||b.currentYear,b.config.maxDate&&b.currentYear===b.config.maxDate.getFullYear()?b.currentMonth=Math.min(b.config.maxDate.getMonth(),b.currentMonth):b.config.minDate&&b.currentYear===b.config.minDate.getFullYear()&&(b.currentMonth=Math.max(b.config.minDate.getMonth(),b.currentMonth)),n&&(b.redraw(),ye("onYearChange"),q())}}function te(e,t){var n;void 0===t&&(t=!0);var i=b.parseDate(e,void 0,t);if(b.config.minDate&&i&&k(i,b.config.minDate,void 0!==t?t:!b.minDateHasTime)<0||b.config.maxDate&&i&&k(i,b.config.maxDate,void 0!==t?t:!b.maxDateHasTime)>0)return!1;if(!b.config.enable&&0===b.config.disable.length)return!0;if(void 0===i)return!1;for(var o=!!b.config.enable,a=null!==(n=b.config.enable)&&void 0!==n?n:b.config.disable,r=0,s=void 0;r=s.from.getTime()&&i.getTime()<=s.to.getTime())return o}return!o}function ne(e){return void 0!==b.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&b.daysContainer.contains(e)}function ie(e){var t=e.target===b._input,n=b._input.value.trimEnd()!==ke();!t||!n||e.relatedTarget&&X(e.relatedTarget)||b.setDate(b._input.value,!0,e.target===b.altInput?b.config.altFormat:b.config.dateFormat)}function oe(e){var t=m(e),n=b.config.wrap?h.contains(t):t===b._input,i=b.config.allowInput,o=b.isOpen&&(!i||!n),a=b.config.inline&&n&&!i;if(13===e.keyCode&&n){if(i)return b.setDate(b._input.value,!0,t===b.altInput?b.config.altFormat:b.config.dateFormat),b.close(),t.blur();b.open()}else if(X(t)||o||a){var r=!!b.timeContainer&&b.timeContainer.contains(t);switch(e.keyCode){case 13:r?(e.preventDefault(),j(),pe()):fe(e);break;case 27:e.preventDefault(),pe();break;case 8:case 46:n&&!b.config.allowInput&&(e.preventDefault(),b.clear());break;case 37:case 39:if(r||n)b.hourElement&&b.hourElement.focus();else{e.preventDefault();var s=O();if(void 0!==b.daysContainer&&(!1===i||s&&ne(s))){var l=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(l),V(R(1),0)):V(void 0,l)}}break;case 38:case 40:e.preventDefault();var c=40===e.keyCode?1:-1;b.daysContainer&&void 0!==t.$i||t===b.input||t===b.altInput?e.ctrlKey?(e.stopPropagation(),ee(b.currentYear-c),V(R(1),0)):r||V(void 0,7*c):t===b.currentYearElement?ee(b.currentYear-c):b.config.enableTime&&(!r&&b.hourElement&&b.hourElement.focus(),j(e),b._debouncedChange());break;case 9:if(r){var d=[b.hourElement,b.minuteElement,b.secondElement,b.amPM].concat(b.pluginElements).filter((function(e){return e})),u=d.indexOf(t);if(-1!==u){var p=d[u+(e.shiftKey?-1:1)];e.preventDefault(),(p||b._input).focus()}}else!b.config.noCalendar&&b.daysContainer&&b.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),b._input.focus())}}if(void 0!==b.amPM&&t===b.amPM)switch(e.key){case b.l10n.amPM[0].charAt(0):case b.l10n.amPM[0].charAt(0).toLowerCase():b.amPM.textContent=b.l10n.amPM[0],S(),xe();break;case b.l10n.amPM[1].charAt(0):case b.l10n.amPM[1].charAt(0).toLowerCase():b.amPM.textContent=b.l10n.amPM[1],S(),xe()}(n||X(t))&&ye("onKeyDown",e)}function ae(e,t){if(void 0===t&&(t="flatpickr-day"),1===b.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var n=e?e.dateObj.getTime():b.days.firstElementChild.dateObj.getTime(),i=b.parseDate(b.selectedDates[0],void 0,!0).getTime(),o=Math.min(n,b.selectedDates[0].getTime()),a=Math.max(n,b.selectedDates[0].getTime()),r=!1,s=0,l=0,c=o;co&&cs)?s=c:c>i&&(!l||c ."+t)).forEach((function(t){var o,a,c,d=t.dateObj.getTime(),u=s>0&&d0&&d>l;if(u)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));r&&!u||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(n<=b.selectedDates[0].getTime()?"startRange":"endRange"),in&&d===i&&t.classList.add("endRange"),d>=s&&(0===l||d<=l)&&(a=i,c=n,(o=d)>Math.min(a,c)&&o0||n.getMinutes()>0||n.getSeconds()>0),b.selectedDates&&(b.selectedDates=b.selectedDates.filter((function(e){return te(e)})),b.selectedDates.length||"min"!==e||A(n),xe()),b.daysContainer&&(ue(),void 0!==n?b.currentYearElement[e]=n.getFullYear().toString():b.currentYearElement.removeAttribute(e),b.currentYearElement.disabled=!!i&&void 0!==n&&i.getFullYear()===n.getFullYear())}}function le(){return b.config.wrap?h.querySelector("[data-input]"):h}function ce(){"object"!=typeof b.config.locale&&void 0===E.l10ns[b.config.locale]&&b.config.errorHandler(new Error("flatpickr: invalid locale "+b.config.locale)),b.l10n=e(e({},E.l10ns.default),"object"==typeof b.config.locale?b.config.locale:"default"!==b.config.locale?E.l10ns[b.config.locale]:void 0),y.D="("+b.l10n.weekdays.shorthand.join("|")+")",y.l="("+b.l10n.weekdays.longhand.join("|")+")",y.M="("+b.l10n.months.shorthand.join("|")+")",y.F="("+b.l10n.months.longhand.join("|")+")",y.K="("+b.l10n.amPM[0]+"|"+b.l10n.amPM[1]+"|"+b.l10n.amPM[0].toLowerCase()+"|"+b.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(h.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(b.config.time_24hr=b.l10n.time_24hr),b.formatDate=w(b),b.parseDate=_({config:b.config,l10n:b.l10n})}function de(e){if("function"!=typeof b.config.position){if(void 0!==b.calendarContainer){ye("onPreCalendarPosition");var t=e||b._positionElement,n=Array.prototype.reduce.call(b.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),i=b.calendarContainer.offsetWidth,o=b.config.position.split(" "),a=o[0],r=o.length>1?o[1]:null,s=t.getBoundingClientRect(),l=window.innerHeight-s.bottom,d="above"===a||"below"!==a&&ln,u=window.pageYOffset+s.top+(d?-n-2:t.offsetHeight+2);if(c(b.calendarContainer,"arrowTop",!d),c(b.calendarContainer,"arrowBottom",d),!b.config.inline){var p=window.pageXOffset+s.left,f=!1,m=!1;"center"===r?(p-=(i-s.width)/2,f=!0):"right"===r&&(p-=i-s.width,m=!0),c(b.calendarContainer,"arrowLeft",!f&&!m),c(b.calendarContainer,"arrowCenter",f),c(b.calendarContainer,"arrowRight",m);var h=window.document.body.offsetWidth-(window.pageXOffset+s.right),g=p+i>window.document.body.offsetWidth,v=h+i>window.document.body.offsetWidth;if(c(b.calendarContainer,"rightMost",g),!b.config.static)if(b.calendarContainer.style.top=u+"px",g)if(v){var y=function(){for(var e=null,t=0;tb.currentMonth+b.config.showMonths-1)&&"range"!==b.config.mode;if(b.selectedDateElem=n,"single"===b.config.mode)b.selectedDates=[i];else if("multiple"===b.config.mode){var a=we(i);a?b.selectedDates.splice(parseInt(a),1):b.selectedDates.push(i)}else"range"===b.config.mode&&(2===b.selectedDates.length&&b.clear(!1,!1),b.latestSelectedDateObj=i,b.selectedDates.push(i),0!==k(i,b.selectedDates[0],!0)&&b.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(S(),o){var r=b.currentYear!==i.getFullYear();b.currentYear=i.getFullYear(),b.currentMonth=i.getMonth(),r&&(ye("onYearChange"),q()),ye("onMonthChange")}if(_e(),W(),xe(),o||"range"===b.config.mode||1!==b.config.showMonths?void 0!==b.selectedDateElem&&void 0===b.hourElement&&b.selectedDateElem&&b.selectedDateElem.focus():z(n),void 0!==b.hourElement&&void 0!==b.hourElement&&b.hourElement.focus(),b.config.closeOnSelect){var s="single"===b.config.mode&&!b.config.enableTime,l="range"===b.config.mode&&2===b.selectedDates.length&&!b.config.enableTime;(s||l)&&pe()}L()}}b.parseDate=_({config:b.config,l10n:b.l10n}),b._handlers=[],b.pluginElements=[],b.loadedPlugins=[],b._bind=P,b._setHoursFromDate=A,b._positionCalendar=de,b.changeMonth=G,b.changeYear=ee,b.clear=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!0),b.input.value="",void 0!==b.altInput&&(b.altInput.value=""),void 0!==b.mobileInput&&(b.mobileInput.value=""),b.selectedDates=[],b.latestSelectedDateObj=void 0,!0===t&&(b.currentYear=b._initialDate.getFullYear(),b.currentMonth=b._initialDate.getMonth()),!0===b.config.enableTime){var n=D(b.config);I(n.hours,n.minutes,n.seconds)}b.redraw(),e&&ye("onChange")},b.close=function(){b.isOpen=!1,b.isMobile||(void 0!==b.calendarContainer&&b.calendarContainer.classList.remove("open"),void 0!==b._input&&b._input.classList.remove("active")),ye("onClose")},b.onMouseOver=ae,b._createElement=d,b.createDay=Q,b.destroy=function(){void 0!==b.config&&ye("onDestroy");for(var e=b._handlers.length;e--;)b._handlers[e].remove();if(b._handlers=[],b.mobileInput)b.mobileInput.parentNode&&b.mobileInput.parentNode.removeChild(b.mobileInput),b.mobileInput=void 0;else if(b.calendarContainer&&b.calendarContainer.parentNode)if(b.config.static&&b.calendarContainer.parentNode){var t=b.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else b.calendarContainer.parentNode.removeChild(b.calendarContainer);b.altInput&&(b.input.type="text",b.altInput.parentNode&&b.altInput.parentNode.removeChild(b.altInput),delete b.altInput),b.input&&(b.input.type=b.input._type,b.input.classList.remove("flatpickr-input"),b.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete b[e]}catch(e){}}))},b.isEnabled=te,b.jumpToDate=H,b.updateValue=xe,b.open=function(e,t){if(void 0===t&&(t=b._positionElement),!0===b.isMobile){if(e){e.preventDefault();var n=m(e);n&&n.blur()}return void 0!==b.mobileInput&&(b.mobileInput.focus(),b.mobileInput.click()),void ye("onOpen")}if(!b._input.disabled&&!b.config.inline){var i=b.isOpen;b.isOpen=!0,i||(b.calendarContainer.classList.add("open"),b._input.classList.add("active"),ye("onOpen"),de(t)),!0===b.config.enableTime&&!0===b.config.noCalendar&&(!1!==b.config.allowInput||void 0!==e&&b.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return b.hourElement.select()}),50))}},b.redraw=ue,b.set=function(e,t){if(null!==e&&"object"==typeof e)for(var i in Object.assign(b.config,e),e)void 0!==me[i]&&me[i].forEach((function(e){return e()}));else b.config[e]=t,void 0!==me[e]?me[e].forEach((function(e){return e()})):n.indexOf(e)>-1&&(b.config[e]=l(t));b.redraw(),xe(!0)},b.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=b.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return b.clear(t);he(e,n),b.latestSelectedDateObj=b.selectedDates[b.selectedDates.length-1],b.redraw(),H(void 0,t),A(),0===b.selectedDates.length&&b.clear(!1),xe(t),t&&ye("onChange")},b.toggle=function(e){if(!0===b.isOpen)return b.close();b.open(e)};var me={locale:[ce,J],showMonths:[U,T,K],minDate:[H],maxDate:[H],positionElement:[ve],clickOpens:[function(){!0===b.config.clickOpens?(P(b._input,"focus",b.open),P(b._input,"click",b.open)):(b._input.removeEventListener("focus",b.open),b._input.removeEventListener("click",b.open))}]};function he(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return b.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[b.parseDate(e,t)];else if("string"==typeof e)switch(b.config.mode){case"single":case"time":n=[b.parseDate(e,t)];break;case"multiple":n=e.split(b.config.conjunction).map((function(e){return b.parseDate(e,t)}));break;case"range":n=e.split(b.l10n.rangeSeparator).map((function(e){return b.parseDate(e,t)}))}else b.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));b.selectedDates=b.config.allowInvalidPreload?n:n.filter((function(e){return e instanceof Date&&te(e,!1)})),"range"===b.config.mode&&b.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function ge(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?b.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:b.parseDate(e.from,void 0),to:b.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function ve(){b._positionElement=b.config.positionElement||b._input}function ye(e,t){if(void 0!==b.config){var n=b.config[e];if(void 0!==n&&n.length>0)for(var i=0;n[i]&&i1||"static"===b.config.monthSelectorType?b.monthElements[t].textContent=g(n.getMonth(),b.config.shorthandCurrentMonth,b.l10n)+" ":b.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),b._hidePrevMonthArrow=void 0!==b.config.minDate&&(b.currentYear===b.config.minDate.getFullYear()?b.currentMonth<=b.config.minDate.getMonth():b.currentYearb.config.maxDate.getMonth():b.currentYear>b.config.maxDate.getFullYear()))}function ke(e){var t=e||(b.config.altInput?b.config.altFormat:b.config.dateFormat);return b.selectedDates.map((function(e){return b.formatDate(e,t)})).filter((function(e,t,n){return"range"!==b.config.mode||b.config.enableTime||n.indexOf(e)===t})).join("range"!==b.config.mode?b.config.conjunction:b.l10n.rangeSeparator)}function xe(e){void 0===e&&(e=!0),void 0!==b.mobileInput&&b.mobileFormatStr&&(b.mobileInput.value=void 0!==b.latestSelectedDateObj?b.formatDate(b.latestSelectedDateObj,b.mobileFormatStr):""),b.input.value=ke(b.config.dateFormat),void 0!==b.altInput&&(b.altInput.value=ke(b.config.altFormat)),!1!==e&&ye("onValueUpdate")}function Ce(e){var t=m(e),n=b.prevMonthNav.contains(t),i=b.nextMonthNav.contains(t);n||i?G(n?-1:1):b.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?b.changeYear(b.currentYear+1):t.classList.contains("arrowDown")&&b.changeYear(b.currentYear-1)}return function(){b.element=b.input=h,b.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=e(e({},JSON.parse(JSON.stringify(h.dataset||{}))),v),a={};b.config.parseDate=o.parseDate,b.config.formatDate=o.formatDate,Object.defineProperty(b.config,"enable",{get:function(){return b.config._enable},set:function(e){b.config._enable=ge(e)}}),Object.defineProperty(b.config,"disable",{get:function(){return b.config._disable},set:function(e){b.config._disable=ge(e)}});var r="time"===o.mode;if(!o.dateFormat&&(o.enableTime||r)){var s=E.defaultConfig.dateFormat||i.dateFormat;a.dateFormat=o.noCalendar||r?"H:i"+(o.enableSeconds?":S":""):s+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||r)&&!o.altFormat){var c=E.defaultConfig.altFormat||i.altFormat;a.altFormat=o.noCalendar||r?"h:i"+(o.enableSeconds?":S K":" K"):c+" h:i"+(o.enableSeconds?":S":"")+" K"}Object.defineProperty(b.config,"minDate",{get:function(){return b.config._minDate},set:se("min")}),Object.defineProperty(b.config,"maxDate",{get:function(){return b.config._maxDate},set:se("max")});var d=function(e){return function(t){b.config["min"===e?"_minTime":"_maxTime"]=b.parseDate(t,"H:i:S")}};Object.defineProperty(b.config,"minTime",{get:function(){return b.config._minTime},set:d("min")}),Object.defineProperty(b.config,"maxTime",{get:function(){return b.config._maxTime},set:d("max")}),"time"===o.mode&&(b.config.noCalendar=!0,b.config.enableTime=!0),Object.assign(b.config,a,o);for(var u=0;u-1?b.config[f]=l(p[f]).map(M).concat(b.config[f]):void 0===o[f]&&(b.config[f]=p[f])}o.altInputClass||(b.config.altInputClass=le().className+" "+b.config.altInputClass),ye("onParseConfig")}(),ce(),b.input=le(),b.input?(b.input._type=b.input.type,b.input.type="text",b.input.classList.add("flatpickr-input"),b._input=b.input,b.config.altInput&&(b.altInput=d(b.input.nodeName,b.config.altInputClass),b._input=b.altInput,b.altInput.placeholder=b.input.placeholder,b.altInput.disabled=b.input.disabled,b.altInput.required=b.input.required,b.altInput.tabIndex=b.input.tabIndex,b.altInput.type="text",b.input.setAttribute("type","hidden"),!b.config.static&&b.input.parentNode&&b.input.parentNode.insertBefore(b.altInput,b.input.nextSibling)),b.config.allowInput||b._input.setAttribute("readonly","readonly"),ve()):b.config.errorHandler(new Error("Invalid input element specified")),function(){b.selectedDates=[],b.now=b.parseDate(b.config.now)||new Date;var e=b.config.defaultDate||("INPUT"!==b.input.nodeName&&"TEXTAREA"!==b.input.nodeName||!b.input.placeholder||b.input.value!==b.input.placeholder?b.input.value:null);e&&he(e,b.config.dateFormat),b._initialDate=b.selectedDates.length>0?b.selectedDates[0]:b.config.minDate&&b.config.minDate.getTime()>b.now.getTime()?b.config.minDate:b.config.maxDate&&b.config.maxDate.getTime()0&&(b.latestSelectedDateObj=b.selectedDates[0]),void 0!==b.config.minTime&&(b.config.minTime=b.parseDate(b.config.minTime,"H:i")),void 0!==b.config.maxTime&&(b.config.maxTime=b.parseDate(b.config.maxTime,"H:i")),b.minDateHasTime=!!b.config.minDate&&(b.config.minDate.getHours()>0||b.config.minDate.getMinutes()>0||b.config.minDate.getSeconds()>0),b.maxDateHasTime=!!b.config.maxDate&&(b.config.maxDate.getHours()>0||b.config.maxDate.getMinutes()>0||b.config.maxDate.getSeconds()>0)}(),b.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=b.currentMonth),void 0===t&&(t=b.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:b.l10n.daysInMonth[e]}},b.isMobile||function(){var e=window.document.createDocumentFragment();if(b.calendarContainer=d("div","flatpickr-calendar"),b.calendarContainer.tabIndex=-1,!b.config.noCalendar){if(e.appendChild((b.monthNav=d("div","flatpickr-months"),b.yearElements=[],b.monthElements=[],b.prevMonthNav=d("span","flatpickr-prev-month"),b.prevMonthNav.innerHTML=b.config.prevArrow,b.nextMonthNav=d("span","flatpickr-next-month"),b.nextMonthNav.innerHTML=b.config.nextArrow,U(),Object.defineProperty(b,"_hidePrevMonthArrow",{get:function(){return b.__hidePrevMonthArrow},set:function(e){b.__hidePrevMonthArrow!==e&&(c(b.prevMonthNav,"flatpickr-disabled",e),b.__hidePrevMonthArrow=e)}}),Object.defineProperty(b,"_hideNextMonthArrow",{get:function(){return b.__hideNextMonthArrow},set:function(e){b.__hideNextMonthArrow!==e&&(c(b.nextMonthNav,"flatpickr-disabled",e),b.__hideNextMonthArrow=e)}}),b.currentYearElement=b.yearElements[0],_e(),b.monthNav)),b.innerContainer=d("div","flatpickr-innerContainer"),b.config.weekNumbers){var t=function(){b.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",b.l10n.weekAbbreviation));var t=d("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,i=t.weekNumbers;b.innerContainer.appendChild(n),b.weekNumbers=i,b.weekWrapper=n}b.rContainer=d("div","flatpickr-rContainer"),b.rContainer.appendChild(K()),b.daysContainer||(b.daysContainer=d("div","flatpickr-days"),b.daysContainer.tabIndex=-1),W(),b.rContainer.appendChild(b.daysContainer),b.innerContainer.appendChild(b.rContainer),e.appendChild(b.innerContainer)}b.config.enableTime&&e.appendChild(function(){b.calendarContainer.classList.add("hasTime"),b.config.noCalendar&&b.calendarContainer.classList.add("noCalendar");var e=D(b.config);b.timeContainer=d("div","flatpickr-time"),b.timeContainer.tabIndex=-1;var t=d("span","flatpickr-time-separator",":"),n=f("flatpickr-hour",{"aria-label":b.l10n.hourAriaLabel});b.hourElement=n.getElementsByTagName("input")[0];var i=f("flatpickr-minute",{"aria-label":b.l10n.minuteAriaLabel});if(b.minuteElement=i.getElementsByTagName("input")[0],b.hourElement.tabIndex=b.minuteElement.tabIndex=-1,b.hourElement.value=a(b.latestSelectedDateObj?b.latestSelectedDateObj.getHours():b.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),b.minuteElement.value=a(b.latestSelectedDateObj?b.latestSelectedDateObj.getMinutes():e.minutes),b.hourElement.setAttribute("step",b.config.hourIncrement.toString()),b.minuteElement.setAttribute("step",b.config.minuteIncrement.toString()),b.hourElement.setAttribute("min",b.config.time_24hr?"0":"1"),b.hourElement.setAttribute("max",b.config.time_24hr?"23":"12"),b.hourElement.setAttribute("maxlength","2"),b.minuteElement.setAttribute("min","0"),b.minuteElement.setAttribute("max","59"),b.minuteElement.setAttribute("maxlength","2"),b.timeContainer.appendChild(n),b.timeContainer.appendChild(t),b.timeContainer.appendChild(i),b.config.time_24hr&&b.timeContainer.classList.add("time24hr"),b.config.enableSeconds){b.timeContainer.classList.add("hasSeconds");var o=f("flatpickr-second");b.secondElement=o.getElementsByTagName("input")[0],b.secondElement.value=a(b.latestSelectedDateObj?b.latestSelectedDateObj.getSeconds():e.seconds),b.secondElement.setAttribute("step",b.minuteElement.getAttribute("step")),b.secondElement.setAttribute("min","0"),b.secondElement.setAttribute("max","59"),b.secondElement.setAttribute("maxlength","2"),b.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),b.timeContainer.appendChild(o)}return b.config.time_24hr||(b.amPM=d("span","flatpickr-am-pm",b.l10n.amPM[r((b.latestSelectedDateObj?b.hourElement.value:b.config.defaultHour)>11)]),b.amPM.title=b.l10n.toggleTitle,b.amPM.tabIndex=-1,b.timeContainer.appendChild(b.amPM)),b.timeContainer}()),c(b.calendarContainer,"rangeMode","range"===b.config.mode),c(b.calendarContainer,"animate",!0===b.config.animate),c(b.calendarContainer,"multiMonth",b.config.showMonths>1),b.calendarContainer.appendChild(e);var o=void 0!==b.config.appendTo&&void 0!==b.config.appendTo.nodeType;if((b.config.inline||b.config.static)&&(b.calendarContainer.classList.add(b.config.inline?"inline":"static"),b.config.inline&&(!o&&b.element.parentNode?b.element.parentNode.insertBefore(b.calendarContainer,b._input.nextSibling):void 0!==b.config.appendTo&&b.config.appendTo.appendChild(b.calendarContainer)),b.config.static)){var s=d("div","flatpickr-wrapper");b.element.parentNode&&b.element.parentNode.insertBefore(s,b.element),s.appendChild(b.element),b.altInput&&s.appendChild(b.altInput),s.appendChild(b.calendarContainer)}b.config.static||b.config.inline||(void 0!==b.config.appendTo?b.config.appendTo:window.document.body).appendChild(b.calendarContainer)}(),function(){if(b.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(b.element.querySelectorAll("[data-"+e+"]"),(function(t){return P(t,"click",b[e])}))})),b.isMobile)!function(){var e=b.config.enableTime?b.config.noCalendar?"time":"datetime-local":"date";b.mobileInput=d("input",b.input.className+" flatpickr-mobile"),b.mobileInput.tabIndex=1,b.mobileInput.type=e,b.mobileInput.disabled=b.input.disabled,b.mobileInput.required=b.input.required,b.mobileInput.placeholder=b.input.placeholder,b.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",b.selectedDates.length>0&&(b.mobileInput.defaultValue=b.mobileInput.value=b.formatDate(b.selectedDates[0],b.mobileFormatStr)),b.config.minDate&&(b.mobileInput.min=b.formatDate(b.config.minDate,"Y-m-d")),b.config.maxDate&&(b.mobileInput.max=b.formatDate(b.config.maxDate,"Y-m-d")),b.input.getAttribute("step")&&(b.mobileInput.step=String(b.input.getAttribute("step"))),b.input.type="hidden",void 0!==b.altInput&&(b.altInput.type="hidden");try{b.input.parentNode&&b.input.parentNode.insertBefore(b.mobileInput,b.input.nextSibling)}catch(e){}P(b.mobileInput,"change",(function(e){b.setDate(m(e).value,!1,b.mobileFormatStr),ye("onChange"),ye("onClose")}))}();else{var e=s(re,50);if(b._debouncedChange=s(L,300),b.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&P(b.daysContainer,"mouseover",(function(e){"range"===b.config.mode&&ae(m(e))})),P(b._input,"keydown",oe),void 0!==b.calendarContainer&&P(b.calendarContainer,"keydown",oe),b.config.inline||b.config.static||P(window,"resize",e),void 0!==window.ontouchstart?P(window.document,"touchstart",Z):P(window.document,"mousedown",Z),P(window.document,"focus",Z,{capture:!0}),!0===b.config.clickOpens&&(P(b._input,"focus",b.open),P(b._input,"click",b.open)),void 0!==b.daysContainer&&(P(b.monthNav,"click",Ce),P(b.monthNav,["keyup","increment"],F),P(b.daysContainer,"click",fe)),void 0!==b.timeContainer&&void 0!==b.minuteElement&&void 0!==b.hourElement){P(b.timeContainer,["increment"],j),P(b.timeContainer,"blur",j,{capture:!0}),P(b.timeContainer,"click",$),P([b.hourElement,b.minuteElement],["focus","click"],(function(e){return m(e).select()})),void 0!==b.secondElement&&P(b.secondElement,"focus",(function(){return b.secondElement&&b.secondElement.select()})),void 0!==b.amPM&&P(b.amPM,"click",(function(e){j(e)}))}b.config.allowInput&&P(b._input,"blur",ie)}}(),(b.selectedDates.length||b.config.noCalendar)&&(b.config.enableTime&&A(b.config.noCalendar?b.latestSelectedDateObj:void 0),xe(!1)),T();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!b.isMobile&&t&&de(),ye("onReady")}(),b}function M(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),i=[],o=0;oe.config.maxDate&&(t=e.config.maxDate),e.currentYear=t.getFullYear()),e.currentYearElement.value=String(e.currentYear),e.rContainer)&&e.rContainer.querySelectorAll(".flatpickr-monthSelect-month").forEach((function(t){t.dateObj.setFullYear(e.currentYear),e.config.minDate&&t.dateObje.config.maxDate?t.classList.add("flatpickr-disabled"):t.classList.remove("flatpickr-disabled")}));s()}function c(t){t.preventDefault(),t.stopPropagation();var n=i(t);if(n instanceof Element&&!n.classList.contains("flatpickr-disabled")&&!n.classList.contains("notAllowed")&&(d(n.dateObj),e.config.closeOnSelect)){var o="single"===e.config.mode,a="range"===e.config.mode&&2===e.selectedDates.length;(o||a)&&e.close()}}function d(t){var n=new Date(e.currentYear,t.getMonth(),t.getDate()),i=[];switch(e.config.mode){case"single":i=[n];break;case"multiple":i.push(n);break;case"range":2===e.selectedDates.length?i=[n]:(i=e.selectedDates.concat([n])).sort((function(e,t){return e.getTime()-t.getTime()}))}e.setDate(i,!0),s()}var u={37:-1,39:1,40:3,38:-3};function p(){var t;"range"===(null===(t=e.config)||void 0===t?void 0:t.mode)&&1===e.selectedDates.length&&e.clear(!1),e.selectedDates.length||a()}return{onParseConfig:function(){e.config.enableTime=!1},onValueUpdate:s,onKeyDown:function(t,n,i,a){var r=void 0!==u[a.keyCode];if((r||13===a.keyCode)&&e.rContainer&&o.monthsContainer){var s=e.rContainer.querySelector(".flatpickr-monthSelect-month.selected"),l=Array.prototype.indexOf.call(o.monthsContainer.children,document.activeElement);if(-1===l){var c=s||o.monthsContainer.firstElementChild;c.focus(),l=c.$i}r?o.monthsContainer.children[(12+l+u[a.keyCode])%12].focus():13===a.keyCode&&o.monthsContainer.contains(document.activeElement)&&d(document.activeElement.dateObj)}},onReady:[function(){r._stubbedCurrentMonth=e._initialDate.getMonth(),e._initialDate.setMonth(r._stubbedCurrentMonth),e.currentMonth=r._stubbedCurrentMonth},function(){if(e.rContainer){n(e.rContainer);for(var t=0;t0&&(o=s(n.width)/l||1),r>0&&(a=s(n.height)/r||1)}return{width:n.width/o,height:n.height/a,top:n.top/a,right:n.right/o,bottom:n.bottom/a,left:n.left/o,x:n.left/o,y:n.top/a}}function c(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function d(e){return e?(e.nodeName||"").toLowerCase():null}function u(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return l(u(e)).left+c(e).scrollLeft}function f(e){return t(e).getComputedStyle(e)}function m(e){var t=f(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function h(e,n,o){void 0===o&&(o=!1);var a,r,f=i(n),h=i(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,i=s(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(n),g=u(n),v=l(e,h),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==d(n)||m(g))&&(y=(a=n)!==t(a)&&i(a)?{scrollLeft:(r=a).scrollLeft,scrollTop:r.scrollTop}:c(a)),i(n)?((b=l(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):g&&(b.x=p(g))),{x:v.left+y.scrollLeft-b.x,y:v.top+y.scrollTop-b.y,width:v.width,height:v.height}}function g(e){var t=l(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function v(e){return"html"===d(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||u(e)}function y(e){return["html","body","#document"].indexOf(d(e))>=0?e.ownerDocument.body:i(e)&&m(e)?e:y(v(e))}function b(e,n){var i;void 0===n&&(n=[]);var o=y(e),a=o===(null==(i=e.ownerDocument)?void 0:i.body),r=t(o),s=a?[r].concat(r.visualViewport||[],m(o)?o:[]):o,l=n.concat(s);return a?l:l.concat(b(v(s)))}function w(e){return["table","td","th"].indexOf(d(e))>=0}function _(e){return i(e)&&"fixed"!==f(e).position?e.offsetParent:null}function k(e){for(var n=t(e),a=_(e);a&&w(a)&&"static"===f(a).position;)a=_(a);return a&&("html"===d(a)||"body"===d(a)&&"static"===f(a).position)?n:a||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&i(e)&&"fixed"===f(e).position)return null;var n=v(e);for(o(n)&&(n=n.host);i(n)&&["html","body"].indexOf(d(n))<0;){var a=f(n);if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||t&&"filter"===a.willChange||t&&a.filter&&"none"!==a.filter)return n;n=n.parentNode}return null}(e)||n}var x="top",C="bottom",D="right",O="left",M="auto",E=[x,C,D,O],T="start",j="end",S="viewport",A="popper",I=E.reduce((function(e,t){return e.concat([t+"-"+T,t+"-"+j])}),[]),F=[].concat(E,[M]).reduce((function(e,t){return e.concat([t,t+"-"+T,t+"-"+j])}),[]),P=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function L(e){var t=new Map,n=new Set,i=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&o(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),i}function H(e){return e.split("-")[0]}function $(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Q(e,i){return i===S?N(function(e){var n=t(e),i=u(e),o=n.visualViewport,a=i.clientWidth,r=i.clientHeight,s=0,l=0;return o&&(a=o.width,r=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,l=o.offsetTop)),{width:a,height:r,x:s+p(e),y:l}}(e)):n(i)?function(e){var t=l(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(i):N(function(e){var t,n=u(e),i=c(e),o=null==(t=e.ownerDocument)?void 0:t.body,r=a(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=a(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+p(e),d=-i.scrollTop;return"rtl"===f(o||n).direction&&(l+=a(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:l,y:d}}(u(e)))}function z(e,t,o){var s="clippingParents"===t?function(e){var t=b(v(e)),o=["absolute","fixed"].indexOf(f(e).position)>=0&&i(e)?k(e):e;return n(o)?t.filter((function(e){return n(e)&&$(e,o)&&"body"!==d(e)})):[]}(e):[].concat(t),l=[].concat(s,[o]),c=l[0],u=l.reduce((function(t,n){var i=Q(e,n);return t.top=a(i.top,t.top),t.right=r(i.right,t.right),t.bottom=r(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),Q(e,c));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function R(e){return e.split("-")[1]}function V(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e){var t,n=e.reference,i=e.element,o=e.placement,a=o?H(o):null,r=o?R(o):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case x:t={x:s,y:n.y-i.height};break;case C:t={x:s,y:n.y+n.height};break;case D:t={x:n.x+n.width,y:l};break;case O:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?V(a):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case T:t[c]=t[c]-(n[d]/2-i[d]/2);break;case j:t[c]=t[c]+(n[d]/2-i[d]/2)}}return t}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function q(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function B(e,t){void 0===t&&(t={});var i=t,o=i.placement,a=void 0===o?e.placement:o,r=i.boundary,s=void 0===r?"clippingParents":r,c=i.rootBoundary,d=void 0===c?S:c,p=i.elementContext,f=void 0===p?A:p,m=i.altBoundary,h=void 0!==m&&m,g=i.padding,v=void 0===g?0:g,y=W("number"!=typeof v?v:q(v,E)),b=f===A?"reference":A,w=e.rects.popper,_=e.elements[h?b:f],k=z(n(_)?_:_.contextElement||u(e.elements.popper),s,d),O=l(e.elements.reference),M=Y({reference:O,element:w,strategy:"absolute",placement:a}),T=N(Object.assign({},w,M)),j=f===A?T:O,I={top:k.top-j.top+y.top,bottom:j.bottom-k.bottom+y.bottom,left:k.left-j.left+y.left,right:j.right-k.right+y.right},F=e.modifiersData.offset;if(f===A&&F){var P=F[a];Object.keys(I).forEach((function(e){var t=[D,C].indexOf(e)>=0?1:-1,n=[x,C].indexOf(e)>=0?"y":"x";I[e]+=P[n]*t}))}return I}var U={placement:"bottom",modifiers:[],strategy:"absolute"};function K(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,r=a[0],s=a[1];return r=r||0,s=(s||0)*o,[O,D].indexOf(i)>=0?{x:s,y:r}:{x:r,y:s}}(n,t.rects,a),e}),{}),s=r[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=r}},ae={left:"right",right:"left",bottom:"top",top:"bottom"};function re(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var se={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=n.boundary,a=n.rootBoundary,r=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?F:l,d=R(i),u=d?s?I:I.filter((function(e){return R(e)===d})):E,p=u.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=u);var f=p.reduce((function(t,n){return t[n]=B(e,{placement:n,boundary:o,rootBoundary:a,padding:r})[H(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var de={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,a=void 0===o||o,r=n.altAxis,s=void 0===r||r,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,h=n.allowedAutoPlacements,g=t.options.placement,v=H(g),y=l||(v!==g&&m?function(e){if(H(e)===M)return[];var t=re(e);return[le(e),t,le(t)]}(g):[re(g)]),b=[g].concat(y).reduce((function(e,n){return e.concat(H(n)===M?ce(t,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,_=t.rects.popper,k=new Map,E=!0,j=b[0],S=0;S=0,L=P?"width":"height",$=B(t,{placement:A,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),N=P?F?D:O:F?C:x;w[L]>_[L]&&(N=re(N));var Q=re(N),z=[];if(a&&z.push($[I]<=0),s&&z.push($[N]<=0,$[Q]<=0),z.every((function(e){return e}))){j=A,E=!1;break}k.set(A,z)}if(E)for(var V=function(e){var t=b.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},Y=m?3:1;Y>0&&"break"!==V(Y);Y--);t.placement!==j&&(t.modifiersData[i]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ue(e,t,n){return a(e,r(t,n))}var pe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,s=void 0===o||o,l=n.altAxis,c=void 0!==l&&l,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,m=n.tether,h=void 0===m||m,v=n.tetherOffset,y=void 0===v?0:v,b=B(t,{boundary:d,rootBoundary:u,padding:f,altBoundary:p}),w=H(t.placement),_=R(t.placement),M=!_,E=V(w),j="x"===E?"y":"x",S=t.modifiersData.popperOffsets,A=t.rects.reference,I=t.rects.popper,F="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,P="number"==typeof F?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(S){if(s){var N,Q="y"===E?x:O,z="y"===E?C:D,Y="y"===E?"height":"width",W=S[E],q=W+b[Q],U=W-b[z],K=h?-I[Y]/2:0,J=_===T?A[Y]:I[Y],G=_===T?-I[Y]:-A[Y],X=t.elements.arrow,Z=h&&X?g(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[Q],ne=ee[z],ie=ue(0,A[Y],Z[Y]),oe=M?A[Y]/2-K-ie-te-P.mainAxis:J-ie-te-P.mainAxis,ae=M?-A[Y]/2+K+ie+ne+P.mainAxis:G+ie+ne+P.mainAxis,re=t.elements.arrow&&k(t.elements.arrow),se=re?"y"===E?re.clientTop||0:re.clientLeft||0:0,le=null!=(N=null==L?void 0:L[E])?N:0,ce=W+ae-le,de=ue(h?r(q,W+oe-le-se):q,W,h?a(U,ce):U);S[E]=de,$[E]=de-W}if(c){var pe,fe="x"===E?x:O,me="x"===E?C:D,he=S[j],ge="y"===j?"height":"width",ve=he+b[fe],ye=he-b[me],be=-1!==[x,O].indexOf(w),we=null!=(pe=null==L?void 0:L[j])?pe:0,_e=be?ve:he-A[ge]-I[ge]-we+P.altAxis,ke=be?he+A[ge]+I[ge]-we-P.altAxis:ye,xe=h&&be?function(e,t,n){var i=ue(e,t,n);return i>n?n:i}(_e,he,ke):ue(h?_e:ve,he,h?ke:ye);S[j]=xe,$[j]=xe-he}t.modifiersData[i]=$}},requiresIfExists:["offset"]},fe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,o=e.options,a=n.elements.arrow,r=n.modifiersData.popperOffsets,s=H(n.placement),l=V(s),c=[O,D].indexOf(s)>=0?"height":"width";if(a&&r){var d=function(e,t){return W("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:q(e,E))}(o.padding,n),u=g(a),p="y"===l?x:O,f="y"===l?C:D,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],h=r[l]-n.rects.reference[l],v=k(a),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=m/2-h/2,w=d[p],_=y-u[c]-d[f],M=y/2-u[c]/2+b,T=ue(w,M,_),j=l;n.modifiersData[i]=((t={})[j]=T,t.centerOffset=T-M,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&$(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function he(e){return[x,D,C,O].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,r=B(t,{elementContext:"reference"}),s=B(t,{altBoundary:!0}),l=me(r,i),c=me(s,o,a),d=he(l),u=he(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}},ve=J({defaultModifiers:[X,Z,ne,ie]}),ye=[X,Z,ne,ie,oe,de,pe,fe,ge],be=J({defaultModifiers:ye});e.applyStyles=ie,e.arrow=fe,e.computeStyles=ne,e.createPopper=be,e.createPopperLite=ve,e.defaultModifiers=ye,e.detectOverflow=B,e.eventListeners=X,e.flip=de,e.hide=ge,e.offset=oe,e.popperGenerator=J,e.popperOffsets=Z,e.preventOverflow=pe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e=e||self).tippy=t(e.Popper)}(this,(function(e){"use strict";var t="undefined"!=typeof window&&"undefined"!=typeof document,n=!!t&&!!window.msCrypto,i={passive:!0,capture:!0},o=function(){return document.body};function a(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function r(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function s(e,t){return"function"==typeof e?e.apply(void 0,t):e}function l(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function c(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function d(e){return[].concat(e)}function u(e,t){-1===e.indexOf(t)&&e.push(t)}function p(e){return e.split("-")[0]}function f(e){return[].slice.call(e)}function m(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function h(){return document.createElement("div")}function g(e){return["Element","Fragment"].some((function(t){return r(e,t)}))}function v(e){return r(e,"MouseEvent")}function y(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function b(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function w(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function _(e){var t,n=d(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function k(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function x(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var C={isTouch:!1},D=0;function O(){C.isTouch||(C.isTouch=!0,window.performance&&document.addEventListener("mousemove",M))}function M(){var e=performance.now();e-D<20&&(C.isTouch=!1,document.removeEventListener("mousemove",M)),D=e}function E(){var e=document.activeElement;if(y(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var T=Object.assign({appendTo:o,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),j=Object.keys(T);function S(e){var t=(e.plugins||[]).reduce((function(t,n){var i,o=n.name,a=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:null!=(i=T[o])?i:a),t}),{});return Object.assign({},e,t)}function A(e,t){var n=Object.assign({},t,{content:s(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(S(Object.assign({},T,{plugins:t}))):j).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},T.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function I(e,t){e.innerHTML=t}function F(e){var t=h();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",g(e)?t.appendChild(e):I(t,e)),t}function P(e,t){g(t.content)?(I(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?I(e,t.content):e.textContent=t.content)}function L(e){var t=e.firstElementChild,n=f(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function H(e){var t=h(),n=h();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=h();function o(n,i){var o=L(t),a=o.box,r=o.content,s=o.arrow;i.theme?a.setAttribute("data-theme",i.theme):a.removeAttribute("data-theme"),"string"==typeof i.animation?a.setAttribute("data-animation",i.animation):a.removeAttribute("data-animation"),i.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?a.setAttribute("role",i.role):a.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||P(r,e.props),i.arrow?s?n.arrow!==i.arrow&&(a.removeChild(s),a.appendChild(F(i.arrow))):a.appendChild(F(i.arrow)):s&&a.removeChild(s)}return i.className="tippy-content",i.setAttribute("data-state","hidden"),P(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}H.$$tippy=!0;var $=1,N=[],Q=[];function z(t,r){var c,g,y,D,O,M,E,j,I=A(t,Object.assign({},T,S(m(r)))),F=!1,P=!1,H=!1,z=!1,R=[],V=l(we,I.interactiveDebounce),Y=$++,W=(j=I.plugins).filter((function(e,t){return j.indexOf(e)===t})),q={id:Y,reference:t,popper:h(),popperInstance:null,props:I,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:W,clearDelayTimeouts:function(){clearTimeout(c),clearTimeout(g),cancelAnimationFrame(y)},setProps:function(e){if(!q.state.isDestroyed){re("onBeforeUpdate",[q,e]),ye();var n=q.props,i=A(t,Object.assign({},n,m(e),{ignoreAttributes:!0}));q.props=i,ve(),n.interactiveDebounce!==i.interactiveDebounce&&(ce(),V=l(we,i.interactiveDebounce)),n.triggerTarget&&!i.triggerTarget?d(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded"),le(),ae(),K&&K(n,i),q.popperInstance&&(Ce(),Oe().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),re("onAfterUpdate",[q,e])}},setContent:function(e){q.setProps({content:e})},show:function(){var e=q.state.isVisible,t=q.state.isDestroyed,n=!q.state.isEnabled,i=C.isTouch&&!q.props.touch,r=a(q.props.duration,0,T.duration);if(!(e||t||n||i||te().hasAttribute("disabled")||(re("onShow",[q],!1),!1===q.props.onShow(q)))){if(q.state.isVisible=!0,ee()&&(U.style.visibility="visible"),ae(),fe(),q.state.isMounted||(U.style.transition="none"),ee()){var l=ie();b([l.box,l.content],0)}M=function(){var e;if(q.state.isVisible&&!z){if(z=!0,U.offsetHeight,U.style.transition=q.props.moveTransition,ee()&&q.props.animation){var t=ie(),n=t.box,i=t.content;b([n,i],r),w([n,i],"visible")}se(),le(),u(Q,q),null==(e=q.popperInstance)||e.forceUpdate(),re("onMount",[q]),q.props.animation&&ee()&&function(e,t){he(e,(function(){q.state.isShown=!0,re("onShown",[q])}))}(r)}},function(){var e,t=q.props.appendTo,n=te();(e=q.props.interactive&&t===o||"parent"===t?n.parentNode:s(t,[n])).contains(U)||e.appendChild(U),q.state.isMounted=!0,Ce()}()}},hide:function(){var e=!q.state.isVisible,t=q.state.isDestroyed,n=!q.state.isEnabled,i=a(q.props.duration,1,T.duration);if(!(e||t||n)&&(re("onHide",[q],!1),!1!==q.props.onHide(q))){if(q.state.isVisible=!1,q.state.isShown=!1,z=!1,F=!1,ee()&&(U.style.visibility="hidden"),ce(),me(),ae(!0),ee()){var o=ie(),r=o.box,s=o.content;q.props.animation&&(b([r,s],i),w([r,s],"hidden"))}se(),le(),q.props.animation?ee()&&function(e,t){he(e,(function(){!q.state.isVisible&&U.parentNode&&U.parentNode.contains(U)&&t()}))}(i,q.unmount):q.unmount()}},hideWithInteractivity:function(e){ne().addEventListener("mousemove",V),u(N,V),V(e)},enable:function(){q.state.isEnabled=!0},disable:function(){q.hide(),q.state.isEnabled=!1},unmount:function(){q.state.isVisible&&q.hide(),q.state.isMounted&&(De(),Oe().forEach((function(e){e._tippy.unmount()})),U.parentNode&&U.parentNode.removeChild(U),Q=Q.filter((function(e){return e!==q})),q.state.isMounted=!1,re("onHidden",[q]))},destroy:function(){q.state.isDestroyed||(q.clearDelayTimeouts(),q.unmount(),ye(),delete t._tippy,q.state.isDestroyed=!0,re("onDestroy",[q]))}};if(!I.render)return q;var B=I.render(q),U=B.popper,K=B.onUpdate;U.setAttribute("data-tippy-root",""),U.id="tippy-"+q.id,q.popper=U,t._tippy=q,U._tippy=q;var J=W.map((function(e){return e.fn(q)})),G=t.hasAttribute("aria-expanded");return ve(),le(),ae(),re("onCreate",[q]),I.showOnCreate&&Me(),U.addEventListener("mouseenter",(function(){q.props.interactive&&q.state.isVisible&&q.clearDelayTimeouts()})),U.addEventListener("mouseleave",(function(){q.props.interactive&&q.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",V)})),q;function X(){var e=q.props.touch;return Array.isArray(e)?e:[e,0]}function Z(){return"hold"===X()[0]}function ee(){var e;return!(null==(e=q.props.render)||!e.$$tippy)}function te(){return E||t}function ne(){var e=te().parentNode;return e?_(e):document}function ie(){return L(U)}function oe(e){return q.state.isMounted&&!q.state.isVisible||C.isTouch||D&&"focus"===D.type?0:a(q.props.delay,e?0:1,T.delay)}function ae(e){void 0===e&&(e=!1),U.style.pointerEvents=q.props.interactive&&!e?"":"none",U.style.zIndex=""+q.props.zIndex}function re(e,t,n){var i;void 0===n&&(n=!0),J.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(i=q.props)[e].apply(i,t)}function se(){var e=q.props.aria;if(e.content){var n="aria-"+e.content,i=U.id;d(q.props.triggerTarget||t).forEach((function(e){var t=e.getAttribute(n);if(q.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var o=t&&t.replace(i,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function le(){!G&&q.props.aria.expanded&&d(q.props.triggerTarget||t).forEach((function(e){q.props.interactive?e.setAttribute("aria-expanded",q.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ce(){ne().removeEventListener("mousemove",V),N=N.filter((function(e){return e!==V}))}function de(e){if(!C.isTouch||!H&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!q.props.interactive||!x(U,n)){if(d(q.props.triggerTarget||t).some((function(e){return x(e,n)}))){if(C.isTouch)return;if(q.state.isVisible&&q.props.trigger.indexOf("click")>=0)return}else re("onClickOutside",[q,e]);!0===q.props.hideOnClick&&(q.clearDelayTimeouts(),q.hide(),P=!0,setTimeout((function(){P=!1})),q.state.isMounted||me())}}}function ue(){H=!0}function pe(){H=!1}function fe(){var e=ne();e.addEventListener("mousedown",de,!0),e.addEventListener("touchend",de,i),e.addEventListener("touchstart",pe,i),e.addEventListener("touchmove",ue,i)}function me(){var e=ne();e.removeEventListener("mousedown",de,!0),e.removeEventListener("touchend",de,i),e.removeEventListener("touchstart",pe,i),e.removeEventListener("touchmove",ue,i)}function he(e,t){var n=ie().box;function i(e){e.target===n&&(k(n,"remove",i),t())}if(0===e)return t();k(n,"remove",O),k(n,"add",i),O=i}function ge(e,n,i){void 0===i&&(i=!1),d(q.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,i),R.push({node:t,eventType:e,handler:n,options:i})}))}function ve(){var e;Z()&&(ge("touchstart",be,{passive:!0}),ge("touchend",_e,{passive:!0})),(e=q.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,be),e){case"mouseenter":ge("mouseleave",_e);break;case"focus":ge(n?"focusout":"blur",ke);break;case"focusin":ge("focusout",ke)}}))}function ye(){R.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,o=e.options;t.removeEventListener(n,i,o)})),R=[]}function be(e){var t,n=!1;if(q.state.isEnabled&&!xe(e)&&!P){var i="focus"===(null==(t=D)?void 0:t.type);D=e,E=e.currentTarget,le(),!q.state.isVisible&&v(e)&&N.forEach((function(t){return t(e)})),"click"===e.type&&(q.props.trigger.indexOf("mouseenter")<0||F)&&!1!==q.props.hideOnClick&&q.state.isVisible?n=!0:Me(e),"click"===e.type&&(F=!n),n&&!i&&Ee(e)}}function we(e){var t=e.target,n=te().contains(t)||U.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,r=p(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===r?s.top.y:0,c="top"===r?s.bottom.y:0,d="right"===r?s.left.x:0,u="left"===r?s.right.x:0,f=t.top-i+l>a,m=i-t.bottom-c>a,h=t.left-n+d>a,g=n-t.right-u>a;return f||m||h||g}))}(Oe().concat(U).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:I}:null})).filter(Boolean),e)&&(ce(),Ee(e))}function _e(e){xe(e)||q.props.trigger.indexOf("click")>=0&&F||(q.props.interactive?q.hideWithInteractivity(e):Ee(e))}function ke(e){q.props.trigger.indexOf("focusin")<0&&e.target!==te()||q.props.interactive&&e.relatedTarget&&U.contains(e.relatedTarget)||Ee(e)}function xe(e){return!!C.isTouch&&Z()!==e.type.indexOf("touch")>=0}function Ce(){De();var n=q.props,i=n.popperOptions,o=n.placement,a=n.offset,r=n.getReferenceClientRect,s=n.moveTransition,l=ee()?L(U).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||te()}:t,d=[{name:"offset",options:{offset:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(ee()){var n=ie().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];ee()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==i?void 0:i.modifiers)||[]),q.popperInstance=e.createPopper(c,U,Object.assign({},i,{placement:o,onFirstUpdate:M,modifiers:d}))}function De(){q.popperInstance&&(q.popperInstance.destroy(),q.popperInstance=null)}function Oe(){return f(U.querySelectorAll("[data-tippy-root]"))}function Me(e){q.clearDelayTimeouts(),e&&re("onTrigger",[q,e]),fe();var t=oe(!0),n=X(),i=n[0],o=n[1];C.isTouch&&"hold"===i&&o&&(t=o),t?c=setTimeout((function(){q.show()}),t):q.show()}function Ee(e){if(q.clearDelayTimeouts(),re("onUntrigger",[q,e]),q.state.isVisible){if(!(q.props.trigger.indexOf("mouseenter")>=0&&q.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&F)){var t=oe(!1);t?g=setTimeout((function(){q.state.isVisible&&q.hide()}),t):y=requestAnimationFrame((function(){q.hide()}))}}else me()}}function R(e,t){void 0===t&&(t={});var n=T.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",O,i),window.addEventListener("blur",E);var o=Object.assign({},t,{plugins:n}),a=function(e){return g(e)?[e]:function(e){return r(e,"NodeList")}(e)?f(e):Array.isArray(e)?e:f(document.querySelectorAll(e))}(e).reduce((function(e,t){var n=t&&z(t,o);return n&&e.push(n),e}),[]);return g(e)?a[0]:a}R.defaultProps=T,R.setDefaultProps=function(e){Object.keys(e).forEach((function(t){T[t]=e[t]}))},R.currentInput=C;var V=Object.assign({},e.applyStyles,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Y={mouseover:"mouseenter",focusin:"focus",click:"click"},W={name:"animateFill",defaultValue:!1,fn:function(e){var t;if(null==(t=e.props.render)||!t.$$tippy)return{};var n=L(e.popper),i=n.box,o=n.content,a=e.props.animateFill?function(){var e=h();return e.className="tippy-backdrop",w([e],"hidden"),e}():null;return{onCreate:function(){a&&(i.insertBefore(a,i.firstElementChild),i.setAttribute("data-animatefill",""),i.style.overflow="hidden",e.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(a){var e=i.style.transitionDuration,t=Number(e.replace("ms",""));o.style.transitionDelay=Math.round(t/10)+"ms",a.style.transitionDuration=e,w([a],"visible")}},onShow:function(){a&&(a.style.transitionDuration="0ms")},onHide:function(){a&&w([a],"hidden")}}}},q={clientX:0,clientY:0},B=[];function U(e){var t=e.clientX,n=e.clientY;q={clientX:t,clientY:n}}var K={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,n=_(e.props.triggerTarget||t),i=!1,o=!1,a=!0,r=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function l(){n.addEventListener("mousemove",u)}function c(){n.removeEventListener("mousemove",u)}function d(){i=!0,e.setProps({getReferenceClientRect:null}),i=!1}function u(n){var i=!n.target||t.contains(n.target),o=e.props.followCursor,a=n.clientX,r=n.clientY,s=t.getBoundingClientRect(),l=a-s.left,c=r-s.top;!i&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),n=a,i=r;"initial"===o&&(n=e.left+l,i=e.top+c);var s="horizontal"===o?e.top:i,d="vertical"===o?e.right:n,u="horizontal"===o?e.bottom:i,p="vertical"===o?e.left:n;return{width:d-p,height:u-s,top:s,right:d,bottom:u,left:p}}})}function p(){e.props.followCursor&&(B.push({instance:e,doc:n}),function(e){e.addEventListener("mousemove",U)}(n))}function f(){0===(B=B.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===n})).length&&function(e){e.removeEventListener("mousemove",U)}(n)}return{onCreate:p,onDestroy:f,onBeforeUpdate:function(){r=e.props},onAfterUpdate:function(t,n){var a=n.followCursor;i||void 0!==a&&r.followCursor!==a&&(f(),a?(p(),!e.state.isMounted||o||s()||l()):(c(),d()))},onMount:function(){e.props.followCursor&&!o&&(a&&(u(q),a=!1),s()||l())},onTrigger:function(e,t){v(t)&&(q={clientX:t.clientX,clientY:t.clientY}),o="focus"===t.type},onHidden:function(){e.props.followCursor&&(d(),c(),a=!0)}}}},J={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t,n=e.reference,i=-1,o=!1,a=[],r={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var r=o.state;e.props.inlinePositioning&&(-1!==a.indexOf(r.placement)&&(a=[]),t!==r.placement&&-1===a.indexOf(r.placement)&&(a.push(r.placement),e.setProps({getReferenceClientRect:function(){return function(e){return function(e,t,n,i){if(n.length<2||null===e)return t;if(2===n.length&&i>=0&&n[0].left>n[1].right)return n[i]||t;switch(e){case"top":case"bottom":var o=n[0],a=n[n.length-1],r="top"===e,s=o.top,l=a.bottom,c=r?o.left:a.left,d=r?o.right:a.right;return{top:s,bottom:l,left:c,right:d,width:d-c,height:l-s};case"left":case"right":var u=Math.min.apply(Math,n.map((function(e){return e.left}))),p=Math.max.apply(Math,n.map((function(e){return e.right}))),f=n.filter((function(t){return"left"===e?t.left===u:t.right===p})),m=f[0].top,h=f[f.length-1].bottom;return{top:m,bottom:h,left:u,right:p,width:p-u,height:h-m};default:return t}}(p(e),n.getBoundingClientRect(),f(n.getClientRects()),i)}(r.placement)}})),t=r.placement)}};function s(){var t;o||(t=function(e,t){var n;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat(((null==(n=e.popperOptions)?void 0:n.modifiers)||[]).filter((function(e){return e.name!==t.name})),[t])})}}(e.props,r),o=!0,e.setProps(t),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(t,n){if(v(n)){var o=f(e.reference.getClientRects()),a=o.find((function(e){return e.left-2<=n.clientX&&e.right+2>=n.clientX&&e.top-2<=n.clientY&&e.bottom+2>=n.clientY})),r=o.indexOf(a);i=r>-1?r:i}},onHidden:function(){i=-1}}}},G={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function i(t){return!0===e.props.sticky||e.props.sticky===t}var o=null,a=null;function r(){var s=i("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,l=i("popper")?n.getBoundingClientRect():null;(s&&X(o,s)||l&&X(a,l))&&e.popperInstance&&e.popperInstance.update(),o=s,a=l,e.state.isMounted&&requestAnimationFrame(r)}return{onMount:function(){e.props.sticky&&r()}}}};function X(e,t){return!e||!t||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}return t&&function(e){var t=document.createElement("style");t.textContent='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}',t.setAttribute("data-tippy-stylesheet","");var n=document.head,i=document.querySelector("head>style,head>link");i?n.insertBefore(t,i):n.appendChild(t)}(),R.setDefaultProps({plugins:[W,K,J,G],render:H}),R.createSingleton=function(e,t){var n;void 0===t&&(t={});var i,o=e,a=[],r=[],s=t.overrides,l=[],u=!1;function p(){r=o.map((function(e){return d(e.props.triggerTarget||e.reference)})).reduce((function(e,t){return e.concat(t)}),[])}function f(){a=o.map((function(e){return e.reference}))}function m(e){o.forEach((function(t){e?t.enable():t.disable()}))}function g(e){return o.map((function(t){var n=t.setProps;return t.setProps=function(o){n(o),t.reference===i&&e.setProps(o)},function(){t.setProps=n}}))}function v(e,t){var n=r.indexOf(t);if(t!==i){i=t;var l=(s||[]).concat("content").reduce((function(e,t){return e[t]=o[n].props[t],e}),{});e.setProps(Object.assign({},l,{getReferenceClientRect:"function"==typeof l.getReferenceClientRect?l.getReferenceClientRect:function(){var e;return null==(e=a[n])?void 0:e.getBoundingClientRect()}}))}}m(!1),f(),p();var y={fn:function(){return{onDestroy:function(){m(!0)},onHidden:function(){i=null},onClickOutside:function(e){e.props.showOnCreate&&!u&&(u=!0,i=null)},onShow:function(e){e.props.showOnCreate&&!u&&(u=!0,v(e,a[0]))},onTrigger:function(e,t){v(e,t.currentTarget)}}}},b=R(h(),Object.assign({},c(t,["overrides"]),{plugins:[y].concat(t.plugins||[]),triggerTarget:r,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(n=t.popperOptions)?void 0:n.modifiers)||[],[V])})})),w=b.show;b.show=function(e){if(w(),!i&&null==e)return v(b,a[0]);if(!i||null!=e){if("number"==typeof e)return a[e]&&v(b,a[e]);if(o.indexOf(e)>=0){var t=e.reference;return v(b,t)}return a.indexOf(e)>=0?v(b,e):void 0}},b.showNext=function(){var e=a[0];if(!i)return b.show(0);var t=a.indexOf(i);b.show(a[t+1]||e)},b.showPrevious=function(){var e=a[a.length-1];if(!i)return b.show(e);var t=a.indexOf(i),n=a[t-1]||e;b.show(n)};var _=b.setProps;return b.setProps=function(e){s=e.overrides||s,_(e)},b.setInstances=function(e){m(!0),l.forEach((function(e){return e()})),o=e,m(!1),f(),p(),l=g(b),b.setProps({triggerTarget:r})},l=g(b),b},R.delegate=function(e,t){var n=[],o=[],a=!1,r=t.target,s=c(t,["target"]),l=Object.assign({},s,{trigger:"manual",touch:!1}),u=Object.assign({touch:T.touch},s,{showOnCreate:!0}),p=R(e,l);function f(e){if(e.target&&!a){var n=e.target.closest(r);if(n){var i=n.getAttribute("data-tippy-trigger")||t.trigger||T.trigger;if(!n._tippy&&!("touchstart"===e.type&&"boolean"==typeof u.touch||"touchstart"!==e.type&&i.indexOf(Y[e.type])<0)){var s=R(n,u);s&&(o=o.concat(s))}}}}function m(e,t,i,o){void 0===o&&(o=!1),e.addEventListener(t,i,o),n.push({node:e,eventType:t,handler:i,options:o})}return d(p).forEach((function(e){var t=e.destroy,r=e.enable,s=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&o.forEach((function(e){e.destroy()})),o=[],n.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,o=e.options;t.removeEventListener(n,i,o)})),n=[],t()},e.enable=function(){r(),o.forEach((function(e){return e.enable()})),a=!1},e.disable=function(){s(),o.forEach((function(e){return e.disable()})),a=!0},function(e){var t=e.reference;m(t,"touchstart",f,i),m(t,"mouseover",f),m(t,"focusin",f),m(t,"click",f)}(e)})),p},R.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;Q.forEach((function(e){var t=!1;if(n&&(t=y(n)?e.reference===n:e.popper===n.popper),!t){var o=e.props.duration;e.setProps({duration:i}),e.hide(),e.state.isDestroyed||e.setProps({duration:o})}}))},R.roundArrow='',R})),function(e,t){"function"==typeof define&&define.amd?define("sifter",t):"object"==typeof exports?module.exports=t():e.Sifter=t()}(this,(function(){function e(e,t){this.items=e,this.settings=t||{diacritics:!0}}e.prototype.tokenize=function(e,t){if(!(e=o(String(e||"").toLowerCase()))||!e.length)return[];for(var n,i,r=[],l=e.split(/ +/),c=0,d=l.length;c/g,">").replace(/"/g,""")}function s(e,t,n){var i,o=e.trigger,a={};for(i in e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return o.apply(e,arguments);a[n]=arguments},n.apply(e,[]),e.trigger=o,a)a.hasOwnProperty(i)&&o.apply(e,a[i])}function l(e){var t,n,i={};return void 0===e?console.warn("WARN getSelection cannot locate input control"):"selectionStart"in e?(i.start=e.selectionStart,i.length=e.selectionEnd-i.start):document.selection&&(e.focus(),t=document.selection.createRange(),n=document.selection.createRange().text.length,t.moveStart("character",-e.value.length),i.start=t.text.length-n,i.length=n),i}function c(t,n){return t?(v.$testInput||(v.$testInput=e("").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),e("
              ").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(v.$testInput).appendTo("body")),v.$testInput.text(t),g(n,v.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),v.$testInput.width()):0}e.fn.removeHighlight=function(){return this.find("span.highlight").each((function(){this.parentNode.firstChild.nodeName;var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()})).end()},i.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},e in this._events!=0)for(var t=0;t").addClass(a.wrapperClass).addClass(v).addClass(g),b=e("
              ").addClass(a.inputClass).addClass("items").appendTo(y),w=e('').appendTo(b).attr("tabindex",h.is(":disabled")?"-1":o.tabIndex),_=e(a.dropdownParent||y);g=e("
              ").addClass(a.dropdownClass).addClass(g).hide().appendTo(_),_=e("
              ").addClass(a.dropdownContentClass).attr("tabindex","-1").appendTo(g);(n=h.attr("id"))&&(w.attr("id",n+"-selectized"),e("label[for='"+n+"']").attr("for",n+"-selectized")),o.settings.copyClassesToDropdown&&g.addClass(v),y.css({width:h[0].style.width}),o.plugins.names.length&&(n="plugin-"+o.plugins.names.join(" plugin-"),y.addClass(n),g.addClass(n)),(null===a.maxItems||1[data-selectable]",(function(e){e.stopImmediatePropagation()})),g.on("mouseenter","[data-selectable]",(function(){return o.onOptionHover.apply(o,arguments)})),g.on("mousedown click","[data-selectable]",(function(){return o.onOptionSelect.apply(o,arguments)})),n="mousedown",v="*:not(input)",i=function(){return o.onItemSelect.apply(o,arguments)},(t=b).on(n,v,(function(e){for(var n=e.target;n&&n.parentNode!==t[0];)n=n.parentNode;return e.currentTarget=n,i.apply(this,[e])})),function(e){function t(t,i){var o,a,r;i=i||{},(t=t||window.event||{}).metaKey||t.altKey||!i.force&&!1===e.data("grow")||(i=e.val(),t.type&&"keydown"===t.type.toLowerCase()&&(o=48<=(a=t.keyCode)&&a<=57||65<=a&&a<=90||96<=a&&a<=111||186<=a&&a<=222||32===a,46===a||8===a?(r=l(e[0])).length?i=i.substring(0,r.start)+i.substring(r.start+r.length):8===a&&r.start?i=i.substring(0,r.start-1)+i.substring(r.start+1):46===a&&void 0!==r.start&&(i=i.substring(0,r.start)+i.substring(r.start+1)):o&&(a=t.shiftKey,r=String.fromCharCode(t.keyCode),i+=r=a?r.toUpperCase():r.toLowerCase())),t=(o=e.attr("placeholder"))?c(o,e)+4:0,(a=Math.max(c(i,e),t)+4)!==n&&(n=a,e.width(a),e.triggerHandler("resize")))}var n=null;e.on("keydown keyup update blur",t),t()}(w),b.on({mousedown:function(){return o.onMouseDown.apply(o,arguments)},click:function(){return o.onClick.apply(o,arguments)}}),w.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return o.onKeyDown.apply(o,arguments)},keypress:function(){return o.onKeyPress.apply(o,arguments)},input:function(){return o.onInput.apply(o,arguments)},resize:function(){o.positionDropdown.apply(o,[])},blur:function(){return o.onBlur.apply(o,arguments)},focus:function(){return o.ignoreBlur=!1,o.onFocus.apply(o,arguments)},paste:function(){return o.onPaste.apply(o,arguments)}}),d.on("keydown"+r,(function(e){o.isCmdDown=e[u?"metaKey":"ctrlKey"],o.isCtrlDown=e[u?"altKey":"ctrlKey"],o.isShiftDown=e.shiftKey})),d.on("keyup"+r,(function(e){e.keyCode===f&&(o.isCtrlDown=!1),16===e.keyCode&&(o.isShiftDown=!1),e.keyCode===p&&(o.isCmdDown=!1)})),d.on("mousedown"+r,(function(e){if(o.isFocused){if(e.target===o.$dropdown[0]||e.target.parentNode===o.$dropdown[0])return!1;o.$control.has(e.target).length||e.target===o.$control[0]||o.blur(e.target)}})),s.on(["scroll"+r,"resize"+r].join(" "),(function(){o.isOpen&&o.positionDropdown.apply(o,arguments)})),s.on("mousemove"+r,(function(){o.ignoreHover=!1})),this.revertSettings={$children:h.children().detach(),tabindex:h.attr("tabindex")},h.attr("tabindex",-1).hide().after(o.$wrapper),Array.isArray(a.items)&&(o.lastValidValue=a.items,o.setValue(a.items),delete a.items),m&&h.on("invalid"+r,(function(e){e.preventDefault(),o.isInvalid=!0,o.refreshState()})),o.updateOriginalInput(),o.refreshItems(),o.refreshState(),o.updatePlaceholder(),o.isSetup=!0,h.is(":disabled")&&o.disable(),o.on("change",this.onChange),h.data("selectize",o),h.addClass("selectized"),o.trigger("initialize"),!0===a.preload&&o.onSearchChange("")},setupTemplates:function(){var t=this.settings.labelField,n=this.settings.valueField,i=this.settings.optgroupLabelField;this.settings.render=e.extend({},{optgroup:function(e){return'
              '+e.html+"
              "},optgroup_header:function(e,t){return'
              '+t(e[i])+"
              "},option:function(e,i){return'
              '+i(e[t])+"
              "},item:function(e,n){return'
              '+n(e[t])+"
              "},option_create:function(e,t){return'
              Add '+t(e.input)+"
              "}},this.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]])&&this.on(e,t)},onClick:function(e){this.isFocused&&this.isOpen||(this.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,i=t.isDefaultPrevented();if(e(t.target),n.isFocused){if(t.target!==n.$control_input[0])return"single"===n.settings.mode?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout((function(){n.focus()}),0)},onChange:function(){""!==this.getValue()&&(this.lastValidValue=this.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(e){var t=this;t.isFull()||t.isInputHidden||t.isLocked?e.preventDefault():t.settings.splitOn&&setTimeout((function(){var e=t.$control_input.val();if(e.match(t.settings.splitOn))for(var n=e.trim().split(t.settings.splitOn),i=0,o=n.length;i=this.settings.maxItems},updateOriginalInput:function(e){var t,n,i,o;if(e=e||{},1===this.tagType){for(i=[],t=0,n=this.items.length;t'+r(o)+"");i.length||this.$input.attr("multiple")||i.push(''),this.$input.html(i.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&!e.silent&&this.trigger("change",this.$input.val())},updatePlaceholder:function(){var e;this.settings.placeholder&&(e=this.$control_input,this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0}))},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var e=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.isBlurring&&this.$control_input.blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),e&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e[0].getBoundingClientRect().width,top:t.top,left:t.left})},clear:function(e){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:e}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function(e){var t=Math.min(this.caretPos,this.items.length),n=(e=e[0],this.buffer||this.$control[0]);0===t?n.insertBefore(e,n.firstChild):n.insertBefore(e,n.childNodes[t]),this.setCaret(t+1)},deleteSelection:function(t){var n,i,o,a,r,s=t&&8===t.keyCode?-1:1,c=l(this.$control_input[0]);if(this.$activeOption&&!this.settings.hideSelected&&(a=("string"==typeof this.settings.deselectBehavior&&"top"===this.settings.deselectBehavior?this.getFirstOption():this.getAdjacentOption(this.$activeOption,-1)).attr("data-value")),o=[],this.$activeItems.length){for(r=this.$control.children(".active:"+(0'+o.emptyOptionLabel+""+u)),("select"===c?n:function(t,n){var i,a,c,d,u=t.attr(r);if(u)for(n.options=JSON.parse(u),i=0,a=n.options.length;iwindow.innerHeight?e:t,{width:n.outerWidth(),left:i.left});o===e?(Object.assign(a,{bottom:i.top,top:"unset",margin:"0 0 5px 0"}),this.$dropdown.addClass("selectize-position-top")):(Object.assign(a,{top:i.top,bottom:"unset",margin:"5px 0 0 0"}),this.$dropdown.removeClass("selectize-position-top")),this.$dropdown.css(a)}})),v.define("auto_select_on_type",(function(e){var t,n=this;n.onBlur=(t=n.onBlur,function(e){var i=n.getFirstItemMatchedByTextContent(n.lastValue,!0);return void 0!==i.attr("data-value")&&n.getValue()!==i.attr("data-value")&&n.setValue(i.attr("data-value")),t.apply(this,arguments)})})),v.define("autofill_disable",(function(e){var t,n=this;n.setup=(t=n.setup,function(){t.apply(n,arguments),n.$control_input.attr({autocomplete:"new-password",autofill:"no"})})})),v.define("drag_drop",(function(t){if(!e.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');var n,i;"multi"===this.settings.mode&&((n=this).lock=(i=n.lock,function(){var e=n.$control.data("sortable");return e&&e.disable(),i.apply(n,arguments)}),n.unlock=function(){var e=n.unlock;return function(){var t=n.$control.data("sortable");return t&&t.enable(),e.apply(n,arguments)}}(),n.setup=function(){var t=n.setup;return function(){t.apply(this,arguments);var i=n.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:n.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width")),i.addClass("dragging")},stop:function(){i.removeClass("dragging");var t=n.$activeItems?n.$activeItems.slice():null,o=[];i.children("[data-value]").each((function(){o.push(e(this).attr("data-value"))})),n.isFocused=!1,n.setValue(o),n.isFocused=!0,n.setActiveItem(t),n.positionDropdown()}})}}())})),v.define("dropdown_header",(function(t){var n,i=this;t=e.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'
              '+e.title+'×
              '}},t),i.setup=(n=i.setup,function(){n.apply(i,arguments),i.$dropdown_header=e(t.html(t)),i.$dropdown.prepend(i.$dropdown_header)})})),v.define("optgroup_columns",(function(t){function n(){var n,i,r,s,l=e("[data-group]",o.$dropdown_content),c=l.length;if(c&&o.$dropdown_content.width()){if(t.equalizeHeight){for(n=i=0;n
              ',e=e.firstChild,n.body.appendChild(e),t=a.width=e.offsetWidth-e.clientWidth,n.body.removeChild(e)),t});(t.equalizeHeight||t.equalizeWidth)&&(h(this,"positionDropdown",n),h(this,"refreshOptions",n))})),v.define("remove_button",(function(t){t=e.extend({label:"×",title:"Remove",className:"remove",append:!0},t),("single"===this.settings.mode?function(t,n){n.className="remove-single";var i,o=t,a=''+n.label+"";t.setup=(i=o.setup,function(){var r,s;n.append&&(r=e(o.$input.context).attr("id"),e("#"+r),s=o.settings.render.item,o.settings.render.item=function(n){return i=s.apply(t,arguments),o=a,e("").append(i).append(o);var i,o}),i.apply(t,arguments),t.$control.on("click","."+n.className,(function(e){e.preventDefault(),o.isLocked||o.clear()}))})}:function(t,n){var i,o=t,a=''+n.label+"";t.setup=(i=o.setup,function(){var r;n.append&&(r=o.settings.render.item,o.settings.render.item=function(e){return n=r.apply(t,arguments),i=a,o=n.search(/(<\/[^>]+>\s*)$/),n.substring(0,o)+i+n.substring(o);var n,i,o}),i.apply(t,arguments),t.$control.on("click","."+n.className,(function(t){if(t.preventDefault(),!o.isLocked)return t=e(t.currentTarget).parent(),o.setActiveItem(t),o.deleteSelection()&&o.setCaret(o.items.length),!1}))})})(this,t)})),v.define("restore_on_backspace",(function(e){var t;e.text=e.text||function(e){return e[this.settings.labelField]},this.onKeyDown=(t=this.onKeyDown,function(n){var i;return 8===n.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(i=this.caretPos-1)&&i"+(i.length-o)+""))}}}(),this.onFocus=function(){const e=n.onFocus;return function(t){if(e.apply(this,t),t){const e=this.$control;e.find(".item").show(),e.find("span").remove()}}}()})),v})), +/*! + * selectize click2deselect (custom) + */ +Selectize.define("click2deselect",(function(e){var t=this,n=t.setup;this.setup=function(){n.apply(t,arguments),t.$dropdown.on("click","[data-selectable]",(function(e){let n=this.getAttribute("data-value");return this.classList.contains("selected")&&(t.removeItem(n),t.refreshItems(),t.refreshOptions()),!1})),t.on("item_remove",(function(e){t.getOption(e).removeClass("selected")}))}})); +//# sourceMappingURL=events-manager.min.js.map \ No newline at end of file diff --git a/tests/test_rewriting.py b/tests/test_rewriting.py index b2897fc1..5715ad58 100644 --- a/tests/test_rewriting.py +++ b/tests/test_rewriting.py @@ -38,6 +38,7 @@ def generate_and_call( set(), set(), set(), + ["UTF-8", "ISO-8859-1"], ).rewrite(Template(""), Template("")) yield generate_and_call diff --git a/tests/test_utils.py b/tests/test_utils.py index 6a1309ab..38252c46 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,7 @@ +import json +from collections.abc import Generator from dataclasses import dataclass +from pathlib import Path import pytest @@ -25,7 +28,9 @@ def __init__(self, content: str, encoding: str): @pytest.fixture( params=[ "Simple ascii content", - "A content with non ascii char éœo€ð", + "A content with non ascii chars éœo€ð", + "Latin1 contént", + "Latin2 conteňt", "这是中文文本", # "This is a chinese text" (in chinese) ] ) @@ -40,6 +45,7 @@ def content(request): "utf-16", "utf-32", "latin1", + "latin2", "gb2312", "gbk", ] @@ -53,214 +59,116 @@ def simple_encoded_content(content, encoding): return EncodedForTest(content, encoding) -def test_decode(simple_encoded_content): +def test_decode_http_header(simple_encoded_content): if not simple_encoded_content.valid: # Nothing to test return - result = to_string(simple_encoded_content.encoded, None) - assert result.value == simple_encoded_content.content - assert result.encoding - assert not result.chars_ignored - - -@pytest.fixture( - params=[ - "ascii", - "utf-8", - "utf-16", - "utf-32", - "latin1", - "gb2312", - "gbk", - "wrong-encoding", - ] -) -def declared_encoding(request): - return request.param - - -# This is a set of content/encoding/decoding that we know to fail. -# For exemple, the content "Simple ascii content" encoded using ascii, can be decoded -# by utf-16. However, it doesn't mean that it decoded it correctly. -# In this case, "utf-16" decoded it as "...." -# And this combination is not only based on the tuple encoding/decoding. -# The content itself may inpact if we can decode the bytes, and so if we try heuristics -# or not. No real choice to maintain a dict of untestable configuration. -FAILING_DECODE_COMBINATION = { - # Encodings/decodings failing for simple ascii content - "Simple ascii content": { - # Decoding failing for simple ascii content encoded in ascii - "ascii": ["utf-16"], - # Decoding failing for simple ascii content encoded in utf-8 - "utf-8": [ - "utf-16", - "utf-32", - "gb2312", - "gbk", - ], - "utf-16": ["latin1"], - "utf-32": ["utf-16", "latin1"], - "latin1": ["utf-16"], - "gb2312": ["utf-16"], - "gbk": ["utf-16"], - }, - "A content with non ascii char éœo€ð": { - "ascii": [], - "utf-8": ["utf-16", "latin1"], - "utf-16": ["latin1"], - "utf-32": ["utf-16", "latin1"], - "latin1": [], - "gb2312": [], - "gbk": [], - }, - "这是中文文本": { - "ascii": [], - "utf-8": ["utf-16", "latin1"], - "utf-16": ["latin1"], - "utf-32": ["utf-16", "latin1"], - "latin1": [], - "gb2312": ["utf-16", "latin1"], - "gbk": ["utf-16", "latin1"], - }, -} + assert ( + to_string(simple_encoded_content.encoded, simple_encoded_content.encoding, []) + == simple_encoded_content.content + ) @dataclass -class DeclaredEncodedForTest(EncodedForTest): - declared_encoding: str - correct: bool - - def __init__(self, content: str, encoding: str, declared_encoding: str): - super().__init__(content, encoding) - self.declared_encoding = declared_encoding - self.correct = self.valid - if ( - self.valid - and content in FAILING_DECODE_COMBINATION - and declared_encoding in FAILING_DECODE_COMBINATION[content][encoding] - ): - self.correct = False +class DeclaredHtmlEncodedForTest(EncodedForTest): + def __init__(self, content: str, encoding: str): + html_content = f'{content}' + super().__init__(html_content, encoding) @pytest.fixture -def declared_encoded_content(content, encoding, declared_encoding): - return DeclaredEncodedForTest(content, encoding, declared_encoding) +def declared_html_encoded_content(content, encoding): + return DeclaredHtmlEncodedForTest(content, encoding) -def test_declared_decode(declared_encoded_content): - test_case = declared_encoded_content +def test_decode_html_header(declared_html_encoded_content): + test_case = declared_html_encoded_content if not test_case.valid: return + assert to_string(test_case.encoded, None, []) == test_case.content - result = to_string(test_case.encoded, test_case.declared_encoding) - if test_case.correct: - assert result.value == test_case.content - assert result.encoding - assert not result.chars_ignored - - -# This is a set of content/encoding/decoding that we know to fail. -# For exemple, the content "Simple ascii content" encoded using ascii, can be decoded -# by utf-16. However, it doesn't mean that it decoded it correctly. -# In this case, "utf-16" decoded it as "...." -# And this combination is not only based on the tuple encoding/decoding. -# The content itself may inpact if we can decode the bytes, and so if we try heuristics -# or not. No real choice to maintain a dict of untestable configuration. -FAILING_DECODE_HTML_COMBINATION = { - # All encoding/declared_encodingcoding failing for simple ascii content - "Simple ascii content": { - "ascii": [], - "utf-8": [], - "utf-16": [], - "utf-32": [], - "latin1": [], - "gb2312": [], - "gbk": [], - }, - "A content with non ascii char éœo€ð": { - "ascii": [], - "utf-8": ["latin1"], - "utf-16": [], - "utf-32": [], - "latin1": [], - "gb2312": [], - "gbk": [], - }, - "这是中文文本": { - "ascii": [], - "utf-8": ["latin1"], - "utf-16": [], - "utf-32": [], - "latin1": [], - "gb2312": ["latin1"], - "gbk": ["latin1"], - }, -} +def test_decode_str(content, encoding): + result = to_string(content, encoding, []) + assert result == content -@dataclass -class DeclaredHtmlEncodedForTest(DeclaredEncodedForTest): - declared_encoding: str - correct: bool - - def __init__(self, content: str, encoding: str, declared_encoding: str): - html_content = ( - f'{content}' - ) - super().__init__(html_content, encoding, declared_encoding) - self.correct = self.valid - if ( - self.valid - and declared_encoding in FAILING_DECODE_HTML_COMBINATION[content][encoding] - ): - self.correct = False +def test_binary_content(): + content = "Hello, 你好".encode("utf-32") + content = bytes([0xEF, 0xBB, 0xBF]) + content + # [0xEF, 0xBB, 0xBF] is a BOM marker for utf-8 + # It will trick chardet to be really confident it is utf-8. + # However, this cannot be properly decoded using utf-8 ; but a value is still + # returned, since upstream server promised this is utf-8 + assert to_string(content, "UTF-8", []) -@pytest.fixture -def declared_html_encoded_content(content, encoding, declared_encoding): - return DeclaredHtmlEncodedForTest(content, encoding, declared_encoding) +def test_single_bad_character(): + content = bytes([0xEF, 0xBB, 0xBF]) + b"prem" + bytes([0xC3]) + "ière".encode() + # [0xEF, 0xBB, 0xBF] is a BOM marker for utf-8-sig + # 0xC3 is a bad character (nothing in utf-8-sig at this position) + result = to_string(content, "utf-8-sig", []) + assert result == "prem�ière" -def test_declared_decode_html(declared_html_encoded_content): - test_case = declared_html_encoded_content - if not test_case.valid: +def test_decode_charset_to_try(simple_encoded_content): + if not simple_encoded_content.valid: + # Nothing to test return + assert ( + to_string( + simple_encoded_content.encoded, None, [simple_encoded_content.encoding] + ) + == simple_encoded_content.content + ) - result = to_string(test_case.encoded, None) - if test_case.correct: - assert result.value == test_case.content - assert result.encoding - assert not result.chars_ignored +def test_decode_weird_encoding_not_declared_not_in_try_list(): + with pytest.raises(ValueError): + to_string("Latin1 contént".encode("latin1"), None, ["UTF-8"]) -def test_decode_str(content, declared_encoding): - result = to_string(content, declared_encoding) - assert result.value == content - assert result.encoding is None - assert not result.chars_ignored +def test_decode_weird_encoding_not_declared_in_try_list(): + content = "Latin1 contént" + assert to_string(content.encode("latin1"), None, ["UTF-8", "latin1"]) == content -def test_binary_content(): - content = "Hello, 你好".encode("utf-32") - content = bytes([0xEF, 0xBB, 0xBF]) + content - # [0xEF, 0xBB, 0xBF] is a BOM marker for utf-8 - # It will trick chardet to be really confident it is utf-8. - # However, this cannot be decoded using utf-8 - with pytest.raises(ValueError): - assert to_string(content, None) - # Make coverage pass on code avoiding us to try the same encoding twice - result = to_string(content, "UTF-8-SIG") - assert result.encoding == "UTF-8-SIG" - assert result.chars_ignored +@dataclass +class CharsetsTestData: + filename: str + probable_charset: str | None # probable charset to use + known_charset: str | None # charset we know is being used (fake file typically) + http_charset: ( + str | None + ) # encoding to pass as http header because file is missing details and encoding is + # not standard + expected_strings: list[str] + + +def get_testdata() -> Generator[CharsetsTestData, None, None]: + data = json.loads( + (Path(__file__).parent / "encodings" / "definition.json").read_bytes() + ) + for file in data["files"]: + yield CharsetsTestData( + filename=file["filename"], + probable_charset=file.get("probable_charset", None), + known_charset=file.get("known_charset", None), + http_charset=file.get("http_charset", None), + expected_strings=file.get("expected_strings", []), + ) + +def get_testdata_id(test_data: CharsetsTestData) -> str: + return test_data.filename -def test_single_bad_character(): - content = bytes([0xEF, 0xBB, 0xBF]) + b"prem" + bytes([0xC3]) + "ière".encode() - # [0xEF, 0xBB, 0xBF] is a BOM marker for utf-8-sig - # 0xC3 is a bad character (nothing in utf-8-sig at this position) - result = to_string(content, "utf-8-sig") - assert result.value == "première" - assert result.encoding == "utf-8-sig" - assert result.chars_ignored + +@pytest.mark.parametrize("testdata", get_testdata(), ids=get_testdata_id) +def test_decode_files(testdata: CharsetsTestData): + result = to_string( + (Path(__file__).parent / "encodings" / testdata.filename).read_bytes(), + testdata.http_charset, + ["UTF-8", "latin1"], + ) + for expected_string in testdata.expected_strings: + assert expected_string in result